Commit graph

17535 commits

Author SHA1 Message Date
Alfranio Correia
19f859a27e merge 5.1 --> 5.1-rpl 2008-12-13 19:42:12 +00:00
Georgi Kodinov
47cff6998a merged addendum to bug 39920 to 5.1-bugteam 2008-12-01 17:43:51 +02:00
Georgi Kodinov
7f9e0b9bfb addendum to the fix for bug #39920 : post-merge test suite fixes 2008-12-01 17:41:06 +02:00
Georgi Kodinov
6afd8123a3 merged bug 39920 and 5.1-main to 5.1-bugteam 2008-12-01 17:22:16 +02:00
Georgi Kodinov
7114fde7c0 merged bug 39920 to 5.0-bugteam 2008-12-01 16:41:22 +02:00
Georgi Kodinov
f56e43ce52 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.
This fix will not affect the values returned by UNIX_TIMESTAMP() for leap seconds.
But note that when converting the value returned by UNIX_TIMESTAMP() to broken 
down time the correction of leap seconds will still be applied.
Note that this fix will make a difference *only* if the OS is specially configured
to return leap seconds from the OS time calls or when using a MySQL time zone 
defintion that has leap seconds.
Even after this change date/time literals (or other broken down time 
representations) with leap seconds (ending on :59:60 or 59:61) will still be 
considered illegal and discarded by the server with an error or 
a warning depending on the sql mode.
Added a test case to demonstrate the effect of the fix.

mysql-test/r/timezone3.result:
  Bug #39920: test case
mysql-test/std_data/Moscow_leap:
  Bug #39920: updated the Moscow time zone to Dr. Olson's tzdata 2008i 
  to accomodate for the 2008 leap second
mysql-test/t/timezone3.test:
  Bug #39920: test case
sql/tztime.cc:
  Bug #39920: adjust leap seconds (:60 or :61) to :59
sql/tztime.h:
  Bug #39920: adjust leap seconds (:60 or :61) to :59
2008-12-01 16:18:35 +02:00
Georgi Kodinov
5f109f4882 merge of the addenum for bug 37339 to 5.1-bugteam 2008-12-01 15:15:33 +02:00
Georgi Kodinov
a1e9b6ba1e Addendum to bug #37339 : make the test case portable to windows
by using and taking out a full path.

mysql-test/r/ctype_filesystem.result:
  Bug #37399: use MYSQL_TEST_DIR rooted test
mysql-test/t/ctype_filesystem-master.opt:
  Bug #37399: use MYSQL_TEST_DIR rooted test
mysql-test/t/ctype_filesystem.test:
  Bug #37399: use MYSQL_TEST_DIR rooted test
2008-12-01 13:34:53 +02:00
Ingo Struewing
622db26040 auto-merge 2008-11-28 21:55:52 +01:00
Matthias Leich
58288b6939 Merge of last pushes into GCA tree, no conflicts
Diff to actual 5.0-bugteam is revno: 2725 only
2008-11-28 19:47:08 +01:00
Gleb Shchepa
86a20bd3dc manual merge 5.0-bugteam --> 5.1-bugteam (bug 33461) 2008-11-28 21:35:48 +04:00
Gleb Shchepa
d15cbc1a1a 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.


mysql-test/r/update.result:
  Added test case for bug #40745.
mysql-test/t/update.test:
  Added test case for bug #40745.
sql/sql_update.cc:
  Bug #40745: Error during WHERE clause calculation in UPDATE
              leads to an assertion failure
  
  The mysql_update function has been updated to take into account
  the status of invoked stored functions before setting the status
  of whole UPDATE query to OK.
2008-11-28 20:36:07 +04:00
Gleb Shchepa
41ccbefcc4 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.


mysql-test/r/view.result:
  Added test case for bug #33461.
  Updated test case for bug 28701.
mysql-test/t/view.test:
  Added test case for bug #33461.
  Updated test case for bug 28701.
