Commit graph

55377 commits

Author SHA1 Message Date
Gleb Shchepa
c762d934cc Bug #40745: Error during WHERE clause calculation in UPDATE
leads to an assertion failure

Any run-time error in stored function (like recursive function
call or update of table that is already updating by statement
which invoked this stored function etc.) that was used in some
expression of the single-table UPDATE statement caused an
assertion failure.
Multiple-table UPDATE (as well as INSERT and both single- and
multiple-table DELETE) are not affected.
2008-11-28 20:36:07 +04:00
Gleb Shchepa
228c913ee5 Bug #33461: SELECT ... FROM <view> USE INDEX (...) throws
an error

Even after the fix for bug 28701 visible behaviors of
SELECT FROM a view and SELECT FROM a regular table are
little bit different:

1. "SELECT FROM regular table USE/FORCE/IGNORE(non
   existent index)" fails with a "ERROR 1176 (HY000):
   Key '...' doesn't exist in table '...'"

2. "SELECT FROM view USING/FORCE/IGNORE(any index)" fails
   with a "ERROR 1221 (HY000): Incorrect usage of
   USE/IGNORE INDEX and VIEW".  OTOH "SHOW INDEX FROM
   view" always returns empty result set, so from the point
   of same behaviour view we trying to use/ignore non
   existent index.

To harmonize the behaviour of USE/FORCE/IGNORE(index)
clauses in SELECT from a view and from a regular table the
"ERROR 1221 (HY000): Incorrect usage of USE/IGNORE INDEX
and VIEW" message has been replaced with the "ERROR 1176
(HY000): Key '...' doesn't exist in table '...'" message
like for tables and non existent keys.
2008-11-28 20:13:12 +04:00
Georgi Kodinov
8479932c42 merged bug 37339 to 5.1-bugteam 2008-11-28 17:27:12 +02:00
Georgi Kodinov
ccc3404f1b merged bug 37339 to 5.0-bugteam 2008-11-28 16:32:04 +02:00
Georgi Kodinov
0708ad5f98 Bug #37339: SHOW VARIABLES not working properly with multi-byte datadir
The SHOW VARIABLES LIKE .../SELECT @@/SELECT ... FROM INFORMATION_SCHEMA.VARIABLES
were assuming that all the system variables are in system charset (UTF-8).
However the variables that are settable through command line will have a different
character set (character_set_filesystem).
Fixed the server to remember the correct character set of basedir, datadir, tmpdir,
ssl, plugin_dir, slave_load_tmpdir, innodb variables; init_connect and init_slave 
variables and use it when processing data.
2008-11-28 16:25:16 +02:00
Ingo Struewing
6baa973d63 merge 2008-11-28 15:01:09 +01:00
Sergey Glukhov
3059c95c65 automerge 2008-11-28 17:15:29 +04:00
Sergey Glukhov
68066aa5a1 error code is changed to satisfy Win NT 2008-11-28 17:12:43 +04:00
Ingo Struewing
57b8f758f0 merge 2008-11-28 12:38:49 +01:00
Sergey Glukhov
a0ddfab9ff 5.0-bugteam->5.1-bugteam merge 2008-11-28 15:04:09 +04:00
Sergey Glukhov
17cd69ccf4 pushbuild failure fixes 2008-11-28 14:50:13 +04:00
Ingo Struewing
1d69696658 merge 2008-11-27 20:39:54 +01:00
Ingo Struewing
5323968d8f 2008-11-27 18:39:43 +01:00
Tatiana A. Nurnberg
669a8e82a6 auto-merge 2008-11-27 17:35:38 +01:00
Tatiana A. Nurnberg
92c8ab0867 auto-merge 2008-11-27 17:32:34 +01:00
Tatiana A. Nurnberg
99fe5e523e auto-merge 2008-11-27 17:17:16 +01:00
Horst Hunger
47cd41b0ec due to merge. 2008-11-27 16:48:00 +01:00
Ingo Struewing
4ffe3bce70 merge 2008-11-27 16:28:50 +01:00
Sergey Glukhov
302152fc86 5.0-bugteam->5.1-bugteam merge 2008-11-27 19:03:13 +04:00
Sergey Glukhov
63bca358ca Bug#37284 Crash in Field_string::type()
The bug is repeatable with latest(1.0.1) InnoDB plugin on Linux, Win,
If MySQL is compiled with valgrind there are errors about
using of uninitialized variable(orig_table).
The fix is to set field->orig_table correct value.
2008-11-27 18:54:23 +04:00
Horst Hunger
e6f9a2e1ff Fix for Bug#37766: Inserted review results.
Reason for the failing test was that "SELECT count(*) from mysql.general_log;" was not always
the same number. That was fixed by "...count(*)>4..." as the minimal fulfilled condition.
As Bug 35371 was fixed the testcase with "log_output = 'FILE'" was enabled and changed to have
always the same result.
2008-11-27 15:51:48 +01:00
Sergey Glukhov
95345cff20 5.0-bugteam->5.1-bugteam merge 2008-11-27 18:27:44 +04:00
Sergey Glukhov
861eeb918d removed unused variable 2008-11-27 18:26:22 +04:00
Sergey Glukhov
04824289dd 5.0-bugteam->5.1-bugteam merge 2008-11-27 18:11:54 +04:00
Sergey Glukhov
2fb574214e Bug#37460 Assertion failed: !table->file || table->file->inited == handler::NONE
enable uncacheable flag if we update a view with check option
and check option has a subselect, otherwise, the check option
can be evaluated after the subselect was freed as independent
(See full_local in JOIN::join_free())
2008-11-27 17:57:34 +04:00
Tatiana A. Nurnberg
457565b2de auto-merge 2008-11-27 14:52:35 +01:00
Tatiana A. Nurnberg
84ea45fbe3 auto-merge 2008-11-27 14:50:28 +01:00
Tatiana A. Nurnberg
238c5bfa2f auto-merge 2008-11-27 14:45:41 +01:00
Tatiana A. Nurnberg
4c850d62b6 auto-merge 2008-11-27 14:05:50 +01:00
Sergey Glukhov
8a43bcc33a 5.0-bugteam->5.1-bugteam merge 2008-11-27 17:05:38 +04:00
Sergey Glukhov
7b488c46a0 Bug#40365 Prepared statements may insert invalid dates.
set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled.
2008-11-27 16:41:25 +04:00
Sergey Glukhov
29cced9440 Bug#34825 perror on windows doesn't know about win32 error codes
extended perror to enable printing of Win32 system errors
2008-11-27 16:33:40 +04:00
Tatiana A. Nurnberg
d57c7dcff8 auto-merge 2008-11-27 12:50:51 +01:00
Tatiana A. Nurnberg
9700cd87d9 auto-merge 2008-11-27 12:33:04 +01:00
Ingo Struewing
b903835265 Bug#28234 - global/session scope - documentation vs implementation
Post-pushbuild fix.

