From 84027b5db0d48b5e47f5930a1f54509ec0b496e0 Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Sun, 11 Jun 2017 08:28:02 +0200 Subject: dev-db/mysql-workbench: fix compilation with mysql 5.6, bug 620000 Thanks to PhobosK for updating the patch and testing with mysql 5.6. Package-Manager: Portage-2.3.5, Repoman-2.3.1 --- .../files/mysql-workbench-6.3.9-mariadb-json.patch | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'dev-db') diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch index 74c84e374dc7..e785d6fb0976 100644 --- a/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.3.9-mariadb-json.patch @@ -1,13 +1,13 @@ ---- a/plugins/migration/copytable/copytable.cpp.~1~ 2017-02-03 19:40:18.000000000 +0100 -+++ b/plugins/migration/copytable/copytable.cpp 2017-05-21 17:23:14.135875375 +0200 +--- a/plugins/migration/copytable/copytable.cpp ++++ b/plugins/migration/copytable/copytable.cpp @@ -109,8 +109,10 @@ return "MYSQL_TYPE_STRING"; case MYSQL_TYPE_GEOMETRY: return "MYSQL_TYPE_GEOMETRY"; -+#ifndef MARIADB_BASE_VERSION ++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION case MYSQL_TYPE_JSON: return "MYSQL_TYPE_JSON"; -+#endif ++#endif default: return "UNKNOWN"; } @@ -15,9 +15,9 @@ case MYSQL_TYPE_STRING: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_BIT: -+#ifndef MARIADB_BASE_VERSION ++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION case MYSQL_TYPE_JSON: -+#endif ++#endif if (!col->is_long_data) bind.buffer_length = (unsigned)col->source_length + 1; @@ -27,9 +27,9 @@ rowbuffer[index].buffer_type == MYSQL_TYPE_STRING || - rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON) { + rowbuffer[index].buffer_type == MYSQL_TYPE_GEOMETRY -+#ifndef MARIADB_BASE_VERSION ++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION + || rowbuffer[index].buffer_type == MYSQL_TYPE_JSON -+#endif ++#endif + ) { if (rowbuffer[index].buffer_length) free(rowbuffer[index].buffer); @@ -38,9 +38,9 @@ case MYSQL_TYPE_STRING: case MYSQL_TYPE_ENUM: case MYSQL_TYPE_SET: -+#ifndef MARIADB_BASE_VERSION ++#if MYSQL_CHECK_VERSION(5, 7, 8) && ! defined MARIADB_BASE_VERSION case MYSQL_TYPE_JSON: -+#endif ++#endif _bulk_insert_record.append("'", 1); ret_val = _bulk_insert_record.append_escaped((char *)(*_row_buffer)[col_index].buffer, *(*_row_buffer)[col_index].length); -- cgit v1.2.3-65-gdbad