Re: [sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond Take 2

2011-11-02 Thread Yuriy Kaminskiy
ChingChang Hsiao wrote: > I can't reply in my system, so I create the problem description again. > > I miss one source code line "char tempString[1024];"in the last email. The > code dump happened after 4 days' run in a test script not immediately. The > SQLITE statements seem to be ok. Could be

[sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond Take 3

2011-11-02 Thread ChingChang Hsiao
I can't reply in my system, so I create the problem description again. It seems it's not the problem of sprintf. If it comes from sprintf array size, the core dump will be like this " in __stack_chk_fail () from /lib/libc.so.6". The code dump happened after 4 days' run in a test script, not

[sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond Take 2

2011-11-02 Thread ChingChang Hsiao
I can't reply in my system, so I create the problem description again. I miss one source code line "char tempString[1024];"in the last email. The code dump happened after 4 days' run in a test script not immediately. The SQLITE statements seem to be ok. Could be a performance issue?

Re: [sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond

2011-11-02 Thread Stephan Beal
On Wed, Nov 2, 2011 at 2:57 AM, Teg wrote: > What happens if you replace all the sprinfs with some simple inserts > inserted directly into vector? > > dbStatements.push_back("INSERT INTO..."); > Since you need integers and floats in your strings, you can use std::ostringstream

Re: [sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond

2011-11-01 Thread Teg
Hello ChingChang, How big is tempString? What kind of type is it? I wonder if you're trashing the stack with the sprintf. What happens if you replace all the sprinfs with some simple inserts inserted directly into vector? dbStatements.push_back("INSERT INTO..."); You need to simplify

Re: [sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond

2011-11-01 Thread Simon Slavin
On 1 Nov 2011, at 11:09pm, ChingChang Hsiao wrote: > dbStatements.push_back( "COMMIT;" ); > > // populate the DB > vector::iterator dbStatementsIter; > SqlQuery oper_db(operDatabase, __FILE__, __LINE__); > for ( dbStatementsIter = dbStatements.begin(); dbStatementsIter != >

[sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond

2011-11-01 Thread ChingChang Hsiao
Do you know why it goes to core dump? ChingChang The source code is shown as below, vector dbStatements; dbStatements.push_back( "BEGIN TRANSACTION;" ); for ( int x = 0; x < 10; x++ ) { sprintf( tempString, "update utilization_table set utilization=%5.2f,sample=%d where