summaryrefslogtreecommitdiff
path: root/databases/mysql-connector-odbc/files/patch-driver_desc.c
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2015-08-31 10:43:30 +0000
committerKurt Jaeger <pi@FreeBSD.org>2015-08-31 10:43:30 +0000
commit3a4b2353edd5cccf9969c0e228f20cacc9c3f4cb (patch)
treed96449df39048210f7c58c2cf2f0c3b174522141 /databases/mysql-connector-odbc/files/patch-driver_desc.c
parentDrop USES=iconv. (diff)
databases/mysql-connector-odbc: build and interoperate with mariadb-10
PR: 198925 Submitted by: Pavel Timofeev <timp87@gmail.com> Approved by: sergey@network-asp.biz (maintainer timeout)
Notes
Notes: svn path=/head/; revision=395662
Diffstat (limited to 'databases/mysql-connector-odbc/files/patch-driver_desc.c')
-rw-r--r--databases/mysql-connector-odbc/files/patch-driver_desc.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/databases/mysql-connector-odbc/files/patch-driver_desc.c b/databases/mysql-connector-odbc/files/patch-driver_desc.c
new file mode 100644
index 000000000000..a95514f390bc
--- /dev/null
+++ b/databases/mysql-connector-odbc/files/patch-driver_desc.c
@@ -0,0 +1,37 @@
+--- driver/desc.c.orig 2014-06-19 02:50:16.000000000 +0400
++++ driver/desc.c 2015-03-26 12:34:50.610931661 +0300
+@@ -63,13 +63,21 @@
+ but in desc_get_rec we manually get a pointer to it. This avoids
+ having to call set_dynamic after modifying the DESCREC.
+ */
++#ifdef MARIADB_BASE_VERSION
++ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0, 0))
++#else
+ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0))
++#endif
+ {
+ x_free((char *)desc);
+ return NULL;
+ }
+
++#ifdef MARIADB_BASE_VERSION
++ if (my_init_dynamic_array(&desc->bookmark, sizeof(DESCREC), 0, 0, 0))
++#else
+ if (my_init_dynamic_array(&desc->bookmark, sizeof(DESCREC), 0, 0))
++#endif
+ {
+ delete_dynamic(&desc->records);
+ x_free((char *)desc);
+@@ -997,7 +1005,12 @@
+ delete_dynamic(&dest->records);
+ if (my_init_dynamic_array(&dest->records, sizeof(DESCREC),
+ src->records.max_element,
++#ifdef MARIADB_BASE_VERSION
++ src->records.alloc_increment,
++ 0))
++#else
+ src->records.alloc_increment))
++#endif
+ {
+ return set_desc_error(dest, "HY001",
+ "Memory allocation error",