diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-09 05:48:53 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-10 07:16:25 +0700 |
commit | f67bb8de4dff7b5c9fa407a78969a2a5d44a2c03 (patch) | |
tree | 390e77cb975a09dd477c5a0ce717fb1e3af7b62e /development | |
parent | 1b6cf4e2f15329eaf209049b2fb6ce1ab769c199 (diff) | |
download | slackbuilds-f67bb8de4dff7b5c9fa407a78969a2a5d44a2c03.tar.gz |
development/mysql-workbench: Updated for version 6.3.9.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
8 files changed, 274 insertions, 71 deletions
diff --git a/development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch b/development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch new file mode 100644 index 0000000000..31471fa9c6 --- /dev/null +++ b/development/mysql-workbench/add-option-to-hide-nonstandard-server-warning.patch @@ -0,0 +1,36 @@ +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 + diff --git a/development/mysql-workbench/copytable.patch b/development/mysql-workbench/copytable.patch index fbdd928bc8..3a061cd6d0 100644 --- a/development/mysql-workbench/copytable.patch +++ b/development/mysql-workbench/copytable.patch @@ -1,18 +1,17 @@ ---- mysql-workbench-community-6.3.8-src/plugins/migration/copytable/copytable.cpp.orig 2016-10-23 15:39:11.356781884 +0700 -+++ mysql-workbench-community-6.3.8-src/plugins/migration/copytable/copytable.cpp 2016-10-23 15:39:36.864471189 +0700 -@@ -2847,14 +2847,7 @@ +--- mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp.orig 2017-02-08 22:15:34.084153506 +0700 ++++ mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp 2017-02-08 22:23:01.194114625 +0700 +@@ -2611,14 +2606,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 (_target->is_mysql_version_at_least(5, 7, 6)) -- ret_length += mysql_real_escape_string_quote(_mysql, buffer + length, data, (unsigned long)dlength, '`'); -- else -- ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); -- #else + +-#if MYSQL_CHECK_VERSION(5, 7, 6) +- 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 - ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); -- #endif -+ ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); +-#else + ret_length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); +-#endif - if( ret_length != (unsigned long) -1) + if (ret_length != (unsigned long)-1) length += ret_length; diff --git a/development/mysql-workbench/disable-unsupported-operating-system-warning.patch b/development/mysql-workbench/disable-unsupported-operating-system-warning.patch new file mode 100644 index 0000000000..56aef14132 --- /dev/null +++ b/development/mysql-workbench/disable-unsupported-operating-system-warning.patch @@ -0,0 +1,29 @@ +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 + diff --git a/development/mysql-workbench/fix-build-for-i686.patch b/development/mysql-workbench/fix-build-for-i686.patch new file mode 100644 index 0000000000..cf4364f4e5 --- /dev/null +++ b/development/mysql-workbench/fix-build-for-i686.patch @@ -0,0 +1,140 @@ +From af2bff95077b376a21ba815505589f4ad6b62140 Mon Sep 17 00:00:00 2001 +From: Christian Hesse <mail@eworm.de> +Date: Tue, 7 Feb 2017 23:10:23 +0100 +Subject: [PATCH 1/1] fix build for i686 + +Signed-off-by: Christian Hesse <mail@eworm.de> +--- + library/base/jsonparser.cpp | 6 ++++-- + library/forms/jsonview.cpp | 12 ++++++++++++ + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/library/base/jsonparser.cpp b/library/base/jsonparser.cpp +index 6ed4b3f..fb4e055 100644 +--- a/library/base/jsonparser.cpp ++++ b/library/base/jsonparser.cpp +@@ -343,7 +343,7 @@ namespace JsonParser { + */ + JsonValue &JsonArray::at(SizeType pos) { + if (pos > _data.size()) +- throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos)); ++ throw std::out_of_range(base::strfmt("Index '%zu' is out of range.", pos)); + return _data.at(pos); + } + +@@ -358,7 +358,7 @@ namespace JsonParser { + */ + const JsonValue &JsonArray::at(SizeType pos) const { + if (pos > _data.size()) +- throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos)); ++ throw std::out_of_range(base::strfmt("Index '%zu' is out of range.", pos)); + return _data.at(pos); + } + +@@ -1668,12 +1668,14 @@ namespace JsonParser { + case VDouble: + _output += std::to_string((double)value); + break; ++#ifdef DEFINE_UINT64_T_FUNCTIONS + case VInt64: + _output += std::to_string((int64_t)value); + break; + case VUint64: + _output += std::to_string((uint64_t)value); + break; ++#endif + case VObject: + write((JsonObject)value); + break; +diff --git a/library/forms/jsonview.cpp b/library/forms/jsonview.cpp +index 1259427..2d50491 100644 +--- a/library/forms/jsonview.cpp ++++ b/library/forms/jsonview.cpp +@@ -651,8 +651,10 @@ void JsonTreeBaseView::setCellValue(mforms::TreeNodeRef node, int column, const + if (data != nullptr) { + std::stringstream buffer; + double number = 0; ++#ifdef DEFINE_UINT64_T_FUNCTIONS + int64_t number2 = 0; + uint64_t number3 = 0; ++#endif + bool retBool = false; + auto &storedValue = data->getData(); + switch (storedValue.getType()) { +@@ -664,6 +666,7 @@ void JsonTreeBaseView::setCellValue(mforms::TreeNodeRef node, int column, const + storedValue = number; + setData = true; + break; ++#ifdef DEFINE_UINT64_T_FUNCTIONS + case VInt64: + if (!base::is_number(value)) + break; +@@ -680,6 +683,7 @@ void JsonTreeBaseView::setCellValue(mforms::TreeNodeRef node, int column, const + storedValue = number3; + setData = true; + break; ++#endif + case VBoolean: + if (!base::isBool(value)) + break; +@@ -1073,6 +1077,7 @@ void JsonTreeView::generateNumberInTree(JsonParser::JsonValue &value, int /*colu + node->set_string(1, std::to_string((double)value)); + node->set_string(2, "Double"); + break; ++#ifdef DEFINE_UINT64_T_FUNCTIONS + case VInt64: + node->set_string(1, std::to_string((int64_t)value)); + node->set_string(2, "Long Integer"); +@@ -1081,6 +1086,7 @@ void JsonTreeView::generateNumberInTree(JsonParser::JsonValue &value, int /*colu + node->set_string(1, std::to_string((uint64_t)value)); + node->set_string(2, "Unsigned Long Integer"); + break; ++#endif + default: + break; + } +@@ -1322,8 +1328,10 @@ void JsonGridView::setCellValue(mforms::TreeNodeRef node, int column, const std: + if (data != NULL) { + std::stringstream buffer; + double number = 0; ++#ifdef DEFINE_UINT64_T_FUNCTIONS + int64_t number2 = 0; + uint64_t number3 = 0; ++#endif + bool retBool = false; + switch (storedValue.getType()) { + case VDouble: +@@ -1334,6 +1342,7 @@ void JsonGridView::setCellValue(mforms::TreeNodeRef node, int column, const std: + storedValue = number; + node->set_float(column, number); + _dataChanged(false); ++#ifdef DEFINE_UINT64_T_FUNCTIONS + case VInt64: + if (!base::is_number(value)) + break; +@@ -1352,6 +1361,7 @@ void JsonGridView::setCellValue(mforms::TreeNodeRef node, int column, const std: + node->set_float(column, (double)number3); + _dataChanged(false); + break; ++#endif + case VBoolean: + if (!base::isBool(value)) + break; +@@ -1611,12 +1621,14 @@ void JsonGridView::generateNumberInTree(JsonParser::JsonValue &value, int column + case VDouble: + node->set_float(columnId, (double)value); + break; ++#ifdef DEFINE_UINT64_T_FUNCTIONS + case VInt64: + node->set_long(columnId, (int64_t)value); + break; + case VUint64: + node->set_long(columnId, (uint64_t)value); + break; ++#endif + default: + break; + } +-- +2.11.1 + diff --git a/development/mysql-workbench/mysql-workbench-no-json.patch b/development/mysql-workbench/mysql-workbench-no-json.patch index d290c26188..100b27a48e 100644 --- a/development/mysql-workbench/mysql-workbench-no-json.patch +++ b/development/mysql-workbench/mysql-workbench-no-json.patch @@ -1,58 +1,49 @@ -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"; +--- mysql-workbench-community-6.3.9-src/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp.orig 2017-02-08 22:24:43.203746527 +0700 ++++ mysql-workbench-community-6.3.9-src/backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp 2017-02-08 22:25:07.878416096 +0700 +@@ -314,9 +314,6 @@ + case sql::DataType::SET: + type = "string"; + break; +- case sql::DataType::JSON: +- type = "json"; +- break; + case sql::DataType::SQLNULL: + type = "null"; + break; +--- mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp.orig 2017-02-08 22:15:34.084153506 +0700 ++++ mysql-workbench-community-6.3.9-src/plugins/migration/copytable/copytable.cpp 2017-02-08 22:23:01.194114625 +0700 +@@ -109,8 +109,6 @@ + return "MYSQL_TYPE_STRING"; + case MYSQL_TYPE_GEOMETRY: + return "MYSQL_TYPE_GEOMETRY"; +- case MYSQL_TYPE_JSON: +- return "MYSQL_TYPE_JSON"; default: return "UNKNOWN"; } -@@ -241,7 +241,7 @@ RowBuffer::RowBuffer(boost::shared_ptr<std::vector<ColumnInfo> > columns, +@@ -295,7 +293,6 @@ 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) - { +@@ -1391,8 +1388,7 @@ + if (rowbuffer[index].buffer_type == MYSQL_TYPE_TINY_BLOB || + 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_STRING) { 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 +2158,6 @@ + case MYSQL_TYPE_STRING: + case MYSQL_TYPE_ENUM: + case MYSQL_TYPE_SET: +- 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); diff --git a/development/mysql-workbench/mysql-workbench.SlackBuild b/development/mysql-workbench/mysql-workbench.SlackBuild index 7bd0f88243..1584f201a5 100644 --- a/development/mysql-workbench/mysql-workbench.SlackBuild +++ b/development/mysql-workbench/mysql-workbench.SlackBuild @@ -2,8 +2,8 @@ # Slackware build script for mysql-workbench -# Originally written by André Geraldo Vieira <andre.geraldo@gmail.com> -# Copyright 2013-2016 Willy Sudiarto Raharjo <willysr@slackbuilds.org> +# Originally written by Andre Geraldo Vieira <andre.geraldo@gmail.com> +# Copyright 2013-2017 Willy Sudiarto Raharjo <willysr@slackbuilds.org> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,8 +25,8 @@ PRGNAM=mysql-workbench PRGNAM2=antlr -VERSION=${VERSION:-6.3.8} -ANTLRVER=3.5.2 +VERSION=${VERSION:-6.3.9} +ANTLRVER=3.4 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -91,6 +91,8 @@ patch -p1 < $CWD/mysql-workbench-no-set-gtid-purged.patch # gnome-keyring package in stable release as well patch -p1 < $CWD/mysql-workbench-gnome-keyring.patch +# Patch to remove JSON support +# MariaDB support for JSON started at 10.2 patch -p1 < $CWD/mysql-workbench-no-json.patch # Self-made patch @@ -99,6 +101,12 @@ patch -p1 < $CWD/mysql-workbench-no-json.patch # https://dev.mysql.com/doc/refman/5.7/en/mysql-real-escape-string-quote.html patch -p1 < $CWD/copytable.patch +# Patch to disable warning on Slackware and fix for x86 +# Taken from ARCH Linux +patch -p1 < $CWD/disable-unsupported-operating-system-warning.patch +patch -p1 < $CWD/add-option-to-hide-nonstandard-server-warning.patch +patch -p1 < $CWD/fix-build-for-i686.patch + install -D $CWD/$PRGNAM2-$ANTLRVER-complete.jar $TMP/linux-res/bin/$PRGNAM2-$ANTLRVER-complete.jar # make cmake happy with mariadb diff --git a/development/mysql-workbench/mysql-workbench.info b/development/mysql-workbench/mysql-workbench.info index 41bfc0e4ac..65aaec26d1 100644 --- a/development/mysql-workbench/mysql-workbench.info +++ b/development/mysql-workbench/mysql-workbench.info @@ -1,12 +1,12 @@ PRGNAM="mysql-workbench" -VERSION="6.3.8" +VERSION="6.3.9" HOMEPAGE="https://www.mysql.com/downloads/workbench/" -DOWNLOAD="http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-6.3.8-src.tar.gz \ - http://www.antlr3.org/download/antlr-3.5.2-complete.jar" -MD5SUM="3c4b773181c14ba4754a6af81513e2fd \ - acfa69f928a0f1653555bda73091efca" +DOWNLOAD="http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-6.3.9-src.tar.gz \ + http://www.antlr3.org/download/antlr-3.4-complete.jar" +MD5SUM="4a90ee9aa2d64a7e49cd4046beb7b956 \ + 1b91dea1c7d480b3223f7c8a9aa0e172" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="tinyxml mysql-connector-c++ vsqlite++ ctemplate paramiko pexpect lua wxPython gdal libantlr3c jdk" +REQUIRES="tinyxml mysql-connector-c++ vsqlite++ ctemplate paramiko pexpect lua wxPython gdal libantlr3c jdk unixODBC" MAINTAINER="Willy Sudiarto Raharjo" EMAIL="willysr@slackbuilds.org" diff --git a/development/mysql-workbench/slack-desc b/development/mysql-workbench/slack-desc index b1521a1106..bcb6115803 100644 --- a/development/mysql-workbench/slack-desc +++ b/development/mysql-workbench/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -mysql-workbench: mysql-workbench (GUI Tool) +mysql-workbench: mysql-workbench (GUI Tool for MySQL/MariaDB) mysql-workbench: mysql-workbench: MySQL Workbench provides DBAs and developers an integrated tools mysql-workbench: environment for: |