Commit graph

40045 commits

Author SHA1 Message Date
Alexey Kopytov
1341ab2347 Attempt #2 to fix PB failures introduced by the patch for bug #44796.
Since max_allowed_packet is a read-only variable in 5.1 and up,
disable warnings to avoid unnecessary test case complication.
2009-05-21 21:50:17 +04:00
Alexey Kopytov
680964d896 Automerge. 2009-05-21 19:17:39 +04:00
Alexey Kopytov
6077086cb4 Fixed a PB failure introduced by the patch for bug #44796.
Set max_allowed_packet to get a consistent error message.
2009-05-21 19:14:56 +04:00
Alexey Kopytov
a46f4b31fc Automerge. 2009-05-21 16:15:25 +04:00
MySQL Build Team
ea603044d8 Updates to build with community features enabled for community builds. 2009-05-20 23:04:34 +02:00
Alexey Kopytov
85645fe3f6 Bug #44796: valgrind: too many my_longlong10_to_str_8bit
warnings after uncompressed_length 
 
UNCOMPRESSED_LENGTH() did not validate its argument. In 
particular, if the argument length was less than 4 bytes, 
an uninitialized memory value was returned as a result. 
 
Since the result of COMPRESS() is either an empty string or 
a 4-byte length prefix followed by compressed data, the bug was 
fixed by ensuring that the argument of UNCOMPRESSED_LENGTH() is 
either an empty string or contains at least 5 bytes (as done in 
UNCOMPRESS()). This is the best we can do to validate input 
without decompressing.
2009-05-20 12:30:06 +04:00
Sergey Glukhov
551e74c567 Bug#39793 Foreign keys not constructed when column has a '#' in a comment or default value
Internal InnoDN FK parser does not recognize '\'' as quotation symbol.
Suggested fix is to add '\'' symbol check for quotation condition
(dict_strip_comments() function).
2009-05-19 11:32:21 +05:00
Gleb Shchepa
8a39147a6a Bug#40825: Error 1356 while selecting from a view
with a "HAVING" clause though query works

SELECT from views defined like:

  CREATE VIEW v1 (view_column)
    AS SELECT c AS alias FROM t1 HAVING alias

fails with an error 1356:
  View '...' references invalid table(s) or column(s)
  or function(s) or definer/invoker of view lack rights
  to use them


CREATE VIEW form with a (column list) substitutes
SELECT column names/aliases with names from a
view column list.
However, alias references in HAVING clause was
not substituted.


The Item_ref::print function has been modified
to write correct aliased names of underlying
items into VIEW definition generation/.frm file.
2009-05-18 23:43:06 +05:00
Matthias Leich
edc19ca252 Merge of fix into GCA tree, no conflicts 2009-05-15 17:41:35 +02:00
Georgi Kodinov
3d94a6ba00 backported a change from 5.1 2009-05-15 16:13:54 +03:00
Georgi Kodinov
61eecfff6c merged 2009-05-15 16:12:31 +03:00
Georgi Kodinov
182bc3062c fixed a win32 compile error 2009-05-15 16:11:27 +03:00
Philip Stoev
847fc72f54 Bug #32651 grant_cache.test fails
It turns out that this test case no longer fails with the discrepancy
  in numbers that was the original cause for disabling this test (and showed
  potential genuine issues with the query cache). Therefore
  this test is being enabled after some minor adjustment of error codes and
  messages.
2009-05-15 13:06:11 +03:00
Matthias Leich
b82498dbe7 Fix for Bug#44826 main.information_schema_db could harm succeeding tests
Details:
1. Add missing "disconnect <session>"
2. Take care that the disconnects are finished when the test terminates
3. Replace error names by error numbers
4. Minor beautifying of script code
2009-05-15 11:59:31 +02:00
Joerg Bruehe
4317e3f9e0 Merge main 5.0 -> 5.0-build 2009-05-15 11:54:55 +02:00
Georgi Kodinov
803ce846a3 merged 5.0-main -> 5.0-bugteam 2009-05-15 12:29:41 +03:00
Alexey Kopytov
9a0e01d73e Automerge. 2009-05-15 12:54:40 +04:00
Alexey Kopytov
12f18228b4 Bug #44792: valgrind warning when casting from time to time
Field_time::get_time() did not initialize some members of 
MYSQL_TIME which led to valgrind warnings when those members 
were accessed in Protocol_simple::store_time(). 
 
