Build MW against MySQL 5.5.8

Remi Collet <[email protected]> Wed, 29 Dec 2010 08:59:21 +0100
Newsgroups gmane.comp.db.mysql.mycc
Message-ID <[email protected]>
--------------040003000300080303070505
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Hi,

I'm trying to build MySQL-Workbench 5.2.30 (stick with this version for
now, because of mysql-connector-c++) against MySQL 5.5.8, which is now
the default version in fedora (rawhide).

Build failed because of library/sql-parser/source/my_global.h
- MYSQL_PLUGIN_IMPORT not defined
- bool declaration

I fix this issue taking some change from /usr/include/mysql/my_global.h

Se the attached patch, which fix the build.

But I must ask why this part of code don't use directly
/usr/include/mysql/my_global.h instead of a local one.


Please ignore this is if  it's fixed in 5.2.31 or dev tree.

Regards
Remi.



--------------040003000300080303070505
Content-Type: text/x-patch;
 name="mysql-workbench-5.2.30-mysql55.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="mysql-workbench-5.2.30-mysql55.patch"

--- mysql-workbench-gpl-5.2.30-src/library/sql-parser/source/my_global.h.mysql55	2010-11-18 23:04:05.000000000 +0100
+++ mysql-workbench-gpl-5.2.30-src/library/sql-parser/source/my_global.h	2010-12-28 18:11:29.000000000 +0100
@@ -24,6 +24,20 @@
 #define HAVE_EXTERNAL_CLIENT
 #endif
 
+/* 
+  MYSQL_PLUGIN_IMPORT macro is used to export mysqld data
+  (i.e variables) for usage in storage engine loadable plugins.
+  Outside of Windows, it is dummy.
+*/
+#ifndef MYSQL_PLUGIN_IMPORT
+#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN))
+#define MYSQL_PLUGIN_IMPORT __declspec(dllimport)
+#else
+#define MYSQL_PLUGIN_IMPORT
+#endif
+#endif
+
+
 #if defined( __EMX__) && !defined( MYSQL_SERVER)
 /* moved here to use below VOID macro redefinition */
 #define INCL_BASE
@@ -1013,8 +1027,8 @@
 typedef char		byte;	/* Smallest addressable unit */
 #endif
 typedef char		my_bool; /* Small bool */
-#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
-typedef char		bool;	/* Ordinary boolean values 0 1 */
+#if !defined(__cplusplus) && !defined(bool)
+#define bool In_C_you_should_use_my_bool_instead()
 #endif
 	/* Macros for converting *constants* to the right type */
 #define INT8(v)		(int8) (v)


--------------040003000300080303070505
Content-Type: text/plain; charset=us-ascii


-- 
MySQL GUI Tools Mailing List
For list archives: http://lists.mysql.com/gui-tools
To unsubscribe:    http://lists.mysql.com/[email protected]
--------------040003000300080303070505--