Commit 2f2669b2 authored by Georgi Kodinov's avatar Georgi Kodinov

merge back to the 5.5 tree and fix indentation

parents 4fdb9555 8d870154
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -25,7 +25,7 @@ connect-timeout= 60
log-bin-trust-function-creators=1
key_buffer_size= 1M
sort_buffer= 256K
sort_buffer_size= 256K
max_heap_table_size= 1M
loose-innodb_data_file_path= ibdata1:10M:autoextend
......
......@@ -5111,7 +5111,7 @@ CREATE TABLE b12809202_db.t1 (c1 INT);
CREATE TABLE b12809202_db.t2 (c1 INT);
INSERT INTO b12809202_db.t1 VALUES (1), (2), (3);
INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
# Starting mysqldump with --single-transaction & --flush-log options..
# Starting mysqldump with --single-transaction & --flush-logs options..
# Note : In the following dump the transaction
# should start only after the logs are
# flushed, as 'flush logs' causes implicit
......
......@@ -23,7 +23,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
--source include/count_sessions.inc
--exec $MYSQL --xml test -e "select * from t1"
--exec $MYSQL_DUMP --xml --skip-create test
--exec $MYSQL_DUMP --xml --skip-create-options test
--exec $MYSQL --xml test -e "select count(*) from t1"
--exec $MYSQL --xml test -e "select 1 < 2 from dual"
......
......@@ -30,7 +30,7 @@ drop view if exists v1, v2, v3;
CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024;
INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-create --skip-comments -X test t1
--exec $MYSQL_DUMP --skip-create-options --skip-comments -X test t1
DROP TABLE t1;
--echo #
......@@ -73,14 +73,14 @@ SET SQL_MODE=@OLD_SQL_MODE;
# check how mysqldump make quoting
--exec $MYSQL_DUMP --compact test t1
--exec $MYSQL_DUMP --compact --skip-create test t1
--exec $MYSQL_DUMP --skip-create --skip-comments test t1
--exec $MYSQL_DUMP --compact --skip-create-options test t1
--exec $MYSQL_DUMP --skip-create-options --skip-comments test t1
--exec $MYSQL_DUMP --skip-opt --extended-insert --skip-comments test t1
DROP TABLE t1;
CREATE TABLE t1(a int, b text, c varchar(3));
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
--exec $MYSQL_DUMP --skip-create --compact -X test t1
--exec $MYSQL_DUMP --skip-create-options --compact -X test t1
DROP TABLE t1;
--echo #
......@@ -89,7 +89,7 @@ DROP TABLE t1;
CREATE TABLE t1 (`a"b"` char(2));
INSERT INTO t1 VALUES ("1\""), ("\"2");
--exec $MYSQL_DUMP --compact --skip-create -X test t1
--exec $MYSQL_DUMP --compact --skip-create-options -X test t1
DROP TABLE t1;
--echo #
......@@ -576,8 +576,8 @@ INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
--exec $MYSQL_DUMP --skip-comments --skip-create-options --xml --no-data mysqldump_test_db
--exec $MYSQL_DUMP --skip-comments --skip-create-options --xml --no-data mysqldump_test_db t1 t2
DROP TABLE t1, t2;
DROP DATABASE mysqldump_test_db;
......@@ -1599,7 +1599,7 @@ drop database mysqldump_test_db;
CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
--exec $MYSQL_DUMP --skip-create --compact --hex-blob test t1
--exec $MYSQL_DUMP --skip-create-options --compact --hex-blob test t1
DROP TABLE t1;
--echo #
......@@ -2175,7 +2175,7 @@ DROP TABLE t1, t2;
--echo #
CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
--exec $MYSQL_DUMP --compact --skip-create --xml test
--exec $MYSQL_DUMP --compact --skip-create-options --xml test
DROP TABLE `comment_table`;
--echo #
......@@ -2343,7 +2343,7 @@ CREATE TABLE b12809202_db.t2 (c1 INT);
INSERT INTO b12809202_db.t1 VALUES (1), (2), (3);
INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
--echo # Starting mysqldump with --single-transaction & --flush-log options..
--echo # Starting mysqldump with --single-transaction & --flush-logs options..
--echo # Note : In the following dump the transaction
--echo # should start only after the logs are
--echo # flushed, as 'flush logs' causes implicit
......@@ -2354,7 +2354,7 @@ INSERT INTO b12809202_db.t2 VALUES (1), (2), (3);
--echo
--echo #### Dump starts here ####
--replace_regex /-- Server version.*// /-- MySQL dump .*// /-- Dump completed on .*/-- Dump completed/
--exec $MYSQL_DUMP --verbose --single-transaction --flush-log b12809202_db 2>$MYSQLTEST_VARDIR/tmp/b12809202_stderr.sql
--exec $MYSQL_DUMP --verbose --single-transaction --flush-logs b12809202_db 2>$MYSQLTEST_VARDIR/tmp/b12809202_stderr.sql
--echo
--echo ## stderr ##
--cat_file $MYSQLTEST_VARDIR/tmp/b12809202_stderr.sql
......
......@@ -192,16 +192,16 @@ CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
# Run mysqldump
--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
--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
--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
--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
--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
--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
# With wrong parameters
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--error 2
--exec $MYSQL_DUMP --skip-create --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
--exec $MYSQL_DUMP --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
DROP TABLE t1;
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
......
/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -829,6 +829,7 @@ static int findopt(char *optpat, uint length,
{
uint count;
const struct my_option *opt= *opt_res;
my_bool is_prefix= FALSE;
for (count= 0; opt->name; opt++)
{
......@@ -837,11 +838,14 @@ static int findopt(char *optpat, uint length,
(*opt_res)= opt;
if (!opt->name[length]) /* Exact match */
return 1;
if (!count)
{
/* We only need to know one prev */
count= 1;
*ffname= opt->name;
if (opt->name[length])
is_prefix= TRUE;
}
else if (strcmp(*ffname, opt->name))
{
......@@ -853,6 +857,12 @@ static int findopt(char *optpat, uint length,
}
}
}
if (is_prefix && count == 1)
my_getopt_error_reporter(WARNING_LEVEL,
"Using unique option prefix %.*s instead of %s "
"is deprecated and will be removed in a future "
"release. Please use the full name instead.",
length, optpat, *ffname);
return count;
}
......
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