Commit graph

28620 commits

Author SHA1 Message Date
Bjorn Munch
edcb3b083a merge from 5.5-mtr 2011-05-26 10:18:21 +02:00
Bjorn Munch
e75292dbee Increase test timeout for rpl.rpl_typeconv
Not for test itself but because it procuces large number of warnings,
  and this may take >90s to filter on slow boxes
2011-05-25 16:39:39 +02:00
Anitha Gopi
f4454a134a Fixed formatting in disabled.def 2011-05-25 19:39:24 +05:30
Bjorn Munch
850b27ccdb Bug #12590770 TEST SPECIFIC TIMEOUT SETTING DOES NOT APPLY TO "CHECK" OR "WARNINGS"
Replace global check_timeout with one that calls testcase_timeout for the test
2011-05-25 16:07:16 +02:00
Anitha Gopi
e8db7d12bb Bug#12584161 : Test is failing consistently. Move nack to disabled list 2011-05-25 16:27:48 +05:30
Bjorn Munch
d7334d8d85 Bug #11750043 40340: USE GZIPPED CORE FILES TO SAVE SPACE
Use [g]zip on core file if available, ignore if not
Skip if running named test, and print a line saying what it compressed.
2011-05-25 10:58:33 +02:00
Anitha Gopi
e6aa9227b6 Autocommit - Updating local tree 2011-05-24 21:57:55 +05:30
Anitha Gopi
74d923fea3 Automerge from mysql-5.1 2011-05-24 15:47:52 +05:30
Anitha Gopi
90df87e46c BUG#12371924 # Bug is fixed. Move test out of experimental group 2011-05-24 15:46:14 +05:30
Bjorn Munch
829a418a53 merge from 5.5 main 2011-05-24 11:18:55 +02:00
Horst.Hunger
96b770d808 Merge of this test from trunk to 5.5 to have a successful weekly test on Windows. 2011-05-24 11:16:34 +02:00
Bjorn Munch
b0a74097f1 Bug#11831031: MTR SHOULD FIND TEST SUITES FROM FEATURE TREES OUTSIDE MYSQL-TEST
Backported from trunk-mtr
2011-05-24 10:54:34 +02:00
Anitha Gopi
5c0e022590 Changed to Oracle bug numbers 2011-05-24 12:08:13 +05:30
Anitha Gopi
3ed16ba797 Upmerge from 5.1 2011-05-24 10:25:56 +05:30
Anitha Gopi
4f816f7842 Bug#11756699: Move test from disabled to experimental group 2011-05-24 10:22:00 +05:30
Anitha Gopi
63304799b1 Bug#12584161 - Up merge from 5.1 2011-05-24 10:03:59 +05:30
Anitha Gopi
607c95c013 Bug#12584161 - Moved test from disabled to experimental group 2011-05-24 09:56:24 +05:30
Anitha Gopi
e5b36af265 Replaced all bug numbers with Oracle bugDB numbers 2011-05-23 17:03:41 +05:30
Guilhem Bichot
27fa7876c8 merge from latest 5.5 2011-05-21 10:59:32 +02:00
Guilhem Bichot
15e69738d9 merge from latest 5.1 2011-05-21 10:43:54 +02:00
Guilhem Bichot
12f651ac9d Merge from 5.1. 2011-05-21 10:21:08 +02:00
Luis Soares
b14c541ab6 BUG#11746302
Manual merged mysql-5.1-gca into latest mysql-5.5.

Conflicts
=========
Text conflict in mysql-test/suite/rpl/r/rpl_relayspace.result
Text conflict in mysql-test/suite/rpl/t/rpl_relayspace.test
2011-05-19 16:47:05 +01:00
Luis Soares
21163d68c3 BUG#11746302: 25228: RPL_RELAYSPACE.TEST FAILS ON POWERMACG5,
VM-WIN2003-32-A, SLES10-IA64-A 
      
The test case waits for master_pos_wait not to timeout, which
means that the deadlock between SQL and IO threads was 
succesfully and automatically dealt with.
      
However, very rarely, master_pos_wait reports a timeout. This
happens because the time set for master_pos_wait to wait was
too small (6 seconds). On slow test env this could be a 
problem.
      
We fix this by setting the timeout inline with the one used
in sync_slave_with_master (300 seconds). In addition we 
refactored the test case and refined some comments.
2011-05-19 16:45:45 +01:00
Mikael Ronström
84af79729a merge 2011-05-19 10:49:43 +02:00
Sergey Glukhov
a48bff1d90 5.1 -> 5.5 merge 2011-05-18 10:59:04 +04:00
Sergey Glukhov
a7cd008e12 Bug#12403504 AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
There are two problems:
1. There is a missing check for 'year' parameter(year can not be greater than 9999) in
   makedate function. fix: added check that year can not be greater than 9999.
2. There is a missing check for zero date in from_days() function.
   fix: added zero date check into Item_func_from_days::get_date()
   function.
