Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-02-20 16:26:30+01:00, msvensson@stripped +5 -0
Merge pilot.blaudden:/home/msvensson/mysql/bug20166/my50-bug20166
into pilot.blaudden:/home/msvensson/mysql/bug20166/my51-bug20166
MERGE: 1.1810.2372.104
mysql-test/r/variables.result@stripped, 2007-02-20 16:26:29+01:00, msvensson@stripped +0 -0
Manual merge
MERGE: 1.76.1.15
mysql-test/t/variables.test@stripped, 2007-02-20 16:25:07+01:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.51.1.15
sql/log.cc@stripped, 2007-02-20 16:26:29+01:00, msvensson@stripped +1 -2
Manual merge, spaces added to 5.1 version
MERGE: 1.158.16.1
sql/mysqld.cc@stripped, 2007-02-20 16:26:29+01:00, msvensson@stripped +0 -1
Code no longer exists
MERGE: 1.439.82.17
sql/set_var.cc@stripped, 2007-02-20 16:26:29+01:00, msvensson@stripped +0 -1
Manual merge
MERGE: 1.125.22.4
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: pilot.blaudden
# Root: /home/msvensson/mysql/bug20166/my51-bug20166/RESYNC
--- 1.255/sql/log.cc 2007-01-29 00:47:30 +01:00
+++ 1.256/sql/log.cc 2007-02-20 16:26:29 +01:00
@@ -2297,7 +2297,7 @@
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.
*/
- strmake(buff, glob_hostname, FN_REFLEN - 5);
+ strmake(buff, pidfile_name, FN_REFLEN - 5);
strmov(fn_ext(buff), suffix);
return (const char *)buff;
}
--- 1.619/sql/mysqld.cc 2007-02-14 14:51:46 +01:00
+++ 1.620/sql/mysqld.cc 2007-02-20 16:26:29 +01:00
@@ -2677,9 +2677,15 @@
*/
mysql_bin_log.init_pthread_objects();
- if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
- strmov(glob_hostname,"mysql");
- strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
+ if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
+ {
+ 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
/*
--- 1.94/mysql-test/r/variables.result 2006-12-05 13:07:18 +01:00
+++ 1.95/mysql-test/r/variables.result 2007-02-20 16:26:29 +01:00
@@ -903,6 +903,14 @@
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;
--- 1.66/mysql-test/t/variables.test 2006-12-05 13:07:18 +01:00
+++ 1.67/mysql-test/t/variables.test 2007-02-20 16:25:07 +01:00
@@ -689,6 +689,17 @@
--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
--- 1.216/sql/set_var.cc 2007-02-14 14:51:46 +01:00
+++ 1.217/sql/set_var.cc 2007-02-20 16:26:29 +01:00
@@ -655,6 +655,10 @@
/* 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_crypt("have_crypt", &have_crypt);
sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db);
@@ -779,6 +783,7 @@
{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_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_crypt.name, (char*) &have_crypt, SHOW_HAVE},
{sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE},
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2444) | msvensson | 20 Feb |