dbd/mysql/connection.c

changeset 14
98192b7d4e89
parent 13
10c8c6f0da14
child 22
fd78e9cdc6e9
--- a/dbd/mysql/connection.c	Wed Dec 03 08:44:40 2008 +0000
+++ b/dbd/mysql/connection.c	Fri Dec 05 07:41:15 2008 +0000
@@ -34,8 +34,10 @@
 	if (lua_isnil(L, 2) == 0) 
 	    user = luaL_checkstring(L, 2);
     case 1:
-	if (lua_isnil(L, 1) == 0) 
-	    db = luaL_checkstring(L, 1);
+	/*
+	 * db is the only mandatory parameter
+	 */
+	db = luaL_checkstring(L, 1);
     }
 
     conn = (connection_t *)lua_newuserdata(L, sizeof(connection_t));

mercurial