Commit graph

56105 commits

Author SHA1 Message Date
Luis Soares
47e19cf2d5 merge: 5.1-rpl (with merge from main) -> 5.1-rpl 2009-01-26 17:06:39 +01:00
Luis Soares
df8543868d merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in client/mysqltest.cc
  Text conflict in mysql-test/include/wait_until_connected_again.inc
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
  Text conflict in mysql-test/r/events_bugs.result
  Text conflict in mysql-test/r/log_state.result
  Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
  Text conflict in mysql-test/r/mysqlcheck.result
  Text conflict in mysql-test/r/query_cache.result
  Text conflict in mysql-test/r/status.result
  Text conflict in mysql-test/suite/binlog/r/binlog_index.result
  Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
  Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
  Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
  Text conflict in mysql-test/t/disabled.def
  Text conflict in mysql-test/t/events_bugs.test
  Text conflict in mysql-test/t/log_state.test
  Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
  Text conflict in mysql-test/t/mysqlcheck.test
  Text conflict in mysql-test/t/query_cache.test
  Text conflict in mysql-test/t/rpl_init_slave_func.test
  Text conflict in mysql-test/t/status.test
2009-01-23 13:22:05 +01:00
Luis Soares
727707ac52 BUG#40143 federated.federated_server fails sporadically in pushbuild
The original goal of the test, as reported on BUG #25721, is to check whether 
a deadlock happens or not when concurrently CREATING/ALTERING/DROPPING the 
same server. For that a procedure (p1) is created that runs the exact same 
CREATE/ALTER/DROP statements for 10K iterations and two different connections 
(threads - t1 and t2) call p1 concurrently. At the end of the 10K iterations, 
the test checks if there was errors while running the loop (SELECT e >0).
      
The problem is that In some cases it may happen that one thread, t1, gets 
scheduled to execute with just enough time to complete the iteration and 
never bumps into the other thread t2. Meaning that t1 will never run into an 
SQL exception. On the other hand, the other thread, t2, may run into t1 and 
never issue any/part of its own statements because it will throw an SQLEXCEPTION. 
This is probably the case for failures where only one value differs.
      
Furthermore, there is a third scenario: both threads are scheduled to run 
interleaved for each iteration (or even one thread completes all iterations 
before the other starts). In this case, both will succeed without any error. 
This is probably the case for the failure that reports two different values.
      
This patch addresses the failure in pushbuild by removing the error counting 
and the printout (SELECT > 0) at the end of the test. A timeout should occur 
if the error that the test is checking surfaces.
2009-01-22 14:07:58 +01:00
Magnus Svensson
c2a4f3901b Bug#35735 mysql-test-run.pl creates tmpdir for socket path longer than 70
- Additional patch with improved protection by putting it all inside an "eval"
 - Calling 'hostpath' on a truncated socket may also croak.
 - Remove the need to create any directory parts of "path" inside the function.
2009-01-21 18:18:03 +01:00
Magnus Svensson
bf33a3fa89 Merge 2009-01-21 14:41:50 +01:00
He Zhenxing
46d1e28679 Auto merge 2009-01-21 18:39:11 +08:00
He Zhenxing
d7529bf160 Auto merge 2009-01-21 18:28:51 +08:00
Magnus Svensson
9c76ec9323 Bug#39972 mysql-test-run.pl: Confusing error message under special conditions
- Fix problem with for example ./mtr --timer, caused by new version of "Getopt::Long"
 - Evaluating the "$opt" variable as a string, returns the name of the parameter
   to be modified instead of "Getopt::Long::Callback" which is the class name
2009-01-21 11:17:16 +01:00
He Zhenxing
b7a66485ca BUG#41653 rpl_innodb_bug30888 fails sporadically on pushbuild: warning in log
In mtr.check_warnings, `text` was declares as type text, which is
64K, and when the server log grows larger than this, it would be
truncated, and then check_warnings was actually checking the 
error messages of a previous test and complain warnings.

This patch fixed the problem by change the type of `text` to
mediumtext, which is 16M.

mysql-test/include/mtr_warnings.sql:
  change the type of `text` to mediumtext
2009-01-21 17:59:31 +08:00
Bjorn Munch
985d7bb81e merge 2009-01-21 10:57:31 +01:00
Bjorn Munch
089663f9a7 Bug #40399 Please make mtr print stack trace after every failure
SIGABRT is sent to relevant processes after a timeout


