summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-11-04 09:40:36 +0200
committerunknown <monty@narttu.mysql.fi>2003-11-04 09:40:36 +0200
commitf97f48acaf26aebc3f79de34b21607e11e1b91fa (patch)
treed387df22d5d3ffed50ecd8620f1eb18bc61ead7e /scripts
parent1eebd1174e87836f4c5bcb58143b11a9dfb8e18f (diff)
parent56ebe77bd1639ee85958ff958bdad05819997043 (diff)
downloadmariadb-git-f97f48acaf26aebc3f79de34b21607e11e1b91fa.tar.gz
Merge with 4.0
BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-apply-patch: Delete: netware/BUILD/apply-patch BitKeeper/deleted/.del-save-patch: Delete: netware/BUILD/save-patch BitKeeper/deleted/.del-mini_client.cc~8677895ec8169183: Auto merged BitKeeper/triggers/post-commit: Auto merged VC++Files/mysys/mysys.dsp: Auto merged client/mysqlbinlog.cc: Auto merged extra/resolveip.c: Auto merged include/config-win.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged include/mysql_com.h: Auto merged innobase/include/os0thread.h: Auto merged innobase/os/os0file.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/thr/thr0loc.c: Auto merged libmysql/manager.c: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/ft_boolean_search.c: Auto merged myisam/mi_extra.c: Auto merged myisam/mi_locking.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/fulltext.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/fulltext.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/rpl_reset_slave.test: Auto merged mysql-test/t/rpl_trunc_binlog.test: Auto merged mysys/Makefile.am: Auto merged mysys/errors.c: Auto merged mysys/my_symlink.c: Auto merged mysys/my_thr_init.c: Auto merged scripts/mysql_install_db.sh: Auto merged sql/item_func.cc: Auto merged sql/log_event.h: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_repl.cc: Auto merged sql/sql_test.cc: Auto merged sql/unireg.h: Auto merged client/mysqldump.c: merge with 4.0 (quoted names) configure.in: use local file include/my_pthread.h: Use local file innobase/include/srv0srv.h: Use local file innobase/row/row0sel.c: Use local file innobase/srv/srv0srv.c: Use local file libmysql/libmysql.c: Use local file myisam/myisamchk.c: merge fixes mysql-test/r/func_crypt.result: update results mysql-test/r/order_by.result: update results mysql-test/r/query_cache.result: update results mysql-test/r/range.result: update results mysql-test/r/rpl_reset_slave.result: update results mysql-test/r/rpl_trunc_binlog.result: update results mysql-test/t/func_crypt.test: Added disable_warnings/enable warnings mysql-test/t/query_cache.test: merge tests mysql-test/t/range.test: merge tests mysys/charset.c: use local file (will merge patch separately) sql/ha_innodb.cc: use local file sql/log_event.cc: new slave_proxy_id handling sql/slave.h: merge sql/sql_base.cc: merge sql/sql_parse.cc: Fixes for counting user connect resourses Added function comments for involved functions sql/sql_select.cc: Fix for not doing sort with LIMIT when OPTION_FOUND_ROWS is used sql/unireg.cc: merge fixes support-files/mysql.server.sh: merge fixes
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh2
-rw-r--r--scripts/mysql_secure_installation.sh10
-rw-r--r--scripts/mysqlhotcopy.sh19
3 files changed, 25 insertions, 6 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index adaac0f3102..acf0f8aa2c8 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -167,7 +167,7 @@ then
fi
fi
-if test "$ip_only" ="1"
+if test "$ip_only" = "1"
then
ip=`echo "$resolved" | awk '/ /{print $6}'`
hostname=$ip
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
index d6392c57731..1c7ca34ad59 100644
--- a/scripts/mysql_secure_installation.sh
+++ b/scripts/mysql_secure_installation.sh
@@ -85,9 +85,13 @@ set_root_password() {
return 1
fi
- do_query "SET PASSWORD FOR root=PASSWORD('$password1');"
+ do_query "UPDATE mysql.user SET Password=PASSWORD('$password1') WHERE User='root';"
if [ $? -eq 0 ]; then
echo "Password updated successfully!"
+ echo "Reloading privilege tables.."
+ if ! reload_privilege_tables; then
+ exit 1
+ fi
echo
rootpass=$password1
make_config
@@ -144,11 +148,11 @@ reload_privilege_tables() {
do_query "FLUSH PRIVILEGES;"
if [ $? -eq 0 ]; then
echo " ... Success!"
+ return 0
else
echo " ... Failed!"
+ return 1
fi
-
- return 0
}
interrupt() {
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index f23955da06a..654e5466e12 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -37,7 +37,7 @@ WARNING: THIS PROGRAM IS STILL IN BETA. Comments/patches welcome.
# Documentation continued at end of file
-my $VERSION = "1.19";
+my $VERSION = "1.20";
my $opt_tmpdir = $ENV{TMPDIR} || "/tmp";
@@ -235,10 +235,15 @@ else
# --- resolve database names from regexp ---
if ( defined $opt{regexp} ) {
+ my $t_regex = '.*';
+ if ( $opt{regexp} =~ s{^/(.+)/\./(.+)/$}{$1} ) {
+ $t_regex = $2;
+ }
+
my $sth_dbs = $dbh->prepare("show databases");
$sth_dbs->execute;
while ( my ($db_name) = $sth_dbs->fetchrow_array ) {
- push @db_desc, { 'src' => $db_name } if ( $db_name =~ m/$opt{regexp}/o );
+ push @db_desc, { 'src' => $db_name, 't_regex' => $t_regex } if ( $db_name =~ m/$opt{regexp}/o );
}
}
@@ -413,6 +418,8 @@ foreach my $rdb ( @db_desc ) {
else {
mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n"
unless -d $tgt_dirpath;
+ my @f_info= stat "$datadir/$rdb->{src}";
+ chown $f_info[4], $f_info[5], $tgt_dirpath;
}
}
}
@@ -938,6 +945,14 @@ server in a mutual replication setup.
Copy all databases with names matching the pattern
+=item --regexp /pattern1/./pattern2/
+
+Copy all tables with names matching pattern2 from all databases with
+names matching pattern1. For example, to select all tables which
+names begin with 'bar' from all databases which names end with 'foo':
+
+ mysqlhotcopy --indices --method=cp --regexp /foo$/./^bar/
+
=item db_name./pattern/
Copy only tables matching pattern. Shell metacharacters ( (, ), |, !,