2011-05-18 10:47:43 +04:00
Guilhem Bichot
25221cccd2 Fix for BUG#11755168 '46895: test "outfile_loaddata" fails (reproducible)'.
In sql_class.cc, 'row_count', of type 'ha_rows', was used as last argument for
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD which is
"Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld".
So 'ha_rows' was used as 'long'.
On SPARC32 Solaris builds, 'long' is 4 bytes and 'ha_rows' is 'longlong' i.e. 8 bytes.
So the printf-like code was reading only the first 4 bytes.
Because the CPU is big-endian, 1LL is 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01
so the first four bytes yield 0. So the warning message had "row 0" instead of
"row 1" in test outfile_loaddata.test:
-Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
+Warning	1366	Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 0

All error-messaging functions which internally invoke some printf-life function
are potential candidate for such mistakes.
One apparently easy way to catch such mistakes is to use
ATTRIBUTE_FORMAT (from my_attribute.h).
But this works only when call site has both:
a) the format as a string literal
b) the types of arguments.
So:
  func(ER(ER_BLAH), 10);
will silently not be checked, because ER(ER_BLAH) is not known at
compile time (it is known at run-time, and depends on the chosen
language).
And
  func("%s", a va_list argument);
has the same problem, as the *real* type of arguments is not
known at this site at compile time (it's known in some caller).
Moreover,
  func(ER(ER_BLAH));
though possibly correct (if ER(ER_BLAH) has no '%' markers), will not
compile (gcc says "error: format not a string literal and no format
arguments").

Consequences:
1) ATTRIBUTE_FORMAT is here added only to functions which in practice
take "string literal" formats: "my_error_reporter" and "print_admin_msg".
2) it cannot be added to the other functions: my_error(),
push_warning_printf(), Table_check_intact::report_error(),
general_log_print().

To do a one-time check of functions listed in (2), the following
"static code analysis" has been done:
1) replace
  my_error(ER_xxx, arguments for substitution in format)
with the equivalent
  my_printf_error(ER_xxx,ER(ER_xxx), arguments for substitution in
format),
so that we have ER(ER_xxx) and the arguments *in the same call site*
2) add ATTRIBUTE_FORMAT to push_warning_printf(),
Table_check_intact::report_error(), general_log_print()
3) replace ER(xxx) with the hard-coded English text found in
errmsg.txt (like: ER(ER_UNKNOWN_ERROR) is replaced with
"Unknown error"), so that a call site has the format as string literal
4) this way, ATTRIBUTE_FORMAT can effectively do its job
5) compile, fix errors detected by ATTRIBUTE_FORMAT
6) revert steps 1-2-3.
The present patch has no compiler error when submitted again to the
static code analysis above.
It cannot catch all problems though: see Field::set_warning(), in
which a call to push_warning_printf() has a variable error
(thus, not replacable by a string literal); I checked set_warning() calls
by hand though.

See also WL 5883 for one proposal to avoid such bugs from appearing
again in the future.

The issues fixed in the patch are:
a) mismatch in types (like 'int' passed to '%ld')
b) more arguments passed than specified in the format.
This patch resolves mismatches by changing the type/number of arguments,
not by changing error messages of sql/share/errmsg.txt. The latter would be wrong,
per the following old rule: errmsg.txt must be as stable as possible; no insertions
or deletions of messages, no changes of type or number of printf-like format specifiers,
are allowed, as long as the change impacts a message already released in a GA version.
If this rule is not followed:
- Connectors, which use error message numbers, will be confused (by insertions/deletions
of messages)
- using errmsg.sys of MySQL 5.1.n with mysqld of MySQL 5.1.(n+1)
could produce wrong messages or crash; such usage can easily happen if
installing 5.1.(n+1) while /etc/my.cnf still has --language=/path/to/5.1.n/xxx;
or if copying mysqld from 5.1.(n+1) into a 5.1.n installation.
When fixing b), I have verified that the superfluous arguments were not used in the format
in the first 5.1 GA (5.1.30 'bteam@astra04-20081114162938-z8mctjp6st27uobm').
Had they been used, then passing them today, even if the message doesn't use them
anymore, would have been necessary, as explained above.
2011-05-16 22:04:01 +02:00
Andrei Elkin
68e6a24d1c Bug 12535301 - SYS_VARS.RPL_INIT_SLAVE_FUNC MISMATCHES IN DAILY-5.5
notifying PB2 the test fails through mysql-test/collections/default.experimental.
2011-05-16 12:44:34 +03:00
Vinay Fisrekar
0c1e38b371 Merge from mysql-5.1 to mysql-5.5 2011-05-14 21:56:49 +05:30
Vinay Fisrekar
4731736320 Adding bug scenario for data types in main suite
Impementing Test Review Comment.
      
