Commit graph

57322 commits

Author SHA1 Message Date
Sergey Glukhov
2b373758af 5.0-bugteam->5.1-bugteam merge 2009-05-19 11:48:04 +05: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
Ramil Kalimullin
a3b26f1aa6 Fix for bug#44860: ALTER TABLE on view crashes server
Problem: executing queries like "ALTER TABLE view1;" we don't
check new view's name (which is not specified),
that leads to server crash.

Fix: do nothing (to be consistent with the behaviour for tables) 
in such cases.
2009-05-19 09:25:36 +05:00
Gleb Shchepa
7bd64afe8a manual merge 5.0-bugteam --> 5.1-bugteam (bug 40825) 2009-05-19 00:51:52 +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
Patrick Crews
189f8ebd97 Bug#44920 - MTR2 is not processing master.opt input properly on Windows
Disabling these two tests as they are affected by this bug / causing PB2 failures
on Windows platforms.  Can always disable via include/not_windows.inc if
the bug fix looks like it will take some time.
2009-05-18 12:53:06 -04:00
Kristofer Pettersson
c26f77fba1 Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors
Fixed start up options for test case "rpl_ndb_2other-slave" to match
the changed behavior for plugin options.
2009-05-18 13:39:13 +02:00
Kristofer Pettersson
f385c603b6 Automerge 2009-05-18 10:35:44 +02:00
Kristofer Pettersson
9c4eb2910b Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors
convert_dash_to_underscore was supplied with a character length containing
my byte too many which caused valgrind errors of invalid read.
2009-05-18 10:10:30 +02:00
Gleb Shchepa
9cc4cb0ea1 Bug #44768: SIGFPE crash when selecting rand from a view containing null
The RAND(N) function where the N is a field of "constant" table
(table of single row) failed with a SIGFPE.

Evaluation of RAND(N) rely on constant status of its argument.
Current server "seeded" random value for each constant argument
only once, in the Item_func_rand::fix_fields method.
Then the server skipped a call to seed_random() in the
Item_func_rand::val_real method for such constant arguments.

However, non-constant state of an argument may be changed
after the call to fix_fields, if an argument is a field of
"constant" table. Thus, pre-initialization of random value
in the fix_fields method is too early.


Initialization of random value by seed_random() has been
removed from Item_func_rand::fix_fields method.
The Item_func_rand::val_real method has been modified to
call seed_random() on the first evaluation of this method
if an argument is a function.
2009-05-18 09:21:25 +05:00
Kristofer Pettersson
0b608e98bb Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors
Fix bug in mtr_cases.pm script visible only when InnoDB isn't configured.
2009-05-17 22:16:21 +02:00
Narayanan V
162fa0059d Bug#44856 IBMDB2I gives misleading 2504 error
Occasionally, if both the partition_pruning
and partition_range tests are run sequentially
against the IBMDB2I engine, the partition_range
test will fail.

Compiler padding on a 64-bit build allowed
garbage data in the hash key used for
caching open iconv descriptors. As a
result, cached descriptors were not found,
and multiple duplicate iconv descriptors
were opened for a single character set.
Eventually, the maximum number of open
iconv descriptors was reached, and further
iconv_open() calls would fail, leading the
storage engine to report incorrectly that
the character set was not supported.

This patch widens the 16-bit members of the
hash key to 32 bits to eliminate compiler
padding. The entire length of the hash key
is now initialized correctly on both 32-bit
and 64-bit builds.
2009-05-17 22:50:20 +05:30
Narayanan V
ca3dbc91ed Bug#44610 RCDFMT clause requested when creating DB2 table
In order to better support the usage of
IBMDB2I tables from within RPG programs,
the storage engine should ensure that the
RCDFMT name is consistent and predictable
for DB2 tables.

This patch appends a "RCDFMT <name>"
clause to the CREATE TABLE statement
that is passed to DB2.  <name> is
generated from the original name of
the table itself. This ensures a
consistent and deterministic mapping
from the original table.

