File mysql-workbench-community-6.3.3-src-mysql_options4.patch of Package mysql-workbench

diff -Ppru mysql-workbench-community-6.3.3-src.orig/plugins/migration/copytable/copytable.cpp mysql-workbench-community-6.3.3-src/plugins/migration/copytable/copytable.cpp
--- mysql-workbench-community-6.3.3-src.orig/plugins/migration/copytable/copytable.cpp	2015-04-15 15:54:19.000000000 +0200
+++ mysql-workbench-community-6.3.3-src/plugins/migration/copytable/copytable.cpp	2015-06-03 15:36:30.133573631 +0200
@@ -1920,12 +1920,17 @@ MySQLCopyDataTarget::MySQLCopyDataTarget
     _incoming_data_charset = "latin1";
 
   mysql_init(&_mysql);
+  /* This is optional has compiled in for MySQL >= 5.6.6
+   * Looks like MariaDB does not support this as supposed,
+   * so disable completly. */
+#if 0
 #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH)
 #if MYSQL_CHECK_VERSION(5,6,6)
   if (is_mysql_version_at_least(5,6,6))
     mysql_options4(&_mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", app_name.c_str());
 #endif
 #endif
+#endif
 
   // _bulk_insert_record is used to prepare a single record string, the connection
   // is needed to escape binary data properly
@@ -2872,7 +2877,7 @@ bool MySQLCopyDataTarget::InsertBuffer::
   // This is needed because the escaping depends on the character set in use by the server
   #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH)
-  #if MYSQL_CHECK_VERSION(5,7,6)
+  #if MYSQL_CHECK_VERSION(5,7,6) && not defined(MARIADB_BASE_VERSION)
     if (is_mysql_version_at_least(5,7,6))
       length += mysql_real_escape_string_quote(_mysql, buffer + length, data, (unsigned long)dlength);
     else
       length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength);
openSUSE Build Service is sponsored by