- Windows does not have 'socket' system variable.
- Compiler warning in sql/slave.cc
2008-11-27 11:50:28 +01:00
Patrick Crews
35bebf503f merge 2008-11-26 16:52:53 -05:00
Patrick Crews
754b2a41e0 merge 2008-11-26 13:03:18 -05:00
Ingo Struewing
068497c870 merge 2008-11-26 17:15:00 +01:00
Matthias Leich
36eabd0fd2 Merge latest Pushes into the GCA tree
(no conflicts)
2008-11-26 15:00:11 +01:00
Ingo Struewing
d861336e28 merge 2008-11-26 12:32:22 +01:00
Horst Hunger
6fce714652 Fix for bug#37702: Inserted the review results into the patch. 2008-11-26 09:33:41 +01:00
Tatiana A. Nurnberg
ae0c6a949c Bug#37553: MySql Error Compare TimeDiff & Time
We pretended that TIMEDIFF() would always return positive results;
this gave strange results in comparisons of the TIMEDIFF(low,hi)<TIME(0)
type that rendered a negative result, but still gave false in comparison.
We also inadvertantly dropped the sign when converting times to
decimal.

CAST(time AS DECIMAL) handles signs of the times correctly.
TIMEDIFF() marked up as signed. Time/date comparison code switched to
signed for clarity.
2008-11-26 09:28:17 +01:00
Vladislav Vaintroub
c3f07acfdd merge 2008-11-25 20:18:43 +01:00
Matthias Leich
e7a85c7e54 Merge of fix for bug 40889 into GCA tree 2008-11-25 17:34:41 +01:00
Matthias Leich
aa1c4d4ebb Merge fix for bug 39854 into GCA tree 2008-11-25 15:30:04 +01:00
Ingo Struewing
6673b2849a Bug#41002 - symlink.test fails on symlinked datadir
symlink.test failed when run in an environment that has mysql-test/var
symlinked to elsewhere, e.g. a memory file system. This is the case
when running mysql-test-run --mem.

In this case the server does not detect that the directory specified
with a DATA/INDEX DIRECTORY clause is within its data home directory.
This problem was reported as Bug#39277 (Creation of table with data
and/or index files in data home directory succeeds). It was decided
that it will not be fixed in 5.1. Hence, the current behavior is
accepted for 5.1. It will be fixed in 6.0 though.

Fixed the test case so that it works in both environments. 1. When no
symbolic link is involved, the server notices that the data/index
directory is in its data hone directory and rejects the CREATE/ALTER
TABLE statement. 2. When the data home directory is symlinked, it
does not notice the problem and executes the statement sucessfully.
2008-11-25 15:06:31 +01:00
Matthias Leich
d495492038 Merge of fix for bug 40644 into GCA tree 2008-11-25 14:35:04 +01:00
Matthias Leich
ff535a0a13 Merge of fix for bug 39979 into GCA tree 2008-11-25 13:48:08 +01:00
Matthias Leich
1e3f6091b8 Merge 5.0 -> 51. of fix for bug 26890 2008-11-25 13:17:50 +01:00
Matthias Leich
febf42555a Merge of fix for Bug 26890 into GCA tree 2008-11-25 12:52:32 +01:00