Bug test scenario:      
SELECT is not returning result set for "equal" (=) and "NULL safe equal
operator"  (<=>) on BIT data type. Extending this scenario for all data types
2011-05-14 21:44:49 +05:30
Bjorn Munch
0fb541fbb9 merge from 5.5-mtr 2011-05-13 13:02:42 +02:00
Mikael Ronström
06087d2315 merge 2011-05-12 20:35:31 +02:00
Bjorn Munch
aa8715e15e merge from 5.5 main 2011-05-12 15:19:59 +02:00
Jon Olav Hauglid
7577c115a0 Bug#12346411 SQL/LOG.CC:6509: ASSERTION `PREPARED_XIDS > 0' FAILED
This assert could be triggered during two phase commit if binary
log was used as transaction coordinator log. The triggered assert
checks that the same number of transaction IDs are processed in
the prepare and commit phases.

The reason it was triggered, was that the transaction consisted
of an INSERT/UPDATE IGNORE that had an ignorable error. Since it
had an error, no row log events were made and therefore
prepared_xids was 0. However, since it was an IGNORE statement,
the statement started a read/write statement transaction, committed
it and completed successfully.

This patch fixes the problem by adjusting the assert to take
this possibility into account.

Test case added to binlog.binlog_innodb_row.test.
2011-05-12 14:56:00 +02:00
Mikael Ronström
69396894f1 merge 2011-05-12 14:29:32 +02:00
Bjorn Munch
dca22eb6f3 merge from 5.1 main 2011-05-12 14:08:47 +02:00
Tatjana Azundris Nuernberg
f1bad788e5 auto-merge 2011-05-12 10:41:17 +01:00
Tatjana Azundris Nuernberg
614f05e4ca auto-merge 2011-05-12 06:23:16 +01:00
Tatjana Azundris Nuernberg
6fb68a22bd Bug#11902767/Bug#60580: Statement improperly replicated crashes slave SQL thread
If LOAD DATA INFILE featured a SET clause, the name=value pairs
would be regenerated using item::print. Unfortunately, that code
is mostly optimized for EXPLAIN EXTENDED output and such, and can
not be relied on to return valid SQL.

We now name each value its original, user-supplied form and use
that to create LOAD DATA INFILE statements for statement-based
replication.
2011-05-12 05:56:41 +01:00
Tatjana Azundris Nuernberg
25abeed586 auto-merge 2011-05-12 05:43:53 +01:00
Tatjana Azundris Nuernberg
79c1c8e586 auto-merge 2011-05-12 05:32:06 +01:00
Tatjana Azundris Nuernberg
a0f300a6d3 auto-merge Bug#11762799/Bug#55436 2011-05-12 04:05:12 +01:00
Tatjana Azundris Nuernberg
2683078d28 auto-merge Bug#11762799/Bug#55436 2011-05-12 03:41:51 +01:00
Luis Soares
efc20dca00 BUG#12416700
Automerged bzr bundle from bug report into latest mysql-5.5.
2011-05-11 15:16:17 +01:00
Magnus Blåudd
d8a9b36b9d Merge bug 12384993 2011-05-11 15:15:11 +02:00
Georgi Kodinov
a914a32191 Bug #11744875: 4082: integer lengths cause truncation with distinct concat
and innodb

The 5.5 version of the patch.

The server doesn't restrict the data that can be inserted into integer columns 
with explicitly specified length that's smaller than what the type can handle,
e.g. 1234 can be inserted into an INT(2) column just fine.
Thus, when calcualting the maximum width of expressions involving such 
restricted integer columns we need to use the implicit maximum width of 
the field instead of the explicitly speficied one.
Fixed the server to use the implicit maximum in such cases and made sure 
the implicit maximum is addjusted the same way as the explicit one wrt
signedness.

Fixed several test case results (ctype_*.result, metadata.result and 
type_ranges.result) to reflect the extended column widths.

Added a regression test case in distinct.test.

Note : this is the behavior preserving fix that makes 5.5 behave as 5.1 and 
earlier. In the mysql trunk we'll add a insert time check for the explict 
maximum size.
2011-05-11 14:11:57 +03:00
Magnus Blåudd
f8e86f50e2 Bug#12384993 EXTRA/RPL_TEST/CHECK_TYPE.INC NEED SUPPORT FOR SPECIFIC ENGINE
- add support for choosing the engine of test
    table(t1) with $engine_type
 - add primary key to the test table(t1) to support
   replication of BLOB/TEXT (also with ENGINE=ndb)
 - change the suppression since the warning printed to error log
  now says "Column 1"
2011-05-11 09:49:23 +02:00
Luis Soares
c9eef1d74a BUG#12416700: RPL_SHOW_SLAVE_HOSTS FAILS SPORADICALLY (TIMEOUT
IN WAIT_SHOW_CONDITION) 

There was a typo in the name of one of the parameters to the
include file wait_show_condition. The parameter name was being
set to "connection" instead of "condition".

We fix this typo, improve one instruction in the test case and
deploy parameter checks inside wait_show_condition.inc.
2011-05-10 12:41:09 +01:00
Serge Kozlov
4dde684315 automerge 5.1->5.5 2011-05-09 23:26:41 +04:00
Serge Kozlov
e8b54a7ce9 WL#5867
Replaced the error code by error name
2011-05-09 23:14:24 +04:00