diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/make_binary_distribution.sh | 2 | ||||
-rw-r--r-- | scripts/mysql_config.sh | 2 | ||||
-rw-r--r-- | scripts/mysql_system_tables.sql | 1 | ||||
-rw-r--r-- | scripts/mysqlhotcopy.sh | 32 |
4 files changed, 11 insertions, 26 deletions
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index b6404a33cc4..8e670f0e6ba 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -212,7 +212,7 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \ if [ $BASE_SYSTEM = "netware" ] ; then BIN_FILES="$BIN_FILES \ netware/mysqld_safe$BS netware/mysql_install_db$BS \ - netware/init_db.sql netware/test_db.sql$BS \ + netware/init_db.sql netware/test_db.sql \ netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql \ "; # For all other platforms: diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index f094cb060b7..6b054e83720 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -121,7 +121,7 @@ done cflags=`echo "$cflags"|sed -e 's/ *\$//'` # Same for --libs(_r) -for remove in lmtmalloc static-libcxa i-static +for remove in lmtmalloc static-libcxa i-static static-intel do # We know the strings starts with a space libs=`echo "$libs"|sed -e "s/ -$remove */ /g"` diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql index cd0882e3af4..f7b23e4e7ae 100644 --- a/scripts/mysql_system_tables.sql +++ b/scripts/mysql_system_tables.sql @@ -2,6 +2,7 @@ -- The system tables of MySQL Server -- +set sql_mode=''; 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, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_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'; diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index 61cd59457d1..6ad5c77b954 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -821,30 +821,14 @@ sub get_raid_dirs { sub get_list_of_tables { my ( $db ) = @_; - # "use database" cannot cope with database names containing spaces - # so create a new connection - - my $dbh = DBI->connect("dbi:mysql:${db}${dsn};mysql_read_default_group=mysqlhotcopy", - $opt{user}, $opt{password}, - { - RaiseError => 1, - PrintError => 0, - AutoCommit => 1, - }); - - my @dbh_tables = eval { $dbh->tables() }; - - ## Remove quotes around table names - my $quote = $dbh->get_info(29); # SQL_IDENTIFIER_QUOTE_CHAR - if ($quote) { - foreach (@dbh_tables) { - s/^$quote(.*)$quote$/$1/; - s/$quote$quote/$quote/g; - } - } - - $dbh->disconnect(); - return @dbh_tables; + my $tables = + eval { + $dbh->selectall_arrayref('SHOW TABLES FROM ' . + $dbh->quote_identifier($db)) + } || []; + warn "Unable to retrieve list of tables in $db: $@" if $@; + + return (map { $_->[0] } @$tables); } sub quote_names { |