dbd/mysql/connection.c

changeset 4
c50b0e6f25d6
parent 3
b61020ca4753
child 13
10c8c6f0da14
--- a/dbd/mysql/connection.c	Wed Nov 26 10:01:03 2008 +0000
+++ b/dbd/mysql/connection.c	Wed Nov 26 10:43:45 2008 +0000
@@ -44,7 +44,7 @@
 
     if (!mysql_real_connect(conn->mysql, host, user, password, db, port, unix_socket, client_flag)) {
 	lua_pushnil(L);
-	lua_pushfstring(L, "Failed to connect to database: %s", mysql_error(conn->mysql));
+	lua_pushfstring(L, DBI_ERR_CONNECTION_FAILED, mysql_error(conn->mysql));
 	return 2;
     }
 
@@ -97,7 +97,7 @@
     }
 
     lua_pushnil(L);    
-    lua_pushstring(L, "Database not available");    
+    lua_pushstring(L, DBI_ERR_DB_UNAVAILABLE);    
 
     return 2;
 }

mercurial