Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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
1.2473 07/03/09 01:09:29 tomas@stripped +20 -0
Merge poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
into poseidon.mysql.com:/home/tomas/mysql-5.1-telco-merge
storage/ndb/tools/restore/restore_main.cpp
1.56 07/03/09 01:08:54 tomas@stripped +0 -4
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp
1.43 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/tools/restore/Restore.hpp
1.30 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/tools/restore/Restore.cpp
1.50 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp
1.47 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/NdbRecAttr.cpp
1.41 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/Ndb.cpp
1.92 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/ClusterMgr.cpp
1.42 07/03/09 01:08:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
1.142 07/03/09 01:08:52 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
1.53 07/03/09 01:08:52 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
1.148 07/03/09 01:08:52 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.114 07/03/09 01:08:51 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.120 07/03/09 01:08:50 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp
1.43 07/03/09 01:08:49 tomas@stripped +0 -0
Auto merged
storage/ndb/include/util/OutputStream.hpp
1.15 07/03/09 01:08:49 tomas@stripped +0 -0
Auto merged
sql/mysqld.cc
1.620 07/03/09 01:08:48 tomas@stripped +0 -0
Auto merged
sql/ha_ndbcluster_binlog.cc
1.106 07/03/09 01:08:47 tomas@stripped +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.275 07/03/09 01:08:47 tomas@stripped +0 -0
Auto merged
configure.in
1.438 07/03/09 01:08:46 tomas@stripped +0 -0
Auto merged
BitKeeper/etc/ignore
1.280 07/03/09 01:06:51 tomas@stripped +0 -0
auto-union
# 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: tomas
# Host: poseidon.mysql.com
# Root: /home/tomas/mysql-5.1-telco-merge/RESYNC
--- 1.619/sql/mysqld.cc 2007-03-08 20:47:53 +07:00
+++ 1.620/sql/mysqld.cc 2007-03-09 01:08:48 +07:00
@@ -421,7 +421,7 @@ const char *opt_ndb_connectstring= 0;
char opt_ndb_constrbuf[1024];
unsigned opt_ndb_constrbuf_len= 0;
my_bool opt_ndb_shm, opt_ndb_optimized_node_selection;
-ulong opt_ndb_cache_check_time;
+ulong opt_ndb_cache_check_time, opt_ndb_wait_connected;
const char *opt_ndb_mgmd;
ulong opt_ndb_nodeid;
ulong ndb_extra_logging;
@@ -4891,6 +4891,7 @@ enum options_mysqld
OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS,
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
OPT_NDB_SHM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_NDB_CACHE_CHECK_TIME,
+ OPT_NDB_WAIT_CONNECTED,
OPT_NDB_MGMD, OPT_NDB_NODEID,
OPT_NDB_DISTRIBUTION,
OPT_NDB_INDEX_STAT_ENABLE,
@@ -5620,6 +5621,12 @@ Disable with --skip-ndbcluster (will sav
(gptr*) &global_system_variables.ndb_use_copying_alter_table,
(gptr*) &global_system_variables.ndb_use_copying_alter_table,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+ { "ndb-wait-connected", OPT_NDB_WAIT_CONNECTED,
+ "Time (in seconds) for mysqld to wait for connection to cluster management and data nodes.",
+ (gptr*) &opt_ndb_wait_connected, (gptr*) &opt_ndb_wait_connected,
+ 0, GET_ULONG, REQUIRED_ARG, 0, 0, LONG_TIMEOUT, 0, 0, 0},
+#endif
{"new", 'n', "Use very new possible 'unsafe' functions.",
(gptr*) &global_system_variables.new_mode,
(gptr*) &max_system_variables.new_mode,
--- 1.274/mysql-test/mysql-test-run.pl 2007-03-08 08:43:37 +07:00
+++ 1.275/mysql-test/mysql-test-run.pl 2007-03-09 01:08:47 +07:00
@@ -300,6 +300,8 @@ our $path_ndb_examples_dir;
our $exe_ndb_example;
our $path_ndb_testrun_log;
+our $path_sql_dir;
+
our @data_dir_lst;
our $used_binlog_format;
@@ -357,6 +359,7 @@ sub stop_all_servers ();
sub run_mysqltest ($);
sub usage ($);
+
######################################################################
#
# Main program
@@ -766,7 +769,7 @@ sub command_line_setup () {
foreach my $arg ( @opt_extra_mysqld_opt )
{
- if ( $arg =~ /binlog-format=(\S+)/ )
+ if ( $arg =~ /binlog[-_]format=(\S+)/ )
{
$used_binlog_format= $1;
}
@@ -1492,6 +1495,10 @@ sub executable_setup () {
if (!$opt_extern)
{
+ # Look for SQL scripts directory
+ $path_sql_dir= mtr_path_exists("$glob_basedir/share",
+ "$glob_basedir/scripts");
+
if ( $mysql_version_id >= 50100 )
{
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
@@ -1585,7 +1592,8 @@ sub executable_setup () {
sub generate_cmdline_mysqldump ($) {
my($mysqld) = @_;
return
- "$exe_mysqldump --no-defaults --debug-info -uroot " .
+ mtr_native_path($exe_mysqldump) .
+ " --no-defaults -uroot --debug-info " .
"--port=$mysqld->{'port'} " .
"--socket=$mysqld->{'path_sock'} --password=";
}
@@ -1727,7 +1735,7 @@ sub environment_setup () {
my $deb_version;
if ( $opt_valgrind and -d $debug_libraries_path and
(! -e '/etc/debian_version' or
- ($deb_version= mtr_grab_file('/etc/debian_version')) == 0 or
+ ($deb_version= mtr_grab_file('/etc/debian_version')) !~ /^[0-9]+\.[0-9]$/ or
$deb_version > 3.1 ) )
{
push(@ld_library_paths, $debug_libraries_path);
@@ -1831,7 +1839,8 @@ sub environment_setup () {
# Setup env so childs can execute mysqlcheck
# ----------------------------------------------------
my $cmdline_mysqlcheck=
- "$exe_mysqlcheck --no-defaults --debug-info -uroot " .
+ mtr_native_path($exe_mysqlcheck) .
+ " --no-defaults --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1865,7 +1874,8 @@ sub environment_setup () {
if ( $exe_mysqlslap )
{
my $cmdline_mysqlslap=
- "$exe_mysqlslap -uroot " .
+ mtr_native_path($exe_mysqlslap) .
+ " -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password= " .
"--lock-directory=$opt_tmpdir";
@@ -1882,7 +1892,8 @@ sub environment_setup () {
# Setup env so childs can execute mysqlimport
# ----------------------------------------------------
my $cmdline_mysqlimport=
- "$exe_mysqlimport --debug-info -uroot " .
+ mtr_native_path($exe_mysqlimport) .
+ " -uroot --debug-info " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1898,7 +1909,8 @@ sub environment_setup () {
# Setup env so childs can execute mysqlshow
# ----------------------------------------------------
my $cmdline_mysqlshow=
- "$exe_mysqlshow --debug-info -uroot " .
+ mtr_native_path($exe_mysqlshow) .
+ " -uroot --debug-info " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1913,7 +1925,7 @@ sub environment_setup () {
# Setup env so childs can execute mysqlbinlog
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
- "$exe_mysqlbinlog" .
+ mtr_native_path($exe_mysqlbinlog) .
" --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir";
if ( !$opt_extern && $mysql_version_id >= 50000 )
{
@@ -1931,7 +1943,8 @@ sub environment_setup () {
# Setup env so childs can execute mysql
# ----------------------------------------------------
my $cmdline_mysql=
- "$exe_mysql --no-defaults --debug-info --host=localhost --user=root --password= " .
+ mtr_native_path($exe_mysql) .
+ " --no-defaults --debug-info --host=localhost --user=root --password= " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} ".
"--character-sets-dir=$path_charsetsdir";
@@ -1963,6 +1976,7 @@ sub environment_setup () {
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'}";
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
+
}
if (!$opt_extern)
{
@@ -1972,17 +1986,17 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
# ----------------------------------------------------
- $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
+ $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= mtr_native_path($exe_my_print_defaults);
# ----------------------------------------------------
# Setup env so childs can execute mysqladmin
# ----------------------------------------------------
- $ENV{'MYSQLADMIN'}= $exe_mysqladmin;
+ $ENV{'MYSQLADMIN'}= mtr_native_path($exe_mysqladmin);
# ----------------------------------------------------
# Setup env so childs can execute perror
# ----------------------------------------------------
- $ENV{'MY_PERROR'}= $exe_perror;
+ $ENV{'MY_PERROR'}= mtr_native_path($exe_perror);
# ----------------------------------------------------
# Add the path where mysqld will find udf_example.so
@@ -2141,6 +2155,16 @@ sub remove_stale_vardir () {
mtr_verbose("Removing $opt_vardir/");
rmtree("$opt_vardir/");
}
+
+ if ( $opt_mem )
+ {
+ # A symlink from var/ to $opt_mem will be set up
+ # remove the $opt_mem dir to assure the symlink
+ # won't point at an old directory
+ mtr_verbose("Removing $opt_mem");
+ rmtree($opt_mem);
+ }
+
}
else
{
@@ -2892,42 +2916,13 @@ 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);
mtr_add_arg($args, "--datadir=%s", $data_dir);
mtr_add_arg($args, "--skip-innodb");
@@ -2954,21 +2949,55 @@ sub install_db ($$) {
# --bootstrap, to accommodate this.
my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || $exe_mysqld;
+ # ----------------------------------------------------------------------
+ # export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
+ # ----------------------------------------------------------------------
+ $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
+
+ # ----------------------------------------------------------------------
+ # Create the bootstrap.sql file
+ # ----------------------------------------------------------------------
+ my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
+
+ # Use the mysql database for system tables
+ mtr_tofile($bootstrap_sql_file, "use mysql");
+
+ # Add the offical mysql system tables
+ # for a production system
+ mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables.sql",
+ $bootstrap_sql_file);
+
+ # Add the mysql system tables initial data
+ # for a production system
+ mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables_data.sql",
+ $bootstrap_sql_file);
+
+ # 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_appendfile_to_file("$path_sql_dir/mysql_test_data_timezone.sql",
+ $bootstrap_sql_file);
+
+ # 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_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
+ $bootstrap_sql_file);
+
# Log bootstrap command
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
mtr_tofile($path_bootstrap_log,
"$exe_mysqld_bootstrap " . join(" ", @$args) . "\n");
- if ( mtr_run($exe_mysqld_bootstrap, $args, $init_db_sql_tmp,
+ if ( mtr_run($exe_mysqld_bootstrap, $args, $bootstrap_sql_file,
$path_bootstrap_log, $path_bootstrap_log,
"", { append_log_file => 1 }) != 0 )
{
- unlink($init_db_sql_tmp);
mtr_error("Error executing mysqld --bootstrap\n" .
- "Could not install $type test DBs");
+ "Could not install system database from $bootstrap_sql_file\n" .
+ "see $path_bootstrap_log for errors");
}
- unlink($init_db_sql_tmp);
}
@@ -3625,6 +3654,12 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
+ if ( $mysql_version_id >= 50036)
+ {
+ # Prevent the started mysqld to access files outside of vardir
+ mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
+ }
+
if ( $mysql_version_id >= 50000 )
{
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
@@ -4673,7 +4708,8 @@ sub run_mysqltest ($) {
# ----------------------------------------------------------------------
# export MYSQL_TEST variable containing <path>/mysqltest <args>
# ----------------------------------------------------------------------
- $ENV{'MYSQL_TEST'}= "$exe_mysqltest " . join(" ", @$args);
+ $ENV{'MYSQL_TEST'}=
+ mtr_native_path($exe_mysqltest) . " " . join(" ", @$args);
# ----------------------------------------------------------------------
# Add arguments that should not go into the MYSQL_TEST env var
@@ -4884,9 +4920,7 @@ sub debugger_arguments {
my $exe= shift;
my $debugger= $opt_debugger || $opt_client_debugger;
- # FIXME Need to change the below "eq"'s to
- # "case unsensitive string contains"
- if ( $debugger eq "vcexpress" or $debugger eq "vc")
+ if ( $debugger =~ /vcexpress|vc|devenv/ )
{
# vc[express] /debugexe exe arg1 .. argn
@@ -4894,22 +4928,37 @@ sub debugger_arguments {
unshift(@$$args, "/debugexe");
unshift(@$$args, "$$exe");
+ # Set exe to debuggername
+ $$exe= $debugger;
+
}
- elsif ( $debugger eq "windbg" )
+ elsif ( $debugger =~ /windbg/ )
{
# windbg exe arg1 .. argn
# Add name of the exe before args
unshift(@$$args, "$$exe");
+ # Set exe to debuggername
+ $$exe= $debugger;
+
+ }
+ elsif ( $debugger eq "dbx" )
+ {
+ # xterm -e dbx -r exe arg1 .. argn
+
+ unshift(@$$args, $$exe);
+ unshift(@$$args, "-r");
+ unshift(@$$args, $debugger);
+ unshift(@$$args, "-e");
+
+ $$exe= "xterm";
+
}
else
{
mtr_error("Unknown argument \"$debugger\" passed to --debugger");
}
-
- # Set exe to debuggername
- $$exe= $debugger;
}
--- 1.40/storage/ndb/src/ndbapi/NdbRecAttr.cpp 2007-03-08 00:33:02 +07:00
+++ 1.41/storage/ndb/src/ndbapi/NdbRecAttr.cpp 2007-03-09 01:08:53 +07:00
@@ -263,6 +263,9 @@ ndbrecattr_print_formatted(NdbOut& out,
if (length > 1)
out << f.end_array_enclosure;
break;
+ case NdbDictionary::Column::Mediumunsigned:
+ out << r.u_medium_value();
+ break;
case NdbDictionary::Column::Smallunsigned:
out << r.u_short_value();
break;
@@ -275,6 +278,9 @@ ndbrecattr_print_formatted(NdbOut& out,
case NdbDictionary::Column::Int:
out << r.int32_value();
break;
+ case NdbDictionary::Column::Mediumint:
+ out << r.medium_value();
+ break;
case NdbDictionary::Column::Smallint:
out << r.short_value();
break;
@@ -461,8 +467,6 @@ ndbrecattr_print_formatted(NdbOut& out,
break;
case NdbDictionary::Column::Undefined:
- case NdbDictionary::Column::Mediumint:
- case NdbDictionary::Column::Mediumunsigned:
unknown:
//default: /* no print functions for the rest, just print type */
out << (int) r.getType();
--- 1.279/BitKeeper/etc/ignore 2007-03-07 00:36:01 +07:00
+++ 1.280/BitKeeper/etc/ignore 2007-03-09 01:06:51 +07:00
@@ -1249,6 +1249,7 @@ mysql-test/*.ds?
mysql-test/*.vcproj
mysql-test/gmon.out
mysql-test/install_test_db
+mysql-test/lib/init_db.sql
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/mysql-test-run-shell
@@ -1813,6 +1814,7 @@ scripts/mysql_explain_log
scripts/mysql_find_rows
scripts/mysql_fix_extensions
scripts/mysql_fix_privilege_tables
+scripts/mysql_fix_privilege_tables.sql
scripts/mysql_install_db
scripts/mysql_secure_installation
scripts/mysql_setpermission
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2473) | tomas | 8 Mar |