client/mysqltest.cc:
  Fixed signal handlers to mysqltest actually dumps core
mysql-test/lib/My/CoreDump.pm:
  Added support for dbx
mysql-test/lib/My/SafeProcess.pm:
  Added dump_core to force process to dump core
mysql-test/lib/My/SafeProcess/safe_process.cc:
  Traps SIGABRT and sends this on to child
mysql-test/mysql-test-run.pl:
  When test times out, force core dumps on mysqltest and servers
2009-01-21 10:34:01 +01:00
He Zhenxing
b93fb0ab5f BUG#41177 mtr gives no debug info after failing to execute check-testcase/check-warnings
Log output of mysqltest when running check-testcase together
with errput. Remove --silent option for mysqltest when running
check-testcase/check-warnings


mysql-test/mysql-test-run.pl:
  Log output of mysqltest when runinng check-testcase together with errput.
  Remove --silent option for mysqltest when running check-testcase/check-warnings
2009-01-21 17:32:05 +08:00
Joerg Bruehe
aec81abb3b Upmerge changesets from 5.0-build to 5.1-build.
This does not bring any contents changes, it is purely
metadata which are affected.

Details:

Even within 5.0, most of these changesets did not cause
file contents changes, because they were backports done
for the "service pack" builds of 5.0.66sp1 and 5.0.72sp1.

The "real" changesets are also already present in 5.1,
so this upmerge doesn't change any contents.

The only "real" changeset in 5.0 was a fix of the shell
scripts used to configure bdb (BerkeleyDB).
As we completele removed bdb from the 5.1 sources already,
the affected files are not present in the 5.1 source tree,
so this changeset also does not cause any contents changes.
2009-01-15 19:11:25 +01:00
Joerg Bruehe
d5e10aec08 Again, the branch designation "-bugteam" made it to the main tree,
this should not happen.
2009-01-15 18:35:21 +01:00
Joerg Bruehe
65474bb120 Merge the version number increase. 2009-01-15 17:51:40 +01:00
Joerg Bruehe
f6d2d02237 Merge main tree to 5.1-build 2009-01-15 17:21:42 +01:00
unknown
f6c8f94d11 Raise version number after cloning 5.1.31 2009-01-15 16:48:10 +01:00
Joerg Bruehe
e48b721d5c Merge some tool fixes from the 5.0.72sp1 build back into the tree.
This is not the final merge of that release build, but we need early
access to these tool fixes (use of "awk" in the BDB configuration).
2009-01-15 12:08:09 +01:00
Joerg Bruehe
315c0ce163 Merge the changes of the 5.0.66sp1 build back into the tree. 2009-01-15 11:48:31 +01:00
Magnus Svensson
bb42e1ab05 Bug#35701 please allow test language variables in connection and
sync_slave_with_master
 - Additional patch for "disconnect $variable"
2009-01-15 09:05:51 +01:00
Georgi Kodinov
920021c9b8 merge 5.0-bugteam-> 5.1-bugteam 2009-01-15 07:31:47 +02:00
Georgi Kodinov
a08460b83a merge 5.0-main to 5.0-bugteam 2009-01-15 06:35:18 +02:00
MySQL Build Team
09ac5c45eb Oops, bumped version too high. Drop it back down from 5.0.78 to 5.0.77. 2009-01-15 00:14:07 +01:00
Ramil Kalimullin
7a23cfaac9 bug#33094: Error in upgrading from 5.0 to 5.1 when table contains triggers
Post-fix test failure: fixed mysqlcheck.test on Windows platforms.


mysql-test/r/mysqlcheck.result:
  fixed mysqlcheck.test on Windows platforms.
mysql-test/t/mysqlcheck.test:
  fixed mysqlcheck.test on Windows platforms.
2009-01-15 00:54:25 +04:00
unknown
ea75d58249 Raise version number after cloning 5.0.76 2009-01-14 20:16:10 +01:00
Chad MILLER
041d09845b Merge from bugteam trunk. 2009-01-14 10:56:37 -05:00
Ramil Kalimullin
53e42d9ee4 Fix for
bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
triggers
and
#41385: Crash when attempting to repair a #mysql50# upgraded table
with triggers.

Problem:
1. trigger code didn't assume a table name may have
a "#mysql50#" prefix, that may lead to a failing ASSERT().
2. "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME" failed
for databases with "#mysql50#" prefix if any trigger.
3. mysqlcheck --fix-table-name didn't use UTF8 as a default
character set that resulted in (parsing) errors for tables with
non-latin symbols in their names and definitions of triggers.

Fix:
1. properly handle table/database names with "#mysql50#" prefix.
2. handle --default-character-set mysqlcheck option;
if mysqlcheck is launched with --fix-table-name or --fix-db-name
set default character set to UTF8 if no --default-character-set
option given.

Note: if given --fix-table-name or --fix-db-name option,
without --default-character-set mysqlcheck option
default character set is UTF8.


client/mysqlcheck.c:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - check and set default charset if --default-character-set option
      given.
    - set default charset to "utf8" if there's
      --fix-table-name or --fix-db-name and no --default-character-set.
mysql-test/r/mysqlcheck.result:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - test result.
mysql-test/t/mysqlcheck.test:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - test case.
sql/mysql_priv.h:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - check_n_cut_mysql50_prefix() introduced.
sql/sql_table.cc:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - tablename_to_filename() code split into 2 parts
    - check_n_cut_mysql50_prefix() introduced to cut #mysql50# prefixes,
      used in the trigger code as well.
sql/sql_trigger.cc:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - Table_triggers_list::check_n_load() - checking triggers assume
      a table/database name given may have "#mysql50#" prefix in some cases.
    - Table_triggers_list::change_table_name_in_triggers() -
      create .TRG file in new database directory and delete it in old one,
      as they may differ in case of
      "ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME"
    - Table_triggers_list::change_table_name_in_trignames() - remove stale .TRN
      files in #mysql50#dbname directory in case of database upgrade
    - Table_triggers_list::change_table_name() - allow changing trigger's
      database in case of its upgrading
sql/sql_trigger.h:
  Fix for
  bug#33094: Error in upgrading from 5.0 to 5.1 when table contains
  triggers
  and
  #41385: Crash when attempting to repair a #mysql50# upgraded table
  with triggers.
    - new old_db_name parameter added in
      Table_triggers_list::change_table_name_in_trignames() and
      Table_triggers_list::change_table_name_in_triggers()
2009-01-14 18:50:51 +04:00
He Zhenxing
45140a8ea3 Auto merge 2009-01-14 17:32:25 +08:00
He Zhenxing
f2c122bf90 BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables
The next number (AUTO_INCREMENT) field of the table for write
rows events are not initialized, and cause some engines (innodb)
not correctly update the tables's auto_increment value.

This patch fixed this problem by honor next number fields if present.

mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Add test code for BUG#41986
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  update test result file for BUG#41986
sql/log_event.cc:
  set next_number_field before writing rows, and reset next_number_field after finished writing rows
2009-01-14 16:27:32 +08:00
Chad MILLER
97523591b0 Merge fix for bug 38364. 2009-01-13 10:50:22 -05:00
Matthias Leich
ec1b0874b6 Merge into actual tree 2009-01-13 16:42:37 +01:00
Davi Arnaut
27a2c73917 Auto-merge from upstream 5.1-bugteam 2009-01-13 13:06:31 -02:00
Matthias Leich
3bee9e6a8f Merge of fix for bug
41776 type_date.test may fail if run around midnight.
into GCA tree.
2009-01-13 15:04:28 +01:00
Joerg Bruehe
1fc458230d Tool fix, needed for "compile-dist" to succeed on Solaris:
The default "awk" there cannot handle some of the scripts
which are used by BDB for configuration.

The fix:
1) Introduce a variable "AWK" in some of the BDB shell scripts,
2) search "gawk" and give it precedence over "awk"
   when assigning a value to the "AWK" variable,
   fail if neither is found,
3) use that variable when calling an "awk" program with one
   of the critical scripts.

The perfect solution would be to use the "awk" program found
by "configure", but we cannot follow that approach because
BDB's configuration is handled as a special case before the
overall "configure" is run. Because of this,
1) the "configure" result isn't yet available,
2) "configure" will not handle these BDB files.
Searching "gawk" is a (not-so-nice) way out.

Note that all this need not be perfectly portable,
it is needed only when we create a source distribution tarball
from a develkopment tree.

bdb/dist/s_all:
  Search "gawk" if available, give it precedence over "awk",
  fail if neither is found.
