MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jwinstead Date:July 13 2007 7:43pm
Subject:Connector/ODBC 3.51 commit: r581 - trunk/driver
View as plain text  
Modified:
   trunk/driver/error.c
Log:
Fix hardcoded numbers in myodbc3_errors array to be SQL_ERROR and
SQL_SUCCESS_WITH_INFO as appropriate.


Modified: trunk/driver/error.c
===================================================================
--- trunk/driver/error.c	2007-07-13 19:40:35 UTC (rev 580)
+++ trunk/driver/error.c	2007-07-13 19:43:21 UTC (rev 581)
@@ -49,55 +49,55 @@
 
 static MYODBC3_ERR_STR myodbc3_errors[]=
 {
-    {"01000","General warning",1},
-    {"01004","String data, right truncated",1},
-    {"01S02","Option value changed",1},
-    {"01S03","No rows updated/deleted",1},
-    {"01S04","More than one row updated/deleted",1},
-    {"01S06","Attempt to fetch before the result set returned the first rowset",
-        1},
-    {"07001","SQLBindParameter not used for all parameters",-1},
-    {"07005","Prepared statement not a cursor-specification",-1},
-    {"07006","Restricted data type attribute violation",-1},
-    {"07009","Invalid descriptor index",-1},
-    {"08002","Connection name in use",-1},
-    {"08003","Connection does not exist",-1},
-    {"24000","Invalid cursor state",-1},
-    {"25000","Invalid transaction state",-1},
-    {"25S01","Transaction state unknown",-1},
-    {"34000","Invalid cursor name",-1},
-    {"HYT00","Timeout expired",-1},
-    {"HY000","General driver defined error",-1},
-    {"HY001","Memory allocation error",-1},
-    {"HY002","Invalid column number",-1},
-    {"HY003","Invalid application buffer type",-1},
-    {"HY004","Invalid SQL data type",-1},
-    {"HY009","Invalid use of null pointer",-1},
-    {"HY010","Function sequence error",-1},
-    {"HY011","Attribute can not be set now",-1},
-    {"HY012","Invalid transaction operation code",-1},
-    {"HY013","Memory management error",-1},
-    {"HY015","No cursor name available",-1},
-    {"HY024","Invalid attribute value",-1},
-    {"HY090","Invalid string or buffer length",-1},
-    {"HY091","Invalid descriptor field identifier",-1},
-    {"HY092","Invalid attribute/option identifier",-1},
-    {"HY093","Invalid parameter number",-1},
-    {"HY095","Function type out of range",-1},
-    {"HY106","Fetch type out of range",-1},
-    {"HY107","Row value out of range",-1},
-    {"HY109","Invalid cursor position",-1},
-    {"HYC00","Optional feature not implemented",-1},
-    /* server related..*/
-    {"21S01","Column count does not match value count",-1},
-    {"23000","Integrity constraint violation",-1},
-    {"42000","Syntax error or access violation",-1},
-    {"42S01","Base table or view already exists ",-1},
-    {"42S02","Base table or view not found",-1},
-    {"42S12","Index not found",-1},
-    {"42S21","Column already exists",-1},
-    {"42S22","Column not found",-1},
-    {"08S01","Communication link failure",-1},
+  {"01000","General warning", SQL_SUCCESS_WITH_INFO},
+  {"01004","String data, right truncated", SQL_SUCCESS_WITH_INFO},
+  {"01S02","Option value changed", SQL_SUCCESS_WITH_INFO},
+  {"01S03","No rows updated/deleted", SQL_SUCCESS_WITH_INFO},
+  {"01S04","More than one row updated/deleted", SQL_SUCCESS_WITH_INFO},
+  {"01S06","Attempt to fetch before the result set returned the first rowset",
+    SQL_SUCCESS_WITH_INFO},
+  {"07001","SQLBindParameter not used for all parameters", SQL_ERROR},
+  {"07005","Prepared statement not a cursor-specification", SQL_ERROR},
+  {"07006","Restricted data type attribute violation", SQL_ERROR},
+  {"07009","Invalid descriptor index", SQL_ERROR},
+  {"08002","Connection name in use", SQL_ERROR},
+  {"08003","Connection does not exist", SQL_ERROR},
+  {"24000","Invalid cursor state", SQL_ERROR},
+  {"25000","Invalid transaction state", SQL_ERROR},
+  {"25S01","Transaction state unknown", SQL_ERROR},
+  {"34000","Invalid cursor name", SQL_ERROR},
+  {"HYT00","Timeout expired", SQL_ERROR},
+  {"HY000","General driver defined error", SQL_ERROR},
+  {"HY001","Memory allocation error", SQL_ERROR},
+  {"HY002","Invalid column number", SQL_ERROR},
+  {"HY003","Invalid application buffer type", SQL_ERROR},
+  {"HY004","Invalid SQL data type", SQL_ERROR},
+  {"HY009","Invalid use of null pointer", SQL_ERROR},
+  {"HY010","Function sequence error", SQL_ERROR},
+  {"HY011","Attribute can not be set now", SQL_ERROR},
+  {"HY012","Invalid transaction operation code", SQL_ERROR},
+  {"HY013","Memory management error", SQL_ERROR},
+  {"HY015","No cursor name available", SQL_ERROR},
+  {"HY024","Invalid attribute value", SQL_ERROR},
+  {"HY090","Invalid string or buffer length", SQL_ERROR},
+  {"HY091","Invalid descriptor field identifier", SQL_ERROR},
+  {"HY092","Invalid attribute/option identifier", SQL_ERROR},
+  {"HY093","Invalid parameter number", SQL_ERROR},
+  {"HY095","Function type out of range", SQL_ERROR},
+  {"HY106","Fetch type out of range", SQL_ERROR},
+  {"HY107","Row value out of range", SQL_ERROR},
+  {"HY109","Invalid cursor position", SQL_ERROR},
+  {"HYC00","Optional feature not implemented", SQL_ERROR},
+  /* server related..*/
+  {"21S01","Column count does not match value count", SQL_ERROR},
+  {"23000","Integrity constraint violation", SQL_ERROR},
+  {"42000","Syntax error or access violation", SQL_ERROR},
+  {"42S01","Base table or view already exists ", SQL_ERROR},
+  {"42S02","Base table or view not found", SQL_ERROR},
+  {"42S12","Index not found", SQL_ERROR},
+  {"42S21","Column already exists", SQL_ERROR},
+  {"42S22","Column not found", SQL_ERROR},
+  {"08S01","Communication link failure", SQL_ERROR},
 };
 
 

Thread
Connector/ODBC 3.51 commit: r581 - trunk/driverjwinstead13 Jul