BUG: 64bit quantities show as 0 in results (on select)

This is the international (english) support forum for the SQLite Administrator developed and maintained by Orbmu2k.

Moderators: gto, EgonHugeist, Orbmu2k

Locked
plaak
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 16.04.2007, 19:02

BUG: 64bit quantities show as 0 in results (on select)

Post by plaak »

Hi. Thanks for the useful tool. I recently discovered a bug (or perhaps a feature) in SQLite Administrator 0.8.3.0 Beta.

As you may know, SQLite natively accepts 64bit integers, but if you select such values using this software (where they exceed 32bit signed quantities, i.e., < −2,147,483,648 or > +2,147,483,647), it will display the field as 0. This freaked me out a bit at first, because the query (visually) returned several zero (i.e., non-unique) values on one of my primary key columns. Although I suspect few users have more than 2^32 rows in any one table, some people, like me, may use these values for other reasons (e.g., importing data, programatic logic, etc)... if, for some reason, you can't support this easily you might at least provide a warning of some sort to future users. Thanks

Here's a code snippet:

CREATE TABLE proof (
id integer primary key,
name text
)

insert into proof (id, name) values (2147483647,'on positive boundry');
insert into proof (id, name) values (2147483648,'OVER postive boundry');
insert into proof (id, name) values (-2147483648,'on negative boundry');
insert into proof (id, name) values (-2147483649,'OVER negative boundry');

select * from proof;

### END ####


On a totally unrelated topic / feature request:

I would _love_ to have a feature to indent or unindent singles lines (and ideally, even, multiple lines in a block). After using SQL Query Analyzer (M$) and other IDEs for many years I've become very accustomed to pressing tab to indent (and alt-tab to unindent) single lines and blocks (if not that, then some other key combo :-). That would make this tool just about perfect, imho.

Thanks again!

Pete
Toxic
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 21.01.2008, 22:55

Post by Toxic »

I confirm that bug. When I insert large values like Windows timestamp (its much larger than Unix timestamp because measure unit is 100s of nanosecond) program shows me zeros.

I suppose you're using wrong sprintf parameter (like %i instead of %lli).
Locked