From: Date: June 13 2009 8:19am Subject: Problems with testing DBD::mysql List-Archive: http://lists.mysql.com/perl/4322 Message-Id: <1244873983.12537.1320183771@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I finally found a reasonably easy way to build DBD::mysql on Strawberry Perl [you copy libmysql.lib -> libmysql.a and zlib.lib -> libzlib.a, then run RKOBES's mysql_config_win32.pl script with s/-lmysqlclient/-lmysql/ and then perl Makefile.PL && dmake runs easily.] - I'll try and send a patch to the Makefile.PL when I get a chance (probably within the next few days), but I'm running into a failing test when I try to install anything above 4.006. [I have an anonymous-user set up on the database - I know this isn't normal, I'm just getting the module to test correctly.] An attempt to run a compile and test with 4.011 is shown below, along with the versions of mysql and perl being used: C:\DBD-mysql-4.011>perl Makefile.PL Unknown option: testdb Unknown option: testhost Unknown option: testuser Use of uninitialized value $ENV{"USER"} in concatenation (.) or string at Makefi le.PL line 491, line 24. Use of uninitialized value in concatenation (.) or string at Makefile.PL line 49 1, line 24. PLEASE NOTE: For 'make test' to run properly, you must ensure that the database user '' can connect to your MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure' as well as others. mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t'; You can also optionally set the user to run 'make test' with: perl Makefile.pl --testuser=username Unknown option: testpassword Unknown option: testsocket Unknown option: nocatchstderr Unknown option: ssl Unknown option: nofoundrows Unknown option: force-embedded I will use the following settings for compiling and testing: cflags (mysql_config) = -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\include" embedded (mysql_config) = libs (mysql_config) = -LC:\PROGRA~1\MySQL\MYSQLS~1.1\lib\opt -lmysql -lzlib mysql_config (guessed ) = mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (default ) = testsocket (default ) = Use of uninitialized value in printf at Makefile.PL line 178, line 75. Use of uninitialized value in printf at Makefile.PL line 178, line 75. testuser ( ) = To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'. Using DBI 1.607 (for perl 5.010000 on MSWin32-x86-multi-thread) installed in C:/ strawberry/perl/site/lib/auto/DBI/ Writing Makefile for DBD::mysql C:\DBD-mysql-4.011>dmake gcc -c -IC:\strawberry\perl\site\lib\auto\DBI -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\i nclude" -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_ READFIX -s -O2 -DVERSION=\"4.011\" -DXS_VERSION=\"4.011\" "-IC:\strawberry \perl\lib\CORE" dbdimp.c gcc -c -IC:\strawberry\perl\site\lib\auto\DBI -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\i nclude" -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_ READFIX -s -O2 -DVERSION=\"4.011\" -DXS_VERSION=\"4.011\" "-IC:\strawberry \perl\lib\CORE" mysql.c Running Mkbootstrap for DBD::mysql () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 mysql.bs dlltool --def mysql.def --output-exp dll.exp C:\strawberry\perl\bin\perl.exe myld g++ -o blib\arch\auto\DBD\mysql\mysql.dll - Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\straw berry\c\lib" dbdimp.o mysql.o -Wl,--image-base,0x1570000 C:\strawberry\perl\l ib\CORE\libperl510.a C:\PROGRA~1\MySQL\MYSQLS~1.1\lib\opt\libmysql.a C:\PROGRA~1 \MySQL\MYSQLS~1.1\lib\opt\libzlib.a C:\strawberry\c\lib\libmsvcrt.a C:\strawberr y\c\lib\libmoldname.a C:\strawberry\c\lib\libkernel32.a C:\strawberry\c\lib\libu ser32.a C:\strawberry\c\lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\stra wberry\c\lib\libcomdlg32.a C:\strawberry\c\lib\libadvapi32.a C:\strawberry\c\lib \libshell32.a C:\strawberry\c\lib\libole32.a C:\strawberry\c\lib\liboleaut32.a C :\strawberry\c\lib\libnetapi32.a C:\strawberry\c\lib\libuuid.a C:\strawberry\c\l ib\libws2_32.a C:\strawberry\c\lib\libmpr.a C:\strawberry\c\lib\libwinmm.a C:\st rawberry\c\lib\libversion.a C:\strawberry\c\lib\libodbc32.a C:\strawberry\c\lib\ libodbccp32.a dll.exp dlltool --def mysql.def --base-file dll.base --output-exp dll.exp C:\strawberry\perl\bin\perl.exe myld g++ -o blib\arch\auto\DBD\mysql\mysql.dll - mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib" dbdimp.o mysql.o -Wl,--image-base,0x1570000 C:\strawberry\perl\lib\CORE\libperl510.a C:\ PROGRA~1\MySQL\MYSQLS~1.1\lib\opt\libmysql.a C:\PROGRA~1\MySQL\MYSQLS~1.1\lib\op t\libzlib.a C:\strawberry\c\lib\libmsvcrt.a C:\strawberry\c\lib\libmoldname.a C: \strawberry\c\lib\libkernel32.a C:\strawberry\c\lib\libuser32.a C:\strawberry\c\ lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\strawberry\c\lib\libcomdlg32 .a C:\strawberry\c\lib\libadvapi32.a C:\strawberry\c\lib\libshell32.a C:\strawbe rry\c\lib\libole32.a C:\strawberry\c\lib\liboleaut32.a C:\strawberry\c\lib\libne tapi32.a C:\strawberry\c\lib\libuuid.a C:\strawberry\c\lib\libws2_32.a C:\strawb erry\c\lib\libmpr.a C:\strawberry\c\lib\libwinmm.a C:\strawberry\c\lib\libversio n.a C:\strawberry\c\lib\libodbc32.a C:\strawberry\c\lib\libodbccp32.a dll.exp C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 755 blib\arch\ auto\DBD\mysql\mysql.dll C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "cp" -- mysql.bs blib\arc h\auto\DBD\mysql\mysql.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 blib\arch\ auto\DBD\mysql\mysql.bs C:\DBD-mysql-4.011>dmake test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00base.t .................. ok t/10connect.t ............... ok t/20createdrop.t ............ ok t/25lockunlock.t ............ ok t/29warnings.t .............. ok t/30insertfetch.t ........... ok t/31insertid.t .............. ok t/32insert_error.t .......... ok t/35limit.t ................. ok t/35prepare.t ............... ok t/40bindparam.t ............. ok t/40bindparam2.t ............ ok t/40blobs.t ................. ok t/40catalog.t ............... ok t/40keyinfo.t ............... ok t/40listfields.t ............ ok t/40nulls.t ................. ok t/40numrows.t ............... ok t/40server_prepare.t ........ ok t/40server_prepare_error.t .. ok t/40types.t ................. ok t/41bindparam.t ............. ok t/41blobs_prepare.t ......... ok t/42bindparam.t ............. ok t/50chopblanks.t ............ ok t/50commit.t ................ ok t/51bind_type_guessing.t .... ok t/55utf8.t .................. ok t/60leaks.t ................. skipped: Skip $ENV{SLOW_TESTS} is not set t/65types.t ................. ok t/70takeimp.t ............... ok t/71impdata.t ............... ok t/75supported_sql.t ......... ok t/76multi_statement.t ....... 1/24 DBD::mysql::st more_results failed: Data trun cated for column 'a' at row 2 at t/76multi_statement.t line 48. DBD::mysql::st more_results failed: Data truncated for column 'a' at row 2 at t/ 76multi_statement.t line 48. Issuing rollback() for database handle being DESTROY'd without explicit disconne ct() at t/76multi_statement.t line 48. # Looks like you planned 24 tests but ran 10. # Looks like your test exited with 9 just after 10. t/76multi_statement.t ....... Dubious, test returned 9 (wstat 2304, 0x900) Failed 14/24 subtests t/80procs.t ................. ok Test Summary Report ------------------- t/76multi_statement.t (Wstat: 2304 Tests: 10 Failed: 0) Non-zero exit status: 9 Parse errors: Bad plan. You planned 24 tests but ran 10. Files=35, Tests=717, 23 wallclock secs ( 0.82 usr + 0.09 sys = 0.91 CPU) Result: FAIL Failed 1/35 test programs. 0/717 subtests failed. dmake: Error code 255, while making 'test_dynamic' C:\DBD-mysql-4.011perl -Mblib t\76multi_statement.t 1..24 ok 1 - Connected to database with multi statement support ok 2 - clean up ok 3 - create table ok 4 - 2 inserts ok 5 - 2 more inserts ok 6 ok 7 - Execute updates ok 8 - First update affected 1 row ok 9 - First update had no warnings ok 10 - Statement handle is Active DBD::mysql::st more_results failed: Data truncated for column 'a' at row 2 at t\ 76multi_statement.t line 48. DBD::mysql::st more_results failed: Data truncated for column 'a' at row 2 at t\ 76multi_statement.t line 48. Issuing rollback() for database handle being DESTROY'd without explicit disconne ct() at t\76multi_statement.t line 48. # Looks like you planned 24 tests but ran 10. # Looks like your test exited with 9 just after 10. C:\DBD-mysql-4.011>perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTE XT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='3.4.5', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseek size=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\li b"' libpth=C:\strawberry\c\lib libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdl g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lw inmm -lversion -lodbc32 -lodbccp32 libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl510.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\st rawberry\c\lib"' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO Built under MSWin32 Compiled at Apr 30 2009 14:30:10 @INC: C:/strawberry/perl/lib C:/strawberry/perl/site/lib . C:\DBD-mysql-4.011>mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 81 Server version: 5.1.35-community MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> \q Bye C:\DBD-mysql-4.011> -- Curtis Jewell swordsman@stripped %DCL-E-MEM-BAD, bad memory -VMS-F-PDGERS, pudding between the ears [I use PC-Alpine, which deliberately does not display colors and pictures in HTML mail]