diff options
author | unknown <monty@mysql.com> | 2004-07-07 11:29:39 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-07-07 11:29:39 +0300 |
commit | 11b8987313aab1eb8d9f829731fa0dcd83bf62f5 (patch) | |
tree | ca8974710746bb69b04a49bc64f938d0b1a8420a /scripts | |
parent | c92670d80b3674fa025e373e0498eccbb407f873 (diff) | |
parent | 9890cd9a9eb37083d13370947fa50d64e21e54ff (diff) | |
download | mariadb-git-11b8987313aab1eb8d9f829731fa0dcd83bf62f5.tar.gz |
Merge with 4.1.3-beta
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
VC++Files/libmysqld/libmysqld.dsp:
Auto merged
VC++Files/sql/mysqld.dsp:
Auto merged
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/config-netware.h:
Auto merged
include/my_base.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
include/mysql_com.h:
Auto merged
include/sql_state.h:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/row/row0sel.c:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/connect.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/derived.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_like.result:
Auto merged
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/insert.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/key.result:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/null.result:
Auto merged
mysql-test/r/null_key.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/rpl_rotate_logs.result:
Auto merged
mysql-test/r/rpl_server_id1.result:
Auto merged
mysql-test/r/rpl_until.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/system_mysql_db.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/rpl000015.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
mysys/mf_iocache2.c:
Auto merged
mysys/my_bitmap.c:
Auto merged
mysys/my_pthread.c:
Auto merged
netware/Makefile.am:
Auto merged
netware/my_manage.c:
Auto merged
netware/mysql_test_run.c:
Auto merged
netware/BUILD/compile-linux-tools:
Auto merged
netware/BUILD/compile-netware-standard:
Auto merged
netware/BUILD/mwenv:
Auto merged
netware/BUILD/nwbootstrap:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_create.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/lex.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/records.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_derived.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/structs.h:
Auto merged
sql-common/client.c:
Auto merged
configure.in:
Merge with 4.1
include/mysqld_error.h:
New errors from 4.1
libmysqld/Makefile.am:
Merge with 4.1
myisam/myisamchk.c:
Merge with 4.1
myisam/myisamdef.h:
Merge with 4.1
myisam/sort.c:
Merge with 4.1
mysql-test/r/mysqlbinlog.result:
Merge with 4.1
mysql-test/r/range.result:
Merge with 4.1
mysql-test/r/rpl_flush_log_loop.result:
Merge with 4.1
mysql-test/r/rpl_replicate_do.result:
Merge with 4.1
mysql-test/r/rpl_temporary.result:
Merge with 4.1
mysql-test/r/rpl_user_variables.result:
Merge with 4.1
mysql-test/t/func_time.test:
Merge with 4.1
scripts/mysql_create_system_tables.sh:
Merge with 4.1
scripts/mysql_fix_privilege_tables.sql:
Merge with 4.1
sql/Makefile.am:
Merge with 4.1
sql/filesort.cc:
Merge with 4.1
sql/ha_innodb.cc:
Merge with 4.1
sql/ha_innodb.h:
Merge with 4.1
sql/ha_myisam.cc:
Merge with 4.1
sql/handler.cc:
Merge with 4.1
sql/handler.h:
Merge with 4.1
sql/item_func.cc:
Merge with 4.1
sql/item_timefunc.cc:
Merge with 4.1
sql/log.cc:
Merge with 4.1
sql/log_event.cc:
Merge with 4.1
sql/mysqld.cc:
Merge with 4.1
sql/opt_range.cc:
Merge with 4.1
sql/opt_range.h:
Merge with 4.1
sql/share/czech/errmsg.txt:
Merge with 4.1
Updated english error messages
sql/share/danish/errmsg.txt:
Merge with 4.1
sql/share/dutch/errmsg.txt:
Merge with 4.1
sql/share/english/errmsg.txt:
Merge with 4.1
sql/share/estonian/errmsg.txt:
Merge with 4.1
sql/share/french/errmsg.txt:
Merge with 4.1
sql/share/german/errmsg.txt:
Merge with 4.1
sql/share/greek/errmsg.txt:
Merge with 4.1
sql/share/hungarian/errmsg.txt:
Merge with 4.1
sql/share/italian/errmsg.txt:
Merge with 4.1
sql/share/japanese/errmsg.txt:
Merge with 4.1
sql/share/korean/errmsg.txt:
Merge with 4.1
sql/share/norwegian-ny/errmsg.txt:
Merge with 4.1
sql/share/norwegian/errmsg.txt:
Merge with 4.1
sql/share/polish/errmsg.txt:
Merge with 4.1
sql/share/portuguese/errmsg.txt:
Merge with 4.1
sql/share/romanian/errmsg.txt:
Merge with 4.1
sql/share/russian/errmsg.txt:
Merge with 4.1
sql/share/serbian/errmsg.txt:
Merge with 4.1
sql/share/slovak/errmsg.txt:
Merge with 4.1
sql/share/spanish/errmsg.txt:
Merge with 4.1
sql/share/swedish/errmsg.txt:
Merge with 4.1
sql/share/ukrainian/errmsg.txt:
Merge with 4.1
sql/slave.cc:
Merge with 4.1
sql/sql_class.cc:
Merge with 4.1
sql/sql_class.h:
Merge with 4.1
sql/sql_db.cc:
Merge with 4.1
sql/sql_insert.cc:
Merge with 4.1
sql/sql_lex.cc:
Merge with 4.1
sql/sql_lex.h:
Merge with 4.1
sql/sql_parse.cc:
Merge with 4.1 tree
Changed // comments to /* */
sql/sql_prepare.cc:
Merge with 4.1
sql/sql_select.cc:
Merge with 4.1
sql/sql_table.cc:
Merge with 4.1
sql/sql_yacc.yy:
Merge with 4.1
sql/table.h:
Merge with 4.1
tests/client_test.c:
Merge with 4.1
Diffstat (limited to 'scripts')
-rw-r--r--[-rwxr-xr-x] | scripts/fill_func_tables.sh | 0 | ||||
-rw-r--r-- | scripts/make_binary_distribution.sh | 50 | ||||
-rw-r--r-- | scripts/make_win_binary_distribution.sh | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | scripts/make_win_src_distribution.sh | 30 | ||||
-rw-r--r-- | scripts/mysql_create_system_tables.sh | 346 | ||||
-rw-r--r-- | scripts/mysql_find_rows.sh | 2 | ||||
-rw-r--r-- | scripts/mysql_fix_privilege_tables.sh | 7 | ||||
-rw-r--r-- | scripts/mysql_fix_privilege_tables.sql | 41 | ||||
-rw-r--r-- | scripts/mysql_install_db.sh | 15 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 8 |
10 files changed, 452 insertions, 52 deletions
diff --git a/scripts/fill_func_tables.sh b/scripts/fill_func_tables.sh index 459afee2fe1..459afee2fe1 100755..100644 --- a/scripts/fill_func_tables.sh +++ b/scripts/fill_func_tables.sh diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 341726fd89b..9c76c5a51f3 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -103,7 +103,7 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ isam/isamchk$BS isam/pack_isam$BS \ myisam/myisamchk$BS myisam/myisampack$BS myisam/myisamlog$BS \ myisam/myisam_ftdump$BS \ - sql/mysqld$BS \ + sql/mysqld$BS sql/mysql_tzinfo_to_sql$BS \ client/mysql$BS client/mysqlshow$BS client/mysqladmin$BS \ client/mysqldump$BS client/mysqlimport$BS \ client/mysqltest$BS client/mysqlcheck$BS \ @@ -197,14 +197,6 @@ fi $CP support-files/* $BASE/support-files $CP scripts/*.sql $BASE/share -if [ $BASE_SYSTEM = "netware" ] ; then - rm -f $BASE/support-files/magic \ - $BASE/support-files/mysql.server \ - $BASE/support-files/mysql*.spec \ - $BASE/support-files/mysql-log-rotate \ - $BASE/support-files/binary-configure -fi - $CP -r sql/share/* $MYSQL_SHARE rm -f $MYSQL_SHARE/Makefile* $MYSQL_SHARE/*/*.OLD @@ -241,10 +233,24 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh $BASE/bin/mysql_install_ # +# Copy system dependent files +# +if [ $BASE_SYSTEM = "netware" ] ; then + cp ./netware/static_init_db.sql ./netware/init_db.sql + ./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql +fi + +# # Remove system dependent files # if [ $BASE_SYSTEM = "netware" ] ; then - rm -f $BASE/MySQLEULA.txt + rm -f $BASE/support-files/magic \ + $BASE/support-files/mysql.server \ + $BASE/support-files/mysql*.spec \ + $BASE/support-files/mysql-log-rotate \ + $BASE/support-files/binary-configure \ + $BASE/INSTALL-BINARY \ + $BASE/MySQLEULA.txt else rm -f $BASE/README.NW fi @@ -263,14 +269,14 @@ fi # NDB Cluster if [ x$NDBCLUSTER = x1 ]; then - if [ ! -f ndb/BinDist.sh ]; then - echo "Missing ndb/BinDist.sh"; exit 1 - fi - mkdir $BASE/ndb || exit 1 - # assume we have cpio.. - if (cd ndb && sh BinDist.sh | cpio -pdm $BASE/ndb); then :; else - echo "Copy failed - missing files in ndb/BinDist.sh ?"; exit 1 - fi + ( cd ndb ; make DESTDIR=$BASE/ndb-stage install ) + ( cd mysql-test/ndb ; make DESTDIR=$BASE/ndb-stage install ) + $CP $BASE/ndb-stage@bindir@/* $BASE/bin/. + $CP $BASE/ndb-stage@libexecdir@/* $BASE/bin/. + $CP $BASE/ndb-stage@pkglibdir@/* $BASE/lib/. + $CP -r $BASE/ndb-stage@pkgincludedir@/ndb $BASE/lib/. + $CP -r $BASE/ndb-stage@prefix@/mysql-test/ndb $BASE/mysql-test/. || exit 1 + rm -rf $BASE/ndb-stage fi # Change the distribution to a long descriptive name @@ -349,9 +355,6 @@ if [ $BASE_SYSTEM != "netware" ] ; then echo "Compressing archive" rm -f $NEW_NAME.tar.gz gzip -9 $NEW_NAME.tar - echo "Removing temporary directory" - rm -r -f $BASE - echo "$NEW_NAME.tar.gz created" else @@ -362,9 +365,8 @@ else cd $TMP if test -e "$SOURCE/$NEW_NAME.zip"; then rm $SOURCE/$NEW_NAME.zip; fi zip -r $SOURCE/$NEW_NAME.zip $NEW_NAME - echo "Removing temporary directory" - rm -r -f $BASE - echo "$NEW_NAME.zip created" fi +echo "Removing temporary directory" +rm -r -f $BASE diff --git a/scripts/make_win_binary_distribution.sh b/scripts/make_win_binary_distribution.sh index e5893c1eb1e..9b2cc2d7d22 100644 --- a/scripts/make_win_binary_distribution.sh +++ b/scripts/make_win_binary_distribution.sh @@ -110,6 +110,9 @@ print_debug "Copying sql-bench to $DIRNAME/bench" mkdir $DIRNAME/bench cp -fr sql-bench/* $DIRNAME/bench +print_debug "Copying support-files to $DIRNAME" +cp support-files/* $DIRNAME + # Files for bin for i in client_release/* client_debug/mysqld.exe lib_release/libmySQL.dll do @@ -124,7 +127,7 @@ do cp $i $DIRNAME/include done -# Windows users are used to having dbug.h +# Windows users are used to having dbug.h ? cp include/my_dbug.h $DIRNAME/include/dbug.h # Libraries found in lib_release and lib_debug diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index 68ba488f3d5..eaaf219afc4 100755..100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -161,13 +161,16 @@ vreplace() done } -for d in 4.0.XX-gpl 4.0.XX-pro 4.0.XX-classic -do - cd $BASE/InstallShield/$d/String\ Tables/0009-English - vreplace value.shl - cd ../../Setup\ Files/Compressed\ Files/Language\ Independent/OS\ Independent - vreplace infolist.txt -done +if test -d $BASE/InstallShield +then + for d in 4.1.XX-gpl 4.1.XX-pro 4.1.XX-classic + do + cd $BASE/InstallShield/$d/String\ Tables/0009-English + vreplace value.shl + cd ../../Setup\ Files/Compressed\ Files/Language\ Independent/OS\ Independent + vreplace infolist.txt + done +fi # # Move all error message files to root directory @@ -288,6 +291,12 @@ do done # +# support files +# +mkdir $BASE/support-files +cp support-files/*.cnf $BASE/support-files + +# # Raw dirs from source tree # @@ -302,10 +311,11 @@ do done # -# Fix some windows files +# Fix some windows files to avoid compiler warnings # -./extra/replace std:: "" -- $BASE/sql/sql_yacc.cpp +./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' > $BASE/sql/sql_yacc.cpp-new +mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp unix_to_dos $BASE/README mv $BASE/README $BASE/README.txt @@ -316,7 +326,7 @@ mv $BASE/README $BASE/README.txt if [ -d $BASE/SSL/SCCS ] then - find $BASE -type d -name SCCS | xargs rm -r -f + find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f fi # diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index 287e1cf11dc..87f49107a40 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -39,6 +39,8 @@ c_hc="" c_hr="" c_hk="" i_ht="" +c_tzn="" c_tz="" c_tzt="" c_tztt="" c_tzls="" +i_tzn="" i_tz="" i_tzt="" i_tztt="" i_tzls="" c_p="" # Check for old tables @@ -153,12 +155,15 @@ then i_u="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','','','','',0,0,0);" if test "$windows" = "0" then - i_u="$i_u + i_u="$i_u 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','','','','',0,0,0); INSERT INTO user (host,user) values ('$hostname',''); INSERT INTO user (host,user) values ('localhost','');" else - i_u="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','','','','',0,0,0);" + i_u="$i_u + INSERT INTO user VALUES ('%','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0); + 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','','','','',0,0,0); + INSERT INTO user VALUES ('%','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0);" fi fi fi @@ -286,6 +291,332 @@ then c_hr="$c_hr comment='keyword-topic relation';" fi +if test ! -f $mdata/time_zone_name.frm +then + if test "$1" = "verbose" ; then + echo "Preparing time_zone_name table" 1>&2; + fi + + c_tzn="$c_tzn CREATE TABLE time_zone_name (" + c_tzn="$c_tzn Name char(64) NOT NULL," + c_tzn="$c_tzn Time_zone_id int unsigned NOT NULL," + c_tzn="$c_tzn PRIMARY KEY Name (Name)" + c_tzn="$c_tzn ) DEFAULT CHARACTER SET latin1" + c_tzn="$c_tzn comment='Time zone names';" + + if test "$1" = "test" + then + i_tzn="$i_tzn INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES" + i_tzn="$i_tzn ('MET', 1), ('UTC', 2), ('Universal', 2), " + i_tzn="$i_tzn ('Europe/Moscow',3), ('leap/Europe/Moscow',4);" + fi +fi + +if test ! -f $mdata/time_zone.frm +then + if test "$1" = "verbose" ; then + echo "Preparing time_zone table" 1>&2; + fi + + c_tz="$c_tz CREATE TABLE time_zone (" + c_tz="$c_tz Time_zone_id int unsigned NOT NULL auto_increment," + c_tz="$c_tz Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL," + c_tz="$c_tz PRIMARY KEY TzId (Time_zone_id)" + c_tz="$c_tz ) DEFAULT CHARACTER SET latin1" + c_tz="$c_tz comment='Time zones';" + + if test "$1" = "test" + then + i_tz="$i_tz INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)" + i_tz="$i_tz VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y');" + fi +fi + +if test ! -f $mdata/time_zone_transition.frm +then + if test "$1" = "verbose" ; then + echo "Preparing time_zone_transition table" 1>&2; + fi + + c_tzt="$c_tzt CREATE TABLE time_zone_transition (" + c_tzt="$c_tzt Time_zone_id int unsigned NOT NULL," + c_tzt="$c_tzt Transition_time bigint signed NOT NULL," + c_tzt="$c_tzt Transition_type_id int unsigned NOT NULL," + c_tzt="$c_tzt PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)" + c_tzt="$c_tzt ) DEFAULT CHARACTER SET latin1" + c_tzt="$c_tzt comment='Time zone transitions';" + + if test "$1" = "test" + then + i_tzt="$i_tzt INSERT INTO time_zone_transition" + i_tzt="$i_tzt (Time_zone_id, Transition_time, Transition_type_id)" + i_tzt="$i_tzt VALUES" + i_tzt="$i_tzt (1, -1693706400, 0) ,(1, -1680483600, 1)" + i_tzt="$i_tzt ,(1, -1663455600, 2) ,(1, -1650150000, 3)" + i_tzt="$i_tzt ,(1, -1632006000, 2) ,(1, -1618700400, 3)" + i_tzt="$i_tzt ,(1, -938905200, 2) ,(1, -857257200, 3)" + i_tzt="$i_tzt ,(1, -844556400, 2) ,(1, -828226800, 3)" + i_tzt="$i_tzt ,(1, -812502000, 2) ,(1, -796777200, 3)" + i_tzt="$i_tzt ,(1, 228877200, 2) ,(1, 243997200, 3)" + i_tzt="$i_tzt ,(1, 260326800, 2) ,(1, 276051600, 3)" + i_tzt="$i_tzt ,(1, 291776400, 2) ,(1, 307501200, 3)" + i_tzt="$i_tzt ,(1, 323830800, 2) ,(1, 338950800, 3)" + i_tzt="$i_tzt ,(1, 354675600, 2) ,(1, 370400400, 3)" + i_tzt="$i_tzt ,(1, 386125200, 2) ,(1, 401850000, 3)" + i_tzt="$i_tzt ,(1, 417574800, 2) ,(1, 433299600, 3)" + i_tzt="$i_tzt ,(1, 449024400, 2) ,(1, 465354000, 3)" + i_tzt="$i_tzt ,(1, 481078800, 2) ,(1, 496803600, 3)" + i_tzt="$i_tzt ,(1, 512528400, 2) ,(1, 528253200, 3)" + i_tzt="$i_tzt ,(1, 543978000, 2) ,(1, 559702800, 3)" + i_tzt="$i_tzt ,(1, 575427600, 2) ,(1, 591152400, 3)" + i_tzt="$i_tzt ,(1, 606877200, 2) ,(1, 622602000, 3)" + i_tzt="$i_tzt ,(1, 638326800, 2) ,(1, 654656400, 3)" + i_tzt="$i_tzt ,(1, 670381200, 2) ,(1, 686106000, 3)" + i_tzt="$i_tzt ,(1, 701830800, 2) ,(1, 717555600, 3)" + i_tzt="$i_tzt ,(1, 733280400, 2) ,(1, 749005200, 3)" + i_tzt="$i_tzt ,(1, 764730000, 2) ,(1, 780454800, 3)" + i_tzt="$i_tzt ,(1, 796179600, 2) ,(1, 811904400, 3)" + i_tzt="$i_tzt ,(1, 828234000, 2) ,(1, 846378000, 3)" + i_tzt="$i_tzt ,(1, 859683600, 2) ,(1, 877827600, 3)" + i_tzt="$i_tzt ,(1, 891133200, 2) ,(1, 909277200, 3)" + i_tzt="$i_tzt ,(1, 922582800, 2) ,(1, 941331600, 3)" + i_tzt="$i_tzt ,(1, 954032400, 2) ,(1, 972781200, 3)" + i_tzt="$i_tzt ,(1, 985482000, 2) ,(1, 1004230800, 3)" + i_tzt="$i_tzt ,(1, 1017536400, 2) ,(1, 1035680400, 3)" + i_tzt="$i_tzt ,(1, 1048986000, 2) ,(1, 1067130000, 3)" + i_tzt="$i_tzt ,(1, 1080435600, 2) ,(1, 1099184400, 3)" + i_tzt="$i_tzt ,(1, 1111885200, 2) ,(1, 1130634000, 3)" + i_tzt="$i_tzt ,(1, 1143334800, 2) ,(1, 1162083600, 3)" + i_tzt="$i_tzt ,(1, 1174784400, 2) ,(1, 1193533200, 3)" + i_tzt="$i_tzt ,(1, 1206838800, 2) ,(1, 1224982800, 3)" + i_tzt="$i_tzt ,(1, 1238288400, 2) ,(1, 1256432400, 3)" + i_tzt="$i_tzt ,(1, 1269738000, 2) ,(1, 1288486800, 3)" + i_tzt="$i_tzt ,(1, 1301187600, 2) ,(1, 1319936400, 3)" + i_tzt="$i_tzt ,(1, 1332637200, 2) ,(1, 1351386000, 3)" + i_tzt="$i_tzt ,(1, 1364691600, 2) ,(1, 1382835600, 3)" + i_tzt="$i_tzt ,(1, 1396141200, 2) ,(1, 1414285200, 3)" + i_tzt="$i_tzt ,(1, 1427590800, 2) ,(1, 1445734800, 3)" + i_tzt="$i_tzt ,(1, 1459040400, 2) ,(1, 1477789200, 3)" + i_tzt="$i_tzt ,(1, 1490490000, 2) ,(1, 1509238800, 3)" + i_tzt="$i_tzt ,(1, 1521939600, 2) ,(1, 1540688400, 3)" + i_tzt="$i_tzt ,(1, 1553994000, 2) ,(1, 1572138000, 3)" + i_tzt="$i_tzt ,(1, 1585443600, 2) ,(1, 1603587600, 3)" + i_tzt="$i_tzt ,(1, 1616893200, 2) ,(1, 1635642000, 3)" + i_tzt="$i_tzt ,(1, 1648342800, 2) ,(1, 1667091600, 3)" + i_tzt="$i_tzt ,(1, 1679792400, 2) ,(1, 1698541200, 3)" + i_tzt="$i_tzt ,(1, 1711846800, 2) ,(1, 1729990800, 3)" + i_tzt="$i_tzt ,(1, 1743296400, 2) ,(1, 1761440400, 3)" + i_tzt="$i_tzt ,(1, 1774746000, 2) ,(1, 1792890000, 3)" + i_tzt="$i_tzt ,(1, 1806195600, 2) ,(1, 1824944400, 3)" + i_tzt="$i_tzt ,(1, 1837645200, 2) ,(1, 1856394000, 3)" + i_tzt="$i_tzt ,(1, 1869094800, 2) ,(1, 1887843600, 3)" + i_tzt="$i_tzt ,(1, 1901149200, 2) ,(1, 1919293200, 3)" + i_tzt="$i_tzt ,(1, 1932598800, 2) ,(1, 1950742800, 3)" + i_tzt="$i_tzt ,(1, 1964048400, 2) ,(1, 1982797200, 3)" + i_tzt="$i_tzt ,(1, 1995498000, 2) ,(1, 2014246800, 3)" + i_tzt="$i_tzt ,(1, 2026947600, 2) ,(1, 2045696400, 3)" + i_tzt="$i_tzt ,(1, 2058397200, 2) ,(1, 2077146000, 3)" + i_tzt="$i_tzt ,(1, 2090451600, 2) ,(1, 2108595600, 3)" + i_tzt="$i_tzt ,(1, 2121901200, 2) ,(1, 2140045200, 3)" + i_tzt="$i_tzt ,(3, -1688265000, 2) ,(3, -1656819048, 1)" + i_tzt="$i_tzt ,(3, -1641353448, 2) ,(3, -1627965048, 3)" + i_tzt="$i_tzt ,(3, -1618716648, 1) ,(3, -1596429048, 3)" + i_tzt="$i_tzt ,(3, -1593829848, 5) ,(3, -1589860800, 4)" + i_tzt="$i_tzt ,(3, -1542427200, 5) ,(3, -1539493200, 6)" + i_tzt="$i_tzt ,(3, -1525323600, 5) ,(3, -1522728000, 4)" + i_tzt="$i_tzt ,(3, -1491188400, 7) ,(3, -1247536800, 4)" + i_tzt="$i_tzt ,(3, 354920400, 5) ,(3, 370728000, 4)" + i_tzt="$i_tzt ,(3, 386456400, 5) ,(3, 402264000, 4)" + i_tzt="$i_tzt ,(3, 417992400, 5) ,(3, 433800000, 4)" + i_tzt="$i_tzt ,(3, 449614800, 5) ,(3, 465346800, 8)" + i_tzt="$i_tzt ,(3, 481071600, 9) ,(3, 496796400, 8)" + i_tzt="$i_tzt ,(3, 512521200, 9) ,(3, 528246000, 8)" + i_tzt="$i_tzt ,(3, 543970800, 9) ,(3, 559695600, 8)" + i_tzt="$i_tzt ,(3, 575420400, 9) ,(3, 591145200, 8)" + i_tzt="$i_tzt ,(3, 606870000, 9) ,(3, 622594800, 8)" + i_tzt="$i_tzt ,(3, 638319600, 9) ,(3, 654649200, 8)" + i_tzt="$i_tzt ,(3, 670374000, 10) ,(3, 686102400, 11)" + i_tzt="$i_tzt ,(3, 695779200, 8) ,(3, 701812800, 5)" + i_tzt="$i_tzt ,(3, 717534000, 4) ,(3, 733273200, 9)" + i_tzt="$i_tzt ,(3, 748998000, 8) ,(3, 764722800, 9)" + i_tzt="$i_tzt ,(3, 780447600, 8) ,(3, 796172400, 9)" + i_tzt="$i_tzt ,(3, 811897200, 8) ,(3, 828226800, 9)" + i_tzt="$i_tzt ,(3, 846370800, 8) ,(3, 859676400, 9)" + i_tzt="$i_tzt ,(3, 877820400, 8) ,(3, 891126000, 9)" + i_tzt="$i_tzt ,(3, 909270000, 8) ,(3, 922575600, 9)" + i_tzt="$i_tzt ,(3, 941324400, 8) ,(3, 954025200, 9)" + i_tzt="$i_tzt ,(3, 972774000, 8) ,(3, 985474800, 9)" + i_tzt="$i_tzt ,(3, 1004223600, 8) ,(3, 1017529200, 9)" + i_tzt="$i_tzt ,(3, 1035673200, 8) ,(3, 1048978800, 9)" + i_tzt="$i_tzt ,(3, 1067122800, 8) ,(3, 1080428400, 9)" + i_tzt="$i_tzt ,(3, 1099177200, 8) ,(3, 1111878000, 9)" + i_tzt="$i_tzt ,(3, 1130626800, 8) ,(3, 1143327600, 9)" + i_tzt="$i_tzt ,(3, 1162076400, 8) ,(3, 1174777200, 9)" + i_tzt="$i_tzt ,(3, 1193526000, 8) ,(3, 1206831600, 9)" + i_tzt="$i_tzt ,(3, 1224975600, 8) ,(3, 1238281200, 9)" + i_tzt="$i_tzt ,(3, 1256425200, 8) ,(3, 1269730800, 9)" + i_tzt="$i_tzt ,(3, 1288479600, 8) ,(3, 1301180400, 9)" + i_tzt="$i_tzt ,(3, 1319929200, 8) ,(3, 1332630000, 9)" + i_tzt="$i_tzt ,(3, 1351378800, 8) ,(3, 1364684400, 9)" + i_tzt="$i_tzt ,(3, 1382828400, 8) ,(3, 1396134000, 9)" + i_tzt="$i_tzt ,(3, 1414278000, 8) ,(3, 1427583600, 9)" + i_tzt="$i_tzt ,(3, 1445727600, 8) ,(3, 1459033200, 9)" + i_tzt="$i_tzt ,(3, 1477782000, 8) ,(3, 1490482800, 9)" + i_tzt="$i_tzt ,(3, 1509231600, 8) ,(3, 1521932400, 9)" + i_tzt="$i_tzt ,(3, 1540681200, 8) ,(3, 1553986800, 9)" + i_tzt="$i_tzt ,(3, 1572130800, 8) ,(3, 1585436400, 9)" + i_tzt="$i_tzt ,(3, 1603580400, 8) ,(3, 1616886000, 9)" + i_tzt="$i_tzt ,(3, 1635634800, 8) ,(3, 1648335600, 9)" + i_tzt="$i_tzt ,(3, 1667084400, 8) ,(3, 1679785200, 9)" + i_tzt="$i_tzt ,(3, 1698534000, 8) ,(3, 1711839600, 9)" + i_tzt="$i_tzt ,(3, 1729983600, 8) ,(3, 1743289200, 9)" + i_tzt="$i_tzt ,(3, 1761433200, 8) ,(3, 1774738800, 9)" + i_tzt="$i_tzt ,(3, 1792882800, 8) ,(3, 1806188400, 9)" + i_tzt="$i_tzt ,(3, 1824937200, 8) ,(3, 1837638000, 9)" + i_tzt="$i_tzt ,(3, 1856386800, 8) ,(3, 1869087600, 9)" + i_tzt="$i_tzt ,(3, 1887836400, 8) ,(3, 1901142000, 9)" + i_tzt="$i_tzt ,(3, 1919286000, 8) ,(3, 1932591600, 9)" + i_tzt="$i_tzt ,(3, 1950735600, 8) ,(3, 1964041200, 9)" + i_tzt="$i_tzt ,(3, 1982790000, 8) ,(3, 1995490800, 9)" + i_tzt="$i_tzt ,(3, 2014239600, 8) ,(3, 2026940400, 9)" + i_tzt="$i_tzt ,(3, 2045689200, 8) ,(3, 2058390000, 9)" + i_tzt="$i_tzt ,(3, 2077138800, 8) ,(3, 2090444400, 9)" + i_tzt="$i_tzt ,(3, 2108588400, 8) ,(3, 2121894000, 9)" + i_tzt="$i_tzt ,(3, 2140038000, 8)" + i_tzt="$i_tzt ,(4, -1688265000, 2) ,(4, -1656819048, 1)" + i_tzt="$i_tzt ,(4, -1641353448, 2) ,(4, -1627965048, 3)" + i_tzt="$i_tzt ,(4, -1618716648, 1) ,(4, -1596429048, 3)" + i_tzt="$i_tzt ,(4, -1593829848, 5) ,(4, -1589860800, 4)" + i_tzt="$i_tzt ,(4, -1542427200, 5) ,(4, -1539493200, 6)" + i_tzt="$i_tzt ,(4, -1525323600, 5) ,(4, -1522728000, 4)" + i_tzt="$i_tzt ,(4, -1491188400, 7) ,(4, -1247536800, 4)" + i_tzt="$i_tzt ,(4, 354920409, 5) ,(4, 370728010, 4)" + i_tzt="$i_tzt ,(4, 386456410, 5) ,(4, 402264011, 4)" + i_tzt="$i_tzt ,(4, 417992411, 5) ,(4, 433800012, 4)" + i_tzt="$i_tzt ,(4, 449614812, 5) ,(4, 465346812, 8)" + i_tzt="$i_tzt ,(4, 481071612, 9) ,(4, 496796413, 8)" + i_tzt="$i_tzt ,(4, 512521213, 9) ,(4, 528246013, 8)" + i_tzt="$i_tzt ,(4, 543970813, 9) ,(4, 559695613, 8)" + i_tzt="$i_tzt ,(4, 575420414, 9) ,(4, 591145214, 8)" + i_tzt="$i_tzt ,(4, 606870014, 9) ,(4, 622594814, 8)" + i_tzt="$i_tzt ,(4, 638319615, 9) ,(4, 654649215, 8)" + i_tzt="$i_tzt ,(4, 670374016, 10) ,(4, 686102416, 11)" + i_tzt="$i_tzt ,(4, 695779216, 8) ,(4, 701812816, 5)" + i_tzt="$i_tzt ,(4, 717534017, 4) ,(4, 733273217, 9)" + i_tzt="$i_tzt ,(4, 748998018, 8) ,(4, 764722818, 9)" + i_tzt="$i_tzt ,(4, 780447619, 8) ,(4, 796172419, 9)" + i_tzt="$i_tzt ,(4, 811897219, 8) ,(4, 828226820, 9)" + i_tzt="$i_tzt ,(4, 846370820, 8) ,(4, 859676420, 9)" + i_tzt="$i_tzt ,(4, 877820421, 8) ,(4, 891126021, 9)" + i_tzt="$i_tzt ,(4, 909270021, 8) ,(4, 922575622, 9)" + i_tzt="$i_tzt ,(4, 941324422, 8) ,(4, 954025222, 9)" + i_tzt="$i_tzt ,(4, 972774022, 8) ,(4, 985474822, 9)" + i_tzt="$i_tzt ,(4, 1004223622, 8) ,(4, 1017529222, 9)" + i_tzt="$i_tzt ,(4, 1035673222, 8) ,(4, 1048978822, 9)" + i_tzt="$i_tzt ,(4, 1067122822, 8) ,(4, 1080428422, 9)" + i_tzt="$i_tzt ,(4, 1099177222, 8) ,(4, 1111878022, 9)" + i_tzt="$i_tzt ,(4, 1130626822, 8) ,(4, 1143327622, 9)" + i_tzt="$i_tzt ,(4, 1162076422, 8) ,(4, 1174777222, 9)" + i_tzt="$i_tzt ,(4, 1193526022, 8) ,(4, 1206831622, 9)" + i_tzt="$i_tzt ,(4, 1224975622, 8) ,(4, 1238281222, 9)" + i_tzt="$i_tzt ,(4, 1256425222, 8) ,(4, 1269730822, 9)" + i_tzt="$i_tzt ,(4, 1288479622, 8) ,(4, 1301180422, 9)" + i_tzt="$i_tzt ,(4, 1319929222, 8) ,(4, 1332630022, 9)" + i_tzt="$i_tzt ,(4, 1351378822, 8) ,(4, 1364684422, 9)" + i_tzt="$i_tzt ,(4, 1382828422, 8) ,(4, 1396134022, 9)" + i_tzt="$i_tzt ,(4, 1414278022, 8) ,(4, 1427583622, 9)" + i_tzt="$i_tzt ,(4, 1445727622, 8) ,(4, 1459033222, 9)" + i_tzt="$i_tzt ,(4, 1477782022, 8) ,(4, 1490482822, 9)" + i_tzt="$i_tzt ,(4, 1509231622, 8) ,(4, 1521932422, 9)" + i_tzt="$i_tzt ,(4, 1540681222, 8) ,(4, 1553986822, 9)" + i_tzt="$i_tzt ,(4, 1572130822, 8) ,(4, 1585436422, 9)" + i_tzt="$i_tzt ,(4, 1603580422, 8) ,(4, 1616886022, 9)" + i_tzt="$i_tzt ,(4, 1635634822, 8) ,(4, 1648335622, 9)" + i_tzt="$i_tzt ,(4, 1667084422, 8) ,(4, 1679785222, 9)" + i_tzt="$i_tzt ,(4, 1698534022, 8) ,(4, 1711839622, 9)" + i_tzt="$i_tzt ,(4, 1729983622, 8) ,(4, 1743289222, 9)" + i_tzt="$i_tzt ,(4, 1761433222, 8) ,(4, 1774738822, 9)" + i_tzt="$i_tzt ,(4, 1792882822, 8) ,(4, 1806188422, 9)" + i_tzt="$i_tzt ,(4, 1824937222, 8) ,(4, 1837638022, 9)" + i_tzt="$i_tzt ,(4, 1856386822, 8) ,(4, 1869087622, 9)" + i_tzt="$i_tzt ,(4, 1887836422, 8) ,(4, 1901142022, 9)" + i_tzt="$i_tzt ,(4, 1919286022, 8) ,(4, 1932591622, 9)" + i_tzt="$i_tzt ,(4, 1950735622, 8) ,(4, 1964041222, 9)" + i_tzt="$i_tzt ,(4, 1982790022, 8) ,(4, 1995490822, 9)" + i_tzt="$i_tzt ,(4, 2014239622, 8) ,(4, 2026940422, 9)" + i_tzt="$i_tzt ,(4, 2045689222, 8) ,(4, 2058390022, 9)" + i_tzt="$i_tzt ,(4, 2077138822, 8) ,(4, 2090444422, 9)" + i_tzt="$i_tzt ,(4, 2108588422, 8) ,(4, 2121894022, 9)" + i_tzt="$i_tzt ,(4, 2140038022, 8);" + fi +fi + +if test ! -f $mdata/time_zone_transition_type.frm +then + if test "$1" = "verbose" ; then + echo "Preparing time_zone_transition_type table" 1>&2; + fi + + c_tztt="$c_tztt CREATE TABLE time_zone_transition_type (" + c_tztt="$c_tztt Time_zone_id int unsigned NOT NULL," + c_tztt="$c_tztt Transition_type_id int unsigned NOT NULL," + c_tztt="$c_tztt Offset int signed DEFAULT 0 NOT NULL," + c_tztt="$c_tztt Is_DST tinyint unsigned DEFAULT 0 NOT NULL," + c_tztt="$c_tztt Abbreviation char(8) DEFAULT '' NOT NULL," + c_tztt="$c_tztt PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)" + c_tztt="$c_tztt ) DEFAULT CHARACTER SET latin1" + c_tztt="$c_tztt comment='Time zone transition types';" + + if test "$1" = "test" + then + i_tztt="$i_tztt INSERT INTO time_zone_transition_type (Time_zone_id," + i_tztt="$i_tztt Transition_type_id, Offset, Is_DST, Abbreviation) VALUES" + i_tztt="$i_tztt (1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET')" + i_tztt="$i_tztt ,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET')" + i_tztt="$i_tztt ,(2, 0, 0, 0, 'UTC')" + i_tztt="$i_tztt ,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST')" + i_tztt="$i_tztt ,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST')" + i_tztt="$i_tztt ,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD')" + i_tztt="$i_tztt ,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET')" + i_tztt="$i_tztt ,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD')" + i_tztt="$i_tztt ,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET')" + i_tztt="$i_tztt ,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST')" + i_tztt="$i_tztt ,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST')" + i_tztt="$i_tztt ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')" + i_tztt="$i_tztt ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')" + i_tztt="$i_tztt ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')" + i_tztt="$i_tztt ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET');" + fi +fi + +if test ! -f $mdata/time_zone_leap_second.frm +then + if test "$1" = "verbose" ; then + echo "Preparing time_zone_leap_second table" 1>&2; + fi + + c_tzls="$c_tzls CREATE TABLE time_zone_leap_second (" + c_tzls="$c_tzls Transition_time bigint signed NOT NULL," + c_tzls="$c_tzls Correction int signed NOT NULL," + c_tzls="$c_tzls PRIMARY KEY TranTime (Transition_time)" + c_tzls="$c_tzls ) DEFAULT CHARACTER SET latin1" + c_tzls="$c_tzls comment='Leap seconds information for time zones';" + + if test "$1" = "test" + then + i_tzls="$i_tzls INSERT INTO time_zone_leap_second " + i_tzls="$i_tzls (Transition_time, Correction) VALUES " + i_tzls="$i_tzls (78796800, 1) ,(94694401, 2) ,(126230402, 3)" + i_tzls="$i_tzls ,(157766403, 4) ,(189302404, 5) ,(220924805, 6)" + i_tzls="$i_tzls ,(252460806, 7) ,(283996807, 8) ,(315532808, 9)" + i_tzls="$i_tzls ,(362793609, 10) ,(394329610, 11) ,(425865611, 12)" + i_tzls="$i_tzls ,(489024012, 13) ,(567993613, 14) ,(631152014, 15)" + i_tzls="$i_tzls ,(662688015, 16) ,(709948816, 17) ,(741484817, 18)" + i_tzls="$i_tzls ,(773020818, 19) ,(820454419, 20) ,(867715220, 21)" + i_tzls="$i_tzls ,(915148821, 22);" + fi +fi + if test ! -f $mdata/proc.frm then c_p="$c_p CREATE TABLE proc (" @@ -352,6 +683,17 @@ $c_hc $c_hr $c_hk +$c_tzn +$i_tzn +$c_tz +$i_tz +$c_tzt +$i_tzt +$c_tztt +$i_tztt +$c_tzls +$i_tzls + $c_p END_OF_DATA diff --git a/scripts/mysql_find_rows.sh b/scripts/mysql_find_rows.sh index 3d7bad3323e..91ffc326e16 100644 --- a/scripts/mysql_find_rows.sh +++ b/scripts/mysql_find_rows.sh @@ -16,7 +16,7 @@ usage() if ($opt_help || $opt_Information); $query=$search=$database=$set=""; $eoq=0; while (<>) { - next if (length($query) == 0 && /^\#/); # Skipp comments + next if (length($query) == 0 && /^\#/); # Skip comments $query.=search($_); if ($eoq) { diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh index 69bf2bebaa8..f3c5c009f1c 100644 --- a/scripts/mysql_fix_privilege_tables.sh +++ b/scripts/mysql_fix_privilege_tables.sh @@ -102,7 +102,7 @@ then fi cmd="$bindir/mysql -f --user=$user --host=$host" -if test -z "$password" ; then +if test ! -z "$password" ; then cmd="$cmd --password=$password" fi if test ! -z "$port"; then @@ -118,13 +118,14 @@ then cmd="cat" fi -# Find where mysql_fix_privilege_tables.sql is located +# Find where first mysql_fix_privilege_tables.sql is located for i in $basedir/support-files $basedir/share $basedir/share/mysql \ $basedir/scripts @pkgdatadir@ . ./scripts do if test -f $i/$file then pkgdatadir=$i + break fi done @@ -154,7 +155,7 @@ s_echo "" if test $verbose = 1 then s_echo "You can safely ignore all 'Duplicate column' and 'Unknown column' errors" - s_echo "as this just means that your tables where already up to date." + s_echo "because these just mean that your tables are already up to date." s_echo "This script is safe to run even if your tables are already up to date!" s_echo "" fi diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql index 0feab0ac7d0..83b802ee567 100644 --- a/scripts/mysql_fix_privilege_tables.sql +++ b/scripts/mysql_fix_privilege_tables.sql @@ -2,7 +2,7 @@ -- for MySQL 4.0. -- You can safely ignore all 'Duplicate column' and 'Unknown column' errors" --- as this just means that your tables where already up to date. +-- because these just mean that your tables are already up to date. -- This script is safe to run even if your tables are already up to date! -- On unix, you should use the mysql_fix_privilege_tables script to execute @@ -181,6 +181,45 @@ unique index (name) ) comment='help keywords'; # +# Create missing time zone related tables +# + +CREATE TABLE IF NOT EXISTS time_zone_name ( +Name char(64) NOT NULL, +Time_zone_id int unsigned NOT NULL, +PRIMARY KEY Name (Name) +) DEFAULT CHARACTER SET latin1 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') DEFAULT 'N' NOT NULL, +PRIMARY KEY TzId (Time_zone_id) +) DEFAULT CHARACTER SET latin1 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) +) DEFAULT CHARACTER SET latin1 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) +) DEFAULT CHARACTER SET latin1 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) +) DEFAULT CHARACTER SET latin1 comment='Leap seconds information for time zones'; + + +# # Create proc table if it doesn't exists # diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index abde6ecbe73..aa5b99aebcc 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -10,6 +10,7 @@ in_rpm=0 windows=0 defaults="" +user="" tmp_file=/tmp/mysql_install_db.$$ case "$1" in @@ -34,7 +35,11 @@ parse_arguments() { --force) force=1 ;; --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; - --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; + --user=*) + # Note that the user will be passed to mysqld so that it runs + # as 'user' (crucial e.g. if log-bin=/some_other_path/ + # where a chown of datadir won't help) + user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;; --skip-name-resolve) ip_only=1 ;; --verbose) verbose=1 ;; --rpm) in_rpm=1 ;; @@ -155,7 +160,7 @@ then resolved=`$bindir/resolveip localhost 2>&1` if [ $? -ne 0 ] then - echo "Neither host '$hostname' and 'localhost' could not be looked up with" + echo "Neither host '$hostname' nor 'localhost' could be looked up with" echo "$bindir/resolveip" echo "Please configure the 'hostname' command to return a correct hostname." echo "If you want to solve this at a later stage, restart this script with" @@ -198,13 +203,17 @@ else create_option="real" fi +if test -n "$user"; then + args="$args --user=$user" +fi + if test "$in_rpm" -eq 0 -a "$windows" -eq 0 then echo "Installing all prepared tables" fi mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \ --skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \ ---skip-bdb $args" +--skip-bdb $args --max_allowed_packet=8M" if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \ | eval "$mysqld_install_cmd_line" then diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 779438e75c3..7b77bf449cd 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -43,13 +43,7 @@ parse_arguments() { --basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;; --datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;; --pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;; - --user=*) - if test $SET_USER -eq 0 - then - user=`echo "$arg" | sed -e "s;--[^=]*=;;"` - fi - SET_USER=1 - ;; + --user=*) user=`echo "$arg" | sed -e "s;--[^=]*=;;"` ; SET_USER=1 ;; # these two might have been set in a [mysqld_safe] section of my.cnf # they are added to mysqld command line to override settings from my.cnf |