Commit graph

14932 commits

Author SHA1 Message Date
Patrick Crews
bc4df2f65d Bug#41893 - main.variables mysql-test fails if new variable like '%alloc%' is added.
Fixed a typo in the bug fix patch.
2009-02-26 18:00:47 +02:00
Patrick Crews
1062119af5 Bug#41893: main.variables mysql-test fails if new variable like '%alloc%' is added.
Started fix in 5.0 as the same issue is here.
Revising queries used given what appears to be the scope of this test to only select the manipulated variables.
Added tests for values that are / are not multiples of 1024 to test rounding / constraints.
This behavior is not currently documented (docs bug has been opened)
2009-02-26 10:57:33 +02:00
Andrei Elkin
da7aa6bc9f merging from 5.0-bt rep to a local branch 2009-02-24 16:35:45 +02:00
Andrei Elkin
162eca37dd fixing compilation warning and adding flush logs to test of bug#37313 2009-02-24 16:17:34 +02:00
Tatiana A. Nurnberg
c1e0d67002 automerge 2009-02-24 08:05:30 +01:00
Alexey Kopytov
1ba7c35e5c Automerge. 2009-02-23 14:53:51 +02:00
Alexey Kopytov
cebaf077d2 Fix for bug #15936: "round" differs on Windows to Unix
Both of our own implementations of rint(3) were inconsistent with the
most common behavior of rint() on those platforms that have it: round
to nearest, break ties by rounding to nearest even.

Fixed by leaving just one implementation of rint() in our source tree,
and changing its behavior to match the most common native
implementations on other platforms.
2009-02-23 14:28:26 +02:00
Tatiana A. Nurnberg
e30fa864a4 auto-merge 2009-02-23 13:14:17 +01:00
Tatiana A. Nurnberg
36d83ee251 auto-merge 2009-02-23 12:53:04 +01:00
Patrick Crews
eecf716a83 automerge 2009-02-20 08:40:28 -05:00
Andrei Elkin
c02752a005 Bug #37313 BINLOG Contains Incorrect server id
Signed integer format specifier forced to print the binlog header with server_id
negative if the unsigned value sets the sign-bit ON.
  
Fixed with correcting the specifier to correspond to typeof(server_id) == ulong.
2009-02-20 13:55:43 +02:00
Georgi Kodinov
39dc3623b3 Bug #42419: test suite fix
Moved the test case for the bug into a separate file (and restored the 
original innodb_mysql test setup).
Used the new wait_show_condition test macro to avoid the usage of sleep
2009-02-20 11:12:06 +02:00
Patrick Crews
ac46e34435 Bug#38831: 11 test cases fail on Windows due to missing commands
Re-enabling mysqlbinlog.test on Windows - removed the use of grep/sed
2009-02-19 16:35:29 -05:00
Patrick Crews
cc628c61fb Bug#38831: 11 test cases fail on Windows due to missing commands
Replaced Unix calls with mysql-test-run's built-in functions / SQL manipulation where possible.
Replaced error codes with error names as well.
Disabled two tests on Windows due to more complex Unix command usage
See Bug#41307, Bug#41308
2009-02-19 15:37:40 -05:00
Tatiana A. Nurnberg
f218f9f278 Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
2009-02-19 17:33:28 +01:00
Georgi Kodinov
759edca6ac merged bug 42419 to 5.0-bugteam 2009-02-19 18:26:19 +02:00
Georgi Kodinov
b2c161c192 Bug #42419: Server crash with "Pure virtual method called" on two concurrent
connections
The problem is that tables can enter open table cache for a thread without 
being properly cleaned up. This can happen if make_join_statistics() fails 
to read a const table because of e.g. a deadlock. It does set a member of 
TABLE structure to a value it allocates, but doesn't clean-up this setting 
on error nor does it set the rest of the members in JOIN to allow for 
automatic cleanup.
As a result when such an error occurs and the next statement depends re-uses 
the table from the open tables cache it will get it with this 
TABLE::reginfo.join_tab pointing to a memory area that's freed.
Fixed by making sure make_join_statistics() cleans up TABLE::reginfo.join_tab 
on error.
2009-02-19 17:30:03 +02:00
Sergey Glukhov
6a9de01a95 Bug#37601 Cast Is Not Done On Row Comparison
In case of ROW item each compared pair does not
check if argumet collations can be aggregated and
thus appropiriate item conversion does not happen.
The fix is to add the check and convertion for ROW
pairs.
2009-02-19 17:20:44 +04:00
Sergey Glukhov
7acaece2ba Bug#25830 SHOW TABLE STATUS behaves differently depending on table name(for 5.0 only)
replace wild_case_compare with my_wildcmp which is multibyte safe function
2009-02-17 18:22:48 +04:00
Alexey Kopytov
b615d8bcb4 Fixed PB failures on IA64 hosts introduced by the patch for bug #21205. 2009-02-15 12:26:08 +03:00
Alexey Kopytov
831914b848 Added missing DROP TABLE to type_float.result. 2009-02-14 20:12:14 +03:00
Alexey Kopytov
811ace8364 Fixed several test failures in the funcs_1 suite introduced by the patch for bug #21205. 2009-02-14 18:58:07 +03:00
Alexey Kopytov
c41a700550 Fixed bdb_gis and ndb_gis test failures in PB introduced by the patch for bug #21205. 2009-02-14 18:36:57 +03:00
Alexey Kopytov
9d21ff1148 Merge from dev tree. 2009-02-14 12:09:35 +03:00
Davi Arnaut
9cce8f40eb Remove test case for bug 40264.
Dirty close tricky does not work on Windows.
2009-02-13 17:26:20 -02:00
Alexey Kopytov
ccd5a4dc46 Merge from dev tree. 2009-02-13 19:17:07 +03:00
Matthias Leich
2a162ef3b1 Merge actual tree -> local GCA tree, no conflicts 2009-02-13 13:55:29 +01:00
Sergey Vojtovich
659a2183dd BUG#36737 - having + full text operator crashes mysql
MATCH() function accepts column list as an argument. It was possible to override
this requirement with aliased non-column select expression. Which results in
server crash.

With this fix aliased non-column select expressions are not accepted by MATCH()
function, returning an error.
2009-02-12 13:49:44 +04:00
Georgi Kodinov
4f0c557340 merged bug 33813 to 5.0-bugteam 2009-02-12 11:27:06 +02:00
Alexey Kopytov
a715b70278 Fix for bug #41868: crash or memory overrun with concat + upper,
date_format functions

String::realloc() did not check whether the existing string data fits in
the newly allocated buffer for cases when reallocating a String object
with external buffer (i.e.alloced == FALSE).  This could lead to memory
overruns in some cases.
2009-02-10 15:38:56 +03:00
Georgi Kodinov
b57c541425 Bug #33813: Schema names are case-sensitive in DROP FUNCTION
The parser was not using the correct fully-qualified-name
production for DROP FUNCTION.
Fixed by copying the production from DROP PROCEDURE.
Tested in the windows specific suite to make sure it's 
tested on a case-insensitive file system.
2009-02-10 11:58:19 +02:00
Matthias Leich
33445d8fb9 This belongs to the fix for
Bug#42003 tests missing the disconnect of connections <> default
second slice
Content:
1. wait_until_count_sessions.inc
   - One PB run of a test using this routine failed because
     5 seconds timeout were exceeded. Although I have some doubts
     if the assigned timeout was really too small, I increase the
     value to 10. We waste the additional 5 seconds only if the
     tests fails anyway.
   - Print the content of the PROCESSLIST if the poll routine fails
2. minor improvements of formatting
3. query_cache_notembedded:
   Activate the wait_until_count_sessions.inc routine which was
   unfortunately forgotten in the changeset before.
2009-02-09 21:52:40 +01:00
Matthias Leich
32bef0bc87 Merge of ifx into GCA tree
no conflicts
2009-02-09 12:44:01 +01:00
Tatiana A. Nurnberg
8cb7c9030f auto-merge 2009-02-06 18:47:54 +01:00
Tatiana A. Nurnberg
b16ad3bac2 Bug#42525: TIMEDIFF function
In 37553 we declared longlong results for
class Item_str_timefunc as per comments/docs,
but didn't add a method for that. And the
default just wasn't good enough for some
cases.

Changeset adds dedicated val_int() to class.
2009-02-06 18:25:08 +01:00
Alexey Kopytov
0a6c553510 Temporarily reverted patch for bug #41868 as it was causing problems in PB. 2009-02-06 12:51:11 +03:00
Matthias Leich
a63c2e5c30 2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Fixed tests:
  backup
  check
  compress
  grant
  information_schema
  multi_update
  overflow
  packet
  query_cache_not_embedded
  sp-threads
  subselect
  synchronization
  timezone_grant
2009-02-05 21:47:23 +01:00
Alexey Kopytov
e266164832 Merge to team tree. 2009-02-05 15:48:30 +03:00
Ramil Kalimullin
909d29ee05 Fix for bug#42014: Crash, name_const with collate
Problem: some queries using NAME_CONST(.. COLLATE ...)
lead to server crash due to failed type cast.

Fix: return the underlying item's type in case of
NAME_CONST(.. COLLATE ...) to avoid wrong casting.
2009-02-05 11:43:39 +04:00
Matthias Leich
f3e0950d86 Merge last changesets into tree, no conflicts 2009-02-04 16:34:28 +01:00
Sergey Vojtovich
8745e368b7 BUG#32047 - 'Spurious' errors while opening MERGE tables
Accessing well defined MERGE table may return an error
stating that the merge table is incorrectly defined. This
happens if MERGE child tables were accessed before and we
failed to open another incorrectly defined MERGE table in
this connection.

myrg_open() internally used my_errno as a variable for determining
failure, and thus could be tricked into a wrong decision by other
uses of my_errno.

With this fix we use function local boolean flag instead of my_errno
to determine failure.
2009-02-04 15:46:23 +04:00
Alexey Kopytov
887d1493fa Fix for bug #41868: crash or memory overrun with concat + upper, date_format
functions
      
String::realloc() did not check whether the existing string data fits in the newly
allocated buffer for cases when reallocating a String object with external buffer
(i.e.alloced == FALSE).  This could lead to memory overruns in some cases.
2009-02-03 20:19:01 +03:00
Patrick Crews
ed5ee58bfc Bug#39369: execution of "variables.test" with "check-testcases" show differences.
The original symptoms of this bug have been fixed as a consequence of other bug fixes.
Taking this time to correct some formatting, such as replacing error numbers with names.
Beginning this with 5.0
2009-02-02 17:30:02 -05:00
Matthias Leich
7da691c9f8 1. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements like
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Modifications according to the code review are included.
Fixed tests:
grant2
grant3
lock_tables_lost_commit
mysqldump
openssl_1
outfile
2009-02-02 22:20:25 +01:00
Tatiana A. Nurnberg
5622d4261f Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
2009-02-02 18:19:07 +01:00
Tatiana A. Nurnberg
d36d50f414 auto-merge 2009-01-31 02:07:36 +01:00
Tatiana A. Nurnberg
1fcf891629 Bug#41370: TIMESTAMP field does not accepts NULL from FROM_UNIXTIME()
When storing a NULL to a TIMESTAMP NOT NULL DEFAULT ...,
NULL returned from some functions threw a 'cannot be NULL error.'

NULL-returns now correctly result in the timestamp-field being
assigned its default value.
2009-01-30 17:12:24 +01:00
Gleb Shchepa
b41c1a45f1 Bug #39069: <row constructor> IN <table-subquery> seriously
messed up

"ROW(...) IN (SELECT ... FROM DUAL)" always returned TRUE.

Item_in_subselect::row_value_transformer rewrites "ROW(...)
IN SELECT" conditions into the "EXISTS (SELECT ... HAVING ...)"
form.
For a subquery from the DUAL pseudotable resulting HAVING
condition is an expression on constant values, so further
transformation with optimize_cond() eliminates this HAVING
condition and resets JOIN::having to NULL.
Then JOIN::exec treated that NULL as an always-true-HAVING
and that caused a bug.

To distinguish an optimized out "HAVING TRUE" clause from
"HAVING FALSE" we already have the JOIN::having_value flag.
However, JOIN::exec() ignored JOIN::having_value as described
above as if it always set to COND_TRUE.

The JOIN::exec method has been modified to take into account
the value of the JOIN::having_value field.
2009-01-28 22:46:45 +04:00
Alexey Kopytov
30ac49019d Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases 
depending on whether the text-based or prepared statements protocol is used for a query.

Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.

This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).
2009-01-28 20:59:08 +03:00
Davi Arnaut
d94e00a0ed Remove test case for bug 40264.
Dirty close tricky does not work on Windows.
2009-01-28 14:33:33 -02:00