It is unlikely that this bug could result in wrong data 
being returned, since Field_time::get_time() initializes the 
'day' member of MYSQL_TIME to 0, so the value of 'day' 
in Protocol_simple::store_time() would be 0 regardless 
of the values for 'year' and 'month'.
2009-05-15 12:16:00 +04:00
Sergey Glukhov
f024bde473 Bug#43612 crash with explain extended, union, order by
In UNION if we use last SELECT without braces and this
SELECT have ORDER BY clause, such clause belongs to
global UNION. It is parsed like last SELECT
part and used further as 'unit->global_parameters->order_list' value.
During DESCRIBE EXTENDED we call select_lex->print_order() for
last SELECT where order fields refer to tmp table 
which already freed. It leads to crash.
The fix is clean up global_parameters->order_list
instead of fake_select_lex->order_list.
2009-05-15 12:03:34 +05:00
Philip Stoev
1ae3d2ac68 Bugs #44871 and #43894:
UNIX sockets need to be on a path shorter than 70 characters on some older platofrms.
  MTRv1 tries to fix this by moving the socket to the $TMPDIR, however this causes
  issues with certain tests on Windows.

  Fixed by not applying any hacks on Windows - Windows does not need them.
2009-05-14 15:14:25 +03:00
Philip Stoev
d5fd4d4204 Bugs #44871 and #43894:
UNIX sockets need to be on a path shorter than 70 characters on some older platofrms.
MTRv1 tries to fix this by moving the socket to the $TMPDIR, however this causes
issues with certain tests on Windows.

Fixed by not applying any hacks on Windows - Windows does not need them.
2009-05-14 14:44:47 +03:00
Ramil Kalimullin
17c6fc2db5 Fix for bug#44774 merged. 2009-05-13 09:21:38 +05:00
Jim Winstead
6cbe3ef3f9 Merge from 5.0-bugteam 2009-05-12 14:20:33 -07:00
Chad MILLER
1a1b16719d Remove community-server only feature and place in its own test
with appropriate condition.
2009-05-12 09:14:23 -04:00
Daniel Fischer
26a5cc064e merge bug#42888 2009-05-12 13:09:16 +02:00
Ramil Kalimullin
ae8348c249 Fix for bug#44774: load_file function produces valgrind warnings
Problem: using LOAD_FILE() in some cases we pass a file name string
without a trailing '\0' to fn_format() which relies on that however.
That may lead to valgrind warnings.

Fix: add a trailing '\0' to the file name passed to fn_format().
2009-05-12 13:18:27 +05:00
Chad MILLER
9dadda803c Merge with trunk. 2009-05-11 14:42:43 -04:00
Chad MILLER
f72ddaebbf Fix improperly-protected variable definition and use.
Also, add CPP so Windows works properly for profiling. Community-server
functionality is required.
2009-05-11 10:00:03 -04:00
Ramil Kalimullin
0781a30262 Fix for bug#42009: SELECT into variable gives different results to direct SELECT
Problem: storing "SELECT ... INTO @var ..." results in variables we used val_xxx()
methods which returned results of the current row. 
So, in some cases (e.g. SELECT DISTINCT, GROUP BY or HAVING) we got data
from the first row of a new group (where we evaluate a clause) instead of
data from the last row of the previous group.

Fix: use val_xxx_result() counterparts to get proper results.
2009-05-10 20:50:14 +05:00
Kent Boortz
48e7641f69 Use /usr/bin/perl as standard Perl install path (bug#44643) 2009-05-09 23:43:48 +02:00
Joerg Bruehe
f949a76093 Merge from main 5.0 (again) into 5.0-build - just version number change. 2009-05-08 22:41:48 +02:00
Joerg Bruehe
7aa284ebc3 Merge main 5.0 into 5.0-build 2009-05-08 22:16:06 +02:00
Alexey Kopytov
203f2178f6 Automerge. 2009-05-08 21:58:39 +04:00
Alexey Kopytov
0f40402fc2 Automerge. 2009-05-08 21:48:51 +04:00
karen.langford@sun.com
fa7b5814f6 Raise version number after cloning 5.0.82 2009-05-07 21:42:19 +02:00
Jim Winstead
71cbbff7de The get_date() function in mysys interpreted the GETDATE_GMT option
backwards, which resulted in the incorrect time being reported at the
end of mysqldump. (Bug #44424, patch by Andrew Hutchings)
2009-05-07 11:17:07 -07:00
Daniel Fischer
4c775c8d91 merge 5.0.81 into 5.0 2009-05-07 20:07:14 +02:00
Jim Winstead
0ba8aa103e Fix support for -i (--ignore-spaces) in the mysql command line application,
which didn't actually do anything. (Bug #39101)
2009-05-07 10:28:29 -07:00
Alexey Kopytov
025ca02f28 Bug #41943: mysqlbinlog.exe crashes if --hexdump option is used
The --hexdump option crashed mysqlbinlog when used together  
with the --read-from-remote-server option due to use of  
uninitialized memory.  
  
Since Log_event::print_header() relies on temp_buf to be  
initialized when the --hexdump option is present,  
dump_remote_log_entries() was fixed to setup temp_buf to point  
to the start of a binlog event as done in  
dump_local_log_entries().  
 
The root cause of this bug is identical to the one for 
bug #17654. The latter was fixed in 5.1 and up, so this 
patch is backport of the patches for bug #17654 to 5.0. 
 
Only 5.0 needs a changelog entry.
2009-05-07 18:31:02 +04:00
Bernt M. Johnsen
975364adf3 Bug 23471 merged from GCA and prepared for push 2009-05-07 08:57:27 +02:00
Chad MILLER
128afdc3e5 Merge community up to enterprise, thus ending the community-server
adventure.
2009-05-06 09:06:32 -04:00
Anurag Shekhar
0a6cf9ed5a merging with local fix. 2009-05-06 14:59:10 +05:30
Anurag Shekhar
81de724743 Bug #39918 memory (heap) engine crashing with b-tree index and DELETE
with seg fault

Multiple-table DELETE from a table joined to itself may cause
server crash. This was originally discovered with MEMORY engine,
but may affect other engines with different symptoms.

The problem was that the server violated SE API by performing
parallel table scan in one handler and removing records in
another (delete on the fly optimization).
2009-05-06 13:37:10 +05:30
Chad MILLER
9d58239dea Pull 5.1 treatment of community features into 5.0. 2009-05-05 17:03:23 -04:00
Davi Arnaut
0f95bd3105 Merge from 5.0-pe-stage into main. 2009-05-05 20:41:58 +02:00
Bernt M. Johnsen
2fd7330c2e Bug#23471 prepared for commit in 5.0 gca branch 2009-05-05 11:07:11 +02:00
timothy.smith@sun.com
8a219e395c Merge from mysql-5.0.80-release 2009-05-01 19:43:27 +02:00
MySQL Build Team
2d867420eb merge in small portability tweaks from 5.0.80 2009-05-01 19:37:23 +02:00
MySQL Build Team
6d1d03f78d A few portability tweaks for Netware, SCO and QNX 2009-05-01 19:35:04 +02:00
Gleb Shchepa
480fac6107 Bug #37362: Crash in do_field_eq
EXPLAIN EXTENDED of nested query containing a error:

   1054 Unknown column '...' in 'field list'

may cause a server crash.


Parse error like described above forces a call to
JOIN::destroy() on malformed subquery.
That JOIN::destroy function closes and frees temporary
tables. However, temporary fields of these tables
may be listed in st_select_lex::group_list of outer
query, and that st_select_lex may not cleanup them
properly. So, after the JOIN::destroy call that
st_select_lex::group_list may have Item_field
objects with dangling pointers to freed temporary
table Field objects. That caused a crash.
2009-05-01 00:20:37 +05:00