mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
Merge pilot.blaudden:/home/msvensson/mysql/bug20166/my50-bug20166
into pilot.blaudden:/home/msvensson/mysql/bug20166/my51-bug20166
This commit is contained in:
commit
0cc2e14040
5 changed files with 34 additions and 4 deletions
|
@ -903,6 +903,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
|
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 @@@;
|
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
|
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
|
End of 5.0 tests
|
||||||
set global binlog_cache_size =@my_binlog_cache_size;
|
set global binlog_cache_size =@my_binlog_cache_size;
|
||||||
set global connect_timeout =@my_connect_timeout;
|
set global connect_timeout =@my_connect_timeout;
|
||||||
|
|
|
@ -689,6 +689,17 @@ select @@&;
|
||||||
--error ER_PARSE_ERROR
|
--error ER_PARSE_ERROR
|
||||||
select @@@;
|
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
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
# This is at the very after the versioned tests, since it involves doing
|
# This is at the very after the versioned tests, since it involves doing
|
||||||
|
|
|
@ -2297,7 +2297,7 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
|
||||||
TODO: The following should be using fn_format(); We just need to
|
TODO: The following should be using fn_format(); We just need to
|
||||||
first change fn_format() to cut the file name if it's too long.
|
first change fn_format() to cut the file name if it's too long.
|
||||||
*/
|
*/
|
||||||
strmake(buff, glob_hostname, FN_REFLEN - 5);
|
strmake(buff, pidfile_name, FN_REFLEN - 5);
|
||||||
strmov(fn_ext(buff), suffix);
|
strmov(fn_ext(buff), suffix);
|
||||||
return (const char *)buff;
|
return (const char *)buff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2677,9 +2677,15 @@ static int init_common_variables(const char *conf_file_name, int argc,
|
||||||
*/
|
*/
|
||||||
mysql_bin_log.init_pthread_objects();
|
mysql_bin_log.init_pthread_objects();
|
||||||
|
|
||||||
if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
|
if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
|
||||||
strmov(glob_hostname,"mysql");
|
{
|
||||||
strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
|
strmake(glob_hostname, STRING_WITH_LEN("localhost"));
|
||||||
|
sql_print_warning("gethostname failed, using '%s' as hostname",
|
||||||
|
glob_hostname);
|
||||||
|
strmake(pidfile_name, STRING_WITH_LEN("mysql"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
|
||||||
strmov(fn_ext(pidfile_name),".pid"); // Add proper extension
|
strmov(fn_ext(pidfile_name),".pid"); // Add proper extension
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -655,6 +655,10 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
|
||||||
|
|
||||||
/* Read only variables */
|
/* Read only variables */
|
||||||
|
|
||||||
|
/* Global read-only variable containing hostname */
|
||||||
|
sys_var_const_str sys_hostname("hostname", glob_hostname);
|
||||||
|
|
||||||
|
|
||||||
sys_var_have_variable sys_have_compress("have_compress", &have_compress);
|
sys_var_have_variable sys_have_compress("have_compress", &have_compress);
|
||||||
sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt);
|
sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt);
|
||||||
sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db);
|
sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db);
|
||||||
|
@ -779,6 +783,7 @@ SHOW_VAR init_vars[]= {
|
||||||
{sys_var_general_log.name, (char*) &opt_log, SHOW_MY_BOOL},
|
{sys_var_general_log.name, (char*) &opt_log, SHOW_MY_BOOL},
|
||||||
{sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS},
|
{sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS},
|
||||||
{sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS},
|
{sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS},
|
||||||
|
{sys_hostname.name, (char*) &sys_hostname, SHOW_SYS},
|
||||||
{sys_have_compress.name, (char*) &have_compress, SHOW_HAVE},
|
{sys_have_compress.name, (char*) &have_compress, SHOW_HAVE},
|
||||||
{sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE},
|
{sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE},
|
||||||
{sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE},
|
{sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE},
|
||||||
|
|
Loading…
Add table
Reference in a new issue