[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY, MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 Julien Nabet changed: What|Removed |Added See Also||https://bugs.documentfounda ||tion.org/show_bug.cgi?id=11 ||8817 -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 Lionel Elie Mamane changed: What|Removed |Added See Also||https://bugs.documentfounda ||tion.org/show_bug.cgi?id=11 ||7589 -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #26 from Julien Nabet--- Thank you Robert for your feedback. Lionel: do you think it worths it to cherry-pick the 3 commits (the Tor's one + the 2 of you) which fixed this one on 6.0 branch or since Firebird is still experimental feature, it doesn't worth it? -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 rob...@familiegrosskopf.de changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #25 from rob...@familiegrosskopf.de --- (In reply to Julien Nabet from comment #24) > On pc Debian x86-64 with master sources updated today, I gave a new try. > > Here what I got in EXTRACT field with last three requests: > EXTRACT(WEEKDAY FROM "StartTimestamp") > => 2 > > EXTRACT(YEARDAY FROM "StartTimestamp") > => 354 > > EXTRACT(MILLISECOND FROM "StartTimestamp") > => 0 > Robert: is it ok for you? Have tested it with Version: 6.1.0.0.alpha0+ Build ID: 6e641f93e837a33c8d4364fdbd88b3d4c52de20c CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: kde4; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-01-27_23:42:42 Locale: de-DE (de_DE.UTF-8); Calc: group threaded Works as expected in 6.1 I will set this one to RESOLVED - FIXED -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #24 from Julien Nabet--- On pc Debian x86-64 with master sources updated today, I gave a new try. Here what I got in EXTRACT field with last three requests: EXTRACT(WEEKDAY FROM "StartTimestamp") => 2 EXTRACT(YEARDAY FROM "StartTimestamp") => 354 EXTRACT(MILLISECOND FROM "StartTimestamp") => 0 Robert: is it ok for you? -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #23 from Commit Notification--- Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=27da558d7c1fe45b58d0bcc28b961fabbc5f2f1a fixup tdf#104986 move named parameters substitution into generic layer It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #22 from Commit Notification--- Lionel Elie Mamane committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a29d97e6ddab8ec002ba9827bd5fc874117712e0 tdf#104986 move named parameters substitution into generic layer It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #21 from Lionel Elie Mamane--- (In reply to Tor Lillqvist from comment #20) > You write: 'No, it is not LibreOffice itself that "quotes" the WEEKDAY, it > is the SDBC Firebird driver.' > > But isn't "the SDBC Firebird driver" part of LibreOffice? Doesn't that > simply mean the code in connectivity/source/drivers/firebird? I would say > that that *is* LibreOffice itself. Yes, you are right. I should have written "the DBMS-agnostic layer of LibreOffice". -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #20 from Tor Lillqvist--- You write: 'No, it is not LibreOffice itself that "quotes" the WEEKDAY, it is the SDBC Firebird driver.' But isn't "the SDBC Firebird driver" part of LibreOffice? Doesn't that simply mean the code in connectivity/source/drivers/firebird? I would say that that *is* LibreOffice itself. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #19 from Lionel Elie Mamane--- (In reply to Lionel Elie Mamane from comment #18) > There is probably a much more robust way to do it... One only has to grossly > lex the SQL, just keeping track of whether on is inside a '-delimited string > or a "-delimited identifier. And outside of that, replace any word that > starts with ":" with "?". It is not quite as easy as I thought, but I think I have a good draft that works for Firebird at least (it wouldn't for PostgreSQL). This assumes that ":" is not allowed in many places in Firebird SQL. It is at https://gerrit.libreoffice.org/47283 -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #18 from Lionel Elie Mamane--- (In reply to Lionel Elie Mamane from comment #17) > connectivity::firebird::Connection::transformPreparedStatement > seems to exist only to remove named parameters... Which can be > done much more cleanly by setting (hardcoding) the appropriate setting. > Actually, that last part is wrong. The setting is acted upon by the general LibreOffice layer, it is just passed down to the driver, and the driver has to implement the removal of named parameters itself. It seems only the ODBC and the JDBC drivers currently do (althought he MySQL driver seems to know about it), and they, like the current Firebird driver, do it by using the LibreOffice SQL parser to parse the statement, use connectivity::OSQLParseNode::substituteParameterNames to replace named parameters by unnamed ones, and then convert the SQL statement back to string. There is probably a much more robust way to do it... One only has to grossly lex the SQL, just keeping track of whether on is inside a '-delimited string or a "-delimited identifier. And outside of that, replace any word that starts with ":" with "?". -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #17 from Lionel Elie Mamane--- No, it is not LibreOffice itself that "quotes" the WEEKDAY, it is the SDBC Firebird driver. connectivity::firebird::Connection::prepareStatement is called with: SELECT "ID", "StartTimestamp", EXTRACT(WEEKDAY FROM "StartTimestamp") FROM "Table3" but it quotes it, by calling connectivity::firebird::Connection::transformPreparedStatement The latter seems to exist only to remove named parameters... Which can be done much more cleanly by setting (hardcoding) the appropriate setting. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #16 from Lionel Elie Mamane--- (In reply to Tor Lillqvist from comment #13) > The problem is that Base for some reason seems to uses its SQL lexer and > parser to decide whether to pass words in SQL to the database engine as such > or quoted. Urgh. That looks bad. This query is marked as "Run SQL command directly" so I would definitely expect it will take it as a string, and not try _at_ _all_ to parse, much less lex, it. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #15 from Tor Lillqvist--- s/affect/effect -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #14 from Tor Lillqvist--- I did try Firebird 3.0.2, it had no affect on this. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #13 from Tor Lillqvist--- The problem is that Base for some reason seems to uses its SQL lexer and parser to decide whether to pass words in SQL to the database engine as such or quoted. Not sure why it works like that, but there must be some good explanation, I guess. Before the patch, what it actually passed to Firebird was: select extract ( "weekday" from "DateTime" ) from "DateTime"; After the patch: select extract ( weekday from "DateTime" ) from "DateTime"; (Or some such; from my memory.) Just try the patch... -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 Commit Notificationchanged: What|Removed |Added Whiteboard||target:6.1.0 -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #12 from Commit Notification--- Tor Lillqvist committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=72ff62a13af402d19e6e53b809b29033a985c04a tdf#104986: Add MILLISECOND, WEEKDAY, and YEARDAY tokens for Firebird It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #11 from Lionel Elie Mamane--- (In reply to Tor Lillqvist from comment #10) > Suggested fix in https://gerrit.libreoffice.org/#/c/47271/ This change teaches the corresponding keywords to the LibreOffice SQL lexer. The problem described here is that the *Firebird* embedded in LibreOffice refuses these SQL commands (when they are passed bypassing the LibreOffice parser), which is why we were talking about "maybe upgrading Firebird will fix this". As such, I think it is unrelated to this bug seen strictly. Teaching these keywords to the LibreOffice SQL lexer is useful, since this will allow them to be used in SQL queries that are parsed by LibreOffice (if/when they are supported by the underlying DBMS engine). This will preemptively solve the bug that will immediately be filed after this bug is corrected, namely "doesn't work in LibreOffice-parsed queries". LibreOffice-parser queries unlock several features, like graphical editing of the query, choosing a sort order in the GUI, etc). But we'll also have to put the new tokens in the relevant parser nodes. I'm not sure out of a quick glance if that's non_second_datetime_field (so that it is available in all of datetime_field), or only more specific uses like extract_field. It depends whether these new keywords are valid interval qualifiers or not. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #10 from Tor Lillqvist--- Suggested fix in https://gerrit.libreoffice.org/#/c/47271/ -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #9 from Gerhard Schaber--- There is already Firebird 3.0.2. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #8 from Tamas Bunth--- (In reply to Julien Nabet from comment #7) > Tamas: would you have some time for a patch to upgrade to Firebird 3.0.1 by > any chance? Sorry, I still don't have time until March. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #7 from Julien Nabet--- Tamas: would you have some time for a patch to upgrade to Firebird 3.0.1 by any chance? -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #6 from Tamas Bunth--- (In reply to Lionel Elie Mamane from comment #4) > (In reply to Lionel Elie Mamane from comment #3) > > Hmm... That's weird. These all work in a stand-alone firbird 3.0 > > That might be a bug fixed in Firebird 3.0.1, althought I don't find any > trace of it in the firbird jira bug tracker. > > Anwyay, upgrading to firebird 3.0.1 would be a good thing anyway... Tamas, > you feel like it? Sure, but I'm quite busy until middle of January. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #4 from Lionel Elie Mamane--- (In reply to Lionel Elie Mamane from comment #3) > Hmm... That's weird. These all work in a stand-alone firbird 3.0 That might be a bug fixed in Firebird 3.0.1, althought I don't find any trace of it in the firbird jira bug tracker. Anwyay, upgrading to firebird 3.0.1 would be a good thing anyway... Tamas, you feel like it? -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #5 from Lionel Elie Mamane--- (I say that because my stand-alone firebird is 3.0.1 and there it works) -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 --- Comment #3 from Lionel Elie Mamane--- Hmm... That's weird. These all work in a stand-alone firbird 3.0 -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 Julien Nabetchanged: What|Removed |Added CC||btom...@gmail.com, ||lio...@mamane.lu, ||serval2...@yahoo.fr --- Comment #2 from Julien Nabet --- On pc Debian x86-64 with master sources updated today, I could reproduce this. Taking a look to http://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-functions-scalarfuncs.html#fblangref25-funcs-tbl-datediff, it seems that Extract should indeed deal with these params. (but perhaps Firebird 3.0 has some regression about them). Lionel/Tamas: thought you might be interested in this one. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 104986] Firebird: Function EXTRACT doesn't work with WEEKDAY, YEARDAY , MILLISECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=104986 m.a.riosvchanged: What|Removed |Added Status|UNCONFIRMED |NEW CC||miguelangelrv@libreoffice.o ||rg Ever confirmed|0 |1 OS|Linux (All) |All --- Comment #1 from m.a.riosv --- Reproducible. Version: 5.4.0.0.alpha0+ Build ID: d0288a482a3dc0f50f535565e4c66a95bb140942 CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; TinderBox: Win-x86@42, Branch:master, Time: 2016-12-26_23:25:18 Locale: es-ES (es_ES); Calc: CL But it also fails runing the statement from Menu/Tools/SQL Status box: "caused by 'isc_dsql_prepare'" -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs