It shouldn't. It's the same as calling it with NULL, 0, NULL. According to the docs, that should execute fine, even if an error occurs.
Now, if NULL != 0 on this system, it's different, but I doubt that's the case. -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Thursday, June 07, 2012 11:02 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] 100% CPU utilization sqlite running in VMWare On 7 Jun 2012, at 2:24pm, IQuant <sql...@iquant.co.cc> wrote: > Looking through the code I noticed sqlite3_exec(db, zSQL, 0, 0, 0); > wrapped inside transaction. > Suspect this is causing the CPU load, going to try recoding using > prepared statements. There's nothing wrong with sqlite3_exec that will causes excessive CPU usage, but the above usage of it suggests someone put that together quickly. The last three parameters should be more like NULL, 0, &zErrMsg showing no callback, a dummy argument for the non-existant callback, and somewhere for SQLite to put an error message if there is one. Even if you burst the _exec() into _prepare(), _step(), _finalize(), you'll still have to provide the equivalent parameters somewhere. I don't know whether using 0, 0, 0 when there is no error will cause any problems. I suspect not. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users