Revision: 3013
https://sourceforge.net/p/mrbs/code/3013/
Author: cimorrison
Date: 2015-03-15 09:38:00 +0000 (Sun, 15 Mar 2015)
Log Message:
-----------
Added some error handling to sql_mysql_table_exists() and
sql_mysqli_table_exists()
Modified Paths:
--------------
mrbs/trunk/web/mysql.inc
mrbs/trunk/web/mysqli.inc
Modified: mrbs/trunk/web/mysql.inc
===================================================================
--- mrbs/trunk/web/mysql.inc 2015-03-15 09:26:07 UTC (rev 3012)
+++ mrbs/trunk/web/mysql.inc 2015-03-15 09:38:00 UTC (rev 3013)
@@ -406,7 +406,13 @@
sql_mysql_ensure_handle($db_conn);
$res = sql_mysql_query1("SHOW TABLES LIKE '" . sql_mysql_escape($table) .
"'", $db_conn);
-
+
+ if ($res < 0)
+ {
+ trigger_error(mysql_error($db_conn), E_USER_WARNING);
+ fatal_error(FALSE, get_vocab("fatal_db_error"));
+ }
+
return ($res == -1) ? FALSE : TRUE;
}
Modified: mrbs/trunk/web/mysqli.inc
===================================================================
--- mrbs/trunk/web/mysqli.inc 2015-03-15 09:26:07 UTC (rev 3012)
+++ mrbs/trunk/web/mysqli.inc 2015-03-15 09:38:00 UTC (rev 3013)
@@ -441,6 +441,12 @@
$res = sql_mysqli_query1("SHOW TABLES LIKE '" . sql_mysqli_escape($table) .
"'", $db_conn);
+ if ($res < 0)
+ {
+ trigger_error($db_conn->error, E_USER_WARNING);
+ fatal_error(FALSE, get_vocab("fatal_db_error"));
+ }
+
return ($res == -1) ? FALSE : TRUE;
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits