diff --git a/src/modules/mysql/mysql.c b/src/modules/mysql/mysql.c index faffb4d8449e3e234da9a28363e70a88aba48ea6..601b50353be0258a7c8862844052d8dbe0c6d7cb 100644 --- a/src/modules/mysql/mysql.c +++ b/src/modules/mysql/mysql.c @@ -1,5 +1,5 @@ /* - * $Id: mysql.c,v 1.8 1997/01/10 00:30:09 grubba Exp $ + * $Id: mysql.c,v 1.9 1997/01/10 10:52:10 grubba Exp $ * * SQL database functionality for Pike * @@ -59,7 +59,7 @@ typedef struct dynamic_buffer_s dynamic_buffer; * Globals */ -RCSID("$Id: mysql.c,v 1.8 1997/01/10 00:30:09 grubba Exp $"); +RCSID("$Id: mysql.c,v 1.9 1997/01/10 10:52:10 grubba Exp $"); struct program *mysql_program = NULL; @@ -268,7 +268,7 @@ static void f_big_query(INT32 args) pop_n_elems(args); if (!(PIKE_MYSQL->last_result = result)) { - if (mysql_num_fields(socket)) { + if (mysql_num_fields(socket) && mysql_error(socket)[0]) { error("mysql->big_query(): Couldn't create result for query\n"); } /* query was INSERT or similar - return 0 */ @@ -446,7 +446,7 @@ static void f_list_dbs(INT32 args) { MYSQL *socket = PIKE_MYSQL->socket; MYSQL_RES *result; - char *wild = "*"; + char *wild = NULL; if (args) { if (sp[-args].type != T_STRING) { @@ -483,7 +483,7 @@ static void f_list_tables(INT32 args) { MYSQL *socket = PIKE_MYSQL->socket; MYSQL_RES *result; - char *wild = "*"; + char *wild = NULL; if (args) { if (sp[-args].type != T_STRING) { @@ -521,7 +521,7 @@ static void f_list_fields(INT32 args) MYSQL *socket = PIKE_MYSQL->socket; MYSQL_RES *result; char *table; - char *wild = "*"; + char *wild = NULL; if (!args) { error("Too few arguments to mysql->list_fields()\n");