summaryrefslogtreecommitdiff
path: root/dev-db/myodbc/files/5.3-mariadb-buffer_length.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/myodbc/files/5.3-mariadb-buffer_length.patch')
-rw-r--r--dev-db/myodbc/files/5.3-mariadb-buffer_length.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/dev-db/myodbc/files/5.3-mariadb-buffer_length.patch b/dev-db/myodbc/files/5.3-mariadb-buffer_length.patch
new file mode 100644
index 000000000000..1be9cc466b65
--- /dev/null
+++ b/dev-db/myodbc/files/5.3-mariadb-buffer_length.patch
@@ -0,0 +1,93 @@
+diff -aurN a/driver/connect.c b/driver/connect.c
+--- a/driver/connect.c 2016-11-29 07:40:13.000000000 -0500
++++ b/driver/connect.c 2017-02-17 16:14:48.116640371 -0500
+@@ -510,11 +510,11 @@
+ }
+ }
+
+-#if MYSQL_VERSION_ID >= 50709
+- mysql_get_option(mysql, MYSQL_OPT_NET_BUFFER_LENGTH, &dbc->net_buffer_length);
++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION)
++ mysql_get_option(mysql, MYSQL_OPT_NET_BUFFER_LENGTH, &dbc->net_buffer_length_value);
+ #else
+ // for older versions just use net_buffer_length() macro
+- dbc->net_buffer_length = net_buffer_length;
++ dbc->net_buffer_length_value = net_buffer_length;
+ #endif
+ return rc;
+
+diff -aurN a/driver/cursor.c b/driver/cursor.c
+--- a/driver/cursor.c 2016-11-29 07:40:13.000000000 -0500
++++ b/driver/cursor.c 2017-02-17 16:13:19.163299885 -0500
+@@ -1485,7 +1485,7 @@
+ We have a limited capacity to shove data across the wire, but
+ we handle this by sending in multiple calls to exec_stmt_query()
+ */
+- if (ext_query->length + length >= (SQLULEN) stmt->dbc->net_buffer_length)
++ if (ext_query->length + length >= (SQLULEN) stmt->dbc->net_buffer_length_value)
+ {
+ break_insert= TRUE;
+ break;
+diff -aurN a/driver/driver.h b/driver/driver.h
+--- a/driver/driver.h 2016-11-29 07:40:13.000000000 -0500
++++ b/driver/driver.h 2017-02-17 16:10:57.072950723 -0500
+@@ -378,7 +378,7 @@
+ int txn_isolation;
+ uint port;
+ uint cursor_count;
+- ulong net_buffer_length;
++ ulong net_buffer_length_value;
+ uint commit_flag;
+ #ifdef THREAD
+ myodbc_mutex_t lock;
+diff -aurN a/driver/info.c b/driver/info.c
+--- a/driver/info.c 2016-11-29 07:40:13.000000000 -0500
++++ b/driver/info.c 2017-02-17 16:12:54.315763441 -0500
+@@ -587,7 +587,7 @@
+ MYINFO_SET_USHORT(0);
+
+ case SQL_MAX_STATEMENT_LEN:
+- MYINFO_SET_ULONG(dbc->net_buffer_length);
++ MYINFO_SET_ULONG(dbc->net_buffer_length_value);
+
+ case SQL_MAX_TABLE_NAME_LEN:
+ MYINFO_SET_USHORT(NAME_LEN);
+diff -aurN a/driver/connect.c b/driver/connect.c
+--- a/driver/connect.c 2017-02-17 16:16:14.609026769 -0500
++++ b/driver/connect.c 2017-02-17 16:34:29.637592664 -0500
+@@ -179,7 +179,7 @@
+ /* Set other connection options */
+
+ if (ds->allow_big_results || ds->safe)
+-#if MYSQL_VERSION_ID >= 50709
++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION)
+ mysql_options(mysql, MYSQL_OPT_MAX_ALLOWED_PACKET, &max_long);
+ #else
+ /* max_allowed_packet is a magical mysql macro. */
+@@ -252,7 +252,7 @@
+ ds_get_utf8attr(ds->rsakey, &ds->rsakey8));
+ }
+
+-#if MYSQL_VERSION_ID >= 50710
++#if MYSQL_VERSION_ID >= 50710 && !defined(MARIADB_BASE_VERSION)
+ {
+ char tls_options[128] = { 0 };
+ if (!ds->no_tls_1)
+@@ -323,7 +323,7 @@
+ #endif
+
+ mysql->options.use_ssl = !ds->disable_ssl_default;
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined(MARIADB_BASE_VERSION)
+ {
+ if (ds->ssl_enforce)
+ {
+@@ -332,7 +332,7 @@
+ }
+ #endif
+
+-#if MYSQL_VERSION_ID >= 50711
++#if MYSQL_VERSION_ID >= 50711 && !defined(MARIADB_BASE_VERSION)
+ if (ds->sslmode)
+ {
+ unsigned int mode = 0;