View | Details | Raw Unified | Return to bug 198925
Collapse All | Expand All

(-)/usr/ports/databases/mysql-connector-odbc/Makefile (-1 / +1 lines)
Lines 19-25 Link Here
19
USE_MYSQL=	yes
19
USE_MYSQL=	yes
20
USES=		cmake
20
USES=		cmake
21
21
22
IGNORE_WITH_MYSQL=	55 51
22
IGNORE_WITH_MYSQL=	55 55m 55p 51 51m 51p
23
23
24
CMAKE_ARGS=	-DWITH_UNIXODBC=1
24
CMAKE_ARGS=	-DWITH_UNIXODBC=1
25
LDFLAGS+=	-L${LOCALBASE}/lib
25
LDFLAGS+=	-L${LOCALBASE}/lib
(-)/usr/ports/databases/mysql-connector-odbc/files/patch-driver__execute.c (-22 lines)
Lines 1-22 Link Here
1
--- driver/execute.c.orig	2014-11-05 14:41:16.000000000 +0300
2
+++ driver/execute.c	2014-11-05 14:44:10.000000000 +0300
3
@@ -563,11 +563,19 @@
4
         *res= buff;
5
         break;
6
     case SQL_C_SBIGINT:
7
+#ifdef MARIADB_BASE_VERSION
8
+        *length= longlong2str(*((longlong*) *res), buff, -10, 1) - buff;
9
+#else
10
         *length= longlong2str(*((longlong*) *res), buff, -10) - buff;
11
+#endif
12
         *res= buff;
13
         break;
14
     case SQL_C_UBIGINT:
15
+#ifdef MARIADB_BASE_VERSION
16
+        *length= longlong2str(*((ulonglong*) *res), buff, 10, 1) - buff;
17
+#else
18
         *length= longlong2str(*((ulonglong*) *res), buff, 10) - buff;
19
+#endif
20
         *res= buff;
21
         break;
22
     case SQL_C_FLOAT:
(-)/usr/ports/databases/mysql-connector-odbc/files/patch-driver_catalog_no_i_s.c (+14 lines)
Line 0 Link Here
1
--- driver/catalog_no_i_s.c.orig	2014-06-19 02:50:16.000000000 +0400
2
+++ driver/catalog_no_i_s.c	2015-03-26 12:31:13.356945009 +0300
3
@@ -1093,7 +1093,11 @@
4
   unsigned long *lengths;
5
   SQLRETURN rc= SQL_SUCCESS;
6
 
7
+#ifdef MARIADB_BASE_VERSION
8
+  my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0, 0);
9
+#else
10
   my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0);
11
+#endif
12
 
13
   /* Get the list of tables that match szCatalog and szTable */
14
   pthread_mutex_lock(&stmt->dbc->lock);
(-)/usr/ports/databases/mysql-connector-odbc/files/patch-driver_desc.c (+37 lines)
Line 0 Link Here
1
--- driver/desc.c.orig	2014-06-19 02:50:16.000000000 +0400
2
+++ driver/desc.c	2015-03-26 12:34:50.610931661 +0300
3
@@ -63,13 +63,21 @@
4
      but in desc_get_rec we manually get a pointer to it. This avoids
5
      having to call set_dynamic after modifying the DESCREC.
6
   */
7
+#ifdef MARIADB_BASE_VERSION
8
+  if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0, 0))
9
+#else
10
   if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0))
11
+#endif
12
   {
13
     x_free((char *)desc);
14
     return NULL;
15
   }
16
 
17
+#ifdef MARIADB_BASE_VERSION
18
+  if (my_init_dynamic_array(&desc->bookmark, sizeof(DESCREC), 0, 0, 0))
19
+#else
20
   if (my_init_dynamic_array(&desc->bookmark, sizeof(DESCREC), 0, 0))
21
+#endif
22
   {
23
     delete_dynamic(&desc->records);
24
     x_free((char *)desc);
25
@@ -997,7 +1005,12 @@
26
   delete_dynamic(&dest->records);
27
   if (my_init_dynamic_array(&dest->records, sizeof(DESCREC),
28
                             src->records.max_element,
29
+#ifdef MARIADB_BASE_VERSION
30
+                            src->records.alloc_increment,
31
+                            0))
32
+#else
33
                             src->records.alloc_increment))
34
+#endif
35
   {
36
     return set_desc_error(dest, "HY001",
37
               "Memory allocation error",
(-)/usr/ports/databases/mysql-connector-odbc/files/patch-driver_handle.c (+14 lines)
Line 0 Link Here
1
--- driver/handle.c.orig	2014-06-19 02:50:16.000000000 +0400
2
+++ driver/handle.c	2015-03-26 12:36:14.548929818 +0300
3
@@ -403,7 +403,11 @@
4
     }
5
   }
6
 
7
+#ifdef MARIADB_BASE_VERSION
8
+  my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10, 0);
9
+#else
10
   my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10);
11
+#endif
12
   memset((*param_bind)->buffer, 0, sizeof(MYSQL_BIND) *
13
 											(*param_bind)->max_element);
14
 
(-)/usr/ports/databases/mysql-connector-odbc/files/patch-driver_parse.c (+16 lines)
Line 0 Link Here
1
--- driver/parse.c.orig	2014-06-19 02:50:16.000000000 +0400
2
+++ driver/parse.c	2015-03-26 12:37:12.112907082 +0300
3
@@ -129,8 +129,13 @@
4
 
5
     /* TODO: Store offsets rather than ptrs. In this case we will be fine
6
        if work with copy of the originally parsed string */
7
+#ifdef MARIADB_BASE_VERSION
8
+    my_init_dynamic_array(&pq->token,     sizeof(uint), 20, 10, 0);
9
+    my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10, 0);
10
+#else
11
     my_init_dynamic_array(&pq->token,     sizeof(uint), 20, 10);
12
     my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10);
13
+#endif
14
   }
15
 
16
   return pq;
(-)/usr/ports/databases/mysql-connector-odbc/files/patch-util_odbcinstw.c (+12 lines)
Line 0 Link Here
1
--- util/odbcinstw.c.orig	2015-03-26 15:10:03.189270855 +0300
2
+++ util/odbcinstw.c	2015-03-26 15:10:43.503271192 +0300
3
@@ -105,7 +105,8 @@
4
   x_free(section);
5
   x_free(entry);
6
   x_free(def);
7
-  x_free(ret);
8
+  if (ret)
9
+    free(ret);
10
   x_free(filename);
11
 
12
   return rc;

Return to bug 198925