bdb/dist/s_include:
  Ensure we use a modern AWK, similar to GNU awk,
  the default awk on Solaris cannot handle BDB's script.
bdb/dist/s_recover:
  Ensure we use a modern AWK, similar to GNU awk,
  the default awk on Solaris cannot handle BDB's script.
bdb/dist/s_rpc:
  Ensure we use a modern AWK, similar to GNU awk,
  the default awk on Solaris cannot handle BDB's script.
2009-01-13 14:52:22 +01:00
Matthias Leich
ee4752c82e Merge of fix for bug
41111 events_bugs fails sporadically on pushbuild
into GCA tree
2009-01-13 14:39:04 +01:00
Matthias Leich
9cef800a07 Merge of fix for bug
41932 funcs_1: is_collation_character_set_applicability path too long for tar
into GCA tree
2009-01-13 14:26:24 +01:00
Matthias Leich
4dcd3c81d7 Fix for Bug#40377 sporadic pushbuild failure in log_state: result mismatch
+ add workaround for bug 38124
+ messages into the protocol when sessions are switched
+ replace error numbers by error names
+ reset of system variables to initial values per subtest
+ remove a file created by this test
+ minor improvements in structure and formatting
2009-01-13 14:09:24 +01:00
Patrick Crews
fed5e97733 Bug#41888: Test binlog.binlog_database causing binlog_innodb to fail on Pushbuild.
Added cleanup of status variables to the end of binlog_database.
Re-recorded .result file to account for cleanup statement.
NOTE:  binlog.binlog_innodb also has had an FLUSH STATUS; statement added to it as well, but
adding this cleanup as a preventative measure.
2009-01-12 18:45:35 -05:00
Joerg Bruehe
4baf24267e Set the version: 5.0.72sp1 2009-01-12 22:02:40 +01:00
Chad MILLER
f4d0b4760a Bug#38364: gen_lex_hash segmentation fault in debug build
Bug#36428: MY_MUTEX_INIT_FAST is used before initialization

On some thread implementations, we need a fake mutex attri-
bute as a placeholder, which we define as a global variable,
"my_fast_mutexattr".  Well. that must be initialized before 
used in any mutexes, and the ordering of initializations in 
the API function  my_init()  was wrong.

Now, put my_thread_global_init(), which initializes the attri-
butes that mutexes require.
2009-01-12 14:48:02 -05:00
Joerg Bruehe
75d276ad61 Backport of a 5.0.74 fix into 5.0.72sp1:
Bug #39920: MySQL cannot deal with Leap Second expression in string literal.

Updated MySQL time handling code to react correctly on UTC leap second additions.
MySQL functions that return the OS current time, like e.g. CURDATE(), NOW() etc
will return :59:59 instead of :59:60 or 59:61.
As a result the reader will receive :59:59 for 2 or 3 consecutive seconds
during the leap second.

Original changesets:
> revision-id: kgeorge@mysql.com-20081201141835-rg8nnnadujj5wl9f
> parent: gshchepa@mysql.com-20081114172557-xh0jlzwal8ze3cy6
> committer: Georgi Kodinov <kgeorge@mysql.com>
> branch nick: B39920-5.0-bugteam
> timestamp: Mon 2008-12-01 16:18:35 +0200

> revision-id: kgeorge@mysql.com-20081201154106-c310zzy5or043rqa
> parent: kgeorge@mysql.com-20081201145656-6kjq91oga5nxbbob
> committer: Georgi Kodinov <kgeorge@mysql.com>
> branch nick: B39920-merge-5.0-bugteam
> timestamp: Mon 2008-12-01 17:41:06 +0200
2009-01-12 17:40:29 +01:00
Joerg Bruehe
3055db5c0e Backport of a 5.0.74 fix into 5.0.72sp1:
Bug#34760 Character set autodetection appears to fail
the problem is the same as reported in bug#20835,
so the fix is backport of bug#20835 patch.

Original changeset:
> revision-id: sergey.glukhov@sun.com-20081121123959-58ffhp2nitg7f40h
> parent: ramil@mysql.com-20081120100836-gct60cm67b1rui29
> committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
> branch nick: mysql-5.0-bugteam
> timestamp: Fri 2008-11-21 16:39:59 +0400
2009-01-12 17:24:00 +01:00
Joerg Bruehe
3b23a99b87 Backport of a 5.0.74 fix into 5.0.72sp1:
BUG#38842 - Fix for 25951 seems incorrect

