Question related to MySQL 5.1.21 and enabling pbxt engine, please
Hi All, I would like to be able to use MySQL 5.1.21 with the PBXT engine. I have compiled MySQL 5.1.21 64 bits on Debian 4.0 with linux 2.6 with the options specified in the README that comes with the PBXT source code. I have copied the binary of the pbxt library into the lib/mysql directory When I tried to execuute the sql command install plugin pbxt soname 'llibpbxt.so'; I would get an error saying that I should have compiled with HAVE_DLOPEN ERROR 1289 (HY000): The 'plugin' feature is disabled; you need MySQL built with 'HAVE_DLOPEN' to have it working So I have re-compiled mysql server including -DHAVE_DLOPEN (e.g. ./configure CC=gcc CFLAGS=-DBIG_JOINS=1 -DHAVE_DLOPEN -O2 CXX=g++ CXXFLAGS=-DBIG_JOINS=1 -DHAVE_DLOPEN -felide-constructors -fno-rtti -O2 --prefix=/usr/local/mysql-5.1.21 --localstatedir=/usr/local/mysql-5.1.21/data --libexecdir=/usr/local/mysql-5.1.21/bin --datadir=/usr/local/mysql-5.1.21/data -with-comment=Debian x86_64 --with-server-suffix=Debian x86_64 --enable-shared --enable-static --enable-thread-safe-client --enable-assembler --enable-local-infile --with-big-tables --with-raid --with-mysqld-user=mysql --with-libwrap --with-mysqld-ldflags=-all-static --with-vio --with-bench --with-readline --with-extra-charsets=all --with-innodb --with-isam --with-archive-storage-engine --with-csv-storage-engine --with-federated-storage-engine --with-embedded-privilege-control --with-zlib-dir=bundled --with-ssl=bundled --with-partition --with-extra-charsets=complex --with-plugins=max-no-ndb --with-embedded-server) but unfortunately I get an error during the compilation mysqld.o: In function `set_user(char const*, passwd*)': mysqld.cc:(.text+0x406f): warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.o: In function `main': mysqld.cc:(.text+0x558d): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.cc:(.text+0x5949): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../mysys/libmysys.a(mf_pack.o): In function `unpack_dirname': mf_pack.c:(.text+0x485): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking hostname.o: In function `ip_to_hostname(in_addr*, unsigned int*)': hostname.cc:(.text+0x391): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.o: In function `mysqld_get_one_option': mysqld.cc:(.text+0x5b19): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../mysys/libmysys.a(my_gethostbyname.o): In function `my_gethostbyname_r': my_gethostbyname.c:(.text+0x10): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.o: In function `set_ports()': mysqld.cc:(.text+0x292d): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking sql_udf.o: In function `free_udf(st_udf_func*)': sql_udf.cc:(.text+0x124): undefined reference to `dlclose' sql_udf.o: In function `init_syms(st_udf_func*, char*)': sql_udf.cc:(.text+0x151): undefined reference to `dlsym' sql_udf.cc:(.text+0x18e): undefined reference to `dlsym' sql_udf.cc:(.text+0x1ae): undefined reference to `dlsym' sql_udf.cc:(.text+0x1d1): undefined reference to `dlsym' sql_udf.cc:(.text+0x1ee): undefined reference to `dlsym' sql_udf.o: In function `udf_free()': sql_udf.cc:(.text+0x4a8): undefined reference to `dlclose' sql_udf.o: In function `udf_init()': sql_udf.cc:(.text+0x92a): undefined reference to `dlclose' sql_udf.cc:(.text+0x9e1): undefined reference to `dlopen' sql_udf.o: In function `mysql_drop_function(THD*, st_mysql_lex_string const*)': sql_udf.cc:(.text+0xc46): undefined reference to `dlclose' sql_udf.o: In function `mysql_create_function(THD*, st_udf_func*)': sql_udf.cc:(.text+0xe35): undefined reference to `dlclose' sql_udf.cc:(.text+0xe70): undefined reference to `dlopen' sql_plugin.o: In function `plugin_dl_del(st_mysql_lex_string const*)': sql_plugin.cc:(.text+0x2ae0): undefined reference to `dlclose' sql_plugin.o: In function `plugin_shutdown()': sql_plugin.cc:(.text+0x3032): undefined reference to `dlclose' sql_plugin.o: In function `plugin_dl_add(st_mysql_lex_string const*, int)': sql_plugin.cc:(.text+0x355c): undefined reference to `dlopen' sql_plugin.cc:(.text+0x357f): undefined reference to `dlsym' sql_plugin.cc:(.text+0x35b5): undefined reference to `dlclose' sql_plugin.cc:(.text+0x3660): undefined reference to `dlsym' sql_plugin.cc:(.text+0x3691): undefined reference
Re: Question related to MySQL 5.1.21 and enabling pbxt engine, please
Vladimir, I have tried to recompile MySQL 5.1.21 as you suggested, but unfortunately I got the same error. Is it possible that some other define needs to be set ? Thanks in advance for your help, Mariella ./configure CC=gcc CFLAGS=-DBIG_JOINS=1 -DHAVE_DLOPEN -O2 CXX=g++ CXXFLAGS=-DBIG_JOINS=1 -DHAVE_DLOPEN -felide-constructors -fno-rtti -O2 --prefix=/usr/local/mysql-5.1.21 --localstatedir=/usr/local/mysql-5.1.21/data --libexecdir=/usr/local/mysql-5.1.21/bin --datadir=/usr/local/mysql-5.1.21/data -with-comment=Debian x86_64 --with-server-suffix=Debian x86_64 --enable-shared --disable-static --enable-thread-safe-client --enable-assembler --enable-local-infile --with-big-tables --with-raid --with-mysqld-user=mysql --with-libwrap --with-mysqld-ldflags=-all-static --with-vio --with-bench --with-readline --with-extra-charsets=all --with-innodb --with-isam --with-archive-storage-engine --with-csv-storage-engine --with-federated-storage-engine --with-embedded-privilege-control --with-zlib-dir=bundled --with-ssl=bundled --with-partition --with-extra-charsets=complex --with-plugins=max-no-ndb --with-embedded-server mysqld.o: In function `set_user(char const*, passwd*)': mysqld.cc:(.text+0x406f): warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.o: In function `main': mysqld.cc:(.text+0x558d): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.cc:(.text+0x5949): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../mysys/libmysys.a(mf_pack.o): In function `unpack_dirname': mf_pack.c:(.text+0x485): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking hostname.o: In function `ip_to_hostname(in_addr*, unsigned int*)': hostname.cc:(.text+0x391): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.o: In function `mysqld_get_one_option': mysqld.cc:(.text+0x5b19): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../mysys/libmysys.a(my_gethostbyname.o): In function `my_gethostbyname_r': my_gethostbyname.c:(.text+0x10): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking mysqld.o: In function `set_ports()': mysqld.cc:(.text+0x292d): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking sql_udf.o: In function `free_udf(st_udf_func*)': sql_udf.cc:(.text+0x124): undefined reference to `dlclose' sql_udf.o: In function `init_syms(st_udf_func*, char*)': sql_udf.cc:(.text+0x151): undefined reference to `dlsym' sql_udf.cc:(.text+0x18e): undefined reference to `dlsym' sql_udf.cc:(.text+0x1ae): undefined reference to `dlsym' sql_udf.cc:(.text+0x1d1): undefined reference to `dlsym' sql_udf.cc:(.text+0x1ee): undefined reference to `dlsym' sql_udf.o: In function `udf_free()': sql_udf.cc:(.text+0x4a8): undefined reference to `dlclose' sql_udf.o: In function `udf_init()': sql_udf.cc:(.text+0x92a): undefined reference to `dlclose' sql_udf.cc:(.text+0x9e1): undefined reference to `dlopen' sql_udf.o: In function `mysql_drop_function(THD*, st_mysql_lex_string const*)': sql_udf.cc:(.text+0xc46): undefined reference to `dlclose' sql_udf.o: In function `mysql_create_function(THD*, st_udf_func*)': sql_udf.cc:(.text+0xe35): undefined reference to `dlclose' sql_udf.cc:(.text+0xe70): undefined reference to `dlopen' sql_plugin.o: In function `plugin_dl_del(st_mysql_lex_string const*)': sql_plugin.cc:(.text+0x2ae0): undefined reference to `dlclose' sql_plugin.o: In function `plugin_shutdown()': sql_plugin.cc:(.text+0x3032): undefined reference to `dlclose' sql_plugin.o: In function `plugin_dl_add(st_mysql_lex_string const*, int)': sql_plugin.cc:(.text+0x355c): undefined reference to `dlopen' sql_plugin.cc:(.text+0x357f): undefined reference to `dlsym' sql_plugin.cc:(.text+0x35b5): undefined reference to `dlclose' sql_plugin.cc:(.text+0x3660): undefined reference to `dlsym' sql_plugin.cc:(.text+0x3691): undefined reference to `dlsym' sql_plugin.cc:(.text+0x3869): undefined reference to `dlclose' sql_plugin.cc:(.text+0x3916): undefined reference to `dlclose' sql_plugin.cc:(.text+0x3a3d): undefined reference to `dlclose' collect2: ld returned 1 exit status make[3]: *** [mysqld] Error 1 make[3]: Leaving directory `/var/local/repository/src/mysql-5.1.21-beta/sql' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/local/repository/src/mysql-5.1.21-beta/sql' make[1]: *** [all] Error
Re: Question related to INSERT statement into table1 and SELECT statement from table1 to populate a column field into table1
I have a table with a PRIMARY KEY on id field, whos evalue is populated usin auto_increment. CREATE TABLE `key` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sid` smallint(4) unsigned NOT NULL DEFAULT '0', `email` varchar(128) NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`) ) ENGINE=InnoDB; Question: 1) When I INSERT a row is there any way to be able in the same INSERT statement (without doing an UPDATE after the insert) to populate the field `sid`, which is base on the value that the field `id` gets (e.g. sid= MOD (id, 20)) Sounds like an excellent case for a TRIGGER. Sorry, I think I'm wrong here -- This would only work if NEW.ID already has a value when the BEFORE INSERT trigger get's called, but I think it has not, as the id column would only be filled when doing the actual insert, and not before. You might wanna try that out. AutoInc stinks. Always does :-) Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Is bad hardware confusing MySQL and InnoDB?
Some processes on a server (64-bit Gentoo Linux with MySQL 5.0.44), which seemed to be related to I/O on LVM volumes hung and it was necessary to force reboot it. The mysql data was not on an LVM volume though it still may have been affected since over time, more and more processes became unresponsive. While fsck recovered the journal and detected no problems on any volume, at least one database was not spared: 070911 23:40:34 InnoDB: Page checksum 3958948568, prior-to-4.0.14-form checksum 2746081740 InnoDB: stored checksum 2722580120, prior-to-4.0.14-form stored checksum 2746081740 InnoDB: Page lsn 0 491535, low 4 bytes of lsn at page end 491535 InnoDB: Page number (if stored to page already) 199, InnoDB: space id (if created with = MySQL-4.1.1 and stored already) 0 InnoDB: Page may be an index page where index id is 0 17 InnoDB: Also the page in the doublewrite buffer is corrupt. InnoDB: Cannot continue operation. Is it wrong to expect InnoDB to have avoided this or does it suggest that it couldn't have, i.e., a hardware defect? -- Maurice Volaski, [EMAIL PROTECTED] Computing Support, Rose F. Kennedy Center Albert Einstein College of Medicine of Yeshiva University -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
ordering dates
$result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM news ORDER BY date DESC ); I have the query above the problem is oders them like so 30/05/2007 29/07/2007 25/0/2007 The order is taken by the first number. Is there any way to order them properly without a timestamp? Ta, R. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ordering dates
May I suggest: SELECT date_format(date, '%d/%m/%Y') as mydate, title, id, display FROM news ORDER BY date DESC changing the alias of your formatted date to mydate, the raw value of date is now available to order by. - michael dykman On 9/12/07, Ross Hulford [EMAIL PROTECTED] wrote: $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM news ORDER BY date DESC ); I have the query above the problem is oders them like so 30/05/2007 29/07/2007 25/0/2007 The order is taken by the first number. Is there any way to order them properly without a timestamp? Ta, R. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- - michael dykman - [EMAIL PROTECTED] - 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/[EMAIL PROTECTED]
Re: ordering dates
$result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM news ORDER BY date DESC ); I have the query above the problem is oders them like so 30/05/2007 29/07/2007 25/0/2007 The order is taken by the first number. Is there any way to order them properly without a timestamp? You're ordering by date but previously you turn date into a string by calling date_format on it. Change the as date to something else and then the ordering will be chronologically descending. Like this: SELECT date_format(date, '%d/%m/%Y') as formatted_date, title, id, display FROM news ORDER BY date DESC -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: ordering dates
I suspect that your problem is that you are converting your date field to a string before sorting. You shouldn't use the same name for the alias as you do for the field. Try $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as formatted_date, title, id, display FROM news ORDER BY date DESC ); Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com -Original Message- From: Ross Hulford [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 12, 2007 4:49 PM To: mysql@lists.mysql.com Subject: ordering dates $result= mysql_query(SELECT date_format(date, '%d/%m/%Y') as date, title, id, display FROM news ORDER BY date DESC ); I have the query above the problem is oders them like so 30/05/2007 29/07/2007 25/0/2007 The order is taken by the first number. Is there any way to order them properly without a timestamp? Ta, R. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copying InnoDB files to remote server - remote server won't start
Whil Hentzen wrote: Baron Schwartz wrote: Whil Hentzen wrote: Michael Dykman wrote: if you see no errors, check your config... are you sure InnoDB is enabled ? I can create a new database and add InnoDB tables to it without problems. Ack, I lied. No error in the /var/lib/mysql, but there IS an error file in /var/logs, and it contains: ./ibdata1: error 13 in a file operation mysqld does not have access rights to the directory But. I'm sitting here looking and I can't see any difference between the ibdata1 and the ibdata1_orig files, nor the folders that contain the .frm files either. Ownership and permissions are both identical? As best as I can tell - here's the remote machine list: drwxr-xr-x 11 mysql mysql 4096 Sep 11 18:29 . drwxr-xr-x 33 root root 4096 May 10 11:17 .. drwx-- 2 mysql mysql 4096 Sep 11 13:22 delme drwx-- 2 mysql mysql 4096 Sep 11 14:19 delmeinno -rw-r- 1 mysql mysql 10485760 Sep 11 17:10 ibdata1 -rw-rw 1 mysql mysql 10485760 Sep 11 14:19 ibdata1_5 -rw-r- 1 mysql mysql 5242880 Sep 11 17:10 ib_logfile0 -rw-rw 1 mysql mysql 5242880 Sep 11 14:20 ib_logfile0_5 There are two databases here. delme is MyISAM. Works fine. delmeinno is the InnoDB. The original works fine. ibdata1 and ib_logfile0 are the original InnoDB files. They work fine. ibdata1_5 and ib_logfile0_5 are the InnoDB files that were copied from the local box. Yes, i see that these have 'w' permissions for mysql group but I can't see why that would matter or cause the error that is occurring. Give it a try making the permissions identical anyway and just see what happens. There might be something funny going on, such as the server running as a different group than you think. Baron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Conflicting server IDs on slaves
Hi all, What do you know about the effect of conflicting slave server IDs on the master in general? And specifically, are you aware of any issues with MySQL 5.0.27? Your help is very much appreciated. Thanks! David -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]