sql/sql_view.cc:
  Bug #33461: SELECT ... FROM <view> USE INDEX (...) throws
              an error
  
  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
552a1bd352 merged bug 37339 to 5.1-bugteam 2008-11-28 17:27:12 +02:00
Georgi Kodinov
f1a9d567c1 merged bug 37339 to 5.0-bugteam 2008-11-28 16:32:04 +02:00
Georgi Kodinov
8e688a7a02 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.

mysql-test/r/ctype_filesystem.result:
  Bug #37339: test case (should be in utf-8)
mysql-test/t/ctype_filesystem-master.opt:
  Bug #37339: test case (should be in ISO-8859-1)
mysql-test/t/ctype_filesystem.test:
  Bug #37339: test case
sql/mysqld.cc:
  Bug #37339: remember the correct character set for init_slave and init_connect
sql/set_var.cc:
  Bug #37339: 
    - remember the character set of the relevant variables
    - implement storing and using the correct 
      character set
sql/set_var.h:
  Bug #37339: implement storing and using the correct 
  character set
sql/sql_show.cc:
  Bug #37339: implement storing and using the correct 
  character set
2008-11-28 16:25:16 +02:00
Ingo Struewing
f525d35b51 merge
.bzrignore:
  Added autom4te.cache and language directories in sql/share to ignorefile.
2008-11-28 15:01:09 +01:00
Sergey Glukhov
be1e992812 automerge 2008-11-28 17:15:29 +04:00
Sergey Glukhov
fef07511e3 error code is changed to satisfy Win NT 2008-11-28 17:12:43 +04:00
Ingo Struewing
8e9e95f2d7 merge 2008-11-28 12:38:49 +01:00
Sergey Glukhov
710b7125da 5.0-bugteam->5.1-bugteam merge
sql/slave.cc:
  compiler warning fix
2008-11-28 15:04:09 +04:00
Sergey Glukhov
78119b2d04 pushbuild failure fixes
mysql-test/r/perror-win.result:
  pushbuild failure fix
mysql-test/t/perror-win.test:
  pushbuild failure fix
sql/item_func.cc:
  pushbuild failure fix
2008-11-28 14:50:13 +04:00
Ingo Struewing
a4abe291dc merge 2008-11-27 20:39:54 +01:00
Ingo Struewing
ccb1990531 2008-11-27 18:39:43 +01:00
Tatiana A. Nurnberg
8c0c30aa90 auto-merge 2008-11-27 17:32:34 +01:00
Tatiana A. Nurnberg
50cfde5328 auto-merge 2008-11-27 17:17:16 +01:00
Horst Hunger
5f678447cc due to merge. 2008-11-27 16:48:00 +01:00
Ingo Struewing
7bfc13296f merge 2008-11-27 16:28:50 +01:00
Sergey Glukhov
0385618e05 5.0-bugteam->5.1-bugteam merge 2008-11-27 19:03:13 +04:00
Sergey Glukhov
1182c0979a 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.


mysql-test/r/innodb_mysql.result:
  test result
mysql-test/t/innodb_mysql.test:
  test case
sql/sql_base.cc:
  set field->orig_table to 'table' value because it may be bogus and
  it leads to crash on Field_string::type() function.
2008-11-27 18:54:23 +04:00
Horst Hunger
5cd6c94289 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
9ac57f01d7 5.0-bugteam->5.1-bugteam merge 2008-11-27 18:11:54 +04:00
Sergey Glukhov
89d044062c 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())


mysql-test/r/subselect.result:
  test result
mysql-test/t/subselect.test:
  test case
sql/mysql_priv.h:
  added UNCACHEABLE_CHECKOPTION flag
sql/sql_update.cc:
  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
