From b14da5242e1dcbaad98502fd02817fabbeaeb7b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Feb 2007 16:24:38 +0100 Subject: Bug#20166 mysql-test-run.pl does not test system privilege tables creation - Part 2, add @@hostname system variable mysql-test/r/variables.result: Add testcase for @@hostname mysql-test/t/variables.test: Add testcase for @@hostname sql/log.cc: Use pidfile_name as base when generating the default log name sql/mysqld.cc: Init "glob_hostname" to that of hostname, fallback to "localhost" if 'gethostname' should fail. Init "pidfile_name" to hostname.pid and fallback to "mysql.pid" if 'gethostname' should fail sql/set_var.cc: Add new system variable "hostname" --- mysql-test/r/variables.result | 8 ++++++++ mysql-test/t/variables.test | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index c3d7d5ac4eb..60010183d32 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -752,6 +752,14 @@ select @@&; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '&' at line 1 select @@@; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@' at line 1 +select @@hostname; +@@hostname +# +set @@hostname= "anothername"; +ERROR HY000: Variable 'hostname' is a read only variable +show variables like 'hostname'; +Variable_name Value +hostname # End of 5.0 tests set global binlog_cache_size =@my_binlog_cache_size; set global connect_timeout =@my_connect_timeout; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 5edb8fb754b..697e55945ef 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -639,6 +639,17 @@ select @@&; --error ER_PARSE_ERROR select @@@; +# +# Bug#20166 mysql-test-run.pl does not test system privilege tables creation +# +# Don't actually output, since it depends on the system +--replace_column 1 # +select @@hostname; +--error 1238 +set @@hostname= "anothername"; +--replace_column 2 # +show variables like 'hostname'; + --echo End of 5.0 tests # This is at the very after the versioned tests, since it involves doing -- cgit v1.2.1