summaryrefslogtreecommitdiff
path: root/databases/kmysqladmin/patches/patch-ad
blob: 62d29436b4e6a11aad2a06d4064c5c90bf762cb1 (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
$NetBSD: patch-ad,v 1.5 2007/11/03 18:53:12 rillig Exp $

--- kmysqladmin/backend/my_sql/my_sql.cpp.orig	2004-09-22 04:53:03.000000000 +0200
+++ kmysqladmin/backend/my_sql/my_sql.cpp	2007-09-26 22:55:12.000000000 +0200
@@ -13,6 +13,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <mysql_com.h>
+#include <mysql_version.h>
 #include <cmath>
 #include <iostream>
 
@@ -70,6 +71,7 @@ const my_sql_type CMySql::f_arr[]=
         my_sql_type("DATETIME","DateTime",                14, 14,0,0,false,false,false,false,false,false,false,false),
         my_sql_type("YEAR","Year",                         4,  4,0,0, true,false,false,false,false,false,false,false),
         my_sql_type("DOUBLE","Double (8 Bytes)",           1, 20,0,8, true, true, true,false,false, true,false,false),
+        my_sql_type("DOUBLE UNSIGNED", "Double (8 Bytes)", 1, 20,0,8, true, true, true, true,false, true,false,false),
         my_sql_type("NUMERIC","Decimal (lenght,dec)",      1, 20,0,8, true, true, true,false, true, true,false,false),
     };
 
@@ -469,8 +471,10 @@ bool CMySql::get_table_fields(const std:
             }
         }
         if (f_type == FieldDescriptCounts()) {
-            do_message("Error retrieving fieldtypes - please send a mail to the "
-                       "autor of the software!");
+            std::string msg = "Unknown MySQL type ";
+            msg += type_string;
+            msg += " - please send a mail to the author of the software!";
+            do_message(msg);
             return false;
         }
         my_sql_type t_info = sql_type(f_type);
@@ -1184,7 +1188,11 @@ int CMySql::shutdown()
     int i;
     if (!Sql_Connection)
         return 0;
-    i = mysql_shutdown(Sql_Connection);
+    i = mysql_shutdown(Sql_Connection
+#if MYSQL_VERSION_ID >= 40103
+	, SHUTDOWN_DEFAULT
+#endif
+	);
     if (i < 0) {
         do_message(get_last_error());
     }