f6299c110a auto-merge 2008-11-27 14:50:28 +01:00
Tatiana A. Nurnberg
57ead840c5 auto-merge 2008-11-27 14:45:41 +01:00
Tatiana A. Nurnberg
733e7ce0fc auto-merge 2008-11-27 14:05:50 +01:00
Sergey Glukhov
910d41725d 5.0-bugteam->5.1-bugteam merge 2008-11-27 17:05:38 +04:00
Sergey Glukhov
fbbdb613d7 Bug#34825 perror on windows doesn't know about win32 error codes
extended perror to enable printing of Win32 system errors


extra/perror.c:
  extended perror to enable printing of Win32 system errors
mysql-test/r/perror-win.result:
  test result
mysql-test/t/perror-win.test:
  test case
2008-11-27 16:33:40 +04:00
Serge Kozlov
011d84bb27 Bug#40145. Argument for LOAD_FILE() can be too long and sometimes
a query with two or more these functions truncated. Therefore data 
from each LOAD_FILE() copied into its local variables and then used
in a query.
2008-11-27 15:15:14 +03:00
Tatiana A. Nurnberg
61296d6db7 auto-merge 2008-11-27 12:33:04 +01:00
Ingo Struewing
41494f86f4 Bug#28234 - global/session scope - documentation vs implementation
Post-pushbuild fix.

- Windows does not have 'socket' system variable.
- Compiler warning in sql/slave.cc

mysql-test/r/variables.result:
  Bug#28234 - global/session scope - documentation vs implementation
  Updated test result.
mysql-test/t/variables.test:
  Bug#28234 - global/session scope - documentation vs implementation
  Removed test for 'socket' variable. Windows doesn't have it.
sql/slave.cc:
  Bug#28234 - global/session scope - documentation vs implementation
  Changed type of constant to avoid a compiler warning.
2008-11-27 11:50:28 +01:00
Patrick Crews
12758f9d6e merge 2008-11-26 16:52:53 -05:00
Patrick Crews
6fb5957f61 merge 2008-11-26 13:03:18 -05:00
Ingo Struewing
fd06e3e2ad merge 2008-11-26 17:15:00 +01:00
Matthias Leich
ee66061821 Merge latest Pushes into the GCA tree
(no conflicts)
2008-11-26 15:00:11 +01:00
Ingo Struewing
3fb68b5f94 merge 2008-11-26 12:32:22 +01:00
Horst Hunger
cff0a6b65c Fix for bug#37702: Inserted the review results into the patch. 2008-11-26 09:33:41 +01:00
Tatiana A. Nurnberg
d096079d33 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.

mysql-test/r/func_sapdb.result:
  show that time-related comparisons work with negative
  time values now.
  show that converting time to DECIMAL no longer drops sign.
mysql-test/t/func_sapdb.test:
  show that time-related comparisons work with negative
  time values now.
  show that converting time to DECIMAL no longer drops sign.
sql/item_cmpfunc.cc:
  signed returns
sql/item_cmpfunc.h:
  signed now (time/date < > =)
sql/item_func.cc:
  signed now
sql/item_timefunc.h:
  Functions such as TIMEDIFF() return signed results!
  The file-comments pretended we were doing that all along, anyway...
sql/my_decimal.cc:
  heed sign when converting time to my_decimal;
  times may actually be negative!
  Needed for SELECT CAST(time('-73:42:12') AS DECIMAL);
sql/mysql_priv.h:
  using signed for dates and times now
2008-11-26 09:28:17 +01:00
Matthias Leich
aa819d1b7b Merge fix for bug 39854 into GCA tree 2008-11-25 15:30:04 +01:00
Ingo Struewing
a8d3f0325b 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.


mysql-test/r/symlink.result:
  Bug#41002 - symlink.test fails on symlinked datadir
  Updated test result.
mysql-test/t/symlink.test:
  Bug#41002 - symlink.test fails on symlinked datadir
  Adjusted the test case to the accepted behavior.
  It needs to accept success and failure of some statements.
2008-11-25 15:06:31 +01:00