Commit e75bdb4e authored by unknown's avatar unknown

Fix mysqldump for so that my_programname is set to "mysqldump".

Correct test results now when error message output is predictable.


client/mysqldump.c:
  Set mysqldump as progname instead of totally long and strange path provided by libtool.
mysql-test/r/mysqldump.result:
  Update test results
mysql-test/t/mysqldump.test:
  Update test result, removed --replace now ehn test output is predictable.
parent 4d99f793
......@@ -2835,7 +2835,7 @@ int main(int argc, char **argv)
compatible_mode_normal_str[0]= 0;
default_charset= (char *)mysql_universal_client_charset;
MY_INIT(argv[0]);
MY_INIT("mysqldump");
if (get_options(&argc, &argv))
{
my_end(0);
......
......@@ -1560,23 +1560,23 @@ create table t2(a varchar(30) primary key, b int not null);
create table t3(a varchar(30) primary key, b int not null);
test_sequence
------ Testing with illegal table names ------
MYSQL_DUMP_DIR: Couldn't find table: "\d-2-1.sql"
mysqldump: Couldn't find table: "\d-2-1.sql"
MYSQL_DUMP_DIR: Couldn't find table: "\t1"
mysqldump: Couldn't find table: "\t1"
MYSQL_DUMP_DIR: Couldn't find table: "\t1"
mysqldump: Couldn't find table: "\t1"
MYSQL_DUMP_DIR: Couldn't find table: "\\t1"
mysqldump: Couldn't find table: "\\t1"
MYSQL_DUMP_DIR: Couldn't find table: "t\1"
mysqldump: Couldn't find table: "t\1"
MYSQL_DUMP_DIR: Couldn't find table: "t\1"
mysqldump: Couldn't find table: "t\1"
MYSQL_DUMP_DIR: Couldn't find table: "t/1"
mysqldump: Couldn't find table: "t/1"
test_sequence
------ Testing with illegal database names ------
MYSQL_DUMP_DIR: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database
MYSQL_DUMP_DIR: Got error: 1102: Incorrect database name 'mysqld\ump_test_db' when selecting the database
mysqldump: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database
mysqldump: Got error: 1102: Incorrect database name 'mysqld\ump_test_db' when selecting the database
drop table t1, t2, t3;
drop database mysqldump_test_db;
......@@ -619,62 +619,47 @@ create table t3(a varchar(30) primary key, b int not null);
--disable_query_log
select '------ Testing with illegal table names ------' as test_sequence ;
--enable_query_log
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\d-2-1.sql" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\t1" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\1" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t\\1" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "t/1" 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_1"
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T%1"
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T'1"
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_1"
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 6
--exec $MYSQL_DUMP --compact --skip-comments "mysqldump_test_db" "T_"
--disable_query_log
select '------ Testing with illegal database names ------' as test_sequence ;
--enable_query_log
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 2
--exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_d 2>&1
--replace_result $MYSQL_DUMP_DIR MYSQL_DUMP_DIR
--error 2
--exec $MYSQL_DUMP --compact --skip-comments "mysqld\ump_test_db" 2>&1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment