Skip to content

Commit ab7c7d2

Browse files
committed
merge
2 parents 6f14eab + 8d87015 commit ab7c7d2

File tree

6 files changed

+30
-20
lines changed

6 files changed

+30
-20
lines changed

mysql-test/include/default_mysqld.cnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ connect-timeout= 60
2525

2626
log-bin-trust-function-creators=1
2727
key_buffer_size= 1M
28-
sort_buffer= 256K
28+
sort_buffer_size= 256K
2929
max_heap_table_size= 1M
3030

3131
loose-innodb_data_file_path= ibdata1:10M:autoextend

mysql-test/r/mysqldump.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5232,7 +5232,7 @@ CREATE TABLE b12809202_db.t1 (c1 INT);
52325232
CREATE TABLE b12809202_db.t2 (c1 INT);
52335233
INSERT INTO b12809202_db.t1 VALUES (1), (2), (3);
52345234
INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
5235-
# Starting mysqldump with --single-transaction & --flush-log options..
5235+
# Starting mysqldump with --single-transaction & --flush-logs options..
52365236
# Note : In the following dump the transaction
52375237
# should start only after the logs are
52385238
# flushed, as 'flush logs' causes implicit

mysql-test/t/client_xml.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
2323
--source include/count_sessions.inc
2424

2525
--exec $MYSQL --xml test -e "select * from t1"
26-
--exec $MYSQL_DUMP --xml --skip-create test
26+
--exec $MYSQL_DUMP --xml --skip-create-options test
2727

2828
--exec $MYSQL --xml test -e "select count(*) from t1"
2929
--exec $MYSQL --xml test -e "select 1 < 2 from dual"

mysql-test/t/mysqldump.test

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ drop view if exists v1, v2, v3;
3131

3232
CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024;
3333
INSERT INTO t1 VALUES (1), (2);
34-
--exec $MYSQL_DUMP --skip-create --skip-comments -X test t1
34+
--exec $MYSQL_DUMP --skip-create-options --skip-comments -X test t1
3535
DROP TABLE t1;
3636

3737
--echo #
@@ -74,14 +74,14 @@ SET SQL_MODE=@OLD_SQL_MODE;
7474

7575
# check how mysqldump make quoting
7676
--exec $MYSQL_DUMP --compact test t1
77-
--exec $MYSQL_DUMP --compact --skip-create test t1
78-
--exec $MYSQL_DUMP --skip-create --skip-comments test t1
77+
--exec $MYSQL_DUMP --compact --skip-create-options test t1
78+
--exec $MYSQL_DUMP --skip-create-options --skip-comments test t1
7979
--exec $MYSQL_DUMP --skip-opt --extended-insert --skip-comments test t1
8080
DROP TABLE t1;
8181

8282
CREATE TABLE t1(a int, b text, c varchar(3));
8383
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
84-
--exec $MYSQL_DUMP --skip-create --compact -X test t1
84+
--exec $MYSQL_DUMP --skip-create-options --compact -X test t1
8585
DROP TABLE t1;
8686

8787
--echo #
@@ -90,7 +90,7 @@ DROP TABLE t1;
9090

9191
CREATE TABLE t1 (`a"b"` char(2));
9292
INSERT INTO t1 VALUES ("1\""), ("\"2");
93-
--exec $MYSQL_DUMP --compact --skip-create -X test t1
93+
--exec $MYSQL_DUMP --compact --skip-create-options -X test t1
9494
DROP TABLE t1;
9595

9696
--echo #
@@ -577,8 +577,8 @@ INSERT INTO t1 VALUES (1), (2);
577577
INSERT INTO t2 VALUES (1), (2);
578578
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db
579579
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
580-
--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
581-
--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
580+
--exec $MYSQL_DUMP --skip-comments --skip-create-options --xml --no-data mysqldump_test_db
581+
--exec $MYSQL_DUMP --skip-comments --skip-create-options --xml --no-data mysqldump_test_db t1 t2
582582
DROP TABLE t1, t2;
583583
DROP DATABASE mysqldump_test_db;
584584

@@ -1600,7 +1600,7 @@ drop database mysqldump_test_db;
16001600

16011601
CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
16021602
INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
1603-
--exec $MYSQL_DUMP --skip-create --compact --hex-blob test t1
1603+
--exec $MYSQL_DUMP --skip-create-options --compact --hex-blob test t1
16041604
DROP TABLE t1;
16051605

16061606
--echo #
@@ -2189,7 +2189,7 @@ drop table t1;
21892189
--echo #
21902190

21912191
CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
2192-
--exec $MYSQL_DUMP --compact --skip-create --xml test
2192+
--exec $MYSQL_DUMP --compact --skip-create-options --xml test
21932193
DROP TABLE `comment_table`;
21942194

21952195
--echo #
@@ -2390,7 +2390,7 @@ CREATE TABLE b12809202_db.t2 (c1 INT);
23902390
INSERT INTO b12809202_db.t1 VALUES (1), (2), (3);
23912391
INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
23922392

2393-
--echo # Starting mysqldump with --single-transaction & --flush-log options..
2393+
--echo # Starting mysqldump with --single-transaction & --flush-logs options..
23942394
--echo # Note : In the following dump the transaction
23952395
--echo # should start only after the logs are
23962396
--echo # flushed, as 'flush logs' causes implicit
@@ -2401,7 +2401,7 @@ INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
24012401
--echo
24022402
--echo #### Dump starts here ####
24032403
--replace_regex /-- Server version.*// /-- MySQL dump .*// /-- Dump completed on .*/-- Dump completed/
2404-
--exec $MYSQL_DUMP --verbose --single-transaction --flush-log b12809202_db 2> $MYSQLTEST_VARDIR/tmp/b12809202_stderr.sql
2404+
--exec $MYSQL_DUMP --verbose --single-transaction --flush-logs b12809202_db 2> $MYSQLTEST_VARDIR/tmp/b12809202_stderr.sql
24052405
--echo
24062406
--echo ## stderr ##
24072407
--cat_file $MYSQLTEST_VARDIR/tmp/b12809202_stderr.sql

mysql-test/t/openssl_1.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,16 @@ CREATE TABLE t1(a int);
192192
INSERT INTO t1 VALUES (1), (2);
193193

194194
# Run mysqldump
195-
--exec $MYSQL_DUMP --skip-create --skip-comments --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test t1
195+
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test t1
196196

197-
--exec $MYSQL_DUMP --skip-create --skip-comments --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
197+
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
198198

199-
--exec $MYSQL_DUMP --skip-create --skip-comments --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
199+
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test
200200

201201
# With wrong parameters
202202
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
203203
--error 2
204-
--exec $MYSQL_DUMP --skip-create --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
204+
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
205205

206206
DROP TABLE t1;
207207
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql

mysys_ssl/my_getopt.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -917,6 +917,7 @@ static int findopt(char *optpat, uint length,
917917
{
918918
uint count;
919919
const struct my_option *opt= *opt_res;
920+
my_bool is_prefix= FALSE;
920921

921922
for (count= 0; opt->name; opt++)
922923
{
@@ -925,11 +926,14 @@ static int findopt(char *optpat, uint length,
925926
(*opt_res)= opt;
926927
if (!opt->name[length]) /* Exact match */
927928
return 1;
929+
928930
if (!count)
929931
{
930932
/* We only need to know one prev */
931933
count= 1;
932934
*ffname= opt->name;
935+
if (opt->name[length])
936+
is_prefix= TRUE;
933937
}
934938
else if (strcmp(*ffname, opt->name))
935939
{
@@ -941,6 +945,12 @@ static int findopt(char *optpat, uint length,
941945
}
942946
}
943947
}
948+
if (is_prefix && count == 1)
949+
my_getopt_error_reporter(WARNING_LEVEL,
950+
"Using unique option prefix %.*s instead of %s "
951+
"is deprecated and will be removed in a future "
952+
"release. Please use the full name instead.",
953+
length, optpat, *ffname);
944954
return count;
945955
}
946956

0 commit comments

Comments
 (0)