MOON
Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4
System: Linux vps.panamaemb.org.sg 3.10.0-1160.80.1.vz7.191.4 #1 SMP Thu Dec 15 20:31:06 MSK 2022 x86_64
User: panama (500)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/cwd/usr/share/mysql-test/t/server_uuid_embedded.test
##############################################################################
# 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)
# Cannot use !$server_uuid since it may begin with 0
if ($server_uuid == '')
{
  --echo server's UUID is null
}