Created attachment 47937 [details] Sample database Hello Build Date & Platform: XP Libo BuildID 3.4 = 340m1 (Build: 12) Steps to Reproduce: - Open the attached database (to simplify the reproduction, but ditto on any base) - Edit the query (right click on Requête1) - Click in the line "Field" on a empty space to add a column - Type 'test' - Validate Expected Results: constant "accepted" and after running the query we must have the constant on each record (cf. screenshot) Actual result: runtime error => Crash Note: - Use quotes (single) and not the quotation marks (double) that are reserved for the names of tables / fields. - The crash is not related to the word "test " any other text between single quotes produces the same result Regression... Additional Builds and Platforms: reproduced on fr-discuss with Windows 7 Best regards
Created attachment 47941 [details] EditQueryBeforeCrash screenshot
Created attachment 47943 [details] EditQueryExpectedResult screenshot
Created attachment 47946 [details] EditQueryRuntimeError screenshot
Confirming on MacOSX, LibO 3.4. Adding trace from apple crash log manager. Alex
Created attachment 47953 [details] insert constant into query crashtrace
The constant insert works fine in : NeoOffice 3.2p2 NeoOffice 3.1.2p8 OpenOffice.org 3.2.1 It also fails in : OpenOffice.org 3.3.0 OpenOffice.org-dev 3.4.0 LibreOffice 3.3.2 LibreOffice 3.3.3
Regression compared to OOo 3.2.1 and NeoOffice 3.1.2p8 and 3.2p2. Alex
More test on win7 reveals: If you create new query in SQL mode with: SELECT "ID", "MyText", 'test' FROM "Table1" It is run as in OOo 3.2.1. If you switch between UI and SQL mode no crash.
Still there with update git version from Master. Here are some console logs (debug mode on a Debian Wheezy x86-32) : Error: Invalid Position From File /home/maryline/compile-libreoffice/libo/solver/unxlngi6/inc/connectivity/sqlnode.hxx at Line 459 terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_chec
Created attachment 52352 [details] Complete backtrace of the pb with the symbols
Hello, I'm preparing a fix but I found a pb. If I add 1 column with 'test', it works If I add 2 columns with 'test' and 'test1', it shows 'test' for the last columns instead of 'test' and 'test1'. Is there this pb on : NeoOffice 3.2p2 NeoOffice 3.1.2p8 OpenOffice.org 3.2.1 ?
(In reply to comment #11) > Hello, > > I'm preparing a fix but I found a pb. > If I add 1 column with 'test', it works > If I add 2 columns with 'test' and 'test1', it shows 'test' for the last > columns instead of 'test' and 'test1'. > > Is there this pb on : > NeoOffice 3.2p2 > NeoOffice 3.1.2p8 > OpenOffice.org 3.2.1 > ? I just tested on OpenOffice 3.1 with Win2k, I've got the same result with twice 'test' instead of 'test' then 'test1'.
(In reply to comment #11) > I'm preparing a fix but I found a pb. Thank you ! > If I add 1 column with 'test', it works > If I add 2 columns with 'test' and 'test1', it shows 'test' for the last > columns instead of 'test' and 'test1'. Same with OOo 3.2.1 & XP But no problem if you define an alias for the columns (cf. screenshot)
Created attachment 52372 [details] Screenshot Constant Alias
(In reply to comment #11) Hi Julien, Mac testing. On NeoOffice 3.2p5 : In SQL Mode with SQL Parser ON : SELECT "ID", "MyText", 'Test', 'Test1', 'Test2' FROM "Table1" gives : Expression 1 Expression 1 Expression 1 Test Test Test With SQL Parser OFF (i.e. direct SQL code execution) : SELECT "ID", "MyText", 'Test', 'Test1', 'Test2' FROM "Table1" gives : 1 2 Test Test1 Test2 In other words, it appears that it is the OOo/LibO parser that can not handle the constants. No crashes whatsoever. On NeoOffice 3.1.2p8 : Exactly the same results as for NeoOffice 3.2p5 - no crash, but same display problems with parser. On OOo 3.2.1 : Same results as for NeoOffice 3.2p5 and 3.1.2p8 Alex
The Query Design mode always has OOo/LibO SQL Parsing 'ON', this is not the only problem with the parser (unfortunately), but obviously doesn't help you when trying to resolve the current crash problem. So the answer to Julien's question is that the SQL parser misinterpretation error has been there for a long time already (since it is present in OOo 3.2.1). Alex
This bug has been fixed on Master (3.5) with the commit 48cdc0318b348c51742339b243dc05546148b335 For 3.4 part, it depends if there are enough review. There's still the pb of duplicate column when there are several constants and no alias but it's another bug.
FYI, the fix has been pushed on 3.4 branch by Petr Mladek. Thank you everyone for your help on this bug.
Since all new unconfirmed bugs start in state UNCONFIRMED now and old unconfirmed bugs were moved to NEEDINFO with a explanatory comment, all bugs promoted above those bug states to NEW and later are automatically confirmed making the CONFIRMED whiteboard status redundant. Thus it will be removed.