[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2023-03-28 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

Robert Großkopf  changed:

   What|Removed |Added

 Blocks||154426


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=154426
[Bug 154426] [META] Steps to work with Base without needing Java
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2022-01-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #16 from Julien Nabet  ---
(In reply to Robert Großkopf from comment #15)
> (In reply to Robert Großkopf from comment #14)
> > 
> > Seems returning content when inserting values is a special behavior of
> > Firebird, which can't work with this construction of executeQuery and
> > executeUpdate.
> 
> Forget the last part. RETURNING is also used in PostgreSQL. It will work
> there also together width LO. Had tested this a time ago with BASIC:
> 
> stSql = "INSERT INTO ""Table"" (""Name"") Values('Robert') RETURNING ""ID"""
> oResult = oSQL_Statement.executeQuery(stSql)
> oResult.Next
> loID = oResult.getLong(1)
> 
> It will work there.

ok so at least we know now that it only depends on the implementation (so
connectivity part) and directsql part (in dbaccess) is already ok to take into
account.
Now I don't know at all how to implement this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2022-01-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #15 from Robert Großkopf  ---
(In reply to Robert Großkopf from comment #14)
> 
> Seems returning content when inserting values is a special behavior of
> Firebird, which can't work with this construction of executeQuery and
> executeUpdate.

Forget the last part. RETURNING is also used in PostgreSQL. It will work there
also together width LO. Had tested this a time ago with BASIC:

stSql = "INSERT INTO ""Table"" (""Name"") Values('Robert') RETURNING ""ID"""
oResult = oSQL_Statement.executeQuery(stSql)
oResult.Next
loID = oResult.getLong(1)

It will work there.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2022-01-03 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #14 from Robert Großkopf  ---
(In reply to Julien Nabet from comment #13)
> 
> We only expect the number of rows inserted here.
> I thought we could add a test here to check if it contains RETURNING but no
> idea then how to retrieve the returned values.

This is the same behavior in Basic macros: You could execute the INSERT with
the executeQuery method and will get "*Cursor is not open" when trying to
receive the result:
*Cursor is not open
caused by
'isc_dsql_fetch'

/home/buildslave/source/libo-core/connectivity/source/drivers/firebird/Util.cxx:68.

You could start the INSERT with executeUpdate and get a number, which is count
wrong for Firebird: 0. But you won't get any other result.

Seems returning content when inserting values is a special beahvior of
Firebird, which can't work with this construction of executeQuery and
executeUpdate.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2022-01-03 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #13 from Julien Nabet  ---
(In reply to Robert Großkopf from comment #12)
> Have tested this again. Nothing changed.
> ...
Ok then.

Just for the record, here's the entry point.
In dbaccess/source/ui/dlg/directsql.cxx, we got:
260 else if (upperStatement.startsWith("INSERT"))
261 {
262 sal_Int32 resultCount =
xStatement->executeUpdate(_rStatement);
263
addOutputText(OUStringConcatenation(OUString::number(resultCount) + " rows
inserted\n"));
264 }
see
https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/dlg/directsql.cxx?r=be73c64d#260

We only expect the number of rows inserted here.
I thought we could add a test here to check if it contains RETURNING but no
idea then how to retrieve the returned values.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2022-01-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #12 from Robert Großkopf  ---
Have tested this again. Nothing changed.

@Julien: The way you described is the workaround I have also written in Base
Handbuch:

SELECT RDB$FIELD_NAME, RDB$RELATION_NAME,
RDB$GENERATOR_NAME FROM RDB$RELATION_FIELDS WHERE
RDB$GENERATOR_NAME IS NOT NULL;

You could see the name for the generator. It is the same way autovalue is
implemented.

SELECT GEN_ID(RDB$1, 1) FROM RDB$DATABASE;

Generator with name RDB$1 is asked for the next generated value.

INSERT INTO "Table" ("ID", "Field") VALUES (, 'Test');

This is the only save mode to get the right data after you inserted a new row:
First the value will be blocked for AutoValue, then this blocked value will be
used for insert.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2022-01-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

Julien Nabet  changed:

   What|Removed |Added

 CC||serval2...@yahoo.fr

--- Comment #11 from Julien Nabet  ---
Just for the record because I'm not sure it could help here, I found a 2 steps
way to do this:
1) Retrieve the generator name

SELECT relfields.RDB$generator_name
FROM RDB$RELATION_FIELDS relfields
JOIN RDB$FIELDS fields
on (fields.RDB$FIELD_NAME = relfields.RDB$FIELD_SOURCE)
WHERE (1 = 1)
AND relfields.RDB$RELATION_NAME = ''

2) Use specific Firebird function
SELECT GEN_ID( "", 0 ) FROM RDB$DATABASE;

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 105220] Firebird: Insert with direct SQL - RETURNING without values

2021-03-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #10 from Buovjaga  ---
Hmm, but according to
https://wiki.documentfoundation.org/Documentation/FirebirdMigration#Data_engine_standard_functions
Firebird does not have a function matching IDENTITY()

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2021-03-01 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #9 from Buovjaga  ---
Some small pointers:

The direct SQL dialog is here:
dbaccess/source/ui/dlg/directsql.cxx

About HSQLDB's IDENTITY(), search in this guide:
http://hsqldb.org/doc/1.8/guide/guide.html

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2019-07-29 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

Robert Großkopf  changed:

   What|Removed |Added

 Attachment #138875|0   |1
is obsolete||

--- Comment #8 from Robert Großkopf  ---
Created attachment 153043
  --> https://bugs.documentfoundation.org/attachment.cgi?id=153043=edit
New Testdatabase - old database seems to be broken.

During a crash in bugzilla the database seems to be broken.

With LO 6.2.5.2 the Update-command returns '0 rows updated' - which is totally
wrong. There has been added a row. RETURNING should show the content of the
added row.

With LO 6.3.0.2 the whole LO crashes immediately after sending the command to
the database.
crashreport.libreoffice.org/stats/crash_details/4327a91e-a61b-4700-a574-3df6bfc3654d
crashreport.libreoffice.org/stats/crash_details/d090119c-4dd9-41bd-966e-a34319b6c537

All tested with OpenSUSE 15 64bit rpm Linux

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2019-01-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #7 from Robert Großkopf  ---
Bug still exists. Tested with
Version: 6.2.0.1
Build ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
CPU threads: 6; OS: Linux 4.12; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
Calc: threaded

Also with LO 6.1.4.2 on OpenSUSE 64bit rpm Linux

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2019-01-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #6 from QA Administrators  ---
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2018-01-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #5 from rob...@familiegrosskopf.de ---
(In reply to Lionel Elie Mamane from comment #3)

> Could you please share the macro? Did you use executeQuery or execute? (I
> assume not executeUpdate...)

Did use executeQuery, because I need a result.

By the way: very much people helping hunting and solving Base-bugs last week.
Great!

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2018-01-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

rob...@familiegrosskopf.de changed:

   What|Removed |Added

 Attachment #130288|0   |1
is obsolete||

--- Comment #4 from rob...@familiegrosskopf.de ---
Created attachment 138875
  --> https://bugs.documentfoundation.org/attachment.cgi?id=138875=edit
Testdatabase, also with code executed by macro: Input data works, returns
nothing

It's only the same way as executed in Tools > SQL. Code is executed and returns
nothing, so the macro couldn't find an object, only a "."

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2018-01-04 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #3 from Lionel Elie Mamane  ---
(In reply to robert from comment #2)
> Have tested this with a macro.

Could you please share the macro? Did you use executeQuery or execute? (I
assume not executeUpdate...)

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2017-01-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

--- Comment #2 from rob...@familiegrosskopf.de ---
Have tested this with a macro. Firebird returns nothing to Base except a "." So
there couldn't be tested the last input and the last inserted AutoValue.

All tested with
Version: 5.4.0.0.alpha0+
Build ID: a3cf075880db31f77cd0550e0ee25eca931c6a40
CPU Threads: 4; OS Version: Linux 4.1; UI Render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time:
2017-01-05_01:21:50
Locale: de-DE (de_DE.UTF-8); Calc: group

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2017-01-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

m.a.riosv  changed:

   What|Removed |Added

 OS|Linux (All) |All

-- 
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 105220] Firebird: Insert with direct SQL - RETURNING without values

2017-01-10 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=105220

m.a.riosv  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||miguelangelrv@libreoffice.o
   ||rg
 Ever confirmed|0   |1

--- Comment #1 from m.a.riosv  ---
Reproducible.
Version: 5.4.0.0.alpha0+
Build ID: 92a1ad1f36b6d3cc13135a8c0805508933011577
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-01-06_23:42:59

-- 
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