Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e94e0a8

Browse files
committedJun 20, 2012
Fix Lack of detailed error message during schema creation
During MantisBT installation, when a schema upgrade step includes several SQL statements (as generated by ADOdb), a detailed error message was only reported the problem occurs while executing the last statement. Calling ExecuteSQLArray() with the 2nd param = false forces the function to return the error message on first failure instead of continuing with the next statement. Fixes #14399
1 parent 7d2ad4f commit e94e0a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎admin/install.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function InsertData( $p_table, $p_data ) {
586586
}
587587
} else {
588588
$sqlarray = $dict->CreateDatabase( $f_database_name, Array( 'mysql' => 'DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci' ) );
589-
$ret = $dict->ExecuteSQLArray( $sqlarray );
589+
$ret = $dict->ExecuteSQLArray( $sqlarray, false );
590590
if( $ret == 2 ) {
591591
print_test_result( GOOD );
592592
$t_db_open = true;
@@ -713,7 +713,7 @@ function InsertData( $p_table, $p_data ) {
713713
} else {
714714
echo 'Schema ' . $upgrade[$i][0] . ' ( ' . $t_target . ' )</td>';
715715
if( $t_sql ) {
716-
$ret = $dict->ExecuteSQLArray( $sqlarray );
716+
$ret = $dict->ExecuteSQLArray( $sqlarray, false );
717717
} else {
718718
if( isset( $sqlarray[1] ) ) {
719719
$ret = call_user_func( 'install_' . $sqlarray[0], $sqlarray[1] );

0 commit comments

Comments
 (0)
Please sign in to comment.