#At file:///home/msvensson/mysql/next-mr-wl3126/ based on revid:magnus.blaudd@strippedptt
3129 Magnus Blåudd 2010-09-30
WL#3126 TCP address binding for mysql client library
- Add tests for all mysql* clients that have got the new --bind-address
option. Since --bind-address is only used with TCP connections, the client
is tricked to use TCP either by setting host to 127.0.0.1 or by using protocol=tcp.
- Test is assuming that 127.0.0.1 always is available on test host.
modified:
mysql-test/r/mysql.result
mysql-test/r/mysqladmin.result
mysql-test/r/mysqldump.result
mysql-test/r/mysqlshow.result
mysql-test/t/mysql.test
mysql-test/t/mysqladmin.test
mysql-test/t/mysqlbinlog.test
mysql-test/t/mysqlcheck.test
mysql-test/t/mysqldump.test
mysql-test/t/mysqlshow.test
=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result 2010-01-18 20:19:19 +0000
+++ b/mysql-test/r/mysql.result 2010-09-30 10:28:49 +0000
@@ -434,3 +434,5 @@ Bug #47147: mysql client option --skip-c
1
End of tests
+Connected
+OK
=== modified file 'mysql-test/r/mysqladmin.result'
--- a/mysql-test/r/mysqladmin.result 2006-11-10 12:25:10 +0000
+++ b/mysql-test/r/mysqladmin.result 2010-09-30 10:28:49 +0000
@@ -2,3 +2,4 @@ mysqld is alive
mysqladmin: unknown variable 'database=db1'
Warning: mysqladmin: unknown variable 'loose-database=db2'
mysqld is alive
+mysqld is alive
=== modified file 'mysql-test/r/mysqldump.result'
--- a/mysql-test/r/mysqldump.result 2010-02-20 10:07:32 +0000
+++ b/mysql-test/r/mysqldump.result 2010-09-30 10:28:49 +0000
@@ -4560,6 +4560,11 @@ a b c
2 NULL NULL
SET NAMES default;
DROP TABLE t1, t2;
+create table t1 (first char(28) , last varchar(37));
+insert into t1 values ("Magnus", "Blåudd");
+truncate table t1;
+test.t1: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
+drop table t1;
#
# End of 5.1 tests
#
=== modified file 'mysql-test/r/mysqlshow.result'
--- a/mysql-test/r/mysqlshow.result 2010-01-15 11:42:15 +0000
+++ b/mysql-test/r/mysqlshow.result 2010-09-30 10:28:49 +0000
@@ -165,4 +165,9 @@ Wildcard: inf_rmation_schema
+--------------------+
| information_schema |
+--------------------+
+Database: test
++--------+
+| Tables |
++--------+
++--------+
End of 5.0 tests
=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test 2009-12-24 07:56:13 +0000
+++ b/mysql-test/t/mysql.test 2010-09-30 10:28:49 +0000
@@ -427,3 +427,10 @@ drop table t1;
--echo
--echo End of tests
+
+
+#
+# WL#3126 TCP address binding for mysql client library;
+# - running mysql --protocol=tcp --bind-address=127.0.0.1
+#
+--exec $MYSQL --protocol=tcp --bind-address=127.0.0.1 -e "select \"OK\" as Connected"
=== modified file 'mysql-test/t/mysqladmin.test'
--- a/mysql-test/t/mysqladmin.test 2009-10-21 12:59:47 +0000
+++ b/mysql-test/t/mysqladmin.test 2010-09-30 10:28:49 +0000
@@ -33,3 +33,9 @@ EOF
--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf;
+
+#
+# WL#3126 TCP address binding for mysql client library;
+# - running mysqladmin --protcol=tcp --bind-address=127.0.0.1
+#
+--exec $MYSQLADMIN --no-defaults --protocol=tcp --bind-address=127.0.0.1 --host=127.0.0.1 -P $MASTER_MYPORT -u root ping 2>&1
=== modified file 'mysql-test/t/mysqlbinlog.test'
--- a/mysql-test/t/mysqlbinlog.test 2010-03-25 07:26:12 +0000
+++ b/mysql-test/t/mysqlbinlog.test 2010-09-30 10:28:49 +0000
@@ -467,3 +467,10 @@ diff_files $MYSQLTEST_VARDIR/tmp/mysqlbi
# Cleanup for this part of test
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn.empty;
remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.warn;
+
+#
+# WL#3126 TCP address binding for mysql client library;
+# - running mysqlbinlog --protocol=tcp --bind-address=127.0.0.1
+#
+--exec $MYSQL_BINLOG --short-form --read-from-remote-server --protocol=tcp --bind-address=127.0.0.1 master-bin.000001 > /dev/null
+
=== modified file 'mysql-test/t/mysqlcheck.test'
--- a/mysql-test/t/mysqlcheck.test 2009-10-21 12:59:47 +0000
+++ b/mysql-test/t/mysqlcheck.test 2010-09-30 10:28:49 +0000
@@ -211,4 +211,11 @@ create table `#mysql50#t1-1` (a int);
show tables like 't1-1';
drop table `t1-1`;
+#
+# WL#3126 TCP address binding for mysql client library;
+# - running mysqlcheck --protcol=tcp --bind-address=127.0.0.1
+#
+--exec $MYSQL_CHECK --protocol=tcp --bind-address=127.0.0.1 --databases test
+
--echo End of 5.1 tests
+
=== modified file 'mysql-test/t/mysqldump.test'
--- a/mysql-test/t/mysqldump.test 2010-01-12 12:07:09 +0000
+++ b/mysql-test/t/mysqldump.test 2010-09-30 10:28:49 +0000
@@ -2138,6 +2138,18 @@ SET NAMES default;
DROP TABLE t1, t2;
+#
+# WL#3126 TCP address binding for mysql client library;
+# - running mysqldump --protocol=tcp --bind-address=127.0.0.1
+# - running mysqlimport --protocol=tcp --bind-address=127.0.0.1
+#
+create table t1 (first char(28) , last varchar(37));
+insert into t1 values ("Magnus", "Blåudd");
+--exec $MYSQL_DUMP --protocol=tcp --bind-address=127.0.0.1 --tab=$MYSQLTEST_VARDIR/tmp/ test
+truncate table t1;
+--exec $MYSQL_IMPORT --protocol=tcp --bind-address=127.0.0.1 test $MYSQLTEST_VARDIR/tmp/t1.txt
+drop table t1;
+
###########################################################################
--echo #
--echo # End of 5.1 tests
=== modified file 'mysql-test/t/mysqlshow.test'
--- a/mysql-test/t/mysqlshow.test 2009-08-07 20:04:53 +0000
+++ b/mysql-test/t/mysqlshow.test 2010-09-30 10:28:49 +0000
@@ -35,4 +35,10 @@ DROP TABLE t1, t2;
--exec $MYSQL_SHOW INFORMATION_SCHEMA
--exec $MYSQL_SHOW inf_rmation_schema
+#
+# WL#3126 TCP address binding for mysql client library;
+# - running mysqlshow --protcol=tcp --bind-address=127.0.0.1
+#
+--exec $MYSQL_SHOW --protocol=tcp --bind-address=127.0.0.1 test
+
--echo End of 5.0 tests
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20100930102849-6nqvj8kleugkoaax.bundle
| Thread |
|---|
| • bzr commit into mysql-next-mr branch (magnus.blaudd:3129) WL#3126 | Magnus Blåudd | 30 Sep |