Hi all,
i try to use the C API but i get a segmentation fault... my code looks like : MYSQL mysql; if( ! mysql_init(&mysql) ) exit(0); if( ! mysql_real_connect(&mysql,"localhost","user","xxx","",3306,NULL,0) ) exit(0); if( mysql_select_db(&mysql, nomBdd) != 0 ) exit(0); mysql_query(&mysql,"SELECT * FROM TABLE_1"); mysql_close(&mysql); Without the mysql_query line, it works perfectly! But when i try a simple query, i've this error message : "Segmentation fault (core dumped)" I try with gdb : $ gdb Config.exe GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found) (gdb) run Starting program: /cygdrive/y/connexion_bdd/Config.exe Program received signal SIGSEGV, Segmentation fault. 0x00000001 in ?? () (gdb) where #0 0x00000001 in ?? () #1 0x00000030 in ?? () #2 0x0022e934 in ?? () #3 0x719f7e50 in WSHTCPIP!WSHJoinLeaf () from /cygdrive/c/WINDOWS/System32/mswsock.dll #4 0x003f43a8 in ?? () #5 0x003f63a8 in ?? () #6 0x003f43a8 in ?? () #7 0x003f43a8 in ?? () #8 0x000006a0 in ?? () #9 0x00002000 in ?? () #10 0x40000000 in ?? () #11 0x00000008 in ?? () #12 0x00000008 in ?? () #13 0x01e13380 in ?? () #14 0x01e13380 in ?? () #15 0x00000001 in ?? () #16 0x00000000 in ?? () from (gdb) I work with Cygwin : $ gcc -v Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/ usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32 -registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured) Thread model: posix gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) MySQL : Ver 14.7 Distrib 4.1.12a, for Win32 (ia32) Do you have any idea? Thanks in advance! pico. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]