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.45-cppconn.patch | 118 +++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 mysql-workbench-5.2.45-cppconn.patch (limited to 'mysql-workbench-5.2.45-cppconn.patch') 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; -- cgit