| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
Make sure that QByteArray does not detach when not needed and avoid some
copies by using QByteArray::fromRawData().
Pick-to: 6.8
Change-Id: I4454a3113c6bd1fe30b404af091f5cc0f904f78a
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
Pass 'const char *' when the string doesn't get modified.
Pick-to: 6.8
Change-Id: I8b2e06b027362debcd81282dc3123235a7e643a3
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
The lower bit of the sqltype is used to express NULL values and needs
therefore masked out. Do this before the acutal operations for better
readability/debugability.
Pick-to: 6.8
Change-Id: I71ee97f4c38241ccc9804562e2826ce9b53567ba
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Cleanup the code by replacing repeated access to sqlda->sqlvar[] with a
temporary (const) ref to enhance readability and avoid repeated lookups.
Pick-to: 6.8
Change-Id: I716812f4446bac7fb3e92bc6fbb099845836624f
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Andreas Bacher <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Cache the return value of QIBaseResult::record() to avoid the recreation
(e.g. when using QSqlQuery::value(QString) instead index-based ones).
Pick-to: 6.8
Change-Id: I88568d99ba96e19ae6b661d058e7709ebc5ef2a2
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
... instead Q_CC_MSVC to be in sync with qlocale_tools_p.h and avoid
compiler erros when used with msvc versions not providing int128
support.
Pick-to: 6.8
Change-Id: Ia2166a6260a9340a5e5bbca3f46c3b77a9f8d50d
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since name clashes between logging categories are so common, having a
way to explicitly avoid them is important. So far, we are depending on
internals of Q_LOGGING_CATEGORY to place the "static" in the right
location. That's less than ideal.
Task-number: QTBUG-67692
Change-Id: Ifeda5297d1d1220a57118b3bf7c7310e4ddd4f93
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous patch missed the handling of SQL_INT128 in
qIBaseTypeName2().
This amends 373ae6cbd24cf0ddbed453e14b1f683e76c92bb5
Pick-to: 6.8
Change-Id: I646bd5af23c14761195f9c1089dc4cbbe2e94790
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Andreas Bacher <[email protected]>
|
|
|
|
|
| |
Change-Id: I6a6f4d4e4c2e4fa8b83078ee5864cc923265ac2e
Reviewed-by: Edward Welbourne <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement partial support for SQL_INT128 datatype which is used for
DECIMAL/NUMERIC columns with a precision > 18. This support is only
available when QT_SUPPORTS_INT128 is defined and for MSVC.
Binding values to columns which need SQL_INT128 is supported but
numbers given as QString will be converted to doubles even if
QSql::HighPrecision is set.
[ChangeLog][SQL][IBASE] Added support for SQL_INT128 datatype.
Task-number: QTBUG-124575
Change-Id: If3fb1eb0f19dc60f000d163f3bf45da7acb08c87
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Andreas Bacher <[email protected]>
|
|
|
|
|
|
|
| |
Factor out setting numeric values for better readability.
Change-Id: I8980c63e87934e3bc3777897e9cd42aef17caf51
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When connecting to an old Firebird instence with a Qt Firebird plugin
linked against Firebird >= 4 the timezone table is not available and
therefore open() will fail. Therefore downgrade the non-existence of
this table to a qCInfo().
Fixes: QTBUG-125467
Change-Id: Iae6d110bc2a48b5b90ffb9cb38f3fba60f30770f
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Andreas Bacher <[email protected]>
|
|
|
|
|
|
|
|
| |
Looks like the CI does not compile the IBase/Firebird plugin so this
compile error slipped through.
Change-Id: I2e20088e10baa91f2e1e5e2b5656dfb7bdf42896
Reviewed-by: Samuel Gaist <[email protected]>
|
|
|
|
|
|
|
|
| |
Move the calculation of the decimal scale into own function and preserve
HighPrecision string values by not converting them into doubles before.
Change-Id: I839923189e9f6b1f8fb9ce234c987423703b79bf
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
Print a warning when we encounter an unsupported data type.
Pick-to: 6.7 6.5
Change-Id: If35ac4dfdf29e555ec406f592c1001b5e16f8ff2
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
... instead three times in a row.
Pick-to: 6.7
Change-Id: If08b4c092cfb5b7d224f9a94afb7d395ce2b2eca
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.ibase
Change-Id: Id7cdc54b8b01ee5af0526e3c522c2511697380d3
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.oci
Change-Id: Ib143cfa3136a7382adbabfe4bc421b94e2a25bda
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.mimer
Change-Id: I1b0d149a1a6317eec3b821dee99d952ef1000c28
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Fredrik Ålund <[email protected]>
|
|
|
|
|
|
|
|
|
| |
To avoid usage errors like fixed with
7e5a0b54f0737986b6716bfce0a43eba2e62aae0
Pick-to: 6.7
Change-Id: I33af9721a04e80541c027fa6da8630070a5957ac
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
.. by playing it safe and taking the QVariant by copy
Pick-to: 6.7 6.5
Change-Id: I24e0507a912388b7fb17e838a22e8d4c449bcf5b
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Seems to have been left out by 874f5c1f463cad61f49e0ff7007852a73fd93e7c
Pick-to: 6.7
Fixes: QTBUG-123478
Change-Id: Ic028c3786203cbc1c3d7316c1ae22c12a928b170
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
We must not try to escape a driver string, the user has to make sure
that everything is correctly escaped when passing a complete driver
string. This fixes a regression from QTBUG-122642.
Pick-to: 6.7
Fixes: QTBUG-123444
Change-Id: I43316c7a09060f5c8117fdc3c464d239e37d9cdf
Reviewed-by: Mark Brand <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... but use QStringView instead in setConnectionOptions() and the
dependent functions.
Also remove the (undocumented) ability to pass the connection options in
non-uppercase - this was never supported and all other plugins don't
support this either.
[ChangeLog][SQL][ODBC] All options must now be upper-cased as documented. Lower-cased options are no longer supported.
Change-Id: I822db1ddf205c22fe939299c4ab741bbe9b56d65
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.sqlite
Change-Id: I70880fca579df56500ddc94a72bc6c616c475e67
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.mysql
Change-Id: I7e6529025dceb81c47571c65b7aea9bd274814e2
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.odbc
Change-Id: I1411e80fa33582857bafdf77baee75b293df56af
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
Change the invalid static_cast<std::int16_t>(i)+1
to the correct static_cast<std::int16_t>(i+1).
Change-Id: I5d3e17d29deb2a70fa0d7d7838531a3dc80b4e45
Reviewed-by: Giuseppe D'Angelo <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Calling data() for parameters of the type bigint
failed in combination with stored procedures with
output parameters. Cast the result to qlonglong to
fix it.
Pick-to: 6.7 6.6
Change-Id: I84ef04ed26821b92ef7c5bcdf12b778e91450e0b
Reviewed-by: Giuseppe D'Angelo <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These options are declared with TYPE enum and a MAPPING that's supposed
to control the feature 'system-zlib' or 'system-sqlite'. Since only
inputs of type boolean control features now, we need to somehow declare
that this non-boolean input controls a feature.
We do this by adding the keyword CONTROLS_FEATURE to
qt_commandline_option. For example,
qt_commandline_option(zlib
CONTROLS_FEATURE
TYPE enum
NAME system-zlib
MAPPING system yes qt no
)
declares
- commandline option "zlib" sets the input "system-zlib",
because of the "NAME system-zlib" argument
- accepted input values are "system" and "qt", because
we have "TYPE enum" and the odd values of MAPPING
- those values are translated to yes/no, because of the
even values of MAPPING
- CONTROLS_FEATURE forces the translated input's type
to boolean, and with that it will set the corresponding
feature 'system-zlib'
Luckily, only qtbase has command line options with MAPPING declared.
Change-Id: I82d06cec43ece3b002c8f5dd414c68dc730909af
Reviewed-by: Alexandru Croitor <[email protected]>
|
|
|
|
|
|
|
| |
Use the categorized logger qt.sql.postgresql
Change-Id: I480346cadb879c22874f0af92d6e05d513f25b48
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The postgresql server by default returns the datetime in it's local
timezone. This works as long as this is the same as on the client. If
they are different, the parsing is going wrong.. Therefore let the
server return the datetime in UTC. Also do not convert the datetime into
local time to be in sync with the MySQL plugin.
[ChangeLog][SQL][PostgreSQL] Fixed a bug where a wrong QDateTime might
be returned when the PostgreSQL server and the Qt client had different
time zones configured.
Fixes: QTBUG-115960
Change-Id: I1a6dda69359a34b99ef399b2a54f35c8ba041326
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Creating a QString from a QDate/QTime works even when
QT_CONFIG(datestring) is not defined, so no need to ifdef it out.
Pick-to: 6.7
Change-Id: Ib3594036f309393b612d3fbf21f51be9c36a9391
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MYSQL_TIME structure doesn't support per-datum timezone and in any
case the server would not store it: the TIMESTAMP type is always stored
in UTC. So instead let's configure the session time zone to UTC and use
QDateTime to convert to/from it.
Fixes https://bugs.kde.org/show_bug.cgi?id=483060
[ChangeLog][SQL][MySQL] Fixed a bug in passing QDateTime to be passed as
local time to the server, regardless of the QDateTime's time zone
setting. This would cause certain timestamps to be rejected by the
server, such as a UTC time stamp whose time numerically matched the
local timezone's spring forward gap in the transition into Daylight
Savings Time.
Change-Id: I6818d78a57394e37857bfffd17bbce4ae43e823c
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was the only place that called it. Makes the code slightly uglier,
but removes a function that returned a raw pointer. More importantly, it
gets the actual type from QVariant, without relying on it internally
converting from QDateTime to QDate and QTime, or failing to do so in
some cases. This is going to be needed for the next commit.
Pick-to: 6.5 6.6 6.7
Change-Id: I6818d78a57394e37857bfffd17bbcd3f5057eadc
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
|
| |
These functions set/get the db-specific internal sql type but it's not
used in any of the sql plugins since ages. Any external plugin using this for some reason must be ported away until Qt7.
Change-Id: Ifb33e9d3be0b80fb4d0979d31436e89ea6a8208b
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Retrieve the default value (if set) of a column during
QSqlDatabase::record() but not for QSqlQuery::record() as it's done for
the other drivers which support retrieving the default column value.
Fixes: QTBUG-122723
Change-Id: I92e052bfa6d88e019c0151fbcbc1483a65770c55
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
| |
Replace all qWarning() with qSqlWarning() to be able to get additional
error/warning output from the handles.
Change-Id: Ieaa947fe06216b3d20b20c509080fc409803683b
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
| |
It shows for example when starting assistant.
Amends 3379fd2322d112af4ef7ce75aafe18c27746acae.
Pick-to: 6.7
Change-Id: I85196c62ff9d9caaa46a5279c3b965dc28266ba8
Reviewed-by: Christian Ehrlicher <[email protected]>
|
|
|
|
|
|
|
|
| |
This value does not change over time so no need to retrieve it from the
driver for every call. As a drive-by change the enum to an enum class.
Change-Id: I25292d724f5173fef7054bb5e7e82e82992e41c6
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Values in connection strings must be escaped when they
- contain a ; -> escape with "
- start with ' -> escape with "
- start with " -> escape with '
Fixes: QTBUG-122642
Pick-to: 6.7
Change-Id: I1df638194067af5df94a34009e1547886fdf928c
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
|
|
|
|
|
|
|
|
| |
Use SQL_SUCCEEDED(r) instead checking for SQL_SUCCESS and
SQL_SUCCESS_WITH_INFO separately on every return.
Change-Id: Ic5c0e7d13b4ce117a23bbee9311980146b13ba4d
Reviewed-by: Axel Spoerl <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Add RAII SqlStmtHandle helper class to make sure the statement handle is
properly cleaned up also on early exit.
Pick-to: 6.7
Change-Id: I7aba4472be1e2991f395eeb7e43f8dd272336694
Reviewed-by: Axel Spoerl <[email protected]>
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When SQLGetDiagRec() does not return an record, the list of
DiagRecords might be empty. This will create an assertion when trying
to access QList::front() or similar. Therefore we need to check if the
list is empty before accessing it.
This amends 4ec5c0efc756a39162b43367438fee965c229ae7
Fixes: QTBUG-122073
Pick-to: 6.7 6.6
Change-Id: I6f421d82f9b6fdf84672d755cbbe8d2adec13266
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since SQLite 3.31 there is a new open() option SQLITE_OPEN_NOFOLLOW to
disallow a filename with a symlink for security reason. Expose this
option to QSQLite via QSQLITE_OPEN_NOFOLLOW.
[ChangeLog][SQL][SQLite] Add new option QSQLITE_OPEN_NOFOLLOW to expose
open mode SQLITE_OPEN_NOFOLLOW.
Pick-to: 6.7
Change-Id: I2d6218bde2bf8b4f1bc36125dffa551b52369072
Reviewed-by: Volker Hilsheimer <[email protected]>
|
|
|
|
|
|
|
|
|
| |
... into an own function instead doing the check if fetchScroll is
available in every function.
Pick-to: 6.7
Change-Id: I8c8a1c8693f667ddf89a660b733e31505427073a
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
|
| |
... by moving the adjustment for the table/schema/catalog name into
splitTableQualifier().
Pick-to: 6.7
Change-Id: Ia392b1c2e7f29e63ea88c21492f2116eac573b5e
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This function can be merged with the other overload of qMakeFieldInfo()
because no-one uses it except qMakeFieldInfo() itself.
Pick-to: 6.7
Change-Id: I7ed07ac0c673801fed9c00c9b0ce1628cfea3837
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
The switch needs to be on QSqlField::metaType() instead the internal
QSqlField::typeID() which holds the db-specific type of this field.
This amends 7b391c0d2c03d8d25449eca3868cd010d75ff81e.
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Id1d1791826f08adb01cc3da45bf5a66bad288046
Reviewed-by: Andy Shaw <[email protected]>
|
|
|
|
|
|
|
|
| |
sqlite3 doesn't detect properly VxWorks. Add workaround that hardcodes
detected OS to "UNIX".
Change-Id: I255bb1af94caf7b15c0bd05a4d4d9df6a076fc22
Reviewed-by: Alexey Edelev <[email protected]>
|