Commit 3f8df78c authored by Chaoting Liu's avatar Chaoting Liu

mysql-workbench: update to 6.3.10...

- switch to gtk3
- port patch from opensuse to compile with system mariadb
- update various upstream python packages and C++ packages
  + python-paramiko, python-pytest
  + vsqlite++, mysqlconnector++
parent 3e070453
Pipeline #152 failed with stages
in 1 minute and 12 seconds
From 784599e99ee97574798512f6daf987cab8fd4cdf Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 8 Feb 2017 09:12:24 +0100
Subject: [PATCH 1/1] disable unsupported operating system warning
Signed-off-by: Christian Hesse <mail@eworm.de>
---
backend/wbprivate/workbench/wb_context.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backend/wbprivate/workbench/wb_context.cpp b/backend/wbprivate/workbench/wb_context.cpp
index 82c0fa6..f06ff99 100644
--- a/backend/wbprivate/workbench/wb_context.cpp
+++ b/backend/wbprivate/workbench/wb_context.cpp
@@ -1009,9 +1009,11 @@ void WBContext::init_finish_(WBOptions *options) {
_frontendCallbacks->show_status_text(_("Ready."));
+#if 0
if (options->open_at_startup_type !=
"run-script") // <--- so that our runtime tests don't lock up when a modal warning dialog is displayed
warnIfRunningOnUnsupportedOS();
+#endif
try {
// execute action requested from command line
--
2.11.1
From cca769c75b9421f8ef5090848cea6162ccd85ba7 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Wed, 8 Feb 2017 09:42:29 +0100
Subject: [PATCH 1/1] add option to hide nonstandard server warning
Signed-off-by: Christian Hesse <mail@eworm.de>
---
backend/wbprivate/workbench/wb_context.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/backend/wbprivate/workbench/wb_context.cpp b/backend/wbprivate/workbench/wb_context.cpp
index f06ff99..f89006b 100644
--- a/backend/wbprivate/workbench/wb_context.cpp
+++ b/backend/wbprivate/workbench/wb_context.cpp
@@ -3038,7 +3038,7 @@ std::shared_ptr<SqlEditorForm> WBContext::add_new_query_window(const db_mgmt_Con
logError("Unsupported server version: %s %s\n", form->connection_details()["dbmsProductName"].c_str(),
form->connection_details()["dbmsProductVersion"].c_str());
- if (mforms::Utilities::show_warning(
+ if (mforms::Utilities::show_message_and_remember(
base::strfmt("Connection Warning (%s)", targetConnection->name().c_str()),
base::strfmt(
"Incompatible/nonstandard server version or connection protocol detected (%s).\n\n"
@@ -3046,7 +3046,8 @@ std::shared_ptr<SqlEditorForm> WBContext::add_new_query_window(const db_mgmt_Con
"properly since the database is not fully compatible with the supported versions of MySQL.\n\n"
"MySQL Workbench is developed and tested for MySQL Server versions 5.1, 5.5, 5.6 and 5.7",
bec::sanitize_server_version_number(form->connection_details()["dbmsProductVersion"]).c_str()),
- "Continue Anyway", "Cancel") != mforms::ResultOk) {
+ "Continue Anyway", "Cancel", "", "wb.supported_server_check.suppress_warning",
+ "Don't show this message again") != mforms::ResultOk) {
_frontendCallbacks->show_status_text(_("Unsupported server"));
return SqlEditorForm::Ref();
}
--
2.11.1
--- mysql-workbench-community-6.3.9-src.orig/plugins/migration/copytable/copytable.cpp 2016-10-14 15:12:03.000000000 +0300
+++ mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp 2016-11-17 16:27:43.044632958 +0200
@@ -2847,7 +2847,7 @@
// This is needed because the escaping depends on the character set in use by the server
unsigned long ret_length = 0;
-#if MYSQL_CHECK_VERSION(5, 7, 6)
+#if MYSQL_CHECK_VERSION(5, 7, 6) && !defined(MARIADB_BASE_VERSION)
if (_target->is_mysql_version_at_least(5, 7, 6))
ret_length += mysql_real_escape_string_quote(_mysql, buffer + length, data, (unsigned long)dlength, '"');
else
diff -uNr mysql-workbench-community-6.3.10-src.org/library/cdbc/src/driver_manager.cpp mysql-workbench-community-6.3.10-src/library/cdbc/src/driver_manager.cpp
--- mysql-workbench-community-6.3.10-src.org/library/cdbc/src/driver_manager.cpp 2017-11-09 18:11:42.000000000 +0200
+++ mysql-workbench-community-6.3.10-src/library/cdbc/src/driver_manager.cpp 2018-02-05 11:51:59.083657042 +0200
@@ -297,7 +297,7 @@
if (properties.find("OPT_READ_TIMEOUT") == properties.end())
properties["OPT_READ_TIMEOUT"] = read_timeout;
}
- properties["OPT_CAN_HANDLE_EXPIRED_PASSWORDS"] = true;
+ //properties["OPT_CAN_HANDLE_EXPIRED_PASSWORDS"] = true;
properties["CLIENT_MULTI_STATEMENTS"] = true;
properties["metadataUseInfoSchema"] =
false; // I_S is way too slow for many things as of MySQL 5.6.10, so disable it for now
@@ -324,7 +324,7 @@
properties.erase("sslCipher");
}
- ssize_t sslModeWb = parameter_values.get_int("useSSL", 0);
+ /*ssize_t sslModeWb = parameter_values.get_int("useSSL", 0);
sql::ssl_mode sslMode = sql::SSL_MODE_DISABLED;
switch(sslModeWb)
{
@@ -344,7 +344,7 @@
sslMode = sql::SSL_MODE_VERIFY_IDENTITY;
break;
}
- properties["OPT_SSL_MODE"] = sslMode;
+ properties["OPT_SSL_MODE"] = sslMode;*/
// If we are on a pipe connection then set the host name explicitly.
// However, pipe connections can only be established on the local box (Win only).
diff -uNr mysql-workbench-community-6.3.10-src.org/library/sql.parser/source/my_config.h mysql-workbench-community-6.3.10-src/library/sql.parser/source/my_config.h
--- mysql-workbench-community-6.3.10-src.org/library/sql.parser/source/my_config.h 1970-01-01 03:00:00.000000000 +0300
+++ mysql-workbench-community-6.3.10-src/library/sql.parser/source/my_config.h 2018-02-05 14:09:01.328469741 +0200
@@ -0,0 +1,44 @@
+// include everything from system my_config.h
+#include_next <my_config.h>
+
+// add charsets for workbench
+#define HAVE_CHARSET_armscii8 1
+#define HAVE_CHARSET_ascii 1
+#define HAVE_CHARSET_big5 1
+#define HAVE_CHARSET_cp1250 1
+#define HAVE_CHARSET_cp1251 1
+#define HAVE_CHARSET_cp1256 1
+#define HAVE_CHARSET_cp1257 1
+#define HAVE_CHARSET_cp850 1
+#define HAVE_CHARSET_cp852 1
+#define HAVE_CHARSET_cp866 1
+#define HAVE_CHARSET_cp932 1
+#define HAVE_CHARSET_dec8 1
+#define HAVE_CHARSET_eucjpms 1
+#define HAVE_CHARSET_euckr 1
+#define HAVE_CHARSET_gb2312 1
+#define HAVE_CHARSET_gbk 1
+#define HAVE_CHARSET_geostd8 1
+#define HAVE_CHARSET_greek 1
+#define HAVE_CHARSET_hebrew 1
+#define HAVE_CHARSET_hp8 1
+#define HAVE_CHARSET_keybcs2 1
+#define HAVE_CHARSET_koi8r 1
+#define HAVE_CHARSET_koi8u 1
+#define HAVE_CHARSET_latin1 1
+#define HAVE_CHARSET_latin2 1
+#define HAVE_CHARSET_latin5 1
+#define HAVE_CHARSET_latin7 1
+#define HAVE_CHARSET_macce 1
+#define HAVE_CHARSET_macroman 1
+#define HAVE_CHARSET_sjis 1
+#define HAVE_CHARSET_swe7 1
+#define HAVE_CHARSET_tis620 1
+#define HAVE_CHARSET_ucs2 1
+#define HAVE_CHARSET_ujis 1
+#define HAVE_CHARSET_utf8mb4 1
+#define HAVE_CHARSET_utf8mb3 1
+#define HAVE_CHARSET_utf8 1
+#define HAVE_CHARSET_utf16 1
+#define HAVE_CHARSET_utf32 1
+#define HAVE_UCA_COLLATIONS 1
diff --git a/plugins/migration/copytable/copytable.cpp b/plugins/migration/copytable/copytable.cpp
index 7b760e0..ec05d11 100644
--- a/plugins/migration/copytable/copytable.cpp
+++ b/plugins/migration/copytable/copytable.cpp
@@ -1922,7 +1922,7 @@ MySQLCopyDataTarget::MySQLCopyDataTarget(const std::string &hostname, int port,
mysql_init(&_mysql);
#if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH)
#if MYSQL_CHECK_VERSION(5,6,6)
- if (is_mysql_version_at_least(5,6,6))
+ if (MySQLCopyDataTarget::is_mysql_version_at_least(5,6,6))
mysql_options4(&_mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", app_name.c_str());
#endif
#endif
diff --git a/plugins/migration/copytable/copytable.cpp b/plugins/migration/copytable/copytable.cpp
index de52d91..2df53a4 100644
--- a/plugins/migration/copytable/copytable.cpp
+++ b/plugins/migration/copytable/copytable.cpp
@@ -79,7 +79,7 @@ static const char *mysql_field_type_to_name(enum enum_field_types type)
case MYSQL_TYPE_VAR_STRING: return "MYSQL_TYPE_VAR_STRING";
case MYSQL_TYPE_STRING: return "MYSQL_TYPE_STRING";
case MYSQL_TYPE_GEOMETRY: return "MYSQL_TYPE_GEOMETRY";
- case MYSQL_TYPE_JSON: return "MYSQL_TYPE_JSON";
+// case MYSQL_TYPE_JSON: return "MYSQL_TYPE_JSON";
diff -Pdpru mysql-workbench-community-6.3.5-src.orig/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
mysql-workbench-community-6.3.5-src/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
--- mysql-workbench-community-6.3.5-src.orig/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp 2015-10-17 16:35:49.000000000 +0200
+++ mysql-workbench-community-6.3.5-src/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp 2015-11-12 06:33:10.787604909 +0100
@@ -314,9 +314,9 @@ public:
case sql::DataType::SET:
type = "string";
break;
- case sql::DataType::JSON:
- type = "json";
- break;
+// case sql::DataType::JSON:
+// type = "json";
+// break;
case sql::DataType::SQLNULL:
type = "null";
break;
diff -Pdpru mysql-workbench-community-6.3.5-src.orig/plugins/migration/copytable/copytable.cpp mysql-workbench-community-6.3.5-src/plugins/migration/copytable/copytable.cpp
--- mysql-workbench-community-6.3.5-src.orig/plugins/migration/copytable/copytable.cpp 2015-10-17 16:35:48.000000000 +0200
+++ mysql-workbench-community-6.3.5-src/plugins/migration/copytable/copytable.cpp 2015-11-12 00:02:35.378227904 +0100
@@ -109,8 +109,8 @@ static const char *mysql_field_type_to_n
return "MYSQL_TYPE_STRING";
case MYSQL_TYPE_GEOMETRY:
return "MYSQL_TYPE_GEOMETRY";
- case MYSQL_TYPE_JSON:
- return "MYSQL_TYPE_JSON";
+// case MYSQL_TYPE_JSON:
+// return "MYSQL_TYPE_JSON";
default:
return "UNKNOWN";
}
@@ -241,7 +241,7 @@ RowBuffer::RowBuffer(boost::shared_ptr<std::vector<ColumnInfo> > columns,
@@ -241,7 +241,7 @@ RowBuffer::RowBuffer(boost::shared_ptr<s
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_BIT:
- case MYSQL_TYPE_JSON:
+// case MYSQL_TYPE_JSON:
if (!col->is_long_data)
bind.buffer_length = (unsigned)col->source_length+1;
bind.buffer_length = (unsigned)col->source_length + 1;
@@ -1551,8 +1551,8 @@ bool MySQLCopyDataSource::fetch_row(RowBuffer &rowbuffer)
rowbuffer[index].buffer_type == MYSQL_TYPE_LONG_BLOB ||
rowbuffer[index].buffer_type == MYSQL_TYPE_BLOB ||
rowbuffer[index].buffer_type == MYSQL_TYPE_STRING ||
- rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY ||
- rowbuffer[index].buffer_type == MYSQL_TYPE_JSON)
+ rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY)
+// rowbuffer[index].buffer_type == MYSQL_TYPE_JSON)
{
@@ -1393,7 +1393,7 @@ bool MySQLCopyDataSource::fetch_row(RowB
rowbuffer[index].buffer_type == MYSQL_TYPE_MEDIUM_BLOB ||
rowbuffer[index].buffer_type == MYSQL_TYPE_LONG_BLOB || rowbuffer[index].buffer_type == MYSQL_TYPE_BLOB ||
rowbuffer[index].buffer_type == MYSQL_TYPE_STRING ||
- rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON) {
+ rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY) {
if (rowbuffer[index].buffer_length)
free(rowbuffer[index].buffer);
@@ -2357,7 +2357,7 @@ bool MySQLCopyDataTarget::append_bulk_column(size_t col_index)
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET:
- case MYSQL_TYPE_JSON:
+// case MYSQL_TYPE_JSON:
_bulk_insert_record.append("'", 1);
ret_val = _bulk_insert_record.append_escaped((char*)(*_row_buffer)[col_index].buffer, *(*_row_buffer)[col_index].length);
_bulk_insert_record.append("'", 1);
diff --git a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
index f5c2ffb..b42ba6a 100644
--- a/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
+++ b/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
@@ -300,9 +300,9 @@ public:
case sql::DataType::SET:
type= "string";
break;
- case sql::DataType::JSON:
+ /* case sql::DataType::JSON:
type = "json";
- break;
+ break; */
case sql::DataType::SQLNULL:
type = "null";
break;
@@ -2162,7 +2162,7 @@ bool MySQLCopyDataTarget::append_bulk_co
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET:
- case MYSQL_TYPE_JSON:
+// case MYSQL_TYPE_JSON:
_bulk_insert_record.append("'", 1);
ret_val = _bulk_insert_record.append_escaped((char *)(*_row_buffer)[col_index].buffer,
*(*_row_buffer)[col_index].length);
pkgname=mysql-workbench
pkgver=6.3.7
pkgver=6.3.10
pkgrel=1
pkgdesc='A cross-platform, visual database design tool developed by MySQL'
arch=('x86_64')
url='https://www.mysql.com/products/workbench/'
license=('GPL2')
depends=('python2' 'libzip' 'libmariadbclient' 'gtkmm' 'ctemplate'
depends=('python2' 'libzip' 'libmariadbclient' 'gtkmm3' 'ctemplate'
'libgnome-keyring' 'libgl' 'python2-paramiko' 'python2-pexpect' 'gdal'
'pcre' 'tinyxml' 'libxml2' 'mysql-python' 'cairo'
'python2-cairo' 'hicolor-icon-theme' 'desktop-file-utils' 'libiodbc'
......@@ -14,22 +14,29 @@ depends=('python2' 'libzip' 'libmariadbclient' 'gtkmm' 'ctemplate'
optdepends=('python2-pyodbc: database migration')
makedepends=('cmake' 'boost' 'curl' 'mesa' 'swig' 'java-runtime' 'imagemagick')
install=mysql-workbench.install
source=("http://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-${pkgver}-src.tar.gz"
'http://www.antlr3.org/download/antlr-3.4-complete.jar'
'0001-mysql-workbench-no-check-for-updates.patch'
'0007-mysql-workbench-no-set-gtid-purged.patch'
'0009-mysql-workbench-gnome-keyring.patch'
'0010-mysql-workbench-object.patch'
'0013-mysql-workbench-no-json.patch'
'arch_linux_profile.xml')
sha256sums=('84941f6dc33674a245d53a21bc14c5f0c192e370940147ddc7c236a61c0193ec'
source=("https://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-${pkgver}-src.tar.gz"
'https://www.antlr3.org/download/antlr-3.4-complete.jar'
'0001-mysql-workbench-no-check-for-updates.patch'
'0002-disable-unsupported-operating-system-warning.patch'
'0003-add-option-to-hide-nonstandard-server-warning.patch'
'0004-mariadb-no-escape-string-quote.patch'
'0005-mysql-workbench-mariadb.patch'
'0007-mysql-workbench-no-set-gtid-purged.patch'
'0009-mysql-workbench-gnome-keyring.patch'
'0013-mysql-workbench-no-json.patch'
'arch_linux_profile.xml')
sha256sums=('b5593e439c6f8d50262a8950456a9ba3709b02d1dece0360d5f6e47e1b0d7dc3'
'9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7'
'b189e15c6b6f5a707357d9a9297f39ee3a33264fd28b44d5de6f537f851f82cf'
'0d65832bc5a73d4cfecef4b552bb78a30ce6020a5fabe5558dcf2ade8341b593'
'3c9097af599f08388c471d6fd02f40ea72e5759eaa89f731e662852a5e67feea'
'cfc21dfbf735dc6490c0934db580d769d5d6bf7f155c09dadc7c8813669e4c3d'
'b6cc28627a8e25dcdc6a7e151767f09e3f1e3a599313912f4490f6d03b03f012'
'b49d4ea352d2c2013b9c5834668c44521a0a2c5f9c7e3fe746ad94ce0d2bb865'
'9c2ae2fe7a4f59502bdcf591a07353c350b0ba29c3935c8242d97848cc0e50d3'
'2bc79f935cd5059409d32aa64832b7aa2c49ba533cc93d40a063bcbfe01a4485'
'663b6eed3715988e16a695f5810bdfb7e76aaeb28baaf4b11b2a73ee2bcb403d'
'968eadbf672680578c24f6950b1e7a702a178630589751c047a30a4935b4118c'
'28724c4b4cec29ce19aada08279df1b086381cd788fef7ae07c1860f7d17af7e')
noextract=(antlr-3.4-complete.jar)
prepare() {
cd "${srcdir}/mysql-workbench-community-${pkgver}-src/"
......@@ -44,12 +51,19 @@ prepare() {
# fix gnome-keyring
patch -Np1 < "${srcdir}"/0009-mysql-workbench-gnome-keyring.patch
# fix cannot call member function without object
patch -Np1 < "${srcdir}"/0010-mysql-workbench-object.patch
# we have no JSON, probably missing in mariadb
patch -Np1 < "${srcdir}"/0013-mysql-workbench-no-json.patch
# disable unsupported operating system warning
patch -Np1 < "${srcdir}"/0002-disable-unsupported-operating-system-warning.patch
# add option to hide nonstandard server warning
patch -Np1 < "${srcdir}"/0003-add-option-to-hide-nonstandard-server-warning.patch
# mysql-workbench doesn't like mariadb
patch -Np1 -i ../0004-mariadb-no-escape-string-quote.patch
patch -Np1 -i ../0005-mysql-workbench-mariadb.patch
# make cmake happy with mariadb
sed -i '/^find_package(MySQL /c find_package(MySQL REQUIRED)' \
CMakeLists.txt
......@@ -58,6 +72,12 @@ prepare() {
sed -i '/^FIND_PROGRAM(PYTHON_EXEC /c FIND_PROGRAM(PYTHON_EXEC "python2")' \
CMakeLists.txt
# GCC 7.x introduced some new warnings, remove '-Werror' for the build to complete
sed -i '/^set/s|-Werror -Wall|-Wall|' CMakeLists.txt
# GCC 7.x complains about unsupported flag
sed -i 's|-Wno-deprecated-register||' ext/scintilla/gtk/CMakeLists.txt
# fix the swig workaround
sed -i '/SWIG_VERSION/s/0x030008/0x030006/' \
library/forms/mforms/textbox.h \
......@@ -69,8 +89,11 @@ prepare() {
backend/wbpublic/grt/spatial_handler.h \
backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp
# fix paramiko version
sed -i 's|paramiko 1.15.1|paramiko 2.4.0|' CMakeLists.txt
# put antlr into place
# put antlr into place
install -D ${srcdir}/antlr-3.4-complete.jar ${srcdir}/linux-res/bin/antlr-3.4-complete.jar
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment