Jan Engelhardt writes:
 > 
 > dbd_sqlite3 has a discrepancy in how it treats integral primary key
 > fields.
 > 
 > sqlite> CREATE TABLE foo (id int(11) primary key);
 > sqlite> CREATE TABLE bar (id integer primary key);
 > 
 > when SELECTing from foo and bar with dbd_sqlite3, the
 > "find_result_field_types" function turns bar.id into
 > a LONGLONG.
 > 
 >   else if (strstr(curr_type, "BIGINT")
 >         || strstr(curr_type, "INTEGER PRIMARY KEY") /* BAD BAD HACK */
 >         || strstr(curr_type, "INT8")) {
 >     type = FIELD_TYPE_LONGLONG;
 >   }
 > 
 > I think that LONGLONG is incorrect for INTEGER PRIMARY KEY. It should
 > just be FIELD_TYPE_LONG.
 > 

Hi,

I think the current behaviour is correct. According to the SQLite docs
(http://www.sqlite.org/lang_createtable.html#rowid), a column declared
as INTEGER PRIMARY KEY always uses 64 bit integers.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to