diff options
author | Sayantan Dutta <sayantan.dutta@oracle.com> | 2014-09-03 14:37:00 +0530 |
---|---|---|
committer | Sayantan Dutta <sayantan.dutta@oracle.com> | 2014-09-03 14:37:00 +0530 |
commit | e95e876400ac32a993e755cd570a11cc1c3f57c0 (patch) | |
tree | 19de3a8f16165214f481f960b00c186424f54e3c /mysql-test | |
parent | 9fb7de7b650fddd6bd02d9a4aaa8fe31c18a84a7 (diff) | |
download | mariadb-git-e95e876400ac32a993e755cd570a11cc1c3f57c0.tar.gz |
Bug #19361317 - --MANUAL-GDB EFFECTIVELY TRUNCATES OPTION FILE ARGS AT FIRST SEMICOLON
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 636f3d88c62..7616a1ec39d 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5684,6 +5684,24 @@ sub start_mysqltest ($) { return $proc; } +sub create_debug_statement { + my $args= shift; + my $input= shift; + + # Put $args into a single string + my $str= join(" ", @$$args); + my $runline= $input ? "run $str < $input" : "run $str"; + + # add quotes to escape ; in plugin_load option + my $pos1 = index($runline, "--plugin_load="); + if ( $pos1 != -1 ) { + my $pos2 = index($runline, " ",$pos1); + substr($runline,$pos1+14,0) = "\""; + substr($runline,$pos2+1,0) = "\""; + } + + return $runline; +} # # Modify the exe and args so that program is run in gdb in xterm @@ -5699,9 +5717,7 @@ sub gdb_arguments { # Remove the old gdbinit file unlink($gdb_init_file); - # Put $args into a single string - my $str= join(" ", @$$args); - my $runline= $input ? "run $str < $input" : "run $str"; + my $runline=create_debug_statement($args,$input); # write init file for mysqld or client mtr_tofile($gdb_init_file, @@ -5749,8 +5765,7 @@ sub lldb_arguments { my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type"; unlink($lldb_init_file); - my $str= join(" ", @$$args); - my $runline= $input ? "r $str < $input" : "r $str"; + my $runline=create_debug_statement($args,$input); # write init file for mysqld or client mtr_tofile($lldb_init_file, @@ -5779,9 +5794,7 @@ sub ddd_arguments { # Remove the old gdbinit file unlink($gdb_init_file); - # Put $args into a single string - my $str= join(" ", @$$args); - my $runline= $input ? "run $str < $input" : "run $str"; + my $runline=create_debug_statement($args,$input); # write init file for mysqld or client mtr_tofile($gdb_init_file, |