DBD::mysql error
MySQL 5.5.11 Perl 5.14.0 DBI 1.616 DBD::mysql 4.018 Installing the DBD::mysql on OS X Snow Leopard 10.6.6, I ran `perl Makefile.PL` fine but `make test` produced: # make test cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm /usr/bin/gcc-4.2 -c -I/sw/lib/perl5/site_perl/5.14.0/darwin-multi-2level/auto/DBI -I/usr/local/mysql/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -O2 -arch x86_64 -fno-common -DPERL_DARWIN -I/sw/include -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\4.018\ -DXS_VERSION=\4.018\ -I/sw/lib/perl5/5.14.0/darwin-multi-2level/CORE dbdimp.c dbdimp.c: In function 'mysql_db_FETCH_attrib': dbdimp.c:2447: error: 'sv_undef' undeclared (first use in this function) dbdimp.c:2447: error: (Each undeclared identifier is reported only once dbdimp.c:2447: error: for each function it appears in.) dbdimp.c: In function 'mysql_st_internal_execute41': dbdimp.c:3298: warning: format '%d' expects type 'int', but argument 3 has type 'my_ulonglong' dbdimp.c: In function 'mysql_describe': dbdimp.c:3517: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int' dbdimp.c:3521: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' dbdimp.c: In function 'mysql_st_fetch': dbdimp.c:3738: warning: format '%d' expects type 'int', but argument 3 has type 'long int' dbdimp.c:3780: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'struct MYSQL_RES *' dbdimp.c:3782: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'unsigned int' dbdimp.c: In function 'mysql_st_FETCH_attrib': dbdimp.c:4365: warning: format '%d' expects type 'int', but argument 3 has type 'my_ulonglong' dbdimp.c: In function 'mysql_bind_ph': dbdimp.c:4571: warning: format '%d' expects type 'int', but argument 3 has type 'IV' dbdimp.c:4583: warning: format '%d' expects type 'int', but argument 3 has type 'IV' dbdimp.c:4595: warning: format '%d' expects type 'int', but argument 3 has type 'IV' dbdimp.c:4609: warning: format '%d' expects type 'int', but argument 3 has type 'IV' dbdimp.c:4630: warning: format '%d' expects type 'int', but argument 5 has type 'IV' make: *** [dbdimp.o] Error 1 What could be the cause of the errors? gvim -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Annoying DBD-mySQL error wont go away
To be more specific, everytime you use $dbh-prepare(...), after you're done with'em, do $sth-finish(); That should solve the problem. Good luck -- sherzodR On Mon, 26 Nov 2001, Colin Faber wrote: You've failed to close your prepare() statements with finish() See the perldoc on DBI again. Jaime Teng wrote: Hi, I have been pulling my hair due to this annoying error. x( DBI::db=HASH(0x1d2998c)-disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at C:\WEBSITE\script\default.pl line 721. It is a Perl CGI script and at line 721 is a simple disconnect command: 721 $DBH-disconnect; 722 723 binmode STDOUT; 724 print Content-type: text/html\cM\cJ; 725 print Content-length: ,length($HTTP),\cM\cJ; 726 print \cM\cJ; 727 print $HTTP; The error message is straight forward and means that I have an open mySQL handle that is not closed; example: $sth=$DBH-prepare(SELECT ..); $sth-execute; $DBH-disconnect; --- should have been a fetch before disconnect. But I am dead sure I have a result collector: $sth=$DBH-prepare(SELECT ..); $sth-execute; $result = $sth-fetchrow; I only use three functions: prepare, execute and fetchrow. For all intents and purposes, I have reviewed the script line per line and even made sure that each select will give only one result by adding LIMIT 1 $sth=$DBH-prepare(SELECT .. LIMIT 1); arg! I am Perl built 626 on win2000. Mysql 3.23.37 I have encountered this kind of errors on Linux+Apache before and I solved it via: $sth=$DBH-prepare(SELECT ..LIMIT 1); $sth-execute; while ( $result = $sth-fetchrow ) {1}; It appeared to me that even if only one result is to be expected, mysql would throw more than one. or is this a problem with DBD-Mysql module? regards, Jaime - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Annoying DBD-mySQL error wont go away
I wonder if there's a date issue here. I am getting the same error with every one of my disconnect methods also!! Wow!! I wonder if there are other folk seeing this... -David -Original Message- From: Jaime Teng [mailto:[EMAIL PROTECTED]] Sent: Monday, November 26, 2001 5:48 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Annoying DBD-mySQL error wont go away Hi, I have been pulling my hair due to this annoying error. x( DBI::db=HASH(0x1d2998c)-disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at C:\WEBSITE\script\default.pl line 721. It is a Perl CGI script and at line 721 is a simple disconnect command: 721 $DBH-disconnect; 722 723 binmode STDOUT; 724 print Content-type: text/html\cM\cJ; 725 print Content-length: ,length($HTTP),\cM\cJ; 726 print \cM\cJ; 727 print $HTTP; The error message is straight forward and means that I have an open mySQL handle that is not closed; example: $sth=$DBH-prepare(SELECT ..); $sth-execute; $DBH-disconnect; --- should have been a fetch before disconnect. But I am dead sure I have a result collector: $sth=$DBH-prepare(SELECT ..); $sth-execute; $result = $sth-fetchrow; I only use three functions: prepare, execute and fetchrow. For all intents and purposes, I have reviewed the script line per line and even made sure that each select will give only one result by adding LIMIT 1 $sth=$DBH-prepare(SELECT .. LIMIT 1); arg! I am Perl built 626 on win2000. Mysql 3.23.37 I have encountered this kind of errors on Linux+Apache before and I solved it via: $sth=$DBH-prepare(SELECT ..LIMIT 1); $sth-execute; while ( $result = $sth-fetchrow ) {1}; It appeared to me that even if only one result is to be expected, mysql would throw more than one. or is this a problem with DBD-Mysql module? regards, Jaime ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Annoying DBD-mySQL error wont go away
Hi, I have been pulling my hair due to this annoying error. x( DBI::db=HASH(0x1d2998c)-disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at C:\WEBSITE\script\default.pl line 721. It is a Perl CGI script and at line 721 is a simple disconnect command: 721 $DBH-disconnect; 722 723 binmode STDOUT; 724 print Content-type: text/html\cM\cJ; 725 print Content-length: ,length($HTTP),\cM\cJ; 726 print \cM\cJ; 727 print $HTTP; The error message is straight forward and means that I have an open mySQL handle that is not closed; example: $sth=$DBH-prepare(SELECT ..); $sth-execute; $DBH-disconnect; --- should have been a fetch before disconnect. But I am dead sure I have a result collector: $sth=$DBH-prepare(SELECT ..); $sth-execute; $result = $sth-fetchrow; I only use three functions: prepare, execute and fetchrow. For all intents and purposes, I have reviewed the script line per line and even made sure that each select will give only one result by adding LIMIT 1 $sth=$DBH-prepare(SELECT .. LIMIT 1); arg! I am Perl built 626 on win2000. Mysql 3.23.37 I have encountered this kind of errors on Linux+Apache before and I solved it via: $sth=$DBH-prepare(SELECT ..LIMIT 1); $sth-execute; while ( $result = $sth-fetchrow ) {1}; It appeared to me that even if only one result is to be expected, mysql would throw more than one. or is this a problem with DBD-Mysql module? regards, Jaime - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Annoying DBD-mySQL error wont go away
You've failed to close your prepare() statements with finish() See the perldoc on DBI again. Jaime Teng wrote: Hi, I have been pulling my hair due to this annoying error. x( DBI::db=HASH(0x1d2998c)-disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at C:\WEBSITE\script\default.pl line 721. It is a Perl CGI script and at line 721 is a simple disconnect command: 721 $DBH-disconnect; 722 723 binmode STDOUT; 724 print Content-type: text/html\cM\cJ; 725 print Content-length: ,length($HTTP),\cM\cJ; 726 print \cM\cJ; 727 print $HTTP; The error message is straight forward and means that I have an open mySQL handle that is not closed; example: $sth=$DBH-prepare(SELECT ..); $sth-execute; $DBH-disconnect; --- should have been a fetch before disconnect. But I am dead sure I have a result collector: $sth=$DBH-prepare(SELECT ..); $sth-execute; $result = $sth-fetchrow; I only use three functions: prepare, execute and fetchrow. For all intents and purposes, I have reviewed the script line per line and even made sure that each select will give only one result by adding LIMIT 1 $sth=$DBH-prepare(SELECT .. LIMIT 1); arg! I am Perl built 626 on win2000. Mysql 3.23.37 I have encountered this kind of errors on Linux+Apache before and I solved it via: $sth=$DBH-prepare(SELECT ..LIMIT 1); $sth-execute; while ( $result = $sth-fetchrow ) {1}; It appeared to me that even if only one result is to be expected, mysql would throw more than one. or is this a problem with DBD-Mysql module? regards, Jaime - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php