[sqlite] Crash
Table was created by copying data from other database: C:\sqlite3.exe db SQLite version 3.7.16.2 2013-04-12 11:52:43 Enter .help for instructions Enter SQL statements terminated with a ; sqlite attach 't68286' as x; sqlite create table tabela_analityczna as select *, 1 from x.tabela_analityczna; Created database can be downloaded from http://bardzotajnekonto.w.interii.pl/db Select below crashes sqlite: C:\chcp 65001 Aktywna strona kodowa: 65001 C:\sqlite3.exe db SQLite version 3.7.16.2 2013-04-12 11:52:43 Enter .help for instructions Enter SQL statements terminated with a ; sqlite SELECT `czy firma upadła` FROM `tabela_analityczna`; C:\ Debugging on older version shows that nField in OP_Column is smaller than real number of columns. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Crash
Works fine for me on both Linux and Windows7, for SQLite version 3.7.16.2 and 3.7.17 (beta). It also works for me on linux. I'v looked what is happening on vista and it doesn't crash but silently exists. fgets() in local_getline() is returning 0 when n is 0. My problem with small nField on older version must be something different. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Finding rows with MIN(MTIME) for all IDs
select * from tab id | a | mtime | +--++---+-- 1 | 1 | 3 | 1 | 2 | 2 | 1 | 3 | 4 | 1 | 4 | 2 | 1 | 5 | 7 | 2 | 6 | 1 | 2 | 7 | 0 | 2 | 8 | 4 | 2 | 9 | 1 | 2 | 10 | 2 | select id, a, min(mtime) over(partition by id order by mtime) m from tab qualify row_number() over(partition by id order by mtime) = 1 id | a | m | +--+---+---+-- 1 | 2 | 2 | 2 | 7 | 0 | qualify isnt't in standad. instead subquery can be used. Message: 14 Date: Wed, 5 Sep 2012 09:03:35 -0400 From: Richard Hipp To: General Discussion of SQLite Database Subject: [sqlite] Finding rows with MIN(MTIME) for all IDs Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Suppose you have a table like this: CREATE TABLE tab(ID, A, B, C, ..., MTIME); The ID entries are not unique. For each ID occurrence, the values for A, B, C, and so forth might (or might not) be different. We do queries like this: SELECT id, a, b, ..., mtime FROM tab ORDER BY mtime DESC; *The problem to solve* is this: We want to restrict the output of the query above to show only the entry with the smallest MTIME for each distinct ID. As of SQLite version 3.7.11 the problem can be solved like this: SELECT id, a, b, ..., min(mtime) FROM tab GROUP BY id ORDER BY min(mtime) DESC; SQLite, unique among SQL database engines as far as I know, will choose for A, B, C, ... the values of those columns that correspond to the row that satisfies the min(mtime) aggregate. And so this actually works. On SQLite versions prior to 3.7.11, the values of A, B, C, .. would be from any arbitrary row having the corresponding ID. And on more strictly conforming SQL implementations (ex: PostgreSQL) the query will not even parse because the GROUP BY clause does not contain every column that is not within an aggregate function. But the query does work, and works efficiently and well, in SQLite and seems very convenient. *Question*: Is there a (better) standard SQL way to do the same thing? *Context*: The actual application here is Fossil, and the display of all changes to a particular file in a repository. Queries like the above are used to generate, for example, a complete history of the changes to the date/time function logic in SQLite: http://www.sqlite.org/src/finfo?name=src/date.c In this example, the ID column corresponds to a particular version (SHA1 hash) of a file. That same version might appear in various branches and so there are duplicate entries in the graph for the same file, which can be confusing. (Note, the actual queryto render the finfo page is slightly more complex; tab is really a join of two tables, and the a, b, c, .. columns are subqueries. But these complications do not bare upon the question of this email.) To work around the confused output, we'd like to only see a single row for each ID, specifically the row with the smallest value of mtime, which means the first time that a particular version of a file appears in the repository. For example: http://www.sqlite.org/src/finfo?name=src/date.cfco=1 The recent change to Fossil to add the fco query parameter to the finfo page is the first time I have actually needed SQLite's min()/max() query behavior myself, and I now find it *very* convenient. But, I am slightly troubled by depending on SQL behavior that is only found in SQLite in not in other database engines. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite4 key encoding bug
SQLite version 4.0.0 2012-07-07 12:21:48 Enter .help for instructions Enter SQL statements terminated with a ; sqlite create table t(a); sqlite insert into t values(123); sqlite insert into t values(123.0); sqlite insert into t values(12323); sqlite insert into t values(12323.0); sqlite select * from t group by 1; 123.0 12323 12323.0 sqlite ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Join performance in SQLite
Do other SQL database engines not have this same limitation? Are MySQL and PostgreSQL and Firebird and MS-SQL and Oracle creating phantom indices on-the-fly to help them do joins faster, for example? Or do their optimizers do a better job of finding ways to use indices in a join? Can somebody supply me with specific examples of joins that other database engines do efficiently but that SQLite does slowly? Acoording to SQLite wiki other databases do better job without indices: Test 6: INNER JOIN without an index SELECT t1.a FROM t1 INNER JOIN t2 ON t1.b=t2.b; SQLite 3.3.3 (sync):14.473 SQLite 3.3.3 (nosync): 14.445 SQLite 2.8.17 (sync): 47.776 SQLite 2.8.17 (nosync): 47.750 PostgreSQL 8.1.2: 0.176 MySQL 5.0.18 (sync):3.421 MySQL 5.0.18 (nosync): 3.443 FirebirdSQL 1.5.2: 0.141 Is join efficiency really a frustration to many SQLite users? Generally not, however the behaviour could be more user friendly. The way is I use SQLite is probably not common becase I don't write queries - apllication's users write them. I also deal with quite large data. The biggest problem with the way joins work is with subqueries. If flattening cannot be done the query runs slow. For example I was told by an user that joins on views are really slow (on large data it means that doesn't work at all). The are other minor problems: 1. Creating indices on every (possibly very large) table makes database file much bigger that it would be if SQLite used temporary indices created before query is run. 2. Database users need to know how exaclty how SQLite work. That is not problem if programmer write queries, but can be a problem if database is used by a mathematician who doesn't really care about it and simply wants to do some calculations. -- Chcesz miec nawigacje GPS ? Zamow lub przedluz umowe na neostrade, a nawigacja bedzie Twoja. Kliknij na link po szczegoly! http://link.interia.pl/f219a ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] fulltest *malloc* test failures
These are simulated malloc() failures. They are important for embedded devices (which tend to run out of memory) but not so much on Solaris. When was the last time you remember that malloc() really failed on a workstation or a server? It's very easy to cause malloc failure on 32 bit desktop computer. Especially using sqlite configured to use about 800M cache inside jvm with large -Xmx. Unfortunaltelly jvm crashes after a malloc failure. Sqlite usually simply returns out of memory however I'v experienced several crashes caused by sqlite (I'm using old version, problems I'v seen were already corrected long time ago). --- Promocja w Speak Up. Kwartal angielskiego za darmo. 3 miesiace nauki gratis. Sprawdz teraz! http://link.interia.pl/f2019 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite syntax diagrams
I find those diagrams less readable than text version. There are other problems besides my personal preferences: - text cannot be copied from pictures - syntax cannot be viewed with text-only browsers - site loads a little longer (there are still people that don't use broadband) -- Dzwon taniej na zagraniczne komorki! Sprawdz http://link.interia.pl/f1f26 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to download a old sqlite version?
Hi! I need to download sqlite (exe), dll and source code of sqlite 3.4.2 but I don't find it. Does someone know where to get it ? This will show when every sqlite version was released. http://www.sqlite.org/cvstrac/timeline?d=1e=2008-Sep-26c=0px=s=9dm=1dt=1m=1x=1 Checkout from cvs from the date you want and compile. Instruction how to checkout from cvs are here: http://www.sqlite.org/download.html (-D option checksout by date) -- Najlepsze oferty kupna, sprzedaży i wynajmu nieruchomości! Kliknij http://link.interia.pl/f1f24 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Manifest Typing performance impact?
Is there a performance hit assosiated with manifest typing? I'm not sure about performance, but I assume that static typing might reduce memory usage (especially with small caches). Internally every type in sqlite is stored in structure that takes 64 bytes (little more on 64 bit systems). Different structure for every type or even union would make the size smaller. -- Sprawdz, czy do siebie pasujecie! http://link.interia.pl/f1eea ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PROBLEMS BUILDING 3.4.2 using Ms Visual Studio 2005
See http://www.sqlite.org/cvstrac/tktview?tn=2574 Apparently VC++ does not like for you to declare a constant with file scope before the constant is defined. I do not know how to work around this problem. Perhaps someone who better understands the quirks of VC++ can help. VC doesn't like static array with unknown size (it's fine with const). I think C standart doesn't like it either. -- Prowadzisz firmê? Zobacz jak mozemy Ci pomoc. http://link.interia.pl/f1b50 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Is it a bug?
The code changes are not that complex. The hard part is getting me to agree to such a change. Surely by now you have come to better understand my views toward static typing Isn't this decision already made? Strict affinity mode is mentioned on official SQLite site suggesting that it will happen. -- Cywilizacje powstaja z gliny i zelaza. Travian http://link.interia.pl/f1a7e - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Why do you use SQLite? Comments for an article needed
I'm writing an article about SQLite and I'd love to get some comments from users about why you use it. Performance? Features? Reliability? Cost? - no restrictions, like only 1 LONG VARCHAR in the table, numer of columns, maximum network packet size and similar (actually there are some restrictions regarding sizes, but with resonable max values) - fast - open source - free Is the open source aspect important? Very. I don't work with orygnal SQLite, but with customized version. For that matter, anything you really don't like about SQLite? - no full support for ALTER TABLE and JOIN - no strict typing and missing date type - no high concurrency support Wiktor Adamski -- Wicie, rozumicie Zobacz http://link.interia.pl/f1a74 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Stack usage
There have been some recent changes to try to address this by placing various limits on number of columns, length of SQL expressions, length of SQL statements etc. See: http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/limits.hv=1.6 Nice. Limit is much better than a crash. But I hope that I will always remain configurable and will be possible to specify really large values. But so that we can check, can you post the database schema and the actual SQL statement that caused the crash in the sqlite shell? Or mail it to me off-list if it's too large or something. Below is a simple C programme that causes a crash with default stack size (tested with MSVC i cygwin's gcc): #include stdio.h #include string.h #include malloc.h #include sqlite3.h int main(int argc, char **argv){ sqlite3 *db; char *str = (char *) malloc(100); int rc, i; strcpy(str, select * from (select 1); for (i = 0; i 5000; ++i) { strcat(str, union select 1); } strcat(str, )); rc = sqlite3_open(test.db3, db); printf(rc: %d\n, rc); rc = sqlite3_exec(db, str, NULL, 0, NULL); printf(rc: %d\n, rc); rc = sqlite3_close(db); printf(rc: %d\n, rc); return 0; } If you still want the big query let me know, but it basically does the same - it doesn't even need any table. I was thinking about sqlite based solution (other solutions are: don't make such query or increase stack limit). I guess the best way is: -include multiSelect in sqlite3Select - that's the easy part -instead of recursive calls to sqlite3Select use gotos with self written stack created on the heap - unfortunatelly it requires to keep track of all created variables. They are mostly in front of the function but still it's annoying to have to remember all of them. Using MSVC it's easy prevent a crash: __try, __except and _resetstkoflw. I have no idea yet hot to do this with gcc. Signal can be caught, but I wasn't able to do anything more with demaged stack. I was looking at -fstack-check - it does print information but i dont know how to catch the error ant recover. -- Kasia Cichopek eksponuje biust http://link.interia.pl/f1a6f - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Stack usage
Change the 5000 to 5 and it crashes here on linux too. I guess your compiler's default stack limit is big. I tested real query on linux too and it crashed really fast. But satck size was limited by default java's value, not gcc's limit. Maybe we need to limit the number of SELECT statements that can be combined in a compound. Anybody can lower stack limit during compilation. It would be hard to guess correct number. But maybe a test case that creates maximum number of selects would at least help to determine quite fast the correct number. Another case (haven't tested it though): SELECT * FROM (SELECT * FROM (SELECT * FROM ...))) With default values it works - error is returned (realy fast, only 13 selects are allowed). It will crash if YYSTACKDEPTH is set to 0. I was thinking about sqlite based solution (other solutions are: don't make such query or increase stack limit). I guess the best way is: -include multiSelect in sqlite3Select - that's the easy part -instead of recursive calls to sqlite3Select use gotos with self written stack created on the heap - unfortunatelly it requires to keep track of all created variables. They are mostly in front of the function but still it's annoying to have to remember all of them. Using MSVC it's easy prevent a crash: __try, __except and _resetstkoflw. I have no idea yet hot to do this with gcc. Signal can be caught, but I wasn't able to do anything more with demaged stack. Even if it worked it would leak resources and maybe leave SQLite's internals in an inconsistent state. The goto way won't leak. But yes, _resetstkoflw may cause problems. I was thinking of closing a db connection after that error. It should solve inconsistency problem. Maybe some kind of rollback would be even better. Leaks would probably remain, but its better than a crash. -- Po meczu.kurde...:) http://link.interia.pl/f1a72 - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Stack usage
I'v read in change log that some stack allocted memory were moved to the heap, but I think that there is still to much allocated memory on the stack. After creating a table with 2000 columns, jdbc driver created a query that run out of stack. Default java's stack limit is low, but it wasn't hard to create simillar query that crashed C application with default stack limit. And the fact that it crashed instead repoting an error isn't really nice. The query created by the driver looks like that: select null as TABLE_CAT, null as TABLE_SCHEM, 'test' as TABLE_NAME, cn as COLUMN_NAME, dt as DATA_TYPE, tn as TYPE_NAME, 20 as COLUMN_SIZE, 20 as BUFFER_LENGTH, 10 as DECIMAL_DIGITS, 10 as NUM_PREC_RADIX, colnullable as NULLABLE, null as REMARKS, null as COLUMN_DEF, 0as SQL_DATA_TYPE, 0as SQL_DATETIME_SUB, 20 as CHAR_OCTET_LENGTH, ordpos as ORDINAL_POSITION, (case colnullable when 0 then 'N' when 1 then 'Y' else '' end)as IS_NULLABLE, null as SCOPE_CATLOG, null as SCOPE_SCHEMA, null as SCOPE_TABLE, null as SOURCE_DATA_TYPE from (select 0 as ordpos, 1 as colnullable, 'col1' as cn, 'double' as tn, 8 as dt union all select 1 as ordpos, 1 as colnullable, 'col2' as cn, 'double' as tn, 8 as dt union all select 2 as ordpos, 1 as colnullable, 'col3' as cn, 'double' as tn, 8 as dt union all select 3 as ordpos, 1 as colnullable, 'col4' as cn, 'double' as tn, 8 as dt union all select 4 as ordpos, 1 as colnullable, 'lastcol' as cn, 'double' as tn, 8 as dt); but uses more columns. -- Cywilizacje powstaja z gliny i zelaza. Travian http://link.interia.pl/f1a7e - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Stack usage
Joe Wilson napisał(a): Please respond to the mailing list in the future. Sorry. Different client. I didn't notice the adress. At least there#039;s a known workaround, so no problem. Workaround is not a solution. hence your problem. Sure it is. Just like any bug or missing feature in any application. But I#039;v always hoped that SQLite won#039;t constraint me. It#039;s sad the it does, and horrible that it crashes instead returning an error. You should ask for your money back. Yes it's free. But I think that no user (or author) of software like when software crashes. Unfortunatelly SQLite does. Last time wasn't sent to the mailing list so once more: Does anyone know other places apart from unions where deep recursion may be used? -- Kasia Cichopek eksponuje biust http://link.interia.pl/f1a6f - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Does Attach improve Concurrency ?
Does using separate databases and attaching them improve concurrency (by providing finer-grained locking)? Yes it does. You can open a connection to a memory database, store each table in a separate database and attach them if needed. I'v already changed sqlite to do it transparently. It still has a lot of bugs, but it has already proven to work. But if you don't mind attaching databases manually originall sqlite will work perfectly. As stated above, not needed if you avoid using BEGIN EXCLUSIVE. It is impossible to write to 2 tables even with default transaction. It is impossible to insert inside a select callback. Seeing numerous Table is locked topics I think there are lots of other impossible things to do. And commit does appear at some time, so reading should be synchronized outside of SQLite (or perhaps repeated when error occures). Attach allows to forget about those problems and makes possible table level locks instead of database level locks. -- Nowy darmowy serwis og³oszeniowy Populada. Kup, sprzedaj, zamieñ http://link.interia.pl/f1a8a - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Stack usage
Excuse me for make this question but have you normalized your database? Try to design/define it in at least 3NormalForm. My application's doesn't create any databases itself. It allows users to store any data. And users need to be able to store any number of columns in 1 table (the most I'v heard about is about 1, but I wouldn't be surprised if they had more). Trust me, they need it and they can't do anything about it.. But the problem isnt't actually caused by many columns in the table. The query i posted before doesn't need any table in the database - it was created based on the a table but any similar query will crash SQLite. The query was created by JDBC driver - I will change driver's code and the problem will be solved for now, but it doesn't mean that everything is ok. Similar automatically created queries may be created based on anything, for example rows of some table - 1 rows isn't too many, right? And that query may cause any application to crash. And possibly there are other innocent looking queries that are implemented using recursion that will do the same damage (maybe nested selects ?). -- Nowy darmowy serwis og³oszeniowy Populada. Kup, sprzedaj, zamieñ http://link.interia.pl/f1a8a - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Tomcat crashes with SQLite
My project is working with Tomcat, SQLite and javasqlite. http://www.ch-werner.de/javasqlite/ http://www.ysalaya.org Since a few weeks Tomcat server crashes very often: error 505 and I need to restart it manually. It is installed on FreeBSD 5.4. Please see the Tomcat log file bellow. It seems to be an error in SQLite outsite the Java Virtual Machine. ANY IDEAR ? I see 2 possible explanations: 1. You use the same connection in different threads at the same time. 2. There are bugs in JDBC driver. If this is the case, try driver from http://www.zentus.com/sqlitejdbc. It for sure has bugs, but may be different and you won't even notice them. You may use pure java version - it will be probably slower than JNI based, but should never crash VM. -- Wicie, rozumicie Zobacz http://link.interia.pl/f1a74 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: CAST
Sqlite lets us advance our storage capabilities into a more flexible world. Sure, but it's not allways a good thing. Usually one column stores related data. Related data mostly have the same type. Entering a value of different type is an error which is silently ignored. Allowing different types gives us more flexibility, but is also more error-prone. Ofcourse there are other databases that can be chosen instead of SQLite if type safety is required, but compile time option wouldn't hurt SQLite in any way. --- CTR #8211; brzmi tajemniczo ? Sprawd¼ co mo¿esz zyskaæ na http://link.interia.pl/f1a9d - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] Re: CAST
I for one would be in favor of an option to enforce strict typing (compile time option). SQLite version 3 will feature two other affinity modes, as follows: Strict affinity mode. In this mode if a conversion between storage classes is ever required, the database engine returns an error and the current statement is rolled back. I hope it means that SQLite will behave like any other database, and errors during insert will be detected while they are made, not in some unspecified time in the future. This is probably not a problem with machine generated SQLs, but if a human is allowed to enter SQLs, working with a database may be difficult. -- Wyjatkowo niegrzeczne kartki na Dzien Dziecka http://link.interia.pl/f1a96 - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] CAST
Hello I'm wandering if CAST is supposed to work? Documentation says that it changes the datatype of the into the type specified by type. However I don't observer any change. It even alters data in not obvious way: SQLite version 3.3.17 Enter .help for instructions sqlite create table tab(col date); sqlite insert into tab values('1994-11-11'); sqlite create table tab2 as select cast(col as DATE) from tab; sqlite .schema tab2 CREATE TABLE tab2(cast(col as DATE)); sqlite select * from tab2; 1994 sqlite create table tab3 as select cast(col as DATE) as col from tab; sqlite .schema tab3 CREATE TABLE tab3(col); sqlite select * from tab3; 1994 -- Po meczu.kurde...:) http://link.interia.pl/f1a72 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: CAST
SQLite does not have a dedicated DATE type. I know that, but why it does't create appropriate column definition ? create table tab(col date); creates a table with date type. create table tab2 as select * from tab; also. This type does't do much, but it can be queried with sqlite3_column_decltype. This way I know what to do with text stored in the database. Currently the only way I see is to create table and then insert .. as select which seems to be weird in presence of a function that changes the datatype. - Original Message - From: Igor Tandetnik [EMAIL PROTECTED] To: SQLite sqlite-users@sqlite.org Date: Mon, 28 May 2007 10:36:50 -0400 Subject: [sqlite] Re: CAST [EMAIL PROTECTED] wrote: I'm wandering if CAST is supposed to work? Yes. sqlite create table tab(col date); sqlite insert into tab values('1994-11-11'); sqlite create table tab2 as select cast(col as DATE) from tab; sqlite .schema tab2 CREATE TABLE tab2(cast(col as DATE)); sqlite select * from tab2; 1994 SQLite does not have a dedicated DATE type. See http://sqlite.org/datatype3.html . When given an unknown type, SQlite assumes numeric. That's why CAST('1994-11-11' as DATE) produces 1994. So would CAST('1994-11-11' as ANY_RANDOM_STRING). It is customary to store dates as strings in SQLite. Several functions are provided to manipulate dates in this representation. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] - -- Ile masz w domu niepotrzebnych rzeczy? Wymien sie z sasiadami http://link.interia.pl/f1a93 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Longest real SQL statement
I haven't used SQLite for that yet (I will in the near future) but with mysql my longes statement was at least several megabytes. I create statements automatically. I think so far the longes created statement was a PCA trafsformation from table with about 2000 columns (would have been more if mysql supported that). Coefficients were already calculated, so a single column in the result table was created from at least 2 * 2000 tokens. I don't remember exact length, but possibly even longer statements was created using a few CASE .. WHEN constructs with lengthy calculations for every condition with lots of columns. - Original Message - From: [EMAIL PROTECTED] To: sqlite-users@sqlite.org Date: Wed, 09 May 2007 23:32:53 + Subject: [sqlite] Longest real SQL statement I'm looking for an upper bound on how big legitimate SQL statements handed to SQLite get to be. I'm not interested in contrived examples. I want to see really big SQL statements that are actually used in real programs. Big can be defined in several ways: * Number of bytes of text in the SQL statement. * Number of tokens in the SQL statement * Number of result columns in a SELECT * Number of terms in an expression If you are using really big SQL statements, please tell me about them. I'd like to see the actual SQL text if possible. But if your use is proprietary, please at least tell me how big your query is in bytes or tokens or columns or expression terms. Thanks. -- D. Richard Hipp [EMAIL PROTECTED] - To unsubscribe, send email to [EMAIL PROTECTED] - -- NIE KUPUJ!!! ...zanim nie porownasz cen http://link.interia.pl/f1a5e - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] more test suite problems on Windows
When testing, it is my usual practice to compile with -DSQLITE_NO_SYNC=1 which turns off disk syncing. This very definitely makes the tests run way faster. I wonder if the Makefiles you are using are not setting this option by default on windows but are on linux? On windows this option doesn't do anything, and with FlushFileBuffers() allways executing tests run really slow. -- NIE KUPUJ!!! ...zanim nie porownasz cen http://link.interia.pl/f1a5e - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] ALTER TABLE
Is there a reason why ALTER TABLE ADD can add only one column? I'v changed the parser to allow any number of columns - I'm calling sqlite3AlterFinishAddColumn() for every column. It seems to work. Am I missing some problem, or nobody wanted more columns before? Wiktor Adamski -- Wkrec znajomych :) http://link.interia.pl/f1a5c - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Insert order maintained?
I know this is the behavior for MySQL, but not sure about SQLite. I'v heard about some version of mysql that didn't return rows in the same order (but haven't seen it myselt). So unless this behaviour is documented in mysql manual, it's not a good idea to rely on this. Actually I'v seen only 1 database that allways returns rows in random order, but it doesn't mean that other databases guarantee anything. -- Jak bedzie wygladac koniec swiata? Zobacz http://link.interia.pl/f1a38 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Building Test Fixture under Visual Studio 2005
The offending lines are tclsqlite.c: EXTERN int Sqlite3_Init(Tcl_Interp *interp){ Tcl_InitStubs(interp, 8.4, 0); Tcl_CreateObjCommand(interp, sqlite3, (Tcl_ObjCmdProc*)DbMain, 0, 0); I simply removed EXTERN from source and there were no other compile errors. But there were other problems when I tried to run tests on windows: -tests crashed (I think only with SQLITE_CRASH_TEST enabled) -there was some problem with tcl not being able to delete some file - after that all other tests didn't run -tests were really slow: os_win.c ignores SQLITE_NO_SYNC - putting it in winSync() function speed up tests a lot -- On wie jak zyskaæ, a nie straciæ. Wideofelietony Tadeusza Mosza. Zobacz http://link.interia.pl/f1a3c - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Java wrapper for both windows and linux
Hello All iam java starter and love sqlite . when i download java wraper for sqlite this is good work in windows but it cant work in linux .i have this exception not found libraryjsqlite.so Althought, i download sqlite.so and rename to it .where is solution export LD_LIBRARY_PATH=directory_with_sqlite_library:$LD_LIBRARY_PATH should make it work -- Wideofelietony Tadeusza Mosza. O biznesie dla wszystkich. Ogl±daj http://link.interia.pl/f1a3c - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] database is locked error with 3.3.13
Where can I get 3.3.9 and earlier source code? http://www.sqlite.org/sqlite-source-3_3_0.zip ... http://www.sqlite.org/sqlite-source-3_3_9.zip But it would be nice to have direct link on the website, or even better to have tags for all releases in CVS. - Aparat cyfrowy, odtwarzacz mp3 i inne nagrody. Sprawd¼ nowy konkurs na TeleInteria! http://link.interia.pl/f1a2d - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Single-character pathnames in win2k
Can somebody who understands or regularly uses windows please look into it for me. It seems like changing nByte = GetFullPathNameW(zWide, 0, 0, zNotUsedW) + 1; to nByte = GetFullPathNameW(zWide, 0, 0, zNotUsedW) + 3; corrects the problem. According to documentation even that + 1 isn't necessary, and actually without it and with longer file name the call does't return an error and everything work as expected. Error isn't returned even with 1-letter file, but +3 is required in my computer to make it work. Wiktor Adamski -- Lewa kasa! Zobacz http://link.interia.pl/f19e2 - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] attach in transaction
Hi Can someone tell me why attach cannot be called within transaction? It does change internal structures, but id doesn't change any tables. And even if it would have, I think changing tables in the same connection should be allowed. Wiktor Adamski -- Jestes kierowca? To poczytaj! http://link.interia.pl/f199e - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Calling ATTACH internally
Hi I need SQLite to be able to acces several tables at the same time. I'v decided to do this by creating a new database for each table. So far I'v changed sqlite3StartTable() function - it calls attachFunc() and then changes name to name.name. It worked - master database is not changed, and new table is created in just created database. But I had to disable sqlite3SafetyOn() check. Can I assume that I'm in the same thread that set SQLITE_MAGIC_BUSY and it is safe to disable checking when calling attachFunc() from sqlite3StartTable() (and probably from every other funtions that uses table name, since I think I'll have to do this for every SELECT, INSERT, etc.) ? Also I'm wandering about SQLite reliability. For example comment to sqlite3SafetyOn() says: ** This routine is a attempt to detect if two threads use the ** same sqlite* pointer at the same time. There is a race ** condition so it is possible that the error is not detected. ** But usually the problem will be seen. The race codidion is obvious, so is the solution, especially since the are already platform independed mutexes in SQlite. Another comment: ** The lock byte is obtained at ** random so two separate readers can probably access the file at the ** same time, unless they are unlucky and choose the same lock byte. can probably access the file at the same time is better than can't access, but there is no guarantee. Does commets like those mean that SQLite will work very often, but there are known bugs not resolved because thay are unlikely to appear, or problems like race conditions are guarented to be found is some other functions? Wiktor Adamski - To unsubscribe, send email to [EMAIL PROTECTED] -