It seems that that is a hint
Old:
if(RunQuery(query, MakeAnyLenString(&query,
"SELECT * FROM spells_new ORDER BY id ASC"),
errbuf, &result)) {
safe_delete_array(query);
-> It is found that value of variable "query" was corrupted
After changing the code into
uint32 length = MakeAnyLenString(&query, "SELECT * FROM spells_new ORDER BY id ASC");
if(RunQuery(query, length,
errbuf, &result)) {
The problem is solved. Is there any option in compiler will cause this problem?
How could I check the compiler options and version? I think that I am using gcc 4.6.3
eqemu@fl-pcduino:~/source/build$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
|