For the sake of simplicity only
the alpha-numeric characters are
preserved when generating the new
name, and these are upper-cased;
other characters are replaced with
an underscore (_). Following DB2
system identifier rules, the name
always begins with an alpha-character
and has a maximum of ten characters.
If no usable characters are found in
the table name, the name X is used.
2009-05-17 21:55:23 +05:30
Jim Winstead
0e02df4ded Merge from 5.1-bugteam 2009-05-15 10:40:51 -07:00
Jim Winstead
5096add301 Fix syntax in test to eliminate failure on Windows. 2009-05-15 10:36:59 -07:00
Matthias Leich
27d0639c8d Merge 5.0 -> 5.1 of fix for bug 44826 2009-05-15 17:47:50 +02:00
Matthias Leich
edc19ca252 Merge of fix into GCA tree, no conflicts 2009-05-15 17:41:35 +02:00
Georgi Kodinov
aba958e6e3 fixed a compile warning in 5.1-bugteam 2009-05-15 16:40:09 +03:00
Georgi Kodinov
87363a1b68 merge 2009-05-15 16:25:29 +03: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
Georgi Kodinov
2d8d779f83 merged 5.1-main -> 5.1-bugteam 2009-05-15 16:03:22 +03:00
Georgi Kodinov
5bd8b90f98 merged 5.0-main -> 5.1-main 2009-05-15 15:57:51 +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
Georgi Kodinov
803ce846a3 merged 5.0-main -> 5.0-bugteam 2009-05-15 12:29:41 +03:00
Kristofer Pettersson
a6b599b575 Automerge 2009-05-15 11:23:23 +02:00
Alexey Kopytov
ec3c47485c Automerge. 2009-05-15 12:56:37 +04:00
Alexey Kopytov
8a5af4526e Automerge. 2009-05-15 12:55:01 +04:00
Alexey Kopytov
9a0e01d73e Automerge. 2009-05-15 12:54:40 +04:00
Alexey Kopytov
3c87aeeff0 Automerge. 2009-05-15 12:42:57 +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
Joerg Bruehe
111ec435ba Fix a bad merge:
Remove a cast (which shouldn't have got here anyway)
which might lose significant bits beyond 4 GB RAM.
2009-05-15 09:53:50 +02:00
Kristofer Pettersson
d9dc2c3d9b Auto merge 2009-05-15 09:36:42 +02:00
Sergey Glukhov
fc531ed45d 5.0-bugteam->5.1-bugteam merge 2009-05-15 12:11:07 +05: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
52973c14c9 null merge. fix not applicable to 5.1 2009-05-14 15:37:00 +03: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
Kristofer Pettersson
8b39abe245 Bug#19027 MySQL 5.0 starts even with Fatal InnoDB errors
It is not possible to prevent the server from starting if a mandatory
built-in plugin fails to start. This can in some cases lead to data
corruption when the old table name space suddenly is used by a different
storage engine.

A boolean command line option in the form of --foobar is automatically
created for every existing plugin "foobar". By changing this command line
option from a boolean to a tristate { OFF, ON, FORCE } it is possible to
specify the plugin loading policy for each plugin.

The behavior is specified as follows:
   OFF   = Disable the plugin and start the server
   ON    = Enable the plugin and start the server even if an error occurrs
           during plugin initialization.
   FORCE = Enable the plugin but don't start the server if an error occurrs
           during plugin initialization.
2009-05-14 14:03:33 +02:00
Luis Soares
554605ce95 merge: 5.1-bt local bug fix branch --> 5.1-bt up-to-date. 2009-05-14 12:51:03 +01: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
Narayanan V
32aa8d01df merging with mysql-5.1-bugteam 2009-05-14 17:00:03 +05:30
Jonathan Perkin
28183ac3a9 Raise version number after cloning 5.1.35 2009-05-14 13:07:11 +02:00
Narayanan V
bc5b4c2e89 Bug#44232 Error msg should be improved when collation not supported.
checking in a test case that will reproduce
the error on v5r4.
2009-05-14 16:05:09 +05:30
Anurag Shekhar
a4fba5727a merging with fix for compiler warnings. 2009-05-14 11:45:43 +05:30
Ramil Kalimullin
5ae7b25792 Auto-merge. 2009-05-13 23:39:35 +05:00
Jim Winstead
9312174fc0 Merge from 5.1-bugteam 2009-05-13 08:56:34 -07:00
Jim Winstead
2e7cdfd3e7 Merge from 5.0-bugteam 2009-05-13 08:48:00 -07:00
Martin Hansson
d430002673 Merge. 2009-05-13 17:24:27 +02:00