https://bugs.documentfoundation.org/show_bug.cgi?id=174405
Bug ID: 174405
Summary: MySQL/MariaDB connections: Advanced Settings has no
"Replace named parameters with '?'" option, so a file
with it off cannot use named parameters
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: [email protected]
Reporter: [email protected]
Description:
For MySQL/MariaDB connections (direct connection, JDBC and ODBC), Edit >
Database > Advanced Settings does not show the "Replace named parameters
with '?'" checkbox. The generic JDBC connection (Connect to an existing
database > JDBC) show the textbox.
New files store it as on, but a file that has it off cannot use named
parameters (:name), and there is no way in the UI to turn it on again.
MySQL does not understand ":name", so such queries fail.
Steps to Reproduce:
1. Create a database file connected to a MySQL/MariaDB server (wizard:
MySQL, direct connection or JDBC) and save it.
2. Turn the setting off, as it is in some existing files, e.g. with the
Basic macro
ThisComponent.DataSource.Settings.ParameterNameSubstitution = False
ThisComponent.store()
run while the Base window is the last active document.
3. Edit > Database > Advanced Settings: there is no "Replace named
parameters with '?'" checkbox.
4. Create a query in SQL view, for example
SELECT * FROM t WHERE d >= :date1 AND d <= :date2
and run it.
Actual Results:
The parameter dialog asks for date1 and date2, then the server reports an
SQL syntax error near ':date1' (with "Run SQL command directly" the error
is "Parameter at position 1 is not set").
Expected Results:
Advanced Settings shows the checkbox, so the user can turn the
replacement on, and the query asks for both values and runs.
Reproducible: Always
User Profile Reset: Yes
Additional Info:
related https://bugs.documentfoundation.org/show_bug.cgi?id=174314
--
You are receiving this mail because:
You are the assignee for the bug.