From 5a0fa6bec355e7550a6181777de1e5e130d38a53 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Oct 2007 15:08:27 -0700 Subject: Fix for bug#31704 Just had to put in the removal of the autocommit, and make sure the commit occurred at the propper time. client/mysqlslap.c: Fix for auto-connect on counter. Relabeled variable which was misnamed. mysql-test/r/mysqlslap.result: Updated result file --- client/mysqlslap.c | 22 +++++++++++++++------- mysql-test/r/mysqlslap.result | 8 ++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 02a0cbd04c5..7af2d556f62 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -546,7 +546,7 @@ static struct my_option my_long_options[] = "Number of rows to insert to used in read and write loads (default is 100).\n", (uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number, 0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0}, - {"commit", OPT_SLAP_COMMIT, "Commit records after X number of statements.", + {"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.", (uchar**) &commit_rate, (uchar**) &commit_rate, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"compress", 'C', "Use compression in server/client protocol.", @@ -577,7 +577,7 @@ static struct my_option my_long_options[] = "Delimiter to use in SQL statements supplied in file or command line.", (uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"detach", OPT_SLAP_DETACH, "Detach connections after X number of requests.", + {"detach", OPT_SLAP_DETACH, "Detach connections every X number of requests.", (uchar**) &detach_rate, (uchar**) &detach_rate, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"engine", 'e', "Storage engine to use for creating the table.", @@ -1766,7 +1766,8 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) pthread_handler_t run_task(void *p) { ulonglong counter= 0, queries; - ulonglong trans_counter; + ulonglong detach_counter; + unsigned int commit_counter; MYSQL *mysql; MYSQL_RES *result; MYSQL_ROW row; @@ -1810,12 +1811,16 @@ pthread_handler_t run_task(void *p) printf("connected!\n"); queries= 0; + commit_counter= 0; + if (commit_rate) + run_query(mysql, "SET AUTOCOMMIT=0", strlen("SET AUTOCOMMIT=0")); + limit_not_met: - for (ptr= con->stmt, trans_counter= 0; + for (ptr= con->stmt, detach_counter= 0; ptr && ptr->length; - ptr= ptr->next, trans_counter++) + ptr= ptr->next, detach_counter++) { - if (!opt_only_print && detach_rate && !(trans_counter % detach_rate)) + if (!opt_only_print && detach_rate && !(detach_counter % detach_rate)) { mysql_close(mysql); @@ -1886,8 +1891,11 @@ limit_not_met: } queries++; - if (commit_rate && commit_rate <= trans_counter) + if (commit_rate && (++commit_counter == commit_rate)) + { + commit_counter= 0; run_query(mysql, "COMMIT", strlen("COMMIT")); + } if (con->limit && queries == con->limit) goto end; diff --git a/mysql-test/r/mysqlslap.result b/mysql-test/r/mysqlslap.result index dfe721d10d2..7f2d4396c68 100644 --- a/mysql-test/r/mysqlslap.result +++ b/mysql-test/r/mysqlslap.result @@ -177,13 +177,17 @@ INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2'); SET AUTOCOMMIT=0; SHOW TABLES; +SET AUTOCOMMIT=0; select * from t1; +COMMIT; select * from t2; COMMIT; select * from t1; +COMMIT; select * from t2; COMMIT; select * from t1; +COMMIT; select * from t2; COMMIT; COMMIT; @@ -199,13 +203,17 @@ INSERT INTO t1 VALUES (1, 'This is a test'); insert into t2 values ('test', 'test2'); SET AUTOCOMMIT=0; SHOW TABLES; +SET AUTOCOMMIT=0; select * from t1; +COMMIT; select * from t2; COMMIT; select * from t1; +COMMIT; select * from t2; COMMIT; select * from t1; +COMMIT; select * from t2; COMMIT; COMMIT; -- cgit v1.2.1 From 6b29db4fe8406903211aca9f53e389155e5f3710 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Dec 2007 12:57:16 +0000 Subject: post-commit: Use $BK_USER, if set, in preference to $USER BitKeeper/triggers/post-commit: Use $BK_USER, if set, in preference to $USER --- BitKeeper/triggers/post-commit | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit index 865d7cdac92..58e8a3996cb 100755 --- a/BitKeeper/triggers/post-commit +++ b/BitKeeper/triggers/post-commit @@ -1,7 +1,14 @@ #!/bin/sh #shift -FROM=$USER@mysql.com +if [ -n "$BK_USER" ] +then + COMMITTER=$BK_USER + FROM=$BK_USER@mysql.com +else + COMMITTER=$USER + FROM=$USER@mysql.com +fi COMMITS=commits@lists.mysql.com DOCS=docs-commit@mysql.com LIMIT=10000 @@ -88,8 +95,8 @@ Subject: bk commit into $VERSION tree ($CHANGESET)$BS X-CSetKey: <$CSETKEY> $BH Below is the list of changes that have just been committed into a local -$VERSION repository of $USER. When $USER does a push these changes will -be propagated to the main repository and, within 24 hours after the +$VERSION repository of $COMMITTER. When $COMMITTER 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 -- cgit v1.2.1 From af868ba7ce9d85bc17c8fc6445146bff5e05413c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Dec 2007 19:23:17 +0100 Subject: Makefile.am Formatting change to improve readability of the "test-*" targets. Makefile.am: Formatting change to improve readability: In multi-line actions, indent the continuation lines so that the start of the next statement is better visible. This affects only "test-*" targets. --- Makefile.am | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile.am b/Makefile.am index c1bdbb22e8e..8f5309b0187 100644 --- a/Makefile.am +++ b/Makefile.am @@ -127,11 +127,11 @@ tags: test-ps: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol + @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol test-ns: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) $(mem) + @PERL@ ./mysql-test-run.pl $(force) $(mem) test: test-ns test-ps @@ -150,25 +150,25 @@ test-force-mem: test-bt: -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=normal --report-features + @PERL@ ./mysql-test-run.pl --force --comment=normal --report-features -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol + @PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1 + @PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1 -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 + @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 -if [ -d mysql-test/suite/nist ] ; then \ - cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=NIST+normal --force --suite=nist ; \ + cd mysql-test ; MTR_BUILD_THREAD=auto \ + @PERL@ ./mysql-test-run.pl --comment=NIST+normal --force --suite=nist ; \ fi -if [ -d mysql-test/suite/nist ] ; then \ - cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \ + cd mysql-test ; MTR_BUILD_THREAD=auto \ + @PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \ fi test-bt-debug: -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=debug --report-features + @PERL@ ./mysql-test-run.pl --force --comment=debug --report-features # Keep these for a while test-pl: test @@ -179,15 +179,15 @@ test-force-full-pl: test-force-full test-ext-funcs: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \ - @PERL@ ./mysql-test-run.pl --force --suite=funcs_2 + @PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \ + @PERL@ ./mysql-test-run.pl --force --suite=funcs_2 test-ext: test-ext-funcs test-fast: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \ - @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam + @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \ + @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam test-fast-view: $(MAKE) subset=--view-protocol test-fast @@ -200,8 +200,8 @@ test-fast-prepare: test-full-qa: $(MAKE) force=--force test-pl \ - test-ext test-fast-view \ - test-fast-cursor + test-ext test-fast-view \ + test-fast-cursor # Don't update the files from bitkeeper %::SCCS/s.% -- cgit v1.2.1 From c61bac89ba2ea75eb24debc63b82bd44ae816f40 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Dec 2007 20:32:38 +0100 Subject: Merge debian.(none):/MySQL/M50/indent-5.0 into debian.(none):/MySQL/M51/indent-5.1 Manual merge of a formatting change. Makefile.am: Manual merge of the formatting change in 5.0, the test actions differ so much that automerge doesn't work. --- Makefile.am | 80 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/Makefile.am b/Makefile.am index bc28fa3082b..2c06a572d1d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -83,30 +83,30 @@ test-unit: test-ps: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed + @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed test-nr: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row + @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row test-pr: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row + @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row test-ns: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed + @PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed test-binlog-statement: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement + @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement # This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07 test-embedded: if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \ cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \ - --embedded-server --skip-rpl --skip-ndbcluster ; \ + @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \ + --embedded-server --skip-rpl --skip-ndbcluster ; \ else \ echo "no program found for 'embedded' tests - skipped testing" ; \ fi @@ -127,54 +127,54 @@ test-force-mem: test-bt: -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=normal --force --timer \ - --skip-ndbcluster --report-features + @PERL@ ./mysql-test-run.pl --comment=normal --force --timer \ + --skip-ndbcluster --report-features -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=ps --force --timer \ - --skip-ndbcluster --ps-protocol + @PERL@ ./mysql-test-run.pl --comment=ps --force --timer \ + --skip-ndbcluster --ps-protocol -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=normal+rowrepl --force --timer \ - --skip-ndbcluster --mysqld=--binlog-format=row + @PERL@ ./mysql-test-run.pl --comment=normal+rowrepl --force --timer \ + --skip-ndbcluster --mysqld=--binlog-format=row -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=ps+rowrepl+NDB --force --timer \ - --ps-protocol --mysqld=--binlog-format=row + @PERL@ ./mysql-test-run.pl --comment=ps+rowrepl+NDB --force --timer \ + --ps-protocol --mysqld=--binlog-format=row -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=NDB --force --timer \ - --with-ndbcluster-only + @PERL@ ./mysql-test-run.pl --comment=NDB --force --timer \ + --with-ndbcluster-only -if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \ cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \ - --embedded-server --skip-rpl --skip-ndbcluster ; \ + @PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \ + --embedded-server --skip-rpl --skip-ndbcluster ; \ else \ echo "no program found for 'embedded' tests - skipped testing" ; \ fi -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1 + @PERL@ ./mysql-test-run.pl --force --comment=funcs1_ps --ps-protocol --suite=funcs_1 -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 + @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=rpl --suite=rpl + @PERL@ ./mysql-test-run.pl --force --comment=rpl --suite=rpl -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts + @PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts -if [ -d mysql-test/suite/nist ] ; then \ cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=NIST+normal --force --suite=nist ; \ + @PERL@ ./mysql-test-run.pl --comment=NIST+normal --force --suite=nist ; \ fi -if [ -d mysql-test/suite/nist ] ; then \ cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \ + @PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \ fi -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress + @PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress # Re-enable the "jp" suite when bug#28563 is fixed # -cd mysql-test ; MTR_BUILD_THREAD=auto \ -# @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp +# @PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp test-bt-debug: -cd mysql-test ; MTR_BUILD_THREAD=auto \ - @PERL@ ./mysql-test-run.pl --comment=debug --force --timer \ - --skip-ndbcluster --skip-rpl --report-features + @PERL@ ./mysql-test-run.pl --comment=debug --force --timer \ + --skip-ndbcluster --skip-rpl --report-features # Keep these for a while test-pl: test @@ -185,32 +185,32 @@ test-force-full-pl: test-force-full test-ext-funcs: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \ - @PERL@ ./mysql-test-run.pl --force --suite=funcs_2 + @PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \ + @PERL@ ./mysql-test-run.pl --force --suite=funcs_2 test-ext-rpl: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --suite=rpl + @PERL@ ./mysql-test-run.pl --force --suite=rpl test-ext-partitions: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --suite=parts + @PERL@ ./mysql-test-run.pl --force --suite=parts test-ext-jp: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --suite=jp + @PERL@ ./mysql-test-run.pl --force --suite=jp test-ext-stress: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl --force --big-test --suite=stress + @PERL@ ./mysql-test-run.pl --force --big-test --suite=stress test-ext: test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress test-fast: cd mysql-test ; \ - @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \ - @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \ - @PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam + @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \ + @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \ + @PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam test-fast-view: $(MAKE) subset=--view-protocol test-fast @@ -223,8 +223,8 @@ test-fast-prepare: test-full-qa: $(MAKE) force=--force test-pr \ - test-binlog-statement test-ext test-fast-view \ - test-fast-cursor test-unit + test-binlog-statement test-ext test-fast-view \ + test-fast-cursor test-unit # Don't update the files from bitkeeper %::SCCS/s.% -- cgit v1.2.1 From d3c6875ac201b201c9c598131274b35ed7d16bdf Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Dec 2007 19:14:28 -0700 Subject: Bug #33192: mysql_install_db bad merge, corrupt code == appears to succeed but does nothing Repair a bad merge that made mysql_install_db silently fail, doing nothing. scripts/mysql_install_db.sh: Repair a bad merge that left out some code changes. --- scripts/mysql_install_db.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 3c1d3ae0fab..4e5ca7305f8 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -124,7 +124,7 @@ parse_arguments() # the install package. See top-level 'dist-hook' make target. # # --windows is a deprecated alias - cross_bootstrap=1 ;; + cross_bootstrap=1 ;; *) if test -n "$pick_args" @@ -324,6 +324,16 @@ then args="$args --user=$user" fi +# When doing a "cross bootstrap" install, no reference to the current +# host should be added to the system tables. So we filter out any +# lines which contain the current host name. +if test $cross_bootstrap -eq 1 +then + filter_cmd_line="sed -e '/@current_hostname/d'" +else + filter_cmd_line="cat" +fi + # Configure mysqld command line mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}" mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ @@ -367,7 +377,7 @@ else fi s_echo "Filling help tables..." -if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line` +if { echo "use mysql;"; cat $fill_help_tables; } | $mysqld_install_cmd_line > /dev/null then s_echo "OK" else @@ -377,12 +387,14 @@ else fi # Don't output verbose information if running inside bootstrap or using -# --srcdir for testing. +# --srcdir for testing. In such cases, there's no end user looking at +# the screen. if test "$cross_bootstrap" -eq 0 && test -z "$srcdir" then s_echo s_echo "To start mysqld at boot time you have to copy" s_echo "support-files/mysql.server to the right place for your system" + echo echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !" echo "To do so, start the server, then issue the following commands:" @@ -401,8 +413,10 @@ then if test "$in_rpm" -eq 0 then + echo echo "You can start the MySQL daemon with:" echo "cd $basedir ; $bindir/mysqld_safe &" + echo echo "You can test the MySQL daemon with mysql-test-run.pl" echo "cd $basedir/mysql-test ; perl mysql-test-run.pl" fi -- cgit v1.2.1 From f367a3488d3e28d3f79e380d47fac0c25b72ac63 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 10:47:01 +0100 Subject: BUG#31880 make test failure from public bk tree mysql-test/mysql-test-run.pl: BUG#31880 make test failure from public bk tree Instead of handling "MTR_BUILD_THREAD set" and "MTR_BUILD_THREAD not set" differently, use the same subroutine to set up the port numbers. The addition of a second master apparently broke the old static port numbers. --- mysql-test/mysql-test-run.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 42298d635e7..7d7f5752787 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -481,14 +481,9 @@ sub command_line_setup () { $opt_suite= "main"; # Special default suite my $opt_comment; - $opt_master_myport= 9306; - $opt_slave_myport= 9308; - $opt_ndbcluster_port= 9310; - $opt_ndbcluster_port_slave= 9311; - $im_port= 9312; - $im_mysqld1_port= 9313; - $im_mysqld2_port= 9314; - + # Magic number -69.4 results in traditional test ports starting from 9306. + set_mtr_build_thread_ports(-69.4); + # If so requested, we try to avail ourselves of a unique build thread number. if ( $ENV{'MTR_BUILD_THREAD'} ) { if ( lc($ENV{'MTR_BUILD_THREAD'}) eq 'auto' ) { @@ -1322,6 +1317,7 @@ sub set_mtr_build_thread_ports($) { } # Up to two masters, up to three slaves + # A magic value in command_line_setup depends on thse equations. $opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1 $opt_slave_myport= $opt_master_myport + 2; # and 3 4 $opt_ndbcluster_port= $opt_master_myport + 5; -- cgit v1.2.1 From c26739edf71f7da76c22d893143e540ceaaaf5ba Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 10:51:05 +0100 Subject: typo --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7d7f5752787..29c5648090c 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1317,7 +1317,7 @@ sub set_mtr_build_thread_ports($) { } # Up to two masters, up to three slaves - # A magic value in command_line_setup depends on thse equations. + # A magic value in command_line_setup depends on these equations. $opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1 $opt_slave_myport= $opt_master_myport + 2; # and 3 4 $opt_ndbcluster_port= $opt_master_myport + 5; -- cgit v1.2.1 From bc5bbe9a8840bc6cd8953fa6247ad3d9840b71b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 15:43:54 +0000 Subject: post-commit: Rationalise setting $FROM. BitKeeper/triggers/post-commit: Rationalise setting $FROM. --- BitKeeper/triggers/post-commit | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit index 58e8a3996cb..a3e329079c8 100755 --- a/BitKeeper/triggers/post-commit +++ b/BitKeeper/triggers/post-commit @@ -4,11 +4,10 @@ if [ -n "$BK_USER" ] then COMMITTER=$BK_USER - FROM=$BK_USER@mysql.com else COMMITTER=$USER - FROM=$USER@mysql.com fi +FROM=$COMMITTER@mysql.com COMMITS=commits@lists.mysql.com DOCS=docs-commit@mysql.com LIMIT=10000 -- cgit v1.2.1 From e1fe5ab9ca3b0fb3d0188b7c1a46b15e9afebb5a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 18:23:11 +0100 Subject: sp_head.cc: Made sp_head::operator delete() match prototype, added throw() mysql_test_run.c, mysqld_safe.c: Include "mysql_version.h" to get MYSQL_PORT defined sql/sp_head.cc: Made sp_head::operator delete() match prototype, added throw() netware/mysql_test_run.c: Include "mysql_version.h" to get MYSQL_PORT defined netware/mysqld_safe.c: Include "mysql_version.h" to get MYSQL_PORT defined --- netware/mysql_test_run.c | 1 + netware/mysqld_safe.c | 1 + sql/sp_head.cc | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c index 3bdbc242f9e..c5974b44c1d 100644 --- a/netware/mysql_test_run.c +++ b/netware/mysql_test_run.c @@ -25,6 +25,7 @@ #include #include #include "my_manage.h" +#include "mysql_version.h" #ifdef __NETWARE__ #define strindex(a,b) ((char*)strindex(a,b)) #define strstr(a,b) ((char*)strstr(a,b)) diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c index 00e7d1bcd51..6ed04c9ff0d 100644 --- a/netware/mysqld_safe.c +++ b/netware/mysqld_safe.c @@ -28,6 +28,7 @@ #include "my_config.h" #include "my_manage.h" +#include "mysql_version.h" /****************************************************************************** diff --git a/sql/sp_head.cc b/sql/sp_head.cc index e55ba81b117..c92723d6ccf 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -453,7 +453,7 @@ sp_head::operator new(size_t size) throw() } void -sp_head::operator delete(void *ptr, size_t size) +sp_head::operator delete(void *ptr, size_t size) throw() { DBUG_ENTER("sp_head::operator delete"); MEM_ROOT own_root; -- cgit v1.2.1 From 81c29da83fef8ee5ff3f831bcc02a16e92b2d87b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 21:38:58 +0100 Subject: sp_head.cc: Corrected typo sql/sp_head.cc: Corrected typo --- sql/sp_head.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index c92723d6ccf..e8ddacb820e 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -453,7 +453,7 @@ sp_head::operator new(size_t size) throw() } void -sp_head::operator delete(void *ptr, size_t size) throw() +sp_head::operator delete(void *ptr, size_t size) throw() { DBUG_ENTER("sp_head::operator delete"); MEM_ROOT own_root; -- cgit v1.2.1 From b003abdcecc3b9d2a5147dc4f75e3a6a5ca032cf Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 15:49:51 -0500 Subject: Bug#26811 Symbolic links don't work in Windows Vista - Enable check for symbolic link files. sql/sql_table.cc: Bug#26811 Symbolic links don't work in Windows Vista - On systems that support symbolic link files, make sure to check for them. --- sql/sql_table.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a43344e902b..b8781d9e83f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -207,7 +207,12 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db, if (pos - rootdir_len >= buff && memcmp(pos - rootdir_len, FN_ROOTDIR, rootdir_len) != 0) pos= strnmov(pos, FN_ROOTDIR, end - pos); - pos= strxnmov(pos, end - pos, dbbuff, FN_ROOTDIR, tbbuff, ext, NullS); + pos= strxnmov(pos, end - pos, dbbuff, FN_ROOTDIR, NullS); +#ifdef USE_SYMDIR + unpack_dirname(buff, buff); + pos= strend(buff); +#endif + pos= strxnmov(pos, end - pos, tbbuff, ext, NullS); DBUG_PRINT("exit", ("buff: '%s'", buff)); DBUG_RETURN(pos - buff); -- cgit v1.2.1 From 9603ebc45c684a895bf2413a05ef01772851e507 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Dec 2007 12:23:35 -0800 Subject: client_priv.h: Removed dead option mysqlslap.c: Updates from Paul for help. Removed dead option client/mysqlslap.c: Updates from Paul for help. Removed dead option client/client_priv.h: Removed dead option --- client/client_priv.h | 1 - client/mysqlslap.c | 49 ++++++++++++++++++++++++------------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index a2f61b9e9ca..abb32d98267 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -60,7 +60,6 @@ enum options_client OPT_USE_THREADS, OPT_IMPORT_USE_THREADS, OPT_MYSQL_NUMBER_OF_QUERY, - OPT_MYSQL_PRESERVE_SCHEMA, OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE, OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA, OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING, diff --git a/client/mysqlslap.c b/client/mysqlslap.c index 7af2d556f62..b91bb9728a5 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -131,7 +131,8 @@ const char *delimiter= "\n"; const char *create_schema_string= "mysqlslap"; -static my_bool opt_preserve= 0, debug_info_flag= 0, debug_check_flag= 0; +static my_bool opt_preserve= TRUE; +static my_bool debug_info_flag= 0, debug_check_flag= 0; static my_bool opt_only_print= FALSE; static my_bool opt_compress= FALSE, tty_password= FALSE, opt_silent= FALSE, @@ -507,12 +508,12 @@ static struct my_option my_long_options[] = (uchar**) &auto_generate_sql, (uchar**) &auto_generate_sql, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO, - "Add autoincrement to auto-generated tables.", + "Add an AUTO_INCREMENT column to auto-generated tables.", (uchar**) &auto_generate_sql_autoincrement, (uchar**) &auto_generate_sql_autoincrement, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES, - "Set this number to generate a set number of queries to run.\n", + "Set this number to generate a set number of queries to run.", (uchar**) &auto_actual_queries, (uchar**) &auto_actual_queries, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY, @@ -521,29 +522,29 @@ static struct my_option my_long_options[] = (uchar**) &auto_generate_sql_guid_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, - "Load types are mixed, update, write, key, or read. Default is mixed\n", + "Specify test load type: mixed, update, write, key, or read; default is mixed.", (uchar**) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"auto-generate-sql-secondary-indexes", OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES, - "Number of secondary indexes to add auto-generated tables.", + "Number of secondary indexes to add to auto-generated tables.", (uchar**) &auto_generate_sql_secondary_indexes, (uchar**) &auto_generate_sql_secondary_indexes, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"auto-generate-sql-unique-query-number", OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM, - "Number of unique queries auto tests", + "Number of unique queries to generate for automatic tests.", (uchar**) &auto_generate_sql_unique_query_number, (uchar**) &auto_generate_sql_unique_query_number, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, {"auto-generate-sql-unique-write-number", OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM, - "Number of unique queries for auto-generate-sql-write-number", + "Number of unique queries to generate for auto-generate-sql-write-number.", (uchar**) &auto_generate_sql_unique_write_number, (uchar**) &auto_generate_sql_unique_write_number, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, {"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM, - "Number of rows to insert to used in read and write loads (default is 100).\n", + "Number of row inserts to perform for each thread (default is 100).", (uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number, 0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0}, {"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.", @@ -565,9 +566,14 @@ static struct my_option my_long_options[] = "Generate CSV output to named file or to stdout if no file is named.", (uchar**) &opt_csv_str, (uchar**) &opt_csv_str, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef DBUG_OFF + {"debug", '#', "This is a non-debug version. Catch this and exit.", + 0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#else {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -577,7 +583,8 @@ static struct my_option my_long_options[] = "Delimiter to use in SQL statements supplied in file or command line.", (uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"detach", OPT_SLAP_DETACH, "Detach connections every X number of requests.", + {"detach", OPT_SLAP_DETACH, + "Detach (close and reopen) connections after X number of requests.", (uchar**) &detach_rate, (uchar**) &detach_rate, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"engine", 'e', "Storage engine to use for creating the table.", @@ -588,11 +595,11 @@ static struct my_option my_long_options[] = {"iterations", 'i', "Number of times to run the tests.", (uchar**) &iterations, (uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, {"number-char-cols", 'x', - "Number of VARCHAR columns to create table with if specifying --auto-generate-sql ", + "Number of VARCHAR columns to create in table if specifying --auto-generate-sql.", (uchar**) &num_char_cols_opt, (uchar**) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"number-int-cols", 'y', - "Number of INT columns to create table with if specifying --auto-generate-sql.", + "Number of INT columns to create in table if specifying --auto-generate-sql.", (uchar**) &num_int_cols_opt, (uchar**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY, @@ -615,30 +622,25 @@ static struct my_option my_long_options[] = (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, {"post-query", OPT_SLAP_POST_QUERY, - "Query to run or file containing query to run after executing.", + "Query to run or file containing query to execute after tests have completed.", (uchar**) &user_supplied_post_statements, (uchar**) &user_supplied_post_statements, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"post-system", OPT_SLAP_POST_SYSTEM, - "System() string to run after the load has completed.", + "system() string to execute after tests have completed.", (uchar**) &post_system, (uchar**) &post_system, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"pre-query", OPT_SLAP_PRE_QUERY, - "Query to run or file containing query to run before executing.", + "Query to run or file containing query to execute before running tests.", (uchar**) &user_supplied_pre_statements, (uchar**) &user_supplied_pre_statements, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"pre-system", OPT_SLAP_PRE_SYSTEM, - "System() string to before load has completed.", + "system() string to execute before running tests.", (uchar**) &pre_system, (uchar**) &pre_system, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA, - "Preserve the schema from the mysqlslap run, this happens unless " - "--auto-generate-sql or --create are used.", - (uchar**) &opt_preserve, (uchar**) &opt_preserve, 0, GET_BOOL, - NO_ARG, TRUE, 0, 0, 0, 0, 0}, {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -663,7 +665,7 @@ static struct my_option my_long_options[] = (uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif {"verbose", 'v', - "More verbose output; You can use this multiple times to get even more " + "More verbose output; you can use this multiple times to get even more " "verbose output.", (uchar**) &verbose, (uchar**) &verbose, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, @@ -1139,12 +1141,9 @@ get_options(int *argc,char ***argv) if (!user) user= (char *)"root"; + /* If something is created we clean it up, otherwise we leave schemas alone */ if (create_string || auto_generate_sql) - { - if (verbose >= 1) - fprintf(stderr, "Turning off preserve-schema!\n"); opt_preserve= FALSE; - } if (auto_generate_sql && (create_string || user_supplied_query)) { -- cgit v1.2.1 From 6dd1f417d32c8d545997fba0e4b7cbb7d64f6e64 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Dec 2007 21:37:21 +0100 Subject: BUG#33057 mysql command line client slows down and uses 100% CPU when restoring dump client/mysql.cc: BUG#33057, avoid calling strlen() *for every single character* in the client's input --- client/mysql.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 999a37e0f7e..6744600aadb 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1272,9 +1272,7 @@ static bool add_line(String &buffer,char *line,char *in_string, if (status.add_to_history && line[0] && not_in_history(line)) add_history(line); #endif -#ifdef USE_MB char *end_of_line=line+(uint) strlen(line); -#endif for (pos=out=line ; (inchar= (uchar) *pos) ; pos++) { @@ -1364,7 +1362,7 @@ static bool add_line(String &buffer,char *line,char *in_string, } } else if (!*ml_comment && !*in_string && - strlen(pos) >= 10 && + (end_of_line - pos) >= 10 && !my_strnncoll(charset_info, (uchar*) pos, 10, (const uchar*) "delimiter ", 10)) { -- cgit v1.2.1