[odb-users] sqlite mismatch in result column count
    MM 
    finjulhich at gmail.com
       
    Mon Sep 14 05:56:36 EDT 2015
    
    
  
Hello,
This assertion, from sqlite, gets triggered:
statement.cxx:331: bool odb::sqlite::statement::bind_result(const
odb::sqlite::bind*, size_t, bool): Assertion `col == col_count' failed.
Looking at the source code, there are 3 variables that relate to column
count:
 bool statement::
    bind_result (const bind* p, size_t count, bool truncated)
    {
    }
   1. The 'count' argument of bind_result: looking at the core file, its
   value is 4
   2. col_count: I couldn't find its value from the core file. Is it the
   expected number of columns that is deduced from the SQL query before it is
   executed?
   If so, that number is 4 also.
   3. col, I suppose this is the actual number of columns that is returned
   after executing the SQL query. I traced the odb query, executed the SQL
   query I see traced out, it has 4 columns, and the result also includes 4
   columns.
   4. The query is the result of a call:    db.query<F>();
   F is a struct, where the number of non transient fields overall is 4 as
   well.
   F(2 virtual members) derives from B1(odb abstract, 1 member) which
   derives from B0(odb abstract, 1 member).
I will try to printout the values of those variables in my locally modified
libodb-sqlite to see what's going on.
Rds,
    
    
More information about the odb-users
mailing list