NO

Author Topic: Have anyone tested libdrizzle with MySQL or MariaDB  (Read 2671 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1896
Have anyone tested libdrizzle with MySQL or MariaDB
« on: August 18, 2011, 04:35:02 pm »
Have anyone tested libdrizzle with MySQL or MariaDB?

http://docs.drizzle.org/#libdrizzle

Here some modifications to test.
Code: [Select]
--- a\libdrizzle\column.c Tue Aug 30 18:50:50 2011
+++ b\libdrizzle\column.c Thu Aug 18 12:45:52 2011
@@ -775,14 +775,18 @@
     return DRIZZLE_RETURN_OK;
   }
 
-  if (con->packet_size == 5 && con->buffer_ptr[0] == 254)
+//  if (con->packet_size == 5 && con->buffer_ptr[0] == 254)
+  if (con->packet_size < 9 && con->buffer_ptr[0] == 254)
   {
     /* EOF packet marking end of columns. */
     con->result->column= NULL;
-    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
-    con->status= drizzle_get_byte2(con->buffer_ptr + 3);
-    con->buffer_ptr+= 5;
-    con->buffer_size-= 5;
+    if (con->packet_size == 5)
+    {
+        con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
+        con->status= drizzle_get_byte2(con->buffer_ptr + 3);
+    }
+    con->buffer_ptr+= con->packet_size;
+    con->buffer_size-= con->packet_size;
 
     drizzle_state_pop(con);
   }

--- a\libdrizzle\conn.c Tue Aug 30 18:50:50 2011
+++ b\libdrizzle\conn.c Fri Aug 26 17:26:41 2011
@@ -794,7 +794,7 @@
     ai.ai_socktype= SOCK_STREAM;
     ai.ai_protocol= IPPROTO_TCP;
     ai.ai_flags = AI_PASSIVE;
-    ai.ai_family = AF_UNSPEC;
+    ai.ai_family = AF_INET; //AF_UNSPEC;
 
     if (con->options & DRIZZLE_CON_LISTEN)
     {

--- a\libdrizzle\constants.h Tue Aug 30 18:50:50 2011
+++ b\libdrizzle\constants.h Thu Aug 18 10:22:12 2011
@@ -63,7 +63,7 @@
 /* Defines. */
 #define DRIZZLE_DEFAULT_TCP_HOST         "127.0.0.1"
 #define DRIZZLE_DEFAULT_TCP_PORT         4427
-#define DRIZZLE_DEFAULT_TCP_PORT_MYSQL   4427
+#define DRIZZLE_DEFAULT_TCP_PORT_MYSQL   3306
 #define DRIZZLE_DEFAULT_UDS              "/tmp/drizzle.sock"
 #define DRIZZLE_DEFAULT_UDS_MYSQL        "/tmp/mysql.sock"
 #define DRIZZLE_DEFAULT_BACKLOG          64
« Last Edit: September 03, 2011, 11:01:45 pm by timovjl »
May the source be with you