1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
diff -up mysql-workbench-gpl-5.2.41-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn mysql-workbench-gpl-5.2.41-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp
--- mysql-workbench-gpl-5.2.41-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp.cppconn 2012-07-25 05:07:39.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/backend/wbprivate/sqlide/wb_sql_editor_form.cpp 2012-08-11 08:31:17.262756837 +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 <cppconn/../driver/mysql_connection.h>
+#include <mysql_connection.h>
#include <boost/foreach.hpp>
#include <boost/scoped_ptr.hpp>
diff -up mysql-workbench-gpl-5.2.41-src/configure.in.cppconn mysql-workbench-gpl-5.2.41-src/configure.in
--- mysql-workbench-gpl-5.2.41-src/configure.in.cppconn 2012-07-25 05:07:43.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/configure.in 2012-08-11 08:32:04.937900117 +0200
@@ -488,8 +488,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.41-src/ext/Makefile.am.cppconn mysql-workbench-gpl-5.2.41-src/ext/Makefile.am
--- mysql-workbench-gpl-5.2.41-src/ext/Makefile.am.cppconn 2012-07-25 05:07:41.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/ext/Makefile.am 2012-08-11 08:32:44.674022530 +0200
@@ -4,7 +4,7 @@ else
ctemplate_dirs=ctemplate
endif
-SUBDIRS=scintilla/gtk cppconn vsqlite++ antlr-runtime $(ctemplate_dirs)
+SUBDIRS=scintilla/gtk vsqlite++ antlr-runtime $(ctemplate_dirs)
if BUNDLE_UTILITIES
all-am:
diff -up mysql-workbench-gpl-5.2.41-src/ext/Makefile.in.cppconn mysql-workbench-gpl-5.2.41-src/ext/Makefile.in
--- mysql-workbench-gpl-5.2.41-src/ext/Makefile.in.cppconn 2012-07-25 05:07:51.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/ext/Makefile.in 2012-08-11 08:33:21.593138333 +0200
@@ -53,7 +53,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = scintilla/gtk cppconn vsqlite++ antlr-runtime ctemplate
+DIST_SUBDIRS = scintilla/gtk vsqlite++ antlr-runtime ctemplate
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -222,7 +222,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
unixodbc = @unixodbc@
@BUILD_CTEMPLATE_FALSE@ctemplate_dirs = ctemplate
-SUBDIRS = scintilla/gtk cppconn vsqlite++ antlr-runtime $(ctemplate_dirs)
+SUBDIRS = scintilla/gtk vsqlite++ antlr-runtime $(ctemplate_dirs)
all: all-recursive
.SUFFIXES:
diff -up mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.am.cppconn mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.am
--- mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.am.cppconn 2012-07-25 05:07:40.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.am 2012-08-11 08:39:25.157340958 +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.41-src/frontend/linux/workbench/Makefile.in.cppconn mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.in
--- mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.in.cppconn 2012-07-25 05:07:52.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/frontend/linux/workbench/Makefile.in 2012-08-11 08:40:25.500548195 +0200
@@ -71,7 +71,6 @@ mysql_workbench_bin_DEPENDENCIES = \
$(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 \
@@ -304,7 +303,6 @@ INCLUDES = @GLIB_CFLAGS@ @SIGC_CFLAGS@ @
-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\
@@ -320,14 +318,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
mysql_workbench_bin_SOURCES = \
main.cpp\
diff -up mysql-workbench-gpl-5.2.41-src/library/dbc/src/driver_manager.cpp.cppconn mysql-workbench-gpl-5.2.41-src/library/dbc/src/driver_manager.cpp
--- mysql-workbench-gpl-5.2.41-src/library/dbc/src/driver_manager.cpp.cppconn 2012-07-25 05:07:35.000000000 +0200
+++ mysql-workbench-gpl-5.2.41-src/library/dbc/src/driver_manager.cpp 2012-08-11 08:37:39.612984727 +0200
@@ -212,6 +212,8 @@ ConnectionWrapper DriverManager::getConn
ConnectionWrapper DriverManager::getConnection(const db_mgmt_ConnectionRef &connectionProperties, boost::shared_ptr<TunnelConnection> 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;
--- mysql-workbench-gpl-5.2.41-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp.cppconn 2012-08-11 09:25:04.192665300 +0200
+++ mysql-workbench-gpl-5.2.41-src/backend/wbpublic/grtdb/diff_dbobjectmatch.cpp 2012-08-11 09:25:41.106778794 +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 <cppconn/../driver/mysql_connection.h>
+#include <mysql_connection.h>
#include <cppconn/metadata.h>
|