3208 Li-Bing.Song@stripped 2010-07-14
Postfix WL#4677
added:
mysql-test/r/server_uuid_embedded.result
mysql-test/t/server_uuid_embedded.test
modified:
libmysqld/lib_sql.cc
3207 Alfranio Correia 2010-07-13
Post-merge fix.
Reverted the patch from BUG#53907 over tests/mysql_client_test.c
as it was null-merged into next-mr.
revno: 2875.40.20 [merge]
revision-id: alexey.kopytov@stripped
The other part of the patch that changed sql/sql_parse.cc was
reverted in the merge.
revno: 3206 [merge]
revision-id: alfranio.correia@stripped
modified:
tests/mysql_client_test.c
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc 2009-12-18 18:44:24 +0000
+++ b/libmysqld/lib_sql.cc 2010-07-14 15:04:32 +0000
@@ -525,6 +525,16 @@ int init_embedded_server(int argc, char
return 1;
}
+ /*
+ Each server should have one UUID. We will create it automatically, if it
+ does not exist.
+ */
+ if (!opt_bootstrap && init_server_auto_options())
+ {
+ mysql_server_end();
+ return 1;
+ }
+
error_handler_hook = my_message_sql;
acl_error= 0;
=== added file 'mysql-test/r/server_uuid_embedded.result'
--- a/mysql-test/r/server_uuid_embedded.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/server_uuid_embedded.result 2010-07-14 15:04:32 +0000
@@ -0,0 +1,10 @@
+
+# Case 1:
+# @@SERVER_UUID is readonly.
+-----------------------------------------------------------------------------
+SET GLOBAL SERVER_UUID= UUID();
+ERROR HY000: Variable 'server_uuid' is a read only variable
+
+# Case 2:
+# SERVER_UUID is not null
+-----------------------------------------------------------------------------
=== added file 'mysql-test/t/server_uuid_embedded.test'
--- a/mysql-test/t/server_uuid_embedded.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/server_uuid_embedded.test 2010-07-14 15:04:32 +0000
@@ -0,0 +1,31 @@
+##############################################################################
+# WL#4677 Unique Server Ids for Replication Topology (UUIDs) #
+#
+# Each server has a UUID generated by server itself. It is stored in auto.cnf
+# in @@DATADIR directory.
+#
+# @@SERVER_UUID is a readonly system variable, it is initialized as the
+# server's UUID when starting. Users can get the server's UUID from
+# @@SERVER_UUID.
+#
+# This test case tests whether the server's UUID can be generated, stored,
+# initialized correctly.
+##############################################################################
+source include/is_embedded.inc;
+
+--echo
+--echo # Case 1:
+--echo # @@SERVER_UUID is readonly.
+--echo -----------------------------------------------------------------------------
+--error 1238
+SET GLOBAL SERVER_UUID= UUID();
+
+--echo
+--echo # Case 2:
+--echo # SERVER_UUID is not null
+--echo -----------------------------------------------------------------------------
+--let $server_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1)
+if (`SELECT '$server_uuid' = ''`)
+{
+ --echo server's UUID is null
+}
Attachment: [text/bzr-bundle] bzr/li-bing.song@sun.com-20100714150432-c18eb557k5cvfk60.bundle
| Thread |
|---|
| • bzr push into mysql-5.1-rep+2 branch (Li-Bing.Song:3207 to 3208) WL#4677 | Li-Bing.Song | 14 Jul |