From f084c8262bece1336362dd4abde99573f02954f9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 29 Dec 2012 13:27:21 +0100 Subject: MySQL Workbench 5.2.45 --- mysql-workbench-5.2.41-nodocs.patch | 67 ------------------- mysql-workbench-5.2.43-cppconn.patch | 118 ---------------------------------- mysql-workbench-5.2.43-noautocc.patch | 94 --------------------------- mysql-workbench-5.2.45-cppconn.patch | 118 ++++++++++++++++++++++++++++++++++ mysql-workbench-5.2.45-noautocc.patch | 94 +++++++++++++++++++++++++++ mysql-workbench-5.2.45-nodocs.patch | 67 +++++++++++++++++++ mysql-workbench.spec | 12 ++-- 7 files changed, 287 insertions(+), 283 deletions(-) delete mode 100644 mysql-workbench-5.2.41-nodocs.patch delete mode 100644 mysql-workbench-5.2.43-cppconn.patch delete mode 100644 mysql-workbench-5.2.43-noautocc.patch create mode 100644 mysql-workbench-5.2.45-cppconn.patch create mode 100644 mysql-workbench-5.2.45-noautocc.patch create mode 100644 mysql-workbench-5.2.45-nodocs.patch diff --git a/mysql-workbench-5.2.41-nodocs.patch b/mysql-workbench-5.2.41-nodocs.patch deleted file mode 100644 index ce1db8e..0000000 --- a/mysql-workbench-5.2.41-nodocs.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -up mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am.nodocs mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am ---- mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am.nodocs 2012-08-11 17:57:08.216320706 +0200 -+++ mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/Makefile.am 2012-08-11 18:01:21.206082661 +0200 -@@ -2,11 +2,5 @@ - pylibdir=$(libdir)/@PACKAGE@/modules - - pylib_DATA=\ -- mysqldoclib.py\ - wb_doclib_grt.py - --docdatadir=$(datadir)/mysql-workbench/modules/data/DocLibrary --docdata_DATA=\ --res/DocLibrary/mysqldoclib.sqlite\ --res/DocLibrary/mysqldoclib_webui.sqlite -- -diff -up mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py.nodocs mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py ---- mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py.nodocs 2012-08-11 17:56:09.271140967 +0200 -+++ mysql-workbench-gpl-5.2.41-src/plugins/wb.doclib/wb_doclib_grt.py 2012-08-11 17:56:18.259168247 +0200 -@@ -91,47 +91,7 @@ server_port = None - def openDocLib(): - global docLibTab - global server_port -- if docLibTab: -- if docLibTab is True: # this will be True if an external browser is used -- Utilities.open_url("http://localhost:%i"%server_port) -- return 1 -- App.get().select_view("wb.doclib") -- return 1 -- -- app = App.get() -- -- try: -- import mysqldoclib -- except ImportError: -- Utilities.show_error("Cannot Open Documentation Library", -- '''pysqlite2 is not installed, please install python-sqlite2 or pysqlite2 to be able to use this feature. --Try running "easy_install pysqlite" with superuser privileges in the command line shell or, if using --Ubuntu, enable the Universe repository and install the python-pysqlite2 package from there.''', -- "OK", "", "") -- return 0 -- -- if server_port is None: -- ready_event = Event() -- -- #datadir = "./modules/data/DocLibrary/" -- datadir = os.path.join(app.get_resource_path(""), "modules/data/DocLibrary") -- -- thread.start_new_thread(run_server, (datadir, ready_event)) -- -- # wait up to 1s for the doclib server to start -- ready_event.wait(1) -- -- if platform.system() == "Linux": -- docLibTab = True -- Utilities.open_url("http://localhost:%i"%server_port) -- return 1 -- docLibTab = DocLibTab(server_port) -- docLibTab.set_identifier("wb.doclib") -- -- app.dock_view(docLibTab, "maintab") -- app.set_view_title(docLibTab, "Doc Library (loading)") -- -- app.set_status_text("Opening Doc Library...") - -+ Utilities.open_url("http://dev.mysql.com/doc/index-gui.html") - return 1 - diff --git a/mysql-workbench-5.2.43-cppconn.patch b/mysql-workbench-5.2.43-cppconn.patch deleted file mode 100644 index 5a593d6..0000000 --- a/mysql-workbench-5.2.43-cppconn.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff -up mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp ---- mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn 2012-09-11 17:47:10.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2012-09-13 18:09:32.129077029 +0200 -@@ -49,7 +49,7 @@ - // this doesn't belong here, but there's no other workaround for having access to mysql_info - // because of that we also need to link wbprivate directly to the connector, making their - // dynamic loading pretty much useless --#include -+#include - - #include - #include -diff -up mysql-workbench-gpl-5.2.43-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp.cppconn mysql-workbench-gpl-5.2.43-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp ---- mysql-workbench-gpl-5.2.43-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp.cppconn 2012-09-11 17:47:11.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp 2012-09-13 18:09:32.130077033 +0200 -@@ -22,7 +22,7 @@ - // this doesn't belong here, but there's no other workaround for having access to mysql_info - // because of that we also need to link wbprivate directly to the connector, making their - // dynamic loading pretty much useless --#include -+#include - #include - - -diff -up mysql-workbench-gpl-5.2.43-src/configure.in.cppconn mysql-workbench-gpl-5.2.43-src/configure.in ---- mysql-workbench-gpl-5.2.43-src/configure.in.cppconn 2012-09-11 17:47:20.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/configure.in 2012-09-13 18:09:32.130077033 +0200 -@@ -487,8 +487,6 @@ res/mysql.profiles/Makefile - res/sqlidedata/Makefile - ext/Makefile - ext/scintilla/gtk/Makefile --ext/cppconn/Makefile --ext/cppconn/driver/Makefile - ext/vsqlite++/Makefile - ext/vsqlite++/src/sqlite/Makefile - backend/Makefile -diff -up mysql-workbench-gpl-5.2.43-src/ext/Makefile.am.cppconn mysql-workbench-gpl-5.2.43-src/ext/Makefile.am ---- mysql-workbench-gpl-5.2.43-src/ext/Makefile.am.cppconn 2012-09-11 17:47:07.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/ext/Makefile.am 2012-09-13 18:09:44.314125984 +0200 -@@ -7,7 +7,7 @@ if BUILD_ANTLR_RUNTIME - antlr_dirs=antlr-runtime - endif - --SUBDIRS=scintilla/gtk cppconn vsqlite++ $(antlr_dirs) $(ctemplate_dirs) -+SUBDIRS=scintilla/gtk vsqlite++ $(antlr_dirs) $(ctemplate_dirs) - - if BUNDLE_UTILITIES - all-am: -diff -up mysql-workbench-gpl-5.2.43-src/frontend/linux/workbench/Makefile.am.cppconn mysql-workbench-gpl-5.2.43-src/frontend/linux/workbench/Makefile.am ---- mysql-workbench-gpl-5.2.43-src/frontend/linux/workbench/Makefile.am.cppconn 2012-09-11 17:46:58.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/frontend/linux/workbench/Makefile.am 2012-09-13 18:09:35.484090509 +0200 -@@ -38,7 +38,6 @@ INCLUDES=@GLIB_CFLAGS@ @SIGC_CFLAGS@ @GR - -I$(top_srcdir)/modules/wb.model/src\ - -I$(top_srcdir)/modules/interfaces\ - -I$(top_srcdir)/ext\ -- -I$(top_srcdir)/ext/cppconn\ - -I$(top_srcdir)/modules\ - -I$(top_srcdir)/ext/vsqlite++/include\ - -I$(top_srcdir)/ext/scintilla/include\ -@@ -54,14 +53,13 @@ mysql_workbench_bin_LDADD=\ - $(top_srcdir)/library/base/libwbbase.la\ - $(top_srcdir)/library/grt/src/libgrt.la\ - $(top_srcdir)/library/dbc/libcdbc.la\ -- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\ - $(top_srcdir)/ext/scintilla/gtk/libwbscintilla.la\ - $(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\ - $(top_srcdir)/library/canvas/src/libmdcanvas.la\ - $(top_srcdir)/library/mysql55-parser/libmysql55parser.la\ - @CTEMPLATE_LIBS@\ - @GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\ -- -lX11 -+ -lmysqlcppconn -lX11 - - #precompiled.h.gch: precompiled.h - # $(CXXCOMPILE) precompiled.h -o precompiled.h.gch -diff -up mysql-workbench-gpl-5.2.43-src/library/dbc/src/driver_manager.cpp.cppconn mysql-workbench-gpl-5.2.43-src/library/dbc/src/driver_manager.cpp ---- mysql-workbench-gpl-5.2.43-src/library/dbc/src/driver_manager.cpp.cppconn 2012-09-11 17:47:00.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/library/dbc/src/driver_manager.cpp 2012-09-13 18:09:35.485090511 +0200 -@@ -212,6 +212,8 @@ ConnectionWrapper DriverManager::getConn - - ConnectionWrapper DriverManager::getConnection(const db_mgmt_ConnectionRef &connectionProperties, boost::shared_ptr tunnel, Authentication::Ref password, ConnectionInitSlot connection_init_slot) - { -+ gchar *p = NULL; -+ GModule *gmodule = NULL; - // 0. determine correct driver filename - - db_mgmt_DriverRef drv = connectionProperties->driver(); -@@ -221,21 +223,21 @@ ConnectionWrapper DriverManager::getConn - library = drv->driverLibraryName(); - else - throw SQLException("Invalid connection settings: undefined connection driver"); --#ifdef _WIN32 -- library.append(".dll"); --#elif defined(__APPLE__) -- library.append(".dylib"); --#else -- library.append(".so"); --#endif -+ -+ // Patch : use library in standard path -+ p = g_module_build_path (NULL, library.c_str()); - - // 1. find driver - -- GModule *gmodule= g_module_open((_driver_path + "/" + library).c_str(), G_MODULE_BIND_LOCAL); -+ if (p) { -+ gmodule = g_module_open(std::string(p).append(".6").c_str(), G_MODULE_BIND_LOCAL); -+ g_free(p); -+ } -+ - if (NULL == gmodule) - { - fprintf(stderr, "Error: %s", g_module_error()); -- throw SQLException(std::string("Database driver: Failed to open library '").append(_driver_path + "/" + library).append("'. Check settings.").c_str()); -+ throw SQLException(std::string("Database driver: Failed to open library '").append(library).append("'. Check settings.").c_str()); - } - - Driver *(* get_driver_instance)()= NULL; diff --git a/mysql-workbench-5.2.43-noautocc.patch b/mysql-workbench-5.2.43-noautocc.patch deleted file mode 100644 index 8b95913..0000000 --- a/mysql-workbench-5.2.43-noautocc.patch +++ /dev/null @@ -1,94 +0,0 @@ -diff -up mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp.noautocc mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp ---- mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp.noautocc 2012-09-11 17:47:00.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp 2012-09-13 18:21:55.207851256 +0200 -@@ -485,7 +485,11 @@ static bool validate_save_edits(wb::WBCo - - static bool validate_list_members(wb::WBContextSQLIDE *sqlide) - { -+#if 0 - return sqlide->get_grt_manager()->get_app_option_int("DbSqlEditor:CodeCompletionEnabled") != 0; -+#else -+ return false; -+#endif - } - - //-------------------------------------------------------------------------------------------------- -diff -up mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.noautocc mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp ---- mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.noautocc 2012-09-13 18:21:55.186851187 +0200 -+++ mysql-workbench-gpl-5.2.43-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2012-09-13 18:21:55.209851264 +0200 -@@ -902,6 +902,7 @@ grt::StringRef SqlEditorForm::do_connect - model->catalog(catalog); - } - -+#if 0 - if (_grtm->get_app_option_int("DbSqlEditor:CodeCompletionEnabled") == 1) - { - std::string cache_dir = _grtm->get_user_datadir() + "/cache/"; -@@ -921,6 +922,7 @@ grt::StringRef SqlEditorForm::do_connect - } - } - else -+#endif - log_debug("Code completion is disabled, so no name cache is created\n"); - - return grt::StringRef(); -diff -up mysql-workbench-gpl-5.2.43-src/backend/wbprivate/workbench/wb_context.cpp.noautocc mysql-workbench-gpl-5.2.43-src/backend/wbprivate/workbench/wb_context.cpp ---- mysql-workbench-gpl-5.2.43-src/backend/wbprivate/workbench/wb_context.cpp.noautocc 2012-09-11 17:47:19.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/backend/wbprivate/workbench/wb_context.cpp 2012-09-13 18:23:03.409093906 +0200 -@@ -1555,7 +1555,7 @@ void WBContext::set_default_options(grt: - set_default(options, "SqlEditor::SyntaxCheck::MaxErrCount", 100); - - // DB SQL editor -- options.gset("DbSqlEditor:CodeCompletionEnabled", 1); -+ options.gset("DbSqlEditor:CodeCompletionEnabled", 0); - options.gset("DbSqlEditor:AutoStartCodeCompletion", 0); // enable back when it works better - options.gset("DbSqlEditor:ProgressStatusUpdateInterval", 500); // in ms - options.gset("DbSqlEditor:KeepAliveInterval", 600); // in seconds -diff -up mysql-workbench-gpl-5.2.43-src/backend/wbpublic/sqlide/sql_editor_be.cpp.noautocc mysql-workbench-gpl-5.2.43-src/backend/wbpublic/sqlide/sql_editor_be.cpp ---- mysql-workbench-gpl-5.2.43-src/backend/wbpublic/sqlide/sql_editor_be.cpp.noautocc 2012-09-11 17:47:17.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/backend/wbpublic/sqlide/sql_editor_be.cpp 2012-09-13 18:21:55.212851274 +0200 -@@ -889,14 +889,22 @@ void Sql_editor::set_sql_check_enabled(b - - bool Sql_editor::code_completion_enabled() - { -+#if 0 - return d->_grtm->get_app_option_int("DbSqlEditor:CodeCompletionEnabled") == 1; -+#else -+ return false; -+#endif - } - - //-------------------------------------------------------------------------------------------------- - - bool Sql_editor::auto_start_code_completion() - { -+#if 0 - return d->_grtm->get_app_option_int("DbSqlEditor:AutoStartCodeCompletion") == 1; -+#else -+ return false; -+#endif - } - - //-------------------------------------------------------------------------------------------------- -diff -up mysql-workbench-gpl-5.2.43-src/frontend/common/preferences_form.cpp.noautocc mysql-workbench-gpl-5.2.43-src/frontend/common/preferences_form.cpp ---- mysql-workbench-gpl-5.2.43-src/frontend/common/preferences_form.cpp.noautocc 2012-09-11 17:47:11.000000000 +0200 -+++ mysql-workbench-gpl-5.2.43-src/frontend/common/preferences_form.cpp 2012-09-13 18:21:55.213851277 +0200 -@@ -618,6 +618,10 @@ void PreferencesForm::create_sqlide_page - - // Code completion settings is a horizontal box with two check boxes. - { -+ // Hack: force value to 0 -+ _wbui->set_wb_options_value(_model_id, "DbSqlEditor:CodeCompletionEnabled", "0", grt::IntegerType); -+ _wbui->set_wb_options_value(_model_id, "DbSqlEditor:AutoStartCodeCompletion", "0", grt::IntegerType); -+ - mforms::Box *cc_box = mforms::manage(new mforms::Box(true)); - vbox->add(cc_box, false); - mforms::CheckBox *auto_start_check = new_checkbox_option("DbSqlEditor:AutoStartCodeCompletion"); -@@ -629,6 +633,7 @@ void PreferencesForm::create_sqlide_page - check->set_text(_("Enable Code Completion in Editors")); - check->set_tooltip(_( - "If enabled SQL editors display a code completion list when pressing the defined hotkey")); -+ check->set_enabled(false); // Hack disable this checkbox - cc_box->add(check, false); - - // Set initial enabled state of the auto-cc checkbox depending on whether diff --git a/mysql-workbench-5.2.45-cppconn.patch b/mysql-workbench-5.2.45-cppconn.patch new file mode 100644 index 0000000..3512799 --- /dev/null +++ b/mysql-workbench-5.2.45-cppconn.patch @@ -0,0 +1,118 @@ +diff -up mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp +--- mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn 2012-12-27 16:43:00.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2012-12-29 11:29:22.252002525 +0100 +@@ -49,7 +49,7 @@ + // this doesn't belong here, but there's no other workaround for having access to mysql_info + // because of that we also need to link wbprivate directly to the connector, making their + // dynamic loading pretty much useless +-#include ++#include + + #include + #include +diff -up mysql-workbench-gpl-5.2.45-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp.cppconn mysql-workbench-gpl-5.2.45-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp +--- mysql-workbench-gpl-5.2.45-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp.cppconn 2012-12-27 16:42:42.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp 2012-12-29 11:29:22.253002528 +0100 +@@ -22,7 +22,7 @@ + // this doesn't belong here, but there's no other workaround for having access to mysql_info + // because of that we also need to link wbprivate directly to the connector, making their + // dynamic loading pretty much useless +-#include ++#include + #include + + +diff -up mysql-workbench-gpl-5.2.45-src/configure.in.cppconn mysql-workbench-gpl-5.2.45-src/configure.in +--- mysql-workbench-gpl-5.2.45-src/configure.in.cppconn 2012-12-27 16:43:02.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/configure.in 2012-12-29 11:29:22.254002532 +0100 +@@ -487,8 +487,6 @@ res/mysql.profiles/Makefile + res/sqlidedata/Makefile + ext/Makefile + ext/scintilla/gtk/Makefile +-ext/cppconn/Makefile +-ext/cppconn/driver/Makefile + ext/vsqlite++/Makefile + ext/vsqlite++/src/sqlite/Makefile + backend/Makefile +diff -up mysql-workbench-gpl-5.2.45-src/ext/Makefile.am.cppconn mysql-workbench-gpl-5.2.45-src/ext/Makefile.am +--- mysql-workbench-gpl-5.2.45-src/ext/Makefile.am.cppconn 2012-12-27 16:42:46.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/ext/Makefile.am 2012-12-29 11:29:22.254002532 +0100 +@@ -7,7 +7,7 @@ if BUILD_ANTLR_RUNTIME + antlr_dirs=antlr-runtime + endif + +-SUBDIRS=scintilla/gtk cppconn vsqlite++ $(antlr_dirs) $(ctemplate_dirs) ++SUBDIRS=scintilla/gtk vsqlite++ $(antlr_dirs) $(ctemplate_dirs) + + if BUNDLE_UTILITIES + all-am: +diff -up mysql-workbench-gpl-5.2.45-src/frontend/linux/workbench/Makefile.am.cppconn mysql-workbench-gpl-5.2.45-src/frontend/linux/workbench/Makefile.am +--- mysql-workbench-gpl-5.2.45-src/frontend/linux/workbench/Makefile.am.cppconn 2012-12-27 16:42:46.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/frontend/linux/workbench/Makefile.am 2012-12-29 11:36:21.491488325 +0100 +@@ -38,7 +38,6 @@ INCLUDES=@GLIB_CFLAGS@ @SIGC_CFLAGS@ @GR + -I$(top_srcdir)/modules/wb.model/src\ + -I$(top_srcdir)/modules/interfaces\ + -I$(top_srcdir)/ext\ +- -I$(top_srcdir)/ext/cppconn\ + -I$(top_srcdir)/modules\ + -I$(top_srcdir)/ext/vsqlite++/include\ + -I$(top_srcdir)/ext/scintilla/include\ +@@ -54,14 +53,13 @@ mysql_workbench_bin_LDADD=\ + $(top_srcdir)/library/base/libwbbase.la\ + $(top_srcdir)/library/grt/src/libgrt.la\ + $(top_srcdir)/library/dbc/libcdbc.la\ +- $(top_srcdir)/ext/cppconn/driver/mysqlcppconn.la\ + $(top_srcdir)/ext/scintilla/gtk/libwbscintilla.la\ + $(top_srcdir)/library/canvas/src/libmdcanvasgtk.la\ + $(top_srcdir)/library/canvas/src/libmdcanvas.la\ + $(top_srcdir)/library/mysql-parser/libmysqlparser.la\ + @CTEMPLATE_LIBS@\ + @GNOME_LIBS@ @GRT_LIBS@ @PCRE_LIBS@ @GLIB_LIBS@ @CAIRO_LIBS@ @ZIP_LIBS@ @MYSQL_LIBS@ @SQLITE3_LIBS@\ +- -lX11 ++ -lmysqlcppconn -lX11 + + #precompiled.h.gch: precompiled.h + # $(CXXCOMPILE) precompiled.h -o precompiled.h.gch +diff -up mysql-workbench-gpl-5.2.45-src/library/dbc/src/driver_manager.cpp.cppconn mysql-workbench-gpl-5.2.45-src/library/dbc/src/driver_manager.cpp +--- mysql-workbench-gpl-5.2.45-src/library/dbc/src/driver_manager.cpp.cppconn 2012-12-27 16:42:54.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/library/dbc/src/driver_manager.cpp 2012-12-29 11:29:22.255002536 +0100 +@@ -212,6 +212,8 @@ ConnectionWrapper DriverManager::getConn + + ConnectionWrapper DriverManager::getConnection(const db_mgmt_ConnectionRef &connectionProperties, boost::shared_ptr tunnel, Authentication::Ref password, ConnectionInitSlot connection_init_slot) + { ++ gchar *p = NULL; ++ GModule *gmodule = NULL; + // 0. determine correct driver filename + + db_mgmt_DriverRef drv = connectionProperties->driver(); +@@ -221,21 +223,21 @@ ConnectionWrapper DriverManager::getConn + library = drv->driverLibraryName(); + else + throw SQLException("Invalid connection settings: undefined connection driver"); +-#ifdef _WIN32 +- library.append(".dll"); +-#elif defined(__APPLE__) +- library.append(".dylib"); +-#else +- library.append(".so"); +-#endif ++ ++ // Patch : use library in standard path ++ p = g_module_build_path (NULL, library.c_str()); + + // 1. find driver + +- GModule *gmodule= g_module_open((_driver_path + "/" + library).c_str(), G_MODULE_BIND_LOCAL); ++ if (p) { ++ gmodule = g_module_open(std::string(p).append(".6").c_str(), G_MODULE_BIND_LOCAL); ++ g_free(p); ++ } ++ + if (NULL == gmodule) + { + fprintf(stderr, "Error: %s", g_module_error()); +- throw SQLException(std::string("Database driver: Failed to open library '").append(_driver_path + "/" + library).append("'. Check settings.").c_str()); ++ throw SQLException(std::string("Database driver: Failed to open library '").append(library).append("'. Check settings.").c_str()); + } + + Driver *(* get_driver_instance)()= NULL; diff --git a/mysql-workbench-5.2.45-noautocc.patch b/mysql-workbench-5.2.45-noautocc.patch new file mode 100644 index 0000000..6e34261 --- /dev/null +++ b/mysql-workbench-5.2.45-noautocc.patch @@ -0,0 +1,94 @@ +diff -up mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp.noautocc mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp +--- mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp.noautocc 2012-12-27 16:42:46.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_context_sqlide.cpp 2012-12-29 11:39:01.080015839 +0100 +@@ -486,7 +486,11 @@ static bool validate_save_edits(wb::WBCo + + static bool validate_list_members(wb::WBContextSQLIDE *sqlide) + { ++#if 0 + return sqlide->get_grt_manager()->get_app_option_int("DbSqlEditor:CodeCompletionEnabled") != 0; ++#else ++ return false; ++#endif + } + + //-------------------------------------------------------------------------------------------------- +diff -up mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.noautocc mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp +--- mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.noautocc 2012-12-29 11:39:01.054015738 +0100 ++++ mysql-workbench-gpl-5.2.45-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2012-12-29 11:41:18.919436541 +0100 +@@ -889,6 +889,7 @@ grt::StringRef SqlEditorForm::do_connect + err_ptr->password_expired = true; + throw; + } ++#if 0 + if (_grtm->get_app_option_int("DbSqlEditor:CodeCompletionEnabled") == 1) + { + std::string cache_dir = _grtm->get_user_datadir() + "/cache/"; +@@ -908,6 +909,7 @@ grt::StringRef SqlEditorForm::do_connect + } + } + else ++#endif + log_debug("Code completion is disabled, so no name cache is created\n"); + + return grt::StringRef(); +diff -up mysql-workbench-gpl-5.2.45-src/backend/wbprivate/workbench/wb_context.cpp.noautocc mysql-workbench-gpl-5.2.45-src/backend/wbprivate/workbench/wb_context.cpp +--- mysql-workbench-gpl-5.2.45-src/backend/wbprivate/workbench/wb_context.cpp.noautocc 2012-12-27 16:43:01.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/backend/wbprivate/workbench/wb_context.cpp 2012-12-29 11:39:01.084015855 +0100 +@@ -1562,7 +1562,7 @@ void WBContext::set_default_options(grt: + set_default(options, "SqlEditor::SyntaxCheck::MaxErrCount", 100); + + // DB SQL editor +- options.gset("DbSqlEditor:CodeCompletionEnabled", 1); ++ options.gset("DbSqlEditor:CodeCompletionEnabled", 0); + options.gset("DbSqlEditor:AutoStartCodeCompletion", 0); // enable back when it works better + options.gset("DbSqlEditor:ProgressStatusUpdateInterval", 500); // in ms + options.gset("DbSqlEditor:KeepAliveInterval", 600); // in seconds +diff -up mysql-workbench-gpl-5.2.45-src/backend/wbpublic/sqlide/sql_editor_be.cpp.noautocc mysql-workbench-gpl-5.2.45-src/backend/wbpublic/sqlide/sql_editor_be.cpp +--- mysql-workbench-gpl-5.2.45-src/backend/wbpublic/sqlide/sql_editor_be.cpp.noautocc 2012-12-27 16:42:46.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/backend/wbpublic/sqlide/sql_editor_be.cpp 2012-12-29 11:39:01.085015859 +0100 +@@ -912,14 +912,22 @@ void Sql_editor::set_sql_check_enabled(b + + bool Sql_editor::code_completion_enabled() + { ++#if 0 + return d->_grtm->get_app_option_int("DbSqlEditor:CodeCompletionEnabled") == 1; ++#else ++ return false; ++#endif + } + + //-------------------------------------------------------------------------------------------------- + + bool Sql_editor::auto_start_code_completion() + { ++#if 0 + return d->_grtm->get_app_option_int("DbSqlEditor:AutoStartCodeCompletion") == 1; ++#else ++ return false; ++#endif + } + + //-------------------------------------------------------------------------------------------------- +diff -up mysql-workbench-gpl-5.2.45-src/frontend/common/preferences_form.cpp.noautocc mysql-workbench-gpl-5.2.45-src/frontend/common/preferences_form.cpp +--- mysql-workbench-gpl-5.2.45-src/frontend/common/preferences_form.cpp.noautocc 2012-12-27 16:42:54.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/frontend/common/preferences_form.cpp 2012-12-29 11:39:01.086015863 +0100 +@@ -622,6 +622,10 @@ void PreferencesForm::create_sqlide_page + + // Code completion settings is a horizontal box with two check boxes. + { ++ // Hack: force value to 0 ++ _wbui->set_wb_options_value(_model.is_valid() ? _model.id() : "", "DbSqlEditor:CodeCompletionEnabled", "0", grt::IntegerType); ++ _wbui->set_wb_options_value(_model.is_valid() ? _model.id() : "", "DbSqlEditor:AutoStartCodeCompletion", "0", grt::IntegerType); ++ + mforms::Box *cc_box = mforms::manage(new mforms::Box(true)); + vbox->add(cc_box, false); + mforms::CheckBox *auto_start_check = new_checkbox_option("DbSqlEditor:AutoStartCodeCompletion"); +@@ -633,6 +637,7 @@ void PreferencesForm::create_sqlide_page + check->set_text(_("Enable Code Completion in Editors")); + check->set_tooltip(_( + "If enabled SQL editors display a code completion list when pressing the defined hotkey")); ++ check->set_enabled(false); // Hack disable this checkbox + cc_box->add(check, false); + + // Set initial enabled state of the auto-cc checkbox depending on whether diff --git a/mysql-workbench-5.2.45-nodocs.patch b/mysql-workbench-5.2.45-nodocs.patch new file mode 100644 index 0000000..680e3e1 --- /dev/null +++ b/mysql-workbench-5.2.45-nodocs.patch @@ -0,0 +1,67 @@ +diff -up mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/Makefile.am.nodocs mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/Makefile.am +--- mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/Makefile.am.nodocs 2012-12-27 16:42:48.000000000 +0100 ++++ mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/Makefile.am 2012-12-29 11:42:54.426723085 +0100 +@@ -2,11 +2,5 @@ + pylibdir=$(libdir)/@PACKAGE@/modules + + pylib_DATA=\ +- mysqldoclib.py\ + wb_doclib_grt.py + +-docdatadir=$(datadir)/mysql-workbench/modules/data/DocLibrary +-docdata_DATA=\ +-res/DocLibrary/mysqldoclib.sqlite\ +-res/DocLibrary/mysqldoclib_webui.sqlite +- +diff -up mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/wb_doclib_grt.py.nodocs mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/wb_doclib_grt.py +--- mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/wb_doclib_grt.py.nodocs 2012-12-29 11:45:01.843098903 +0100 ++++ mysql-workbench-gpl-5.2.45-src/plugins/wb.doclib/wb_doclib_grt.py 2012-12-29 11:45:39.478209799 +0100 +@@ -91,47 +91,7 @@ server_port = None + def openDocLib(): + global docLibTab + global server_port +- if docLibTab: +- if docLibTab is True: # this will be True if an external browser is used +- Utilities.open_url("http://localhost:%i"%server_port) +- return 1 +- App.get().select_view(docLibTab) +- return 1 +- +- app = App.get() +- +- try: +- import mysqldoclib +- except ImportError: +- Utilities.show_error("Cannot Open Documentation Library", +- '''pysqlite2 is not installed, please install python-sqlite2 or pysqlite2 to be able to use this feature. +-Try running "easy_install pysqlite" with superuser privileges in the command line shell or, if using +-Ubuntu, enable the Universe repository and install the python-pysqlite2 package from there.''', +- "OK", "", "") +- return 0 +- +- if server_port is None: +- ready_event = Event() +- +- #datadir = "./modules/data/DocLibrary/" +- datadir = os.path.join(app.get_resource_path(""), "modules/data/DocLibrary") +- +- thread.start_new_thread(run_server, (datadir, ready_event)) +- +- # wait up to 1s for the doclib server to start +- ready_event.wait(1) +- +- if platform.system() == "Linux": +- docLibTab = True +- Utilities.open_url("http://localhost:%i"%server_port) +- return 1 +- docLibTab = DocLibTab(server_port) +- docLibTab.set_identifier("wb.doclib") +- +- app.dock_view(docLibTab, "maintab") +- app.set_view_title(docLibTab, "Doc Library (loading)") +- +- app.set_status_text("Opening Doc Library...") + ++ Utilities.open_url("http://dev.mysql.com/doc/index-gui.html") + return 1 + diff --git a/mysql-workbench.spec b/mysql-workbench.spec index 3a2ba83..34b80a6 100644 --- a/mysql-workbench.spec +++ b/mysql-workbench.spec @@ -10,7 +10,7 @@ Summary: A MySQL visual database modeling, administration and querying tool Name: mysql-workbench -Version: 5.2.44 +Version: 5.2.45 Release: 1%{?dist} Group: Applications/Databases License: GPLv2 with exceptions @@ -26,7 +26,7 @@ Source1: stripdocs.sh # don't build extension, use system one # !!! This patch use versioned soname (libmysqlcppconn.so.6) !!! -Patch1: %{name}-5.2.43-cppconn.patch +Patch1: %{name}-5.2.45-cppconn.patch # Use system ctemplate Patch2: %{name}-5.2.43-ctemplate.patch # Use system tinyxml @@ -36,12 +36,12 @@ Patch4: %{name}-5.2.43-antlr.patch # Use system antlr (and vsqlite) - NOT applied Patch5: %{name}-5.2.44-antlr.patch # Disable broken AutoCompletion feature -Patch6: %{name}-5.2.43-noautocc.patch +Patch6: %{name}-5.2.45-noautocc.patch # Use system vsqlite++ (not ready) - NOT applied Patch7: %{name}-5.2.44-vsqlite.patch # don't use bundled documentation, redirect to online doc -Patch9: %{name}-5.2.41-nodocs.patch +Patch9: %{name}-5.2.45-nodocs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pcre-devel >= 3.9 @@ -239,6 +239,10 @@ fi %changelog +* Sat Dec 29 2012 Remi Collet 5.2.45-1 +- update to 5.2.45 Community (OSS) Edition (GPL) + http://dev.mysql.com/doc/relnotes/workbench/en/wb-news-5-2-45.html + * Sat Oct 20 2012 Remi Collet 5.2.44-1 - update to 5.2.44 Community (OSS) Edition (GPL) http://dev.mysql.com/doc/workbench/en/wb-news-5-2-44.html -- cgit