diff options
Diffstat (limited to 'dev-qt/qtsql')
-rw-r--r-- | dev-qt/qtsql/Manifest | 3 | ||||
-rw-r--r-- | dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch | 43 | ||||
-rw-r--r-- | dev-qt/qtsql/qtsql-5.12.4-r1.ebuild (renamed from dev-qt/qtsql/qtsql-5.12.4.ebuild) | 5 |
3 files changed, 50 insertions, 1 deletions
diff --git a/dev-qt/qtsql/Manifest b/dev-qt/qtsql/Manifest index 28028486c906..44b9caf52adc 100644 --- a/dev-qt/qtsql/Manifest +++ b/dev-qt/qtsql/Manifest @@ -1,5 +1,6 @@ +AUX qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch 1436 BLAKE2B 24fa12fb72f862f8f8cba401bf773b91c74dd9b0af7a7801ee3b2298ff5176981833ffbf47b4d565bd0cfd71bff9735689ce4c5dd67ea6349458af78e37dcf3c SHA512 ea8fc7333dfd966d8b850b46f83906daa508d51294e8cba19553520f0583864c86f5319627c31cb633d2dc3ef22ad1873801b780da28ee786ae3bb91a10e478e DIST qtbase-everywhere-src-5.12.3.tar.xz 48382148 BLAKE2B 779c43a75403e0f21357a90228bbcc3f216495613f4f17a2f442c7aa93f277a79cc7addf5ae44e22964069580f4932cfd14ba4773aa0ab30405d5587577a545c SHA512 1dab927573eb22b1ae772de3a418f7d3999ea78d6e667a7f2494390dd1f0981ea93f4f892cb6e124ac18812c780ee71da3021b485c61eaf1ef2234a5c12b7fe2 DIST qtbase-everywhere-src-5.12.4.tar.xz 48431020 BLAKE2B 7eeb3f6698984343ec14d03b8ad66ab23d81cd7a25c590316f7300c868ab869a9c96b125d56bba149ee116dff44bf47c751cce06f2cdd2d3121e5448708c5f6b SHA512 28b029a0d3621477f625d474b8bc38ddcc7173df6adb274b438e290b6c50bd0891e5b62c04b566a281781acee3a353a6a3b0bc88228e996994f92900448d7946 EBUILD qtsql-5.12.3.ebuild 1248 BLAKE2B 5e882a4eef1c1642aed15d9c56cf2947a81ecc23434d9553d193efde1c9bf0b6f0bc88879a844d889003bbd6d0a4051fe50318feb398d2a12a01072206bc2296 SHA512 57fb3698b7a451206507f7d43358c3e2e3a1ca92a07b7000781be7bdbdecef395a0088b979a3599ef56ed95df3b55c484644fd1772d4b500e7fc4144d2937b8b -EBUILD qtsql-5.12.4.ebuild 1254 BLAKE2B 614f00cb5d8d9c8a9a42340e6c01f3ee684527f5a5b3336fa5666adad630a51bc39889820592f0f104c00304d3bef75e23ac536760a369226636b95c94e97283 SHA512 342c4dff5f1f6ed4a2b5824213427c5f4a2c310bd1a16a933d2cd1ab1eca9a5d03d442a5569b19915a3cb32f733a645adf0f946b6fb306e1a5be7654e5aa1615 +EBUILD qtsql-5.12.4-r1.ebuild 1375 BLAKE2B b9d86e57a064211b7a4ed9a66490c10c1bcd2f89c9fb42e52c9221a345de372db00059cbc13691f5dc6661b8194032353011e5b9fb08f424e753407c9de4aa08 SHA512 fbbd9791fafa46ffa51e981b6e1c61f4a25c319e9dfdb07fcf97851049fccb792dd629fd944f939ac475e1c10fa18cccd99dcb54f094bbfacea4526b0ea818a6 MISC metadata.xml 481 BLAKE2B 210b94f2e7cdb09b2e07ec4a931ea47d5aed734be52e9dcb132ae174fc0707ebd82feff52e44490c7133274c4dd31b0898f9fa54ce700b635b6a45c2cbf2b5c6 SHA512 bc22732d392630b21ba3895b22a3b1835fe639f930bad0ebab511757df89ebbb30530f0c482ff0a7eb24c7ba844f0b2448040dc5252ac98b0ac01423f236829f diff --git a/dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch b/dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch new file mode 100644 index 000000000000..6bd3d3d2b9bd --- /dev/null +++ b/dev-qt/qtsql/files/qtsql-5.12.4-mysql_free_results_when_qsqlquery_finished_is_called.patch @@ -0,0 +1,43 @@ +From 97d8be10cd97cf997286ed0ca0a5d8b360fa942e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org> +Date: Sat, 1 Dec 2018 17:56:41 +0100 +Subject: [PATCH] MySQL: Free the results when QSqlQuery::finished() is called + +Calling mysql_stmt_free_result() frees the results of the last +executed query while keeping the prepared statement valid. This +allows one to keep around prepared QSqlQueries without the overhead +of keeping all the results in memory. + +Change-Id: I4589e90857cc4e9a6f9612799bfca967a67e2ab2 +Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> +Reviewed-by: Andy Shaw <andy.shaw@qt.io> +--- + src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp ++++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp +@@ -197,6 +197,7 @@ protected: + QSqlRecord record() const override; + void virtual_hook(int id, void *data) override; + bool nextResult() override; ++ void detachFromResultSet() override; + + #if MYSQL_VERSION_ID >= 40108 + bool prepare(const QString &stmt) override; +@@ -804,6 +805,15 @@ int QMYSQLResult::numRowsAffected() + return d->rowsAffected; + } + ++void QMYSQLResult::detachFromResultSet() ++{ ++ Q_D(QMYSQLResult); ++ ++ if (d->preparedQuery) { ++ mysql_stmt_free_result(d->stmt); ++ } ++} ++ + QVariant QMYSQLResult::lastInsertId() const + { + Q_D(const QMYSQLResult); diff --git a/dev-qt/qtsql/qtsql-5.12.4.ebuild b/dev-qt/qtsql/qtsql-5.12.4-r1.ebuild index ba9ab526b7ec..d1e4e555dd9c 100644 --- a/dev-qt/qtsql/qtsql-5.12.4.ebuild +++ b/dev-qt/qtsql/qtsql-5.12.4-r1.ebuild @@ -38,6 +38,11 @@ QT5_GENTOO_PRIVATE_CONFIG=( :sql ) +PATCHES+=( + # Backport from dev branch + "${FILESDIR}/${P}-mysql_free_results_when_qsqlquery_finished_is_called.patch" +) + src_configure() { local myconf=( $(qt_use freetds sql-tds plugin) |