Commit graph

229 commits

Author SHA1 Message Date
Anitha Gopi
e5b36af265 Replaced all bug numbers with Oracle bugDB numbers 2011-05-23 17:03:41 +05:30
Guilhem Bichot
12f651ac9d Merge from 5.1. 2011-05-21 10:21:08 +02: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
Sven Sandberg
58ebf89501 Marked test experimental. 2011-05-02 16:38:25 +02:00
Serge Kozlov
410ee93cde BUG#12371924
Update test case
2011-04-18 23:59:15 +04:00
Sven Sandberg
5038060b3b test fails on more platforms, removed @freebsd from default.experimental. 2011-04-18 14:42:14 +02:00
Serge Kozlov
58cb12c9b2 WL#5867, reorganize test cases of bugs suite 2011-04-14 00:18:08 +04:00
Sven Sandberg
d08c710457 marked rpl_stop_slave experimental due to BUG#12345981 2011-04-12 13:14:49 +02:00
Sven Sandberg
bbfb9eabd5 corrected bug reference for experimental test 2011-04-11 16:01:46 +02:00
Sven Sandberg
5759b05f78 Marked test experimental because it fails due to BUG#12403008 2011-04-27 14:57:45 +02:00
Serge Kozlov
f8a3dcc42e autocommit 5.1 -> 5.5 2011-04-19 00:08:25 +04:00
Serge Kozlov
6b3c702f61 autocommit 5.1->5.5 2011-04-14 00:48:09 +04:00
Anitha Gopi
dd17a7e0ae Bug#11762246 : Test is not failing in PB2. Remove from experimental group 2011-04-13 16:42:13 +05:30
Sven Sandberg
81ae92c260 some replication tests were marked experimental with reference
to a bug that has been fixed. made these tests non-experimental.
2011-04-12 11:47:00 +02:00
hery.ramilison@oracle.com
18d2e55c51 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
Bjorn Munch
1bef7a728e merge from 5.5 main 2011-03-11 10:12:58 +01:00
Anitha Gopi
d7a4372fbe Skip tests in disabled-daily.list 2011-03-10 09:57:14 +05:30
Anitha Gopi
34f3953b59 Skip the tests listed in disabled-weekly.list 2011-03-10 09:54:16 +05:30
Bjorn Munch
311a3ca078 merge from 5.5 main 2011-03-08 18:39:25 +01:00
Anitha Gopi
47162494bf Bug#11769332 : These tests crash on windows which leads to cdb hang. This results in very long runtime. Disable till the bug is fixed 2011-03-03 12:18:04 +05:30
Anitha Gopi
986bc27f1d Bug#11769332 : Disable in daily runs till the bug is fixed. These tests crash the server abd can lead to cdb hang on windows 2011-03-03 11:52:52 +05:30
Serge Kozlov
7438f4f051 Bug#54820. Remove test cases from experimental 2011-02-27 23:23:44 +03:00
Bjorn Munch
1e951fb832 merge from 5.5 main 2011-02-24 15:13:23 +01:00
Bjorn Munch
562978e1ab Bug #11766640 (59789) Hook the invocation of unit tests in MTR.
Added code to call 'ctest' if the needed cmake file is present
Will do so unless tests/suited named on mtr command line
Also add option to turn on/off
Will be made to look like a test 'unit-test' which counts towards total
Extracts summary report and any test failures from ctest output
Addendum: added override to turn off in PB, add back in selected invocations
2011-02-21 13:56:43 +01:00
Vasil Dimov
95d02c5c2d Merge mysql-5.5-innodb -> mysql-5.5 2011-02-18 14:57:50 +02:00
Vasil Dimov
f19a4c0d76 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-02-17 19:14:41 +02:00
Georgi Kodinov
f883ca66b5 merge mysql-5.5->mysql-5.5-security 2011-02-10 12:10:21 +02:00
Georgi Kodinov
4b1ac3f652 weave merge mysql-5.5->mysql-5.5-security 2011-02-09 11:27:31 +02:00
Jonathan Perkin
e98c722825 merge 2011-02-08 15:07:36 +01:00
Jonathan Perkin
d06e324e66 Merge from mysql-5.5.9-release 2011-02-08 14:59:03 +01:00
Anitha Gopi
ee698efe20 Bug#59979: Added --debug-server option to collections 2011-02-08 17:25:42 +05:30
Anitha Gopi
ef2eb87b6b Added more tests to daily 2011-02-08 13:20:32 +05:30
Anitha Gopi
13292b3775 Remove unwanted collections 2011-02-08 11:47:57 +05:30
Anitha Gopi
4e24741e0f Upmerge 3565 from 5.1 2011-02-08 11:41:57 +05:30
Anitha Gopi
7c838e296c Removed the collections for mysql-5.1-bugteam. Removed 1st from weekly. This is part of default suites 2011-02-08 11:30:35 +05:30
Anitha Gopi
21b847c752 Bug#52208 - Removed main.gis from experimental group 2011-02-08 08:56:49 +05:30
Sergey Vojtovich
3571aa4f71 Bug #59148 - made tests experimental 2011-02-02 10:38:50 +03:00
Sergey Vojtovich
4605f18320 Merge. 2011-01-28 15:00:54 +03:00
Anitha Gopi
ff7d07062d Bug#47449: This problem not seen in PB2. Remove from experimental group 2011-01-18 23:21:39 +05:30
Georgi Kodinov
1680a56657 merge 2011-01-12 17:10:12 +02:00
Jonathan Perkin
e6ff7b63f9 Combine test-bt and test-bt-debug into a single default.release
collection, utilising the new --debug-server option for the debug
run to ensure the correct binaries are used.

Remove test-bt-*fast, they are unused.
2011-02-09 19:41:12 +00:00
Bjorn Munch
a18cde4734 Bug #58896 MTR should recognise combinations as experimental without needing wildcards
Added a pattern match to cover combinations
Added to readme file
2011-01-11 10:53:22 +01:00
Anitha Gopi
f6bcd9c6c5 Bug#47792 : Moving test out of disabled state since the problem is not seen anymore 2011-01-11 13:31:51 +05:30
Matthias Leich
30652c4f2b The fix for Bug#58414 affecting the test show_check is pushed.
Remove the test from defaults.experimental.
2011-01-10 15:53:06 +01:00
Georgi Kodinov
7fd0c36b7b merge 2011-01-10 15:09:57 +02:00
Georgi Kodinov
635d76cad9 Bug #59148 - made tests experimental 2011-01-10 11:54:05 +02:00
Vasil Dimov
b192c11c08 Merge mysql-5.5 -> mysql-5.5-innodb 2011-01-07 13:49:06 +02:00
Saikumar V
ce7a75fe8c Adding more mtr commands to runs engine suites. 2011-01-06 16:47:22 +05:30
Saikumar V
5db83bab28 Adding more mtr commands to runs engine suites. 2011-01-06 16:09:45 +05:30