[sqlite] sqlite3_get_table

2008-03-05 Thread Kenneth LO
In previous versions (<=3.4.10) I use to do if (errmsg) { free(errmsg)
; } without problem.

In 3.5.6 the free() will segfault (yes, even after if) with a "invalid
pointer" message.

It's my old understanding that sqlite3_get_table (previously
sqlite_get_table) will malloc for *errmsg and I'll need to do the
free().  Has anything changed?  I'm just recompiling old codes with
the new lib.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Japanese-Korean characters

2007-04-25 Thread Kenneth LO

The only restriction is to escape \0.  I've been storing GB2312, BIG5 and
UTF8 Chinese characters since 2.x versions without any problem.
Japanese/korean characters should be OK.


Re: [sqlite] sqlite.so for php 4

2004-11-07 Thread Kenneth Lo
>can anyone send me sqlite.so for php 4, i can't

see http://www.mail-archive.com/sqlite-users@sqlite.org/msg01393.html



[sqlite] sqlite3 error in kexi-0.1beta5

2004-11-04 Thread Kenneth Lo
I got this.

kexi: btree.c:1043: sqlite3BtreeOpen: Assertion `sizeof(ptr)==sizeof(char*)' failed.
KCrash: Application 'kexi' crashing...

Can't figure out at this moment as I still work use 2.8.12 in production.



[sqlite] bug in time() ?

2004-03-30 Thread Kenneth Lo
I think the time() function is not reporting the correct time.  The date part is OK.  
I also note that CVSTrac uses C codes to handle datetime i.e. not relying on sqlite.  
Is there a bug?

Some investigation ...
bash-2.05b$ date
Wed Mar 31 11:12:03 HKT 2004
bash-2.05b$ sqlite
SQLite version 2.8.12
Enter ".help" for instructions
sqlite> SELECT strftime('%s','now');
1080701286
sqlite> select datetime(1080701286,'unixepoch');
2004-03-31 02:48:06
sqlite> select datetime(1080701286,'localtime');
2954147-07-10 19:59:59
sqlite> select datetime('now');
2004-03-31 02:49:07



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[sqlite] Re: PHP extention (or sqlite.so)

2004-02-29 Thread Kenneth Lo
I have placed a copy of sqlite.so (php 4.2.2 + sqlite 2.8.12) at 
http://home.graffiti.net/kenlo/sqlite.so

Simply placed it in /usr/lib/php4 and load it with dl('sqlite.so') or via php.ini as 
usual.

Compiling sqlite.so for php < 4.3.3 is a bit tricky because of some changes in 
config.m4 (I believe).  Here are the steps to get it compiled.

1.  Get SQLite-1.0.2 or later from pecl.php.net
2.  Get sqlite-php from http://sourceforge.net/projects/sqlite-php/
3.  Copy config.m4 and Makefile.in from this package to the SQLite-1.0.2 directory
4.  run phpize
5.  run ./configure --with-sqlite=shared
6.  run make
7.  that's it

Of course you must have the latest sqlite compiled and installed first.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]