Original changeset:
> revision-id: svoj@mysql.com-20081111091051-54pr96nf1z2s30gx
> parent: vvaintroub@mysql.com-20081110201804-bi98gcs9avsf58ff
> committer: Sergey Vojtovich <svoj@mysql.com>
> branch nick: mysql-5.0-bugteam-bug38842
> timestamp: Tue 2008-11-11 13:10:51 +0400
2009-01-12 17:18:53 +01:00
Georgi Kodinov
b91bbba2df Fixed a warning in sql_profile.cc 2009-01-12 18:17:15 +02:00
Joerg Bruehe
16f374ef65 Backport of a 5.0.74 fix into 5.0.72sp1:
Bug #40021: Renaming view fails, archived .frm for view is
            missing after downgrade

Original changeset:
> revision-id: gshchepa@mysql.com-20081114172557-xh0jlzwal8ze3cy6
> parent: ramil@mysql.com-20081114074229-vj4fvfrpmz8jfub9
> committer: Gleb Shchepa <gshchepa@mysql.com>
> branch nick: mysql-5.0-bugteam
> timestamp: Fri 2008-11-14 21:25:57 +0400
2009-01-12 17:09:03 +01:00
Georgi Kodinov
e0df7f1cd5 merged 41453 to 5.1-bugteam 2009-01-12 17:52:46 +02:00
Joerg Bruehe
0b689ca3c9 Backport of a 5.0.74 fix into 5.0.72sp1:
Remove bashisms from BUILD/compile-dist and configure.in,
so Bootstrap works on Solaris box;
- force GNU make in compile-dist;
- remove unportable "grep -q" from configure.in

Original changeset:
  revision-id: build@mysql.com-20081203041148-icwscut3bk09ds47
  parent: kgeorge@mysql.com-20081202125040-eiu6s7bk6s96s4xh
  author: timothy.smith@sun.com
  committer: MySQL Build Team <build@mysql.com>
  branch nick: mysql-5.0.74-release
  timestamp: Wed 2008-12-03 05:11:48 +0100
2009-01-12 16:46:19 +01:00
Davi Arnaut
d1323f433d Post-merge fix for bug 37016: Update test case for row-based logging.
mysql-test/r/commit_1innodb.result:
  Increase commit count for row-based logging.
2009-01-12 10:48:33 -02:00
Tatiana A. Nurnberg
95e0d3bd06 Bug#31177: Server variables can't be set to their current values
Bounds-checks and blocksize corrections were applied to user-input,
but constants in the server were trusted implicitly. If these values
did not actually meet the requirements, the user could not set change
a variable, then set it back to the (wonky) factory default or maximum
by explicitly specifying it (SET <var>=<value> vs SET <var>=DEFAULT).

Now checks also apply to the server's presets. Wonky values and maxima
get corrected at startup. Consequently all non-offsetted values the user
sees are valid, and users can set the variable to that exact value if
they so desire.

mysql-test/r/read_buffer_size_basic.result:
  test sets out of bounds value; we now throw a warning for this.
  This is a side-effect: before, the maximum was higher than the
  value we set here. The value was corrected to block-size, the
  maximum was not, hence the value was smaller than the maximum
  in this particular case. Now that we align the maxima at startup,
  the value in SET is larger than the (corrected) maximum, and we
  see a warning in this particular case. "This means we're doing it right."
mysql-test/r/read_rnd_buffer_size_basic.result:
  test sets out of bounds value; we now throw a warning for this.
  This is a side-effect: before, the maximum was higher than the
  value we set here. The value was corrected to block-size, the
  maximum was not, hence the value was smaller than the maximum
  in this particular case. Now that we align the maxima at startup,
  the value in SET is larger than the (corrected) maximum, and we
  see a warning in this particular case. "This means we're doing it right."
mysys/my_getopt.c:
  Do bounds-checking at start-up time so we'll catch and correct
  wonky default values and upper limits.
sql/mysqld.cc:
  If 0 is a legal value per the docs, not to mention the default, we shouldn't give 1 as
  the lower limit.
storage/innobase/handler/ha_innodb.cc:
  We are setting upper bounds here.
  ~0L gives -1. That is NOT what we want!
2009-01-12 06:32:49 +01:00
Tatiana A. Nurnberg
386ec13b59 auto-merge 2009-01-09 23:06:07 +01:00