|
@@ -1099,9 +1099,13 @@ function DatabasePopulation()
|
|
|
|
|
|
if ($smcFunc['db_query']('', $current_statement, array('security_override' => true, 'db_error_skip' => true), $db_connection) === false)
|
|
|
{
|
|
|
+
|
|
|
+ if ($db_type == 'mysql' || $db_type =='mysqli')
|
|
|
+ $db_errorno = $db_type . '_errno';
|
|
|
+
|
|
|
|
|
|
|
|
|
- if ((($db_type != 'mysql' && $db_type != 'mysqli') || mysql_errno($db_connection) === 1050) && preg_match('~^\s*CREATE TABLE ([^\s\n\r]+?)~', $current_statement, $match) == 1)
|
|
|
+ if ((($db_type != 'mysql' && $db_type != 'mysqli') || $db_errno($db_connection) == 1050) && preg_match('~^\s*CREATE TABLE ([^\s\n\r]+?)~', $current_statement, $match) == 1)
|
|
|
{
|
|
|
$exists[] = $match[1];
|
|
|
$incontext['sql_results']['table_dups']++;
|
|
@@ -1109,7 +1113,8 @@ function DatabasePopulation()
|
|
|
|
|
|
elseif (!preg_match('~^\s*CREATE( UNIQUE)? INDEX ([^\n\r]+?)~', $current_statement, $match) && !($db_type == 'postgresql' && preg_match('~^\s*CREATE OPERATOR (^\n\r]+?)~', $current_statement, $match)))
|
|
|
{
|
|
|
- $incontext['failures'][$count] = $smcFunc['db_error']();
|
|
|
+
|
|
|
+ $incontext['failures'][$count] = $smcFunc['db_error']($db_connection);
|
|
|
}
|
|
|
}
|
|
|
else
|