Below is the list of changes that have just been committed into a local
5.0 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, 2006-11-27 19:22:13+01:00, msvensson@neptunus.(none) +18 -0
Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Add new options --bootstrap=[<file>], --bootstrap-force and
--bootstrap-database to mysqld
- Add new system variable @@hostname
- Make mysql_create_system_tables.sql the default file for bootstrapping
a mysql system database
- Add test for bootstrap
- Add test for mysql_install_db if running from bindist
- Remove mysql-test/init_db.sql and mysql-test/lib/init_db.sql
BitKeeper/deleted/.del-init_db.sql@stripped, 2006-11-27 16:45:03+01:00, msvensson@neptunus.(none) +0 -0
Rename: mysql-test/init_db.sql -> BitKeeper/deleted/.del-init_db.sql
BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8@stripped, 2006-11-27 16:45:03+01:00, msvensson@neptunus.(none) +0 -0
Rename: mysql-test/lib/init_db.sql -> BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8
BitKeeper/deleted/.del-mysql_create_system_tables.sh@stripped, 2006-11-27 16:45:03+01:00, msvensson@neptunus.(none) +0 -0
Rename: scripts/mysql_create_system_tables.sh -> BitKeeper/deleted/.del-mysql_create_system_tables.sh
mysql-test/include/binary_dist.inc@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +7 -0
New BitKeeper file ``mysql-test/include/binary_dist.inc''
mysql-test/include/binary_dist.inc@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
mysql-test/mysql-test-run.pl@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +98 -40
Bootstrap using --bootstrap argument(s) to mysqld if version of mysqld
is above 5.0.30
Set environment variable MYSQLD_BOOTSTRAP to allow testing of "mysqld --bootstrap"
commands
Change old implementation to generate the init_db_sql.tmp in local "var/" instead
of /tmp as that poentially could be a security risk
Set MYSQL_SOURCE_DIST environment variable making it possible to run scripts
only when in or not in source dist
Set variable for executing mysql_install_db from test case
mysql-test/r/binary_dist.require@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +2 -0
New BitKeeper file ``mysql-test/r/binary_dist.require''
mysql-test/r/binary_dist.require@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
mysql-test/r/bootstrap.result@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +24 -0
New BitKeeper file ``mysql-test/r/bootstrap.result''
mysql-test/r/bootstrap.result@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
mysql-test/t/bootstrap.test@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +111 -0
New BitKeeper file ``mysql-test/t/bootstrap.test''
mysql-test/t/bootstrap.test@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
scripts/Makefile.am@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +8 -5
Remove mysql_create_system_tables.sh
Add new files mysql_create_system_tables.sql,
mysql_create_test_users.sql and mysql_test_data_timezone.sql
scripts/mysql_create_system_tables.sql@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +63 -0
New BitKeeper file ``scripts/mysql_create_system_tables.sql''
scripts/mysql_create_system_tables.sql@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
scripts/mysql_create_test_users.sql@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +11 -0
New BitKeeper file ``scripts/mysql_create_test_users.sql''
scripts/mysql_create_test_users.sql@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
scripts/mysql_install_db.sh@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +37 -41
Update mysql_install_db.sh to use mysql_create_system_tables.sql when
bootstrapping the mysql system tables
Update help text
- add hint that mysql_upgrade must be run if upgrading from a previous MySQL
version
- remove hint about using "sql-bench" since it does not work out of the box.
scripts/mysql_test_data_timezone.sql@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +8 -0
New BitKeeper file ``scripts/mysql_test_data_timezone.sql''
scripts/mysql_test_data_timezone.sql@stripped, 2006-11-27 19:22:11+01:00, msvensson@neptunus.(none) +0 -0
sql/log.cc@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +1 -1
Use pidfile_name as template when generating a new log file name
sql/mysql_priv.h@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +2 -0
Export new bootstrap variables
sql/mysqld.cc@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +69 -14
Add option --bootstrap=[<file>] making it possible for the mysqld to
bootstrap from file(s) in addition to stdin. The option can be specified
multiple times.
Add option --bootstrap-force to allow bootstrapping to procede although
an error occurs in one of the SQL statements.
Add option --bootstrap-database inidcating what database to use during execution
of the bootstrap file(s).
Init glob_hostname and if gethostname fails set glob_hostname to localhost.
sql/set_var.cc@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +3 -0
Add @@hostname system variable
sql/sql_parse.cc@stripped, 2006-11-27 19:22:10+01:00, msvensson@neptunus.(none) +20 -2
Set default database for bootstrap script from bootstrap-database option.
Modify bootstrap to always print SQL errors to log file.
Exit from bootstrap if error occurs and --bootstrap-force is not set.
# 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: neptunus.(none)
# Root: /home/msvensson/mysql/bug20166/my50-bug20166
--- 1.52/scripts/Makefile.am 2006-11-27 19:22:19 +01:00
+++ 1.53/scripts/Makefile.am 2006-11-27 19:22:19 +01:00
@@ -33,8 +33,7 @@ bin_SCRIPTS = @server_scripts@ \
mysql_explain_log \
mysql_tableinfo \
mysql_upgrade_shell \
- mysqld_multi \
- mysql_create_system_tables
+ mysqld_multi
noinst_SCRIPTS = make_binary_distribution \
make_sharedlib_distribution \
@@ -61,15 +60,19 @@ EXTRA_SCRIPTS = make_binary_distributio
mysqld_multi.sh \
mysql_tableinfo.sh \
mysql_upgrade_shell.sh \
- mysqld_safe.sh \
- mysql_create_system_tables.sh
+ mysqld_safe.sh
EXTRA_DIST = $(EXTRA_SCRIPTS) \
mysqlaccess.conf \
mysqlbug \
make_win_bin_dist
-dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql
+dist_pkgdata_DATA = fill_help_tables.sql \
+ mysql_fix_privilege_tables.sql \
+ mysql_create_system_tables.sql \
+ mysql_create_test_users.sql \
+ mysql_test_data_timezone.sql
+
# mysqlbug should be distributed built so that people can report build
# failures with it.
--- 1.65/scripts/mysql_install_db.sh 2006-11-27 19:22:19 +01:00
+++ 1.66/scripts/mysql_install_db.sh 2006-11-27 19:22:19 +01:00
@@ -2,8 +2,7 @@
# Copyright (C) 2002-2003 MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file.
-# This scripts creates the privilege tables db, host, user, tables_priv,
-# columns_priv, procs_priv in the mysql database, as well as the func table.
+# This scripts creates the privilege tables in the mysql database
#
# All unrecognized arguments to this script are passed to mysqld.
@@ -81,6 +80,7 @@ basedir=
force=0
verbose=0
fill_help_tables=""
+create_system_tables=""
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
@@ -105,20 +105,32 @@ else
fi
fi
-# find fill_help_tables.sh
+# Look for pkgdatadir, ie.location of mysql_create_system_tables.sql
for i in $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
do
- if test -f $i/fill_help_tables.sql
+ if test -f $i/mysql_create_system_tables.sql
then
pkgdatadir=$i
fi
done
+# Make sure mysql_create_system_tables.sql was found
+if test -f $pkgdatadir/mysql_create_system_tables.sql
+then
+ create_system_tables=$pkgdatadir/mysql_create_system_tables.sql
+else
+ echo "Could not find SQL file 'mysql_create_system_tables.sql' in "
+ echo "@pkgdatadir@ or inside $basedir".
+ exit 1;
+fi
+
+# Check that fill_help_tables.sql is found in the same directory
if test -f $pkgdatadir/fill_help_tables.sql
then
fill_help_tables=$pkgdatadir/fill_help_tables.sql
else
- echo "Could not find help file 'fill_help_tables.sql' in @pkgdatadir@ or inside $basedir".
+ echo "Could not find help file 'fill_help_tables.sql' in "
+ echo "@pkgdatadir@ or inside $basedir".
exit 1;
fi
@@ -182,13 +194,12 @@ then
fi
# Create database directories mysql & test
-
- if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
- if test ! -d $ldata/mysql; then mkdir $ldata/mysql; chmod 700 $ldata/mysql ; fi
- if test ! -d $ldata/test; then mkdir $ldata/test; chmod 700 $ldata/test ; fi
- if test -w / -a ! -z "$user"; then
- chown $user $ldata $ldata/mysql $ldata/test;
- fi
+if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
+if test ! -d $ldata/mysql; then mkdir $ldata/mysql; chmod 700 $ldata/mysql ; fi
+if test ! -d $ldata/test; then mkdir $ldata/test; chmod 700 $ldata/test ; fi
+if test -w / -a ! -z "$user"; then
+ chown $user $ldata $ldata/mysql $ldata/test;
+fi
if test ! -f $mdata/db.frm
then
@@ -208,35 +219,23 @@ fi
if test "$in_rpm" -eq 0 -a "$windows" -eq 0
then
- echo "Installing all prepared tables"
+ echo "Installing MySQL system tables..."
fi
-mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
+mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt \
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
---skip-bdb --skip-ndbcluster $args --max_allowed_packet=8M --net_buffer_length=16K"
-if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
- | eval "$mysqld_install_cmd_line"
+--skip-bdb --skip-ndbcluster $args --max_allowed_packet=8M \
+--net_buffer_length=16K \
+--bootstrap-database=mysql \
+--bootstrap=$create_system_tables \
+--bootstrap=$fill_help_tables"
+
+if eval "$mysqld_install_cmd_line"
then
- if test -n "$fill_help_tables"
- then
- if test "$in_rpm" -eq 0 -a "$windows" -eq 0
- then
- echo "Fill help tables"
- fi
- (echo "use mysql;"; cat $fill_help_tables) | eval "$mysqld_install_cmd_line"
- res=$?
- if test $res != 0
- then
- echo ""
- echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
- echo "The \"HELP\" command might not work properly"
- echo ""
- fi
- fi
if test "$in_rpm" = 0 -a "$windows" = 0
then
echo ""
- echo "To start mysqld at boot time you have to copy support-files/mysql.server"
- echo "to the right place for your system"
+ echo "To start mysqld at boot time you have to copy "
+ echo "support-files/mysql.server to the right place for your system"
echo
fi
if test "$windows" -eq 0
@@ -251,18 +250,15 @@ then
if test -z "$c_d"
then
echo
- echo "NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run"
- echo "the $bindir/mysql_fix_privilege_tables. Otherwise you will not be"
- echo "able to use the new GRANT command!"
+ echo "NOTE: If you are upgrading from a previous MySQL version you should"
+ echo "run '$bindir/mysql_upgrade', to make sure all tables have been "
+ echo "upgraded for this version of MySQL"
fi
echo
if test "$in_rpm" = "0"
then
echo "You can start the MySQL daemon with:"
echo "cd @prefix@ ; $bindir/mysqld_safe &"
- echo
- echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:"
- echo "cd sql-bench ; perl run-all-tests"
echo
fi
echo "Please report any problems with the @scriptdir@/mysqlbug script!"
--- 1.196/sql/log.cc 2006-11-27 19:22:19 +01:00
+++ 1.197/sql/log.cc 2006-11-27 19:22:19 +01:00
@@ -453,7 +453,7 @@ const char *MYSQL_LOG::generate_name(con
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.420/sql/mysql_priv.h 2006-11-27 19:22:19 +01:00
+++ 1.421/sql/mysql_priv.h 2006-11-27 19:22:19 +01:00
@@ -1260,6 +1260,8 @@ extern uint opt_large_page_size;
extern MYSQL_LOG mysql_log,mysql_slow_log,mysql_bin_log;
extern FILE *bootstrap_file;
extern int bootstrap_error;
+extern my_bool opt_bootstrap_force;
+extern char opt_bootstrap_db[NAME_LEN];
extern FILE *stderror_file;
extern pthread_key(MEM_ROOT**,THR_MALLOC);
extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
--- 1.578/sql/mysqld.cc 2006-11-27 19:22:20 +01:00
+++ 1.579/sql/mysqld.cc 2006-11-27 19:22:20 +01:00
@@ -457,9 +457,6 @@ Lt_creator lt_creator;
Ge_creator ge_creator;
Le_creator le_creator;
-
-FILE *bootstrap_file;
-int bootstrap_error;
FILE *stderror_file=0;
I_List<i_string_pair> replicate_rewrite_db;
@@ -528,7 +525,7 @@ char *master_ssl_ca, *master_ssl_capath,
/* Static variables */
static bool kill_in_progress, segfaulted;
-static my_bool opt_do_pstack, opt_bootstrap, opt_myisam_log;
+static my_bool opt_do_pstack, opt_myisam_log;
static int cleanup_done;
static ulong opt_specialflag, opt_myisam_block_size;
static char *opt_logname, *opt_update_logname, *opt_binlog_index_name;
@@ -537,6 +534,14 @@ static char *mysql_home_ptr, *pidfile_na
static char **defaults_argv;
static char *opt_bin_logname;
+/* Bootstrap variables */
+FILE *bootstrap_file;
+int bootstrap_error;
+my_bool opt_bootstrap_force;
+static I_List<i_string> bootstrap_files;
+static my_bool opt_bootstrap;
+char opt_bootstrap_db[NAME_LEN];
+
static my_socket unix_sock,ip_sock;
static pthread_t select_thread;
struct rand_struct sql_rand; // used by sql_class.cc:THD::THD()
@@ -1146,6 +1151,7 @@ void clean_up(bool print_message)
free_list(&binlog_ignore_db);
free_list(&replicate_rewrite_db);
#endif
+ free_list(&bootstrap_files);
#ifdef HAVE_OPENSSL
if (ssl_acceptor_fd)
{
@@ -2613,8 +2619,14 @@ static int init_common_variables(const c
mysql_slow_log.init_pthread_objects();
mysql_bin_log.init_pthread_objects();
- if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
- strmov(glob_hostname,"mysql");
+ if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
+ {
+ strmov(glob_hostname,"localhost");
+ sql_print_warning("gethostname failed, using '%s'", glob_hostname);
+ strmake(pidfile_name, "mysql", sizeof(pidfile_name)-5);
+ }
+ else
+ strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
strmov(fn_ext(pidfile_name),".pid"); // Add proper extension
@@ -3064,7 +3076,7 @@ server.");
if (opt_error_log)
{
if (!log_error_file_ptr[0])
- fn_format(log_error_file, glob_hostname, mysql_data_home, ".err",
+ fn_format(log_error_file, pidfile_name, mysql_data_home, ".err",
MY_REPLACE_EXT); /* replace '.<domain>' by '.err', bug#4997 */
else
fn_format(log_error_file, log_error_file_ptr, mysql_data_home, ".err",
@@ -3514,7 +3526,28 @@ we force server id to 2, but this MySQL
if (opt_bootstrap)
{
select_thread_in_use= 0; // Allow 'kill' to work
- bootstrap(stdin);
+
+ /* There should be at least one file in the list */
+ DBUG_ASSERT(!bootstrap_files.is_empty());
+
+ I_List_iterator<i_string> it(bootstrap_files);
+ i_string* tmp;
+
+ while ((tmp= it++) && !bootstrap_error)
+ {
+ if (!tmp->ptr)
+ {
+ /* --boostrap without argument was specifed, read from stdin */
+ bootstrap(stdin);
+ }
+ else if (read_init_file(tmp->ptr))
+ {
+ /* File could not be opened */
+ bootstrap_error= !opt_bootstrap_force;
+ break;
+ }
+ }
+
end_thr_alarm(1); // Don't allow alarms
unireg_abort(bootstrap_error ? 1 : 0);
}
@@ -4675,7 +4708,9 @@ enum options_mysqld
OPT_LOG_SLOW_ADMIN_STATEMENTS,
OPT_TABLE_LOCK_WAIT_TIMEOUT,
OPT_PORT_OPEN_TIMEOUT,
- OPT_MERGE
+ OPT_MERGE,
+ OPT_BOOTSTRAP_FORCE,
+ OPT_BOOTSTRAP_DATABASE
};
@@ -4757,8 +4792,19 @@ Disable with --skip-bdb (will save memor
{"binlog-ignore-db", OPT_BINLOG_IGNORE_DB,
"Tells the master that updates to the given database should not be logged tothe binary log.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts.", 0, 0, 0,
- GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts. "
+ "Will read SQL statements for bootstrap from stdin or specified file"
+ " - multiple files can be specified", 0, 0, 0,
+ GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ {"bootstrap-database", OPT_BOOTSTRAP_DATABASE,
+ "Used by mysql installation scripts, specifies "
+ "default database for bootstrap",
+ (gptr*) & opt_bootstrap_db, (gptr*) & opt_bootstrap_db, 0,
+ GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"bootstrap-force", OPT_BOOTSTRAP_FORCE,
+ "Used by mysql installation scripts to ignore errors during bootstrap.",
+ (gptr*) &opt_bootstrap_force, (gptr*) &opt_bootstrap_force, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
"Don't ignore client side character set value sent during handshake.",
(gptr*) &opt_character_set_client_handshake,
@@ -6319,13 +6365,14 @@ static void mysql_init_variables(void)
/* Things reset to zero */
opt_skip_slave_start= opt_reckless_slave = 0;
mysql_home[0]= pidfile_name[0]= log_error_file[0]= 0;
+ opt_bootstrap_db[0]= 0;
opt_log= opt_update_log= opt_slow_log= 0;
opt_bin_log= 0;
opt_disable_networking= opt_skip_show_db=0;
opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name !
opt_secure_auth= 0;
- opt_bootstrap= opt_myisam_log= 0;
+ opt_bootstrap= opt_bootstrap_force= opt_myisam_log= 0;
mqh_used= 0;
segfaulted= kill_in_progress= 0;
cleanup_done= 0;
@@ -6396,6 +6443,7 @@ static void mysql_init_variables(void)
replicate_ignore_db.empty();
binlog_do_db.empty();
binlog_ignore_db.empty();
+ bootstrap_files.empty();
/* Set directory paths */
strmake(language, LANGUAGE, sizeof(language)-1);
@@ -6865,9 +6913,16 @@ get_one_option(int optid, const struct m
thr_upgraded_concurrent_insert_lock= TL_WRITE_LOW_PRIORITY;
global_system_variables.low_priority_updates=1;
break;
+ case OPT_BOOTSTRAP_DATABASE:
+ strmake(opt_bootstrap_db, argument, sizeof(opt_bootstrap_db)-1);
+ break;
case OPT_BOOTSTRAP:
+ {
+ i_string *file = new i_string(argument);
+ bootstrap_files.push_back(file);
opt_noacl=opt_bootstrap=1;
break;
+ }
case OPT_STORAGE_ENGINE:
{
if ((enum db_type)((global_system_variables.table_type=
@@ -7447,9 +7502,9 @@ static int test_if_case_insensitive(cons
MY_STAT stat_info;
DBUG_ENTER("test_if_case_insensitive");
- fn_format(buff, glob_hostname, dir_name, ".lower-test",
+ fn_format(buff, pidfile_name, dir_name, ".lower-test",
MY_UNPACK_FILENAME | MY_REPLACE_EXT | MY_REPLACE_DIR);
- fn_format(buff2, glob_hostname, dir_name, ".LOWER-TEST",
+ fn_format(buff2, pidfile_name, dir_name, ".LOWER-TEST",
MY_UNPACK_FILENAME | MY_REPLACE_EXT | MY_REPLACE_DIR);
(void) my_delete(buff2, MYF(0));
if ((file= my_create(buff, 0666, O_RDWR, MYF(0))) < 0)
--- 1.588/sql/sql_parse.cc 2006-11-27 19:22:20 +01:00
+++ 1.589/sql/sql_parse.cc 2006-11-27 19:22:20 +01:00
@@ -1272,6 +1272,10 @@ pthread_handler_t handle_bootstrap(void
buff= (char*) thd->net.buff;
thd->init_for_queries();
+
+ if (opt_bootstrap_db && mysql_change_db(thd, opt_bootstrap_db, TRUE))
+ goto end;
+
while (fgets(buff, thd->net.max_packet, file))
{
ulong length= (ulong) strlen(buff);
@@ -1302,6 +1306,7 @@ pthread_handler_t handle_bootstrap(void
thd->query= thd->memdup_w_gap(buff, length+1,
thd->db_length+1+QUERY_CACHE_FLAGS_SIZE);
thd->query[length] = '\0';
+ DBUG_PRINT("query",("%-.4096s",thd->query));
/*
We don't need to obtain LOCK_thread_count here because in bootstrap
mode we have only one thread.
@@ -1309,17 +1314,30 @@ pthread_handler_t handle_bootstrap(void
thd->query_id=next_query_id();
mysql_parse(thd,thd->query,length);
close_thread_tables(thd); // Free tables
+
if (thd->is_fatal_error)
break;
+
+ if (thd->net.report_error)
+ {
+ /* The query failed, send error (to log) */
+ net_send_error(thd);
+ if (!opt_bootstrap_force)
+ break;
+ }
+
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
#ifdef USING_TRANSACTIONS
free_root(&thd->transaction.mem_root,MYF(MY_KEEP_PREALLOC));
#endif
}
- /* thd->fatal_error should be set in case something went wrong */
end:
- bootstrap_error= thd->is_fatal_error;
+ /*
+ thd->is_fatal_error is set in case something went seriously wrong
+ and thd->net.report_error in case of SQL query error
+ */
+ bootstrap_error= thd->is_fatal_error || thd->net.report_error;
net_end(&thd->net);
thd->cleanup();
--- 1.149/mysql-test/mysql-test-run.pl 2006-11-27 19:22:20 +01:00
+++ 1.150/mysql-test/mysql-test-run.pl 2006-11-27 19:22:20 +01:00
@@ -151,6 +151,7 @@ our $exe_mysqlslap;
our $exe_mysqlimport;
our $exe_mysqlshow;
our $exe_mysql_fix_system_tables;
+our $exe_mysql_install_db;
our $exe_mysqltest;
our $exe_ndbd;
our $exe_ndb_mgmd;
@@ -239,7 +240,7 @@ my $default_suite_timeout= 180; #
our $opt_socket;
-our $opt_source_dist;
+our $opt_source_dist= 0;
our $opt_start_and_exit;
our $opt_start_dirty;
@@ -278,6 +279,8 @@ our $opt_warnings;
our $opt_udiff;
+our $opt_report_features= 0;
+
our $opt_skip_ndbcluster= 0;
our $opt_skip_ndbcluster_slave= 0;
our $opt_with_ndbcluster= 0;
@@ -293,6 +296,7 @@ our $path_ndb_tools_dir;
our $path_ndb_examples_dir;
our $exe_ndb_example;
our $path_ndb_testrun_log;
+our $path_sql_scripts_dir;
our @data_dir_lst;
@@ -639,6 +643,7 @@ sub command_line_setup () {
{
$opt_source_dist= 1;
}
+ $ENV{'MYSQL_SOURCE_DIST'}= $opt_source_dist;
$glob_hostname= mtr_short_hostname();
@@ -1411,12 +1416,24 @@ sub executable_setup () {
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
}
+ # Look for sql scripts
+ if ( $mysql_version_id >= 50030 )
+ {
+ $path_sql_scripts_dir= mtr_path_exists("$glob_basedir/share",
+ "$glob_basedir/scripts");
+ }
+
if ( ! $glob_win32 )
{
# Look for mysql_fix_system_table script
$exe_mysql_fix_system_tables=
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
"$path_client_bindir/mysql_fix_privilege_tables");
+
+ # Look for mysql_install_db script
+ $exe_mysql_install_db=
+ mtr_script_exists("$glob_basedir/scripts/mysql_install_db",
+ "$path_client_bindir/mysql_install_db");
}
@@ -1805,6 +1822,8 @@ sub environment_setup () {
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'}";
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
+
+ $ENV{'MYSQL_INSTALL_DB'}= "$exe_mysql_install_db --basedir=$glob_basedir";
}
# ----------------------------------------------------
@@ -2644,40 +2663,12 @@ sub install_db ($$) {
my $type= shift;
my $data_dir= shift;
- my $init_db_sql= "lib/init_db.sql";
- my $init_db_sql_tmp= "/tmp/init_db.sql$$";
- my $args;
-
mtr_report("Installing \u$type Database");
- open(IN, $init_db_sql)
- or mtr_error("Can't open $init_db_sql: $!");
- open(OUT, ">", $init_db_sql_tmp)
- or mtr_error("Can't write to $init_db_sql_tmp: $!");
- while (<IN>)
- {
- chomp;
- s/\@HOSTNAME\@/$glob_hostname/;
- if ( /^\s*$/ )
- {
- print OUT "\n";
- }
- elsif (/;$/)
- {
- print OUT "$_\n";
- }
- else
- {
- print OUT "$_ ";
- }
- }
- close OUT;
- close IN;
-
+ my $args;
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
- mtr_add_arg($args, "--bootstrap");
mtr_add_arg($args, "--console");
mtr_add_arg($args, "--skip-grant-tables");
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
@@ -2687,16 +2678,86 @@ sub install_db ($$) {
mtr_add_arg($args, "--tmpdir=.");
mtr_add_arg($args, "--core-file");
+ if ( ! $glob_netware )
+ {
+ mtr_add_arg($args, "--language=%s", $path_language);
+ mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
+ }
+
if ( $opt_debug )
{
mtr_add_arg($args, "--debug=d:t:i:A,%s/log/bootstrap_%s.trace",
$path_vardir_trace, $type);
}
- if ( ! $glob_netware )
+ # ----------------------------------------------------------------------
+ # export MYSQLD_BOOTSTRAP variable containing <path>/mysqld <args>
+ # ----------------------------------------------------------------------
+ $ENV{'MYSQLD_BOOTSTRAP'}= "$exe_mysqld " . join(" ", @$args);
+
+ my $bootstrap_sql_file= "";
+
+ if ( $mysql_version_id < 50030 )
+ {
+ # Create the bootstrap.sql file
+ my $mysql_create_system_tables_file=
+ "$glob_basedir/scripts/mysql_create_system_tables.sql";
+ my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql$$";
+ open(IN, $mysql_create_system_tables_file)
+ or mtr_error("Can't open $mysql_create_system_tables_file: $!");
+ open(OUT, ">", $bootstrap_sql_file)
+ or mtr_error("Can't write to $bootstrap_sql_file: $!");
+ while (<IN>)
+ {
+ chomp;
+ s/\@HOSTNAME\@/$glob_hostname/;
+ if ( /^\s*$/ )
+ {
+ print OUT "\n";
+ }
+ elsif (/;$/)
+ {
+ print OUT "$_\n";
+ }
+ else
+ {
+ print OUT "$_ ";
+ }
+ }
+ close OUT;
+ close IN;
+ }
+ else
{
- mtr_add_arg($args, "--language=%s", $path_language);
- mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
+ # New way of bootstrapping - pass --bootstrap-file
+
+ # Add the offical mysql system tables and initial system data
+ # for a prodcuction system
+ mtr_add_arg($args, "--bootstrap=%s",
+ "$path_sql_scripts_dir/mysql_create_system_tables.sql");
+
+ # Add test data for timezone - this is just a subset, on a real
+ # system these tables will be populated either by mysql_tzinfo_to_sql
+ # or by downloading the timezone table package from our website
+ mtr_add_arg($args, "--bootstrap=%s",
+ "$path_sql_scripts_dir/mysql_test_data_timezone.sql");
+
+ # Add test users
+ mtr_add_arg($args, "--bootstrap=%s",
+ "$path_sql_scripts_dir/mysql_create_test_users.sql");
+
+ # Fill help tables, just an empty file when running from bk repo
+ # but will be replaced by a real fill_help_tables.sql when
+ # building the source dist
+ mtr_add_arg($args, "--bootstrap=%s",
+ "$path_sql_scripts_dir/fill_help_tables.sql");
+
+
+ # Use "mysql" as default db for above boostrap commands
+ mtr_add_arg($args, "--bootstrap-database=mysql");
+
+ # Don't force bootstrap to continue on SQL error
+ mtr_add_arg($args, "--skip-bootstrap-force");
}
# Log bootstrap command
@@ -2704,18 +2765,15 @@ sub install_db ($$) {
mtr_tofile($path_bootstrap_log,
"$exe_mysqld " . join(" ", @$args) . "\n");
- if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp,
- $path_bootstrap_log, $path_bootstrap_log,
- "", { append_log_file => 1 }) != 0 )
-
+ my $res= mtr_run($exe_mysqld, $args, $bootstrap_sql_file,
+ $path_bootstrap_log, $path_bootstrap_log,
+ "", { append_log_file => 1 });
+ if ( $res != 0)
{
- unlink($init_db_sql_tmp);
mtr_error("Error executing mysqld --bootstrap\n" .
"Could not install $type test DBs");
}
- unlink($init_db_sql_tmp);
}
-
sub im_prepare_env($) {
my $instance_manager = shift;
--- 1.171/sql/set_var.cc 2006-11-27 19:22:20 +01:00
+++ 1.172/sql/set_var.cc 2006-11-27 19:22:20 +01:00
@@ -593,6 +593,7 @@ sys_var_readonly sys_have
/* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
+sys_var_const_str sys_hostname("hostname", glob_hostname);
/*
List of all variables for initialisation and storage in hash
@@ -645,6 +646,7 @@ sys_var *sys_variables[]=
&sys_foreign_key_checks,
&sys_group_concat_max_len,
&sys_have_innodb,
+ &sys_hostname,
&sys_identity,
&sys_init_connect,
&sys_init_slave,
@@ -877,6 +879,7 @@ struct show_var_st init_vars[]= {
{"have_raid", (char*) &have_raid, SHOW_HAVE},
{"have_rtree_keys", (char*) &have_rtree_keys, SHOW_HAVE},
{"have_symlink", (char*) &have_symlink, SHOW_HAVE},
+ {sys_hostname.name, (char*) &sys_hostname, SHOW_CHAR},
{"init_connect", (char*) &sys_init_connect, SHOW_SYS},
{"init_file", (char*) &opt_init_file, SHOW_CHAR_PTR},
{"init_slave", (char*) &sys_init_slave, SHOW_SYS},
--- New file ---
+++ mysql-test/include/binary_dist.inc 06/11/27 19:22:11
#
# Check if the variable MYSQL_SOURCE_DIST is 0
#
--require r/binary_dist.require
disable_query_log;
eval select STRCMP("$MYSQL_SOURCE_DIST", "0") as "binary_dist";
enable_query_log;
--- New file ---
+++ mysql-test/r/binary_dist.require 06/11/27 19:22:11
binary_dist
0
--- New file ---
+++ mysql-test/r/bootstrap.result 06/11/27 19:22:11
drop table if exists t1, t2;
drop table t1;
drop table t1;
drop table t1, t2;
drop table t1;
ERROR 42S02: Unknown table 't1'
drop table t3;
ERROR 42S02: Unknown table 't3'
drop table t3;
ERROR 42S02: Unknown table 't3'
select * from t1;
a
1
drop table t1;
drop table mysql.t1;
drop table test.t1;
drop table mysql.t1;
ERROR 42S02: Unknown table 't1'
drop table test.t1;
ERROR 42S02: Unknown table 't1'
set @my_max_allowed_packet= @@max_allowed_packet;
set global max_allowed_packet=100*@@max_allowed_packet;
set global max_allowed_packet=@my_max_allowed_packet;
drop table t4;
--- New file ---
+++ mysql-test/t/bootstrap.test 06/11/27 19:22:11
#
# test mysqld in bootstrap mode
#
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
#
# Check that --bootstrap reads from stdin
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap.sql
use test;
CREATE TABLE t1(a int);
EOF
--exec $MYSQLD_BOOTSTRAP --bootstrap < $MYSQLTEST_VARDIR/tmp/bootstrap.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
drop table t1;
#
# Check that --bootstrap reads from file and allows multiple files
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap2.sql
use test;
CREATE TABLE t2(a int);
EOF
--exec $MYSQLD_BOOTSTRAP --bootstrap=$MYSQLTEST_VARDIR/tmp/bootstrap.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
drop table t1;
--exec $MYSQLD_BOOTSTRAP --bootstrap=$MYSQLTEST_VARDIR/tmp/bootstrap.sql --bootstrap=$MYSQLTEST_VARDIR/tmp/bootstrap2.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
drop table t1, t2;
#
# Check that --bootstrap from non existsing file returns error
#
--error 1
--exec $MYSQLD_BOOTSTRAP --bootstrap=non_existing_file.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--error 1051
drop table t1;
#
# Check that --bootstrap of file with SQL error returns error
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql
use test;
CREATE TABLE t3;
EOF
--error 1
--exec $MYSQLD_BOOTSTRAP --bootstrap=bootstrap_error.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--error 1051
drop table t3;
#
# Check that --bootstrap --bootstrap-force continues with next SQL
# statement after error
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql
use test;
CREATE TABLE t3;
CREATE TABLE t1(a int);
insert into t1 values(1);
EOF
--exec $MYSQLD_BOOTSTRAP --bootstrap=$MYSQLTEST_VARDIR/tmp/bootstrap_error.sql --bootstrap-force >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--error 1051
drop table t3;
select * from t1;
drop table t1;
#
# Check --bootstrap-db
#
--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_db.sql
CREATE TABLE t1(b int);
insert into t1 values(2);
use test;
CREATE TABLE t1(a int);
insert into t1 values(1);
EOF
--exec $MYSQLD_BOOTSTRAP --bootstrap=$MYSQLTEST_VARDIR/tmp/bootstrap_db.sql --bootstrap-database=mysql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
drop table mysql.t1;
drop table test.t1;
#
# Check boostrap-db with non existing db
#
--error 1
--exec $MYSQLD_BOOTSTRAP --bootstrap=$MYSQLTEST_VARDIR/tmp/bootstrap_db.sql --bootstrap-database=non_existing_db >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--error 1051
drop table mysql.t1;
--error 1051
drop table test.t1;
#
# Bootstrap with a query larger than 2*thd->net.max_packet
#
set @my_max_allowed_packet= @@max_allowed_packet;
set global max_allowed_packet=100*@@max_allowed_packet;
--disable_query_log
create table t4 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t4;
--enable_query_log
--error 1
--exec $MYSQLD_BOOTSTRAP --bootstrap=$MYSQLTEST_VARDIR/tmp/long_query.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
set global max_allowed_packet=@my_max_allowed_packet;
drop table t4;
--- New file ---
+++ scripts/mysql_create_system_tables.sql 06/11/27 19:22:11
set storage_engine=myisam;
CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y')
COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');
CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT N
ULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, R
eferences_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routi
ne_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp(14), Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
CREATE TABLE IF NOT EXISTS help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
CREATE TABLE IF NOT EXISTS proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob DEFAULT '' NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'M
YSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp(14), PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
-- root users
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-- default users are depending on platform
CREATE PROCEDURE create_default_users() BEGIN DECLARE is_windows INT DEFAULT 0; SELECT convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows") INTO is_windows; IF (is_windows) THEN INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); ELSE INSERT INTO user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user (host,user) values (@@hostname,''); INSERT INTO user (host,user) values ('localhost',''); END IF; END;
CALL create_default_users();
DROP PROCEDURE create_default_users;
--- New file ---
+++ scripts/mysql_create_test_users.sql 06/11/27 19:22:11
use mysql;
-- remove all users created by mysql_create_system_tables.sql
DELETE FROM user;
-- root users
INSERT INTO user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-- anonymous users
INSERT INTO user (host,user) values ('localhost','');
REPLACE INTO user (host,user) values (@@hostname,'');
--- New file ---
+++ scripts/mysql_test_data_timezone.sql 06/11/27 19:22:11
INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES ('MET', 1), ('UTC', 2), ('Universal', 2), ('Europe/Moscow',3), ('leap/Europe/Moscow',4), ('Japan', 5);
INSERT INTO time_zone (Time_zone_id, Use_leap_seconds) VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');
INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES (1, -1693706400, 0) ,(1, -1680483600, 1) ,(1, -1663455600, 2) ,(1, -1650150000, 3) ,(1, -1632006000, 2) ,(1, -1618700400, 3) ,(1, -938905200, 2) ,(1, -857257200, 3) ,(1, -844556400, 2) ,(1, -828226800, 3) ,(1, -812502000, 2) ,(1, -796777200, 3) ,(1, 228877200, 2) ,(1, 243997200, 3) ,(1, 260326800, 2) ,(1, 276051600, 3) ,(1, 291776400, 2) ,(1, 307501200, 3) ,(1, 323830800, 2) ,(1, 338950800, 3) ,(1, 354675600, 2) ,(1, 370400400, 3) ,(1, 386125200, 2) ,(1, 401850000, 3) ,(1, 417574800, 2) ,(1, 433299600, 3) ,(1, 449024400, 2) ,(1, 465354000, 3) ,(1, 481078800, 2) ,(1, 496803600, 3) ,(1, 512528400, 2) ,(1, 528253200, 3) ,(1, 543978000, 2) ,(1, 559702800, 3) ,(1, 575427600, 2) ,(1, 591152400, 3) ,(1, 606877200, 2) ,(1, 622602000, 3) ,(1, 638326800, 2) ,(1, 654656400, 3) ,(1, 670381200, 2) ,(1, 686106000, 3) ,(1, 701830800, 2) ,(1, 717555600, 3) ,(1, 733280400, 2)
,(1, 749005200, 3) ,(1, 764730000, 2) ,(1, 780454800, 3) ,(1, 796179600, 2) ,(1, 811904400, 3) ,(1, 828234000, 2) ,(1, 846378000, 3) ,(1, 859683600, 2) ,(1, 877827600, 3) ,(1, 891133200, 2) ,(1, 909277200, 3) ,(1, 922582800, 2) ,(1, 941331600, 3) ,(1, 954032400, 2) ,(1, 972781200, 3) ,(1, 985482000, 2) ,(1, 1004230800, 3) ,(1, 1017536400, 2) ,(1, 1035680400, 3) ,(1, 1048986000, 2) ,(1, 1067130000, 3) ,(1, 1080435600, 2) ,(1, 1099184400, 3) ,(1, 1111885200, 2) ,(1, 1130634000, 3) ,(1, 1143334800, 2) ,(1, 1162083600, 3) ,(1, 1174784400, 2) ,(1, 1193533200, 3) ,(1, 1206838800, 2) ,(1, 1224982800, 3) ,(1, 1238288400, 2) ,(1, 1256432400, 3) ,(1, 1269738000, 2) ,(1, 1288486800, 3) ,(1, 1301187600, 2) ,(1, 1319936400, 3) ,(1, 1332637200, 2) ,(1, 1351386000, 3) ,(1, 1364691600, 2) ,(1, 1382835600, 3) ,(1, 1396141200, 2) ,(1, 1414285200, 3) ,(1, 1427590800, 2) ,(1, 1445734800, 3) ,(1, 1459040400, 2) ,(1, 1477789200, 3) ,(1, 1490490000, 2) ,(1, 1509238800, 3)
,(1, 1521939600, 2) ,(1, 1540688400, 3) ,(1, 1553994000, 2) ,(1, 1572138000, 3) ,(1, 1585443600, 2) ,(1, 1603587600, 3) ,(1, 1616893200, 2) ,(1, 1635642000, 3) ,(1, 1648342800, 2) ,(1, 1667091600, 3) ,(1, 1679792400, 2) ,(1, 1698541200, 3) ,(1, 1711846800, 2) ,(1, 1729990800, 3) ,(1, 1743296400, 2) ,(1, 1761440400, 3) ,(1, 1774746000, 2) ,(1, 1792890000, 3) ,(1, 1806195600, 2) ,(1, 1824944400, 3) ,(1, 1837645200, 2) ,(1, 1856394000, 3) ,(1, 1869094800, 2) ,(1, 1887843600, 3) ,(1, 1901149200, 2) ,(1, 1919293200, 3) ,(1, 1932598800, 2) ,(1, 1950742800, 3) ,(1, 1964048400, 2) ,(1, 1982797200, 3) ,(1, 1995498000, 2) ,(1, 2014246800, 3) ,(1, 2026947600, 2) ,(1, 2045696400, 3) ,(1, 2058397200, 2) ,(1, 2077146000, 3) ,(1, 2090451600, 2) ,(1, 2108595600, 3) ,(1, 2121901200, 2) ,(1, 2140045200, 3) ,(3, -1688265000, 2) ,(3, -1656819048, 1) ,(3, -1641353448, 2) ,(3, -1627965048, 3) ,(3, -1618716648, 1) ,(3, -1596429048, 3) ,(3, -1593829848, 5) ,(3, -1589860800, 4
) ,(3, -1542427200, 5) ,(3, -1539493200, 6) ,(3, -1525323600, 5) ,(3, -1522728000, 4) ,(3, -1491188400, 7) ,(3, -1247536800, 4) ,(3, 354920400, 5) ,(3, 370728000, 4) ,(3, 386456400, 5) ,(3, 402264000, 4) ,(3, 417992400, 5) ,(3, 433800000, 4) ,(3, 449614800, 5) ,(3, 465346800, 8) ,(3, 481071600, 9) ,(3, 496796400, 8) ,(3, 512521200, 9) ,(3, 528246000, 8) ,(3, 543970800, 9) ,(3, 559695600, 8) ,(3, 575420400, 9) ,(3, 591145200, 8) ,(3, 606870000, 9) ,(3, 622594800, 8) ,(3, 638319600, 9) ,(3, 654649200, 8) ,(3, 670374000, 10) ,(3, 686102400, 11) ,(3, 695779200, 8) ,(3, 701812800, 5) ,(3, 717534000, 4) ,(3, 733273200, 9) ,(3, 748998000, 8) ,(3, 764722800, 9) ,(3, 780447600, 8) ,(3, 796172400, 9) ,(3, 811897200, 8) ,(3, 828226800, 9) ,(3, 846370800, 8) ,(3, 859676400, 9) ,(3, 877820400, 8) ,(3, 891126000, 9) ,(3, 909270000, 8) ,(3, 922575600, 9) ,(3, 941324400, 8) ,(3, 954025200, 9) ,(3, 972774000, 8) ,(3, 985474800, 9) ,(3, 1004223600, 8) ,(3, 1017529200,
9) ,(3, 1035673200, 8) ,(3, 1048978800, 9) ,(3, 1067122800, 8) ,(3, 1080428400, 9) ,(3, 1099177200, 8) ,(3, 1111878000, 9) ,(3, 1130626800, 8) ,(3, 1143327600, 9) ,(3, 1162076400, 8) ,(3, 1174777200, 9) ,(3, 1193526000, 8) ,(3, 1206831600, 9) ,(3, 1224975600, 8) ,(3, 1238281200, 9) ,(3, 1256425200, 8) ,(3, 1269730800, 9) ,(3, 1288479600, 8) ,(3, 1301180400, 9) ,(3, 1319929200, 8) ,(3, 1332630000, 9) ,(3, 1351378800, 8) ,(3, 1364684400, 9) ,(3, 1382828400, 8) ,(3, 1396134000, 9) ,(3, 1414278000, 8) ,(3, 1427583600, 9) ,(3, 1445727600, 8) ,(3, 1459033200, 9) ,(3, 1477782000, 8) ,(3, 1490482800, 9) ,(3, 1509231600, 8) ,(3, 1521932400, 9) ,(3, 1540681200, 8) ,(3, 1553986800, 9) ,(3, 1572130800, 8) ,(3, 1585436400, 9) ,(3, 1603580400, 8) ,(3, 1616886000, 9) ,(3, 1635634800, 8) ,(3, 1648335600, 9) ,(3, 1667084400, 8) ,(3, 1679785200, 9) ,(3, 1698534000, 8) ,(3, 1711839600, 9) ,(3, 1729983600, 8) ,(3, 1743289200, 9) ,(3, 1761433200, 8) ,(3, 1774738800, 9)
,(3, 1792882800, 8) ,(3, 1806188400, 9) ,(3, 1824937200, 8) ,(3, 1837638000, 9) ,(3, 1856386800, 8) ,(3, 1869087600, 9) ,(3, 1887836400, 8) ,(3, 1901142000, 9) ,(3, 1919286000, 8) ,(3, 1932591600, 9) ,(3, 1950735600, 8) ,(3, 1964041200, 9) ,(3, 1982790000, 8) ,(3, 1995490800, 9) ,(3, 2014239600, 8) ,(3, 2026940400, 9) ,(3, 2045689200, 8) ,(3, 2058390000, 9) ,(3, 2077138800, 8) ,(3, 2090444400, 9) ,(3, 2108588400, 8) ,(3, 2121894000, 9) ,(3, 2140038000, 8) ,(4, -1688265000, 2) ,(4, -1656819048, 1) ,(4, -1641353448, 2) ,(4, -1627965048, 3) ,(4, -1618716648, 1) ,(4, -1596429048, 3) ,(4, -1593829848, 5) ,(4, -1589860800, 4) ,(4, -1542427200, 5) ,(4, -1539493200, 6) ,(4, -1525323600, 5) ,(4, -1522728000, 4) ,(4, -1491188400, 7) ,(4, -1247536800, 4) ,(4, 354920409, 5) ,(4, 370728010, 4) ,(4, 386456410, 5) ,(4, 402264011, 4) ,(4, 417992411, 5) ,(4, 433800012, 4) ,(4, 449614812, 5) ,(4, 465346812, 8) ,(4, 481071612, 9) ,(4, 496796413, 8) ,(4, 512521213, 9) ,(
4, 528246013, 8) ,(4, 543970813, 9) ,(4, 559695613, 8) ,(4, 575420414, 9) ,(4, 591145214, 8) ,(4, 606870014, 9) ,(4, 622594814, 8) ,(4, 638319615, 9) ,(4, 654649215, 8) ,(4, 670374016, 10) ,(4, 686102416, 11) ,(4, 695779216, 8) ,(4, 701812816, 5) ,(4, 717534017, 4) ,(4, 733273217, 9) ,(4, 748998018, 8) ,(4, 764722818, 9) ,(4, 780447619, 8) ,(4, 796172419, 9) ,(4, 811897219, 8) ,(4, 828226820, 9) ,(4, 846370820, 8) ,(4, 859676420, 9) ,(4, 877820421, 8) ,(4, 891126021, 9) ,(4, 909270021, 8) ,(4, 922575622, 9) ,(4, 941324422, 8) ,(4, 954025222, 9) ,(4, 972774022, 8) ,(4, 985474822, 9) ,(4, 1004223622, 8) ,(4, 1017529222, 9) ,(4, 1035673222, 8) ,(4, 1048978822, 9) ,(4, 1067122822, 8) ,(4, 1080428422, 9) ,(4, 1099177222, 8) ,(4, 1111878022, 9) ,(4, 1130626822, 8) ,(4, 1143327622, 9) ,(4, 1162076422, 8) ,(4, 1174777222, 9) ,(4, 1193526022, 8) ,(4, 1206831622, 9) ,(4, 1224975622, 8) ,(4, 1238281222, 9) ,(4, 1256425222, 8) ,(4, 1269730822, 9) ,(4, 1288479622
, 8) ,(4, 1301180422, 9) ,(4, 1319929222, 8) ,(4, 1332630022, 9) ,(4, 1351378822, 8) ,(4, 1364684422, 9) ,(4, 1382828422, 8) ,(4, 1396134022, 9) ,(4, 1414278022, 8) ,(4, 1427583622, 9) ,(4, 1445727622, 8) ,(4, 1459033222, 9) ,(4, 1477782022, 8) ,(4, 1490482822, 9) ,(4, 1509231622, 8) ,(4, 1521932422, 9) ,(4, 1540681222, 8) ,(4, 1553986822, 9) ,(4, 1572130822, 8) ,(4, 1585436422, 9) ,(4, 1603580422, 8) ,(4, 1616886022, 9) ,(4, 1635634822, 8) ,(4, 1648335622, 9) ,(4, 1667084422, 8) ,(4, 1679785222, 9) ,(4, 1698534022, 8) ,(4, 1711839622, 9) ,(4, 1729983622, 8) ,(4, 1743289222, 9) ,(4, 1761433222, 8) ,(4, 1774738822, 9) ,(4, 1792882822, 8) ,(4, 1806188422, 9) ,(4, 1824937222, 8) ,(4, 1837638022, 9) ,(4, 1856386822, 8) ,(4, 1869087622, 9) ,(4, 1887836422, 8) ,(4, 1901142022, 9) ,(4, 1919286022, 8) ,(4, 1932591622, 9) ,(4, 1950735622, 8) ,(4, 1964041222, 9) ,(4, 1982790022, 8) ,(4, 1995490822, 9) ,(4, 2014239622, 8) ,(4, 2026940422, 9) ,(4, 2045689222, 8)
,(4, 2058390022, 9) ,(4, 2077138822, 8) ,(4, 2090444422, 9) ,(4, 2108588422, 8) ,(4, 2121894022, 9) ,(4, 2140038022, 8) ,(5, -1009875600, 1);
INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES (1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET') ,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET') ,(2, 0, 0, 0, 'UTC') ,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST') ,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST') ,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD') ,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET') ,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD') ,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET') ,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST') ,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST') ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD') ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET') ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD') ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET') ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');
INSERT INTO time_zone_leap_second (Transition_time, Correction) VALUES (78796800, 1) ,(94694401, 2) ,(126230402, 3) ,(157766403, 4) ,(189302404, 5) ,(220924805, 6) ,(252460806, 7) ,(283996807, 8) ,(315532808, 9) ,(362793609, 10) ,(394329610, 11) ,(425865611, 12) ,(489024012, 13) ,(567993613, 14) ,(631152014, 15) ,(662688015, 16) ,(709948816, 17) ,(741484817, 18) ,(773020818, 19) ,(820454419, 20) ,(867715220, 21) ,(915148821, 22);
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2298) BUG#20166 | msvensson | 27 Nov |