summaryrefslogtreecommitdiff
blob: 1be9cc466b65f6f5f0d189eaa85b14412ddb062a (plain)
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
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;