Re: How to get Error Number and Error Message 2nd Try
Paul DuBois wrote: On Feb 10, 2009, at 11:26 PM, Al wrote: I know that all of the prgramming interfaces have the ability to issue a Function Call to get error number for the most recently invoked MySQL function and the error message for the most recently invoked MySQL function such as in C using *mysql_errno() etc. BUT * Surely there is a way to get the SAME info via a SQL statment or function I know one can do a ** select @@error_count as errorcount; to get the COUNT of errors, Surely there is SOMETHING similar to get the latest ERROR NUMBER and latest ERROR MESSAGE, SHOW WARNINGS might help. http://dev.mysql.com/doc/refman/5.1/en/show-warnings.html Indeed it will, bu if you need via a SQL QUERY to return that info, HOW can one get to it. I mean since I can use Straight SQL to get to the COUNT of errors, it just seems there would HAVE to be a FUNCTION or USER_VARIABLE that would contain this info Has Anybody found such a way THX -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
MySQL University session on Feb 19: Developing MySQL on Solaris
Developing MySQL on Solaris http://forge.mysql.com/wiki/Developing_MySQL_on_Solaris This Thursday (February 19th, 14:00 UTC), MC Brown Trond Norbye will give a MySQL University session on Developing MySQL on Solaris. MC works on the MySQL Documentation Team and has been involved with quite a few Solaris things, for example porting MySQL to openSolaris. Trond has been involved with many things, including openSolaris, as you can see from his blog (http://blogs.sun.com/trond/). For MySQL University sessions, point your browser to this page: http://webmeeting.dimdim.com/portal/JoinForm.action?confKey=mysqluniversity You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the conferencing system we're using for MySQL University sessions. It provides integrated voice streaming, chat, whiteboard, session recording, and more.) MySQL University is a free educational online program for engineers/developers. MySQL University sessions are open to anyone, not just Sun employees. Sessions are recorded (slides and audio), so if you can't attend the live session you can look at the recording anytime after the session. Here's the schedule for the upcoming weeks (see http://forge.mysql.com/wiki/MySQL_University for a better format of this list): February 19, 2009 14:00 UTC / 8am CST (Central) / 9am EST (Eastern) / 14:00 GMT / 15:00 CET / 17:00 MDT (Moscow) Developing MySQL on Solaris MC Brown Trond Norbye February 26, 2009 14:00 UTC / 8am CST (Central) / 9am EST (Eastern) / 14:00 GMT / 15:00 CET / 17:00 MDT (Moscow) Backing up MySQL using file system snapshotsLenz Grimmer March 5, 2009 14:00 UTC / 8am CST (Central) / 9am EST (Eastern) / 14:00 GMT / 15:00 CET / 17:00 MDT (Moscow)Good Coding Style Konstantin Osipov March 12, 2009 14:00 UTC / 8am CST (Central) / 9am EST (Eastern) / 14:00 GMT / 15:00 CET / 17:00 MDT (Moscow) MySQL and ZFS MC Brown March 19, 2009 14:00 UTC / 8am CST (Central) / 9am EST (Eastern) / 14:00 BST / 15:00 CET / 17:00 MDT (Moscow) How to Use Charsets and Collations Properly Susanne Ebrecht Cheers, Stefan -- *** Sun Microsystems GmbHStefan Hinz Sonnenallee 1Manager Documentation, Database Group 85551 Kirchheim-Heimstetten Phone: +49-30-82702940 Germany Fax: +49-30-82702941 http://www.sun.de/mysql mailto: stefan.h...@sun.com Amtsgericht Muenchen: HRB161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering *** -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: SPARC to x64 Transition
Aaron, I've currently got a project to migrate a LARGE (3.5TB) MySQL data set from a Sun SPARC machine to a Sun x86 machine, both running Solaris 10 (though obviously one is x86 and the other is SPARC). Is it possible to simply copy the data files from one host to the other or is a full mysqldump/import necessary to preserve data integrity? If a file copy doesn't work, why specificially would it fail? Thanks, -Aaron you can simply copy the files, whether InnoDB or MyISAM. As far as I know, all modern processors use the same floating point format. And all integer and other data structures are platform independent in MyISAM and InnoDB. Best regards, Heikki Innobase/Oracle -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
what is best upgrade plan for large, replicating database?
I am beginning the process of upgrading a large mysql 5.0 database to 5.1. Specifically, I'm going from 5.0.56 enterprise to 5.1.30 community (which I think is now the GA version?) The db is about 4 terabytes. This means making a dump of the database, installing a new version of the dbms, and reloading the database, would take too long. Also the databases are replicating. I believe I need to upgrade the slaves first, the go to the master. I've read about the possibility of having to rebuild indexes, mainly due to collation changes. I didn't see any compatibility issues in going to 5.1.30, although I can certainly rebuild some indexes if I need to. Can I (after backing up the data) just install the new mysql code, run mysql_upgrade, and reasonably expect the database to work? What is time involved? If I can just install new binaries and point them to the old data, the time taken should not depend on the size of the database, should it (unless I have to rebuild some indexes)? Thanks, Jim -- Jim Lyons Web developer / Database administrator http://www.weblyons.com
Re: what is best upgrade plan for large, replicating database?
Jim, In my experience updating the binaries (or installing the new ones in addition to the old ones) works fine as long as you have made sure there are no incompatible changes. I have done this from 5.0 to 5.1 without any issues. Just run mysql_upgrade and you should be fine. I have never had to rebuild my indexes so I am not sure about that Olaf On 2/16/09 12:28 PM, Jim Lyons jlyons4...@gmail.com wrote: I am beginning the process of upgrading a large mysql 5.0 database to 5.1. Specifically, I'm going from 5.0.56 enterprise to 5.1.30 community (which I think is now the GA version?) The db is about 4 terabytes. This means making a dump of the database, installing a new version of the dbms, and reloading the database, would take too long. Also the databases are replicating. I believe I need to upgrade the slaves first, the go to the master. I've read about the possibility of having to rebuild indexes, mainly due to collation changes. I didn't see any compatibility issues in going to 5.1.30, although I can certainly rebuild some indexes if I need to. Can I (after backing up the data) just install the new mysql code, run mysql_upgrade, and reasonably expect the database to work? What is time involved? If I can just install new binaries and point them to the old data, the time taken should not depend on the size of the database, should it (unless I have to rebuild some indexes)? Thanks, Jim - Confidentiality Notice: The following mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. The recipient is responsible to maintain the confidentiality of this information and to use the information only for authorized purposes. If you are not the intended recipient (or authorized to receive information for the intended recipient), you are hereby notified that any review, use, disclosure, distribution, copying, printing, or action taken in reliance on the contents of this e-mail is strictly prohibited. If you have received this communication in error, please notify us immediately by reply e-mail and destroy all copies of the original message. Thank you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
accent sensitivity in fulltext search
Hi, How can I have accent sensitive, case insensitive fulltext query? version: 5.0.45 The database, tables, connection, data etc. are all utf8. select name from people where match(name) against ('königsberger' in boolean mode); shouldn't return konigsberger. Any idea, collation? Regards Salam -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Slow connection over VPN
We have an application using mysql. When we run it locally there are no issues. If we try and connect to a remote database machine over VPN it works but takes a VERY long time to get anything done. We are using the exact same database. All other programs using the same VPN run fine and the speed on the VPN has tested fine. Does anyone have any ideas? Kurt Duncan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: accent sensitivity in fulltext search
Hi, try to set the collation to utf8_unicode_ci. I have had the inverse problem and I solved with utf8_general_ci. Santino At 19:33 +0100 16-02-2009, Salam Baker Shanawa wrote: Hi, How can I have accent sensitive, case insensitive fulltext query? version: 5.0.45 The database, tables, connection, data etc. are all utf8. select name from people where match(name) against ('königsberger' in boolean mode); shouldn't return konigsberger. Any idea, collation? Regards Salam -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=santino.cusim...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: accent sensitivity in fulltext search
Thanks Santino, but unfortunately didn't help . I tried utf8_bin, just for checking, same results¸ Not even the case sensitivity is respected. The following queries return the same results: select name from people where match(name) against ('königsberger' in boolean mode); select name from people where match(name) against ('koNigsberger' in boolean mode); Königsberger konigsberger Could it be a version dependent problem? Regards Salam On Mon, 2009-02-16 at 20:26 +0100, Santino wrote: Hi, try to set the collation to utf8_unicode_ci. I have had the inverse problem and I solved with utf8_general_ci. Santino At 19:33 +0100 16-02-2009, Salam Baker Shanawa wrote: Hi, How can I have accent sensitive, case insensitive fulltext query? version: 5.0.45 The database, tables, connection, data etc. are all utf8. select name from people where match(name) against ('königsberger' in boolean mode); shouldn't return konigsberger. Any idea, collation? Regards Salam -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=santino.cusim...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
how to deal with multiple authors for one book
In my db there are a number of books with several authors; so, I am wondering how to set up a table on books and authors to be able to insert (via php-mysql pages) data and retrieve and display these books with several authors I suspect that to insert data for a multiple author book I will have to enter all data other than the author names into the book table and enter the authors in the author tables with foreign keys to reference the authors and their book. Then to retrieve and display the book,I would have to use some kind of join instruction with a where clause(regarding the position - 1st, 2nd, 3rd...) to retrieve the authors and their order. The order would probably be done by a third field (e.g. f_name, l_name, position) in the book_author table (tables in db - book, author, and book_author) Am I on the right track, here? -- Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: how to deal with multiple authors for one book
On Mon, Feb 16, 2009 at 5:20 PM, PJ af.gour...@videotron.ca wrote: In my db there are a number of books with several authors; so, I am wondering how to set up a table on books and authors to be able to insert (via php-mysql pages) data and retrieve and display these books with several authors I suspect that to insert data for a multiple author book I will have to enter all data other than the author names into the book table and enter the authors in the author tables with foreign keys to reference the authors and their book. Then to retrieve and display the book,I would have to use some kind of join instruction with a where clause(regarding the position - 1st, 2nd, 3rd...) to retrieve the authors and their order. The order would probably be done by a third field (e.g. f_name, l_name, position) in the book_author table (tables in db - book, author, and book_author) Am I on the right track, here? Close. You have to consider that this is a many-to-many relationship books may have many authors and authors may have many books. This will reuire the use of a linking table and it's there that I suggest you need too maintain your ordinal field (I use 'ordinal' by convention as 'order' is a SQL keyword) AUTHORS - authorid - name -- other fields BOOKS - bookid - title -- other fields A2B - bookid - authorid - ordinal -- - michael dykman - mdyk...@gmail.com - All models are wrong. Some models are useful. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: how to deal with multiple authors for one book
Michael Dykman wrote: On Mon, Feb 16, 2009 at 5:20 PM, PJ af.gour...@videotron.ca wrote: In my db there are a number of books with several authors; so, I am wondering how to set up a table on books and authors to be able to insert (via php-mysql pages) data and retrieve and display these books with several authors I suspect that to insert data for a multiple author book I will have to enter all data other than the author names into the book table and enter the authors in the author tables with foreign keys to reference the authors and their book. Then to retrieve and display the book,I would have to use some kind of join instruction with a where clause(regarding the position - 1st, 2nd, 3rd...) to retrieve the authors and their order. The order would probably be done by a third field (e.g. f_name, l_name, position) in the book_author table (tables in db - book, author, and book_author) Am I on the right track, here? Close. You have to consider that this is a many-to-many relationship books may have many authors and authors may have many books. This will reuire the use of a linking table and it's there that I suggest you need too maintain your ordinal field (I use 'ordinal' by convention as 'order' is a SQL keyword) AUTHORS - authorid - name -- other fields BOOKS - bookid - title -- other fields A2B - bookid - authorid - ordinal What do you mean by ordinal is this a primary key??? Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
how to check for null in string
I know this is not working, but how can I check for NULL; or how can I configure my field sub_title so I can check if $booksub_title contains anything or is empty. This problem as been breaking my back...don't know what to put in as a default to be able to check against string input (VARCHAR) or should I use another type? if ($booksub_title != NULL) { echo td width='400'b$booktitle[$i]/bbr $booksub_title[$i]/b; } else {echo td width='400'b$booktitle[$i]/b; } -- Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Slow connection over VPN
it depends on the vpn router if u need more info let me know - Original Message - From: Duncan, Kurt (MCUSA) k...@medconnectusa.com To: mysql@lists.mysql.com Sent: Tuesday, February 17, 2009 12:09 AM Subject: Slow connection over VPN We have an application using mysql. When we run it locally there are no issues. If we try and connect to a remote database machine over VPN it works but takes a VERY long time to get anything done. We are using the exact same database. All other programs using the same VPN run fine and the speed on the VPN has tested fine. Does anyone have any ideas? Kurt Duncan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=prathiman...@vsnl.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: how to deal with multiple authors for one book
On Mon, Feb 16, 2009 at 8:37 PM, PJ af.gour...@videotron.ca wrote: Michael Dykman wrote: On Mon, Feb 16, 2009 at 5:20 PM, PJ af.gour...@videotron.ca wrote: In my db there are a number of books with several authors; so, I am wondering how to set up a table on books and authors to be able to insert (via php-mysql pages) data and retrieve and display these books with several authors I suspect that to insert data for a multiple author book I will have to enter all data other than the author names into the book table and enter the authors in the author tables with foreign keys to reference the authors and their book. Then to retrieve and display the book,I would have to use some kind of join instruction with a where clause(regarding the position - 1st, 2nd, 3rd...) to retrieve the authors and their order. The order would probably be done by a third field (e.g. f_name, l_name, position) in the book_author table (tables in db - book, author, and book_author) Am I on the right track, here? Close. You have to consider that this is a many-to-many relationship books may have many authors and authors may have many books. This will reuire the use of a linking table and it's there that I suggest you need too maintain your ordinal field (I use 'ordinal' by convention as 'order' is a SQL keyword) AUTHORS - authorid - name -- other fields BOOKS - bookid - title -- other fields A2B - bookid - authorid - ordinal What do you mean by ordinal is this a primary key??? ordinal is just the sorting key you use to define what order to present the many authors of a book. I use 'ordinal' generically whenever I need an arbitrary number to use for pure ordering purposes. -- - michael dykman - mdyk...@gmail.com - All models are wrong. Some models are useful. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org