Commit graph

1224 commits

Author SHA1 Message Date
Ole John Aske
003e87fef0 Fix for bug#58818: Incorrect result for IN/ANY subquery
If the ::single_value_transformer() find an existing HAVING condition it used
to do the transformation:
            
  1) HAVING cond -> (HAVING Cond) AND (cond_guard (Item_ref_null_helper(...))
      
As the AND condition in 1) is Mc'Carty evaluated, the
right side of the AND cond should be executed only if the 
original 'HAVING evaluated' to true.
      
However, as we failed to set 'top_level' for the tranformed HAVING condition,
'abort_on_null' was FALSE after transformation. An
UNKNOWN having condition will then not terminate evaluation of the
transformed having condition, and we incorrectly continued
into the Item_ref_null_helper() part.
2011-01-12 13:15:22 +01:00
Michael Widenius
050c004f5e Merge with 5.1
Fixes to get Aria handler tests to work.
Fixes LP#697597 "HANDLER + Aria asserts in maria-5.3-handler"
2011-01-11 15:36:41 +02:00
Igor Babaev
efbb3c6c90 Fixed LP bug #639935 (bug #58727).
When the optimizer creates items out of other items it does
not have to call the fix_fields method. Usually in these
cases it calls quick_fix_field() that just marks the 
created item as fixed. If the created item is an Item_func
object then calling quick_fix_field() works fine if the
arguments of the created functional item are already fixed.
Otherwise some unfixed nodes remain in the item tree and
it triggers an assertion failure whenever the item is 
evaluated.

Fixed the problem by making the method quick_fix_field
virtual and providing an implementation for the class
Item_func objects that recursively calls the method
for unfixed arguments of any functional item.
2010-12-24 15:30:23 -08:00
Michael Widenius
b7b25dc666 Merge with 5.1-release.
- Fixed problem with oqgraph and 'make dist'

Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024).
This will be fixed when mwl#128 is merged into 5.3.
2010-12-06 10:25:44 +02:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
unknown
34c8930c09 Fix of LP BUG#675248.
Registration of pointer change if we assign it to other pointer which should be identical after statement execution (PS/SP).

mysql-test/r/subselect.result:
  Test suite.
mysql-test/t/subselect.test:
  Test suite.
sql/sql_class.cc:
  The procedure of the pointer registration.
sql/sql_class.h:
  The procedure of the pointer registration.
sql/sql_lex.cc:
  Registration of pointer change if we assign it to other pointer which should be identical after statement execution (PS/SP).
2010-11-23 20:43:34 +02:00
Oystein Grovlen
bb356127a3 Bug#57704 Cleanup code dies with void TABLE::set_keyread(bool): Assertion `file' failed.
This bug was introduced in this revision: 
kostja@sun.com-20100727102553-b4n2ojcyfj79l2x7
("A pre-requisite patch for the fix for Bug#52044.")

It happens because close_thread_tables() is now called in
open_and_lock_tables upon failure.  Hence, table is no longer
open when optimizer tries to do cleanup.

Fix: Make sure to do cleanup in st_select_lex_unit::prepare()
upon failure. This way, cleanup() is called before tables are
released.

mysql-test/r/subselect.result:
  Added test case for Bug#57704.
mysql-test/t/subselect.test:
  Added test case for Bug#57704.
sql/sql_union.cc:
  st_select_lex_unit::prepare():  On failure, make sure cleanup()
  is called.
2010-11-10 15:48:29 +01:00
Oystein Grovlen
117c19c262 Bug#57704 Cleanup code dies with void TABLE::set_keyread(bool): Assertion `file' failed.
This bug was introduced in this revision: 
kostja@sun.com-20100727102553-b4n2ojcyfj79l2x7
("A pre-requisite patch for the fix for Bug#52044.")

It happens because close_thread_tables() is now called in
open_and_lock_tables upon failure.  Hence, table is no longer
open when optimizer tries to do cleanup.

Fix: Make sure to do cleanup in st_select_lex_unit::prepare()
upon failure. This way, cleanup() is called before tables are
released.
2010-11-10 15:48:29 +01:00
Sergey Glukhov
50a3c55ee7 Bug#52711 Segfault when doing EXPLAIN SELECT with union...order by (select... where...)
backport from 5.1


mysql-test/r/subselect.result:
  backport from 5.1
mysql-test/t/subselect.test:
  backport from 5.1
sql/sql_select.cc:
  backport from 5.1
2010-11-08 13:51:39 +03:00
Sergey Glukhov
b318882949 Bug#52711 Segfault when doing EXPLAIN SELECT with union...order by (select... where...)
backport from 5.1
2010-11-08 13:51:39 +03:00
Sergey Petrunya
6765cc3017 # No BUG#, a case brought from 5.2's innodb_mysql_lock.test
- Fix a crash in nested semi-join subquery processing
2010-10-18 12:55:26 +04:00
Sergey Petrunya
72dd7575cd Merge 5.2->5.3
- Re-commit Monty's merge, partially fixed by Igor and SergeyP, 
  but still broken
2010-10-10 17:18:11 +03:00
Michael Widenius
e0a6b02c5d Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
2010-08-02 12:01:24 +03:00
Sergey Petrunya
27f9fc063c MariaDB 5.2 -> MariaDB 5.3 merge 2010-06-26 14:05:41 +04:00
Georgi Kodinov
dbd40508f0 merge 2010-06-25 16:32:47 +03:00
Georgi Kodinov
5e0aaa2613 merge 2010-06-25 16:32:47 +03:00
unknown
b1e00b6be8 Merge MySQL 5.1.46 into MariaDB.
Still two test failures to be solved: main.myisam and main.subselect.
2010-04-28 14:52:24 +02:00
Georgi Kodinov
93013ae630 Bug #52711: Segfault when doing EXPLAIN SELECT with
union...order by (select... where...)

The problem is mysql is trying to materialize and 
cache the scalar sub-queries at JOIN::optimize
even for EXPLAIN where the number of columns is 
totally different from what's expected.
Fixed by not executing the scalar subqueries 
for EXPLAIN.
2010-04-15 17:04:24 +03:00
Georgi Kodinov
a8ae3cd6e9 Bug #52711: Segfault when doing EXPLAIN SELECT with
union...order by (select... where...)

The problem is mysql is trying to materialize and 
cache the scalar sub-queries at JOIN::optimize
even for EXPLAIN where the number of columns is 
totally different from what's expected.
Fixed by not executing the scalar subqueries 
for EXPLAIN.
2010-04-15 17:04:24 +03:00
Alexey Kopytov
b1ae675d5b Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in storage/myisam/mi_delete_table.c
2010-04-03 21:55:04 +04:00
Alexey Kopytov
cab4a776d8 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in storage/myisam/mi_delete_table.c
2010-04-03 21:55:04 +04:00
Anurag Shekhar
ab8ff15cd1 Bug #47904 Incorrect results w/ table subquery, derived SQs, and LEFT JOIN
on index

'my_decimal' class has two members which can be used to access the 
value. The member variable buf (inherited from parent class decimal_t) 
is set to member variable buffer so that both are pointing to same value.

Item_copy_decimal::copy() uses memcpy to clone 'my_decimal'. The member
buffer is declared as an array and memcpy results in copying the values
of the array, but the inherited member buf, which should be pointing at
the begining of the array 'buffer' starts pointing to the begining of 
buffer in original object (which is being cloned). Further updates on 
'my_decimal' updates only the inherited member 'buf' but leaves 
buffer unchanged.

Later when the new object (which now holds a inconsistent value) is cloned
again using proper cloning function 'my_decimal2decimal' the buf pointer
is fixed resulting in loss of the current value.

Using my_decimal2decimal instead of memcpy in Item_copy_decimal::copy()
fixed this problem.


mysql-test/r/subselect.result:
  Updated result file after addding test case for bug#47904.
mysql-test/t/subselect.test:
  Added test case for bug#47904.
sql/item.cc:
  Memcopy shouldn't be used to clone my_decimal. Use my_decimal2decimal
  instead.
2010-04-02 01:35:36 +05:30
Anurag Shekhar
92a4196045 Bug #47904 Incorrect results w/ table subquery, derived SQs, and LEFT JOIN
on index

'my_decimal' class has two members which can be used to access the 
value. The member variable buf (inherited from parent class decimal_t) 
is set to member variable buffer so that both are pointing to same value.

Item_copy_decimal::copy() uses memcpy to clone 'my_decimal'. The member
buffer is declared as an array and memcpy results in copying the values
of the array, but the inherited member buf, which should be pointing at
the begining of the array 'buffer' starts pointing to the begining of 
buffer in original object (which is being cloned). Further updates on 
'my_decimal' updates only the inherited member 'buf' but leaves 
buffer unchanged.

Later when the new object (which now holds a inconsistent value) is cloned
again using proper cloning function 'my_decimal2decimal' the buf pointer
is fixed resulting in loss of the current value.

Using my_decimal2decimal instead of memcpy in Item_copy_decimal::copy()
fixed this problem.
2010-04-02 01:35:36 +05:30
Sergey Petrunya
7df026676b Merge MariaDB-5.2 -> MariaDB 5.3 2010-03-20 15:01:47 +03:00
unknown
3d2a74609a MWL#68 Subquery optimization: Efficient NOT IN execution with NULLs
This patch does three things:
- It adds the possibility to force the execution of top-level [NOT] IN
  subquery predicates via the IN=>EXISTS transformation. This is done by
  setting both optimizer switches partial_match_rowid_merge and
  partial_match_table_scan to "off".
- It adjusts all test cases where the complete optimizer_switch is
  selected because now we have two more switches.
- For those test cases where the plan changes because of the new available
  strategies, we switch off both partial match strategies in order to
  force the "old" IN=>EXISTS strategy. This is done because most of these
  test cases specifically test bugs in this strategy.

sql/opt_subselect.cc:
  Adds the possibility to force the execution of top-level [NOT] IN
  subquery predicates via the IN=>EXISTS transformation. This is done by
  setting both optimizer switches partial_match_rowid_merge and
  partial_match_table_scan to "off".
2010-03-11 23:43:31 +02:00
unknown
4bf849c23c Merge MySQL 5.1.44 into MariaDB. 2010-03-04 09:03:07 +01:00
Alexander Nozdrin
b3018e8613 Manual merge from mysql-trunk-merge.
Conflicts:
  - client/mysql.cc
  - client/mysqldump.c
  - configure.in
  - mysql-test/r/csv.result
  - mysql-test/r/func_time.result
  - mysql-test/r/show_check.result
  - mysql-test/r/sp-error.result
  - mysql-test/r/sp.result
  - mysql-test/r/sp_trans.result
  - mysql-test/r/type_blob.result
  - mysql-test/r/type_timestamp.result
  - mysql-test/r/warnings.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - sql/mysql_priv.h
  - sql/mysqld.cc
  - sql/sp.cc
  - sql/sql_base.cc
  - sql/sql_table.cc
  - sql/sql_trigger.cc
  - sql/sql_view.cc
  - sql/table.h
  - sql/share/errmsg.txt
  - mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
2010-02-24 16:52:27 +03:00
Alexander Nozdrin
04b8cb1882 Manual merge from mysql-trunk-merge.
Conflicts:
  - client/mysql.cc
  - client/mysqldump.c
  - configure.in
  - mysql-test/r/csv.result
  - mysql-test/r/func_time.result
  - mysql-test/r/show_check.result
  - mysql-test/r/sp-error.result
  - mysql-test/r/sp.result
  - mysql-test/r/sp_trans.result
  - mysql-test/r/type_blob.result
  - mysql-test/r/type_timestamp.result
  - mysql-test/r/warnings.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - sql/mysql_priv.h
  - sql/mysqld.cc
  - sql/sp.cc
  - sql/sql_base.cc
  - sql/sql_table.cc
  - sql/sql_trigger.cc
  - sql/sql_view.cc
  - sql/table.h
  - sql/share/errmsg.txt
  - mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
2010-02-24 16:52:27 +03:00
Alexander Nozdrin
f928e0b03d Auto-merge from mysql-trunk-merge. 2010-01-28 00:32:29 +03:00
Alexander Nozdrin
8107f41725 Auto-merge from mysql-trunk-merge. 2010-01-28 00:32:29 +03:00
Sergey Petrunya
085e8b6935 Subquery optimizations, backport to 5.3:
- Fix valgrind failure
- Test result fixes (not finished)
2010-01-17 23:52:20 +03:00
Sergey Petrunya
b83cb52e9e Backport of subquery optimizations to 5.3.
There are still test failures because of:
- Wrong query results in outer join + semi join
- EXPLAIN output differences
2010-01-17 17:51:10 +03:00
Georgi Kodinov
d2f61748cd Bug #49512 : subquery with aggregate function crash
subselect_single_select_engine::exec()

When a subquery doesn't need to be evaluated because
it returns only aggregate functions and these aggregates
can be calculated from the metadata about the table it
was not updating all the relevant members of the JOIN 
structure to reflect that this is a constant query.
This caused problems to the enclosing subquery 
('<> SOME' in the test case above) trying to read some
data about the tables.

Fixed by setting const_tables to the number of tables 
when the SELECT is optimized away.
2009-12-23 17:11:22 +02:00
Georgi Kodinov
2fa49930ca revert of the fix for bug #45989: pushed by mistake. 2010-01-19 14:48:41 +02:00
Georgi Kodinov
5ba1dd0474 Bug #45989 take 2 : memory leak after explain encounters an
error in the query.

Fixes a leak after materializing a GROUP BY subquery to a 
temp table when the subquery has a blob column in the SELECT
list.
Fixed by correctly destructing temporary buffers after doing
the conversion.
2010-01-18 17:50:46 +02:00
Georgi Kodinov
c968fd4818 Bug #49512 : subquery with aggregate function crash
subselect_single_select_engine::exec()

When a subquery doesn't need to be evaluated because
it returns only aggregate functions and these aggregates
can be calculated from the metadata about the table it
was not updating all the relevant members of the JOIN 
structure to reflect that this is a constant query.
This caused problems to the enclosing subquery 
('<> SOME' in the test case above) trying to read some
data about the tables.

Fixed by setting const_tables to the number of tables 
when the SELECT is optimized away.
2009-12-23 17:11:22 +02:00
Georgi Kodinov
f79e182a9c revert of the fix for bug #45989: pushed by mistake. 2010-01-19 14:48:41 +02:00
Georgi Kodinov
a3b4065d90 Bug #45989 take 2 : memory leak after explain encounters an
error in the query.

Fixes a leak after materializing a GROUP BY subquery to a 
temp table when the subquery has a blob column in the SELECT
list.
Fixed by correctly destructing temporary buffers after doing
the conversion.
2010-01-18 17:50:46 +02:00
Georgi Kodinov
a89d88dc0a Bug #45989 take 2 : memory leak after explain encounters an
error in the query.

Fixes a leak after materializing a GROUP BY subquery to a 
temp table when the subquery has a blob column in the SELECT
list.
Fixed by correctly destructing temporary buffers for re-usable
queries
2010-02-02 18:30:23 +02:00
Georgi Kodinov
0569a827ea Bug #45989 take 2 : memory leak after explain encounters an
error in the query.

Fixes a leak after materializing a GROUP BY subquery to a 
temp table when the subquery has a blob column in the SELECT
list.
Fixed by correctly destructing temporary buffers for re-usable
queries
2010-02-02 18:30:23 +02:00
Alexander Nozdrin
5f0c09dd72 Manual merge from mysql-trunk-merge.
Conflicts:
  - include/my_no_pthread.h
  - mysql-test/r/sp-ucs2.result
  - sql/log.cc
  - sql/sql_acl.cc
  - sql/sql_yacc.yy
2009-12-16 21:02:21 +03:00
Alexander Nozdrin
09942fe8e8 Manual merge from mysql-trunk-merge.
Conflicts:
  - include/my_no_pthread.h
  - mysql-test/r/sp-ucs2.result
  - sql/log.cc
  - sql/sql_acl.cc
  - sql/sql_yacc.yy
2009-12-16 21:02:21 +03:00
Georgi Kodinov
b72f278958 Bug #48709: Assertion failed in sql_select.cc:11782:
int join_read_key(JOIN_TAB*)

The eq_ref access method TABLE_REF (accessed through 
JOIN_TAB) to save state and to track if this is the 
first row it finds or not.
This state was not reset on subquery re-execution
causing an assert.

Fixed by resetting the state before the subquery 
re-execution.
2009-12-15 19:10:06 +02:00
Georgi Kodinov
8d329aa720 Bug #48709: Assertion failed in sql_select.cc:11782:
int join_read_key(JOIN_TAB*)

The eq_ref access method TABLE_REF (accessed through 
JOIN_TAB) to save state and to track if this is the 
first row it finds or not.
This state was not reset on subquery re-execution
causing an assert.

Fixed by resetting the state before the subquery 
re-execution.
2009-12-15 19:10:06 +02:00
Georgi Kodinov
188c6f8c74 Bug #48709: Assertion failed in sql_select.cc:11782:
int join_read_key(JOIN_TAB*)

The eq_ref access method TABLE_REF (accessed through 
JOIN_TAB) to save state and to track if this is the 
first row it finds or not.
This state was not reset on subquery re-execution
causing an assert.

Fixed by resetting the state before the subquery 
re-execution.
2009-12-15 14:20:29 +02:00
Georgi Kodinov
82e6ae0ff1 Bug #48709: Assertion failed in sql_select.cc:11782:
int join_read_key(JOIN_TAB*)

The eq_ref access method TABLE_REF (accessed through 
JOIN_TAB) to save state and to track if this is the 
first row it finds or not.
This state was not reset on subquery re-execution
causing an assert.

Fixed by resetting the state before the subquery 
re-execution.
2009-12-15 14:20:29 +02:00
Martin Hansson
3937a79886 merge of Bug#33204 (backport) 2009-11-20 13:29:43 +01:00
Martin Hansson
ca59582149 merge of Bug#33204 (backport) 2009-11-20 13:29:43 +01:00
unknown
a962160eec Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.

This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
2009-11-16 21:49:51 +01:00
Martin Hansson
70c7e936db Backport of Bug#33204 from mysql-pe to
mysql-next-mr-bugfixing.

Bug no 32858 was fixed in two different ways in what was
then called mysql 5.1 and 6.0. The fix in 6.0 was very
different since bugfix no 33204 was present.  Furthermore,
the two fixes were not compatible. Hence in order to
backport Bug#33204 to the 5.1-based mysql-next-mr-bugfixing,
it was necessary to remove the 5.1 fix of 32858 and apply
the 6.0 version of the fix.


mysql-test/r/subselect.result:
  Bug#33204-backport: Test result
mysql-test/r/union.result:
  
  Bug#33204-backport:
  - Reversal of test result: bugfix no 32858 for 5.1
  - Application of test result: bugfix no 32858 for 6.0
mysql-test/t/subselect.test:
  Bug#33204-backport: 
  - Changed tests
  - Test case
mysql-test/t/union.test:
  Bug#33204-backport:
  - Reversal of test: bugfix no 32858 for 5.1
  - Application of test: bugfix no 32858 for 6.0
sql/sql_class.cc:
  Bug#33204-backport: Reversal of bugfix no 32858 for 5.1
sql/sql_class.h:
  Bug#33204-backport: Reversal of bugfix no 32858 for 5.1
sql/sql_yacc.yy:
  Bug#33204-backport:
  - Reversal of bugfix no 32858 for 5.1
  - Application of bugfix no 32858 for 6.0
  - Application of bugfix no 33204
2009-11-10 13:52:46 +01:00
Martin Hansson
b4a3083dc8 Backport of Bug#33204 from mysql-pe to
mysql-next-mr-bugfixing.

Bug no 32858 was fixed in two different ways in what was
then called mysql 5.1 and 6.0. The fix in 6.0 was very
different since bugfix no 33204 was present.  Furthermore,
the two fixes were not compatible. Hence in order to
backport Bug#33204 to the 5.1-based mysql-next-mr-bugfixing,
it was necessary to remove the 5.1 fix of 32858 and apply
the 6.0 version of the fix.
2009-11-10 13:52:46 +01:00
unknown
ad368a2b54 Merge Mysql 5.1.39 merge into MariaDB trunk 2009-11-06 18:22:32 +01:00
Alexander Nozdrin
5bbacc5214 Manual merge from mysql-5.1. 2009-11-05 12:23:55 +03:00
Alexander Nozdrin
e6fffedb27 Manual merge from mysql-5.1. 2009-11-05 12:23:55 +03:00
Kristofer Pettersson
cafe3c7fca automerge 2009-11-03 17:23:05 +01:00
Kristofer Pettersson
cea642e32b Moved test case for bug 31157 from query_cache.test to subselect.test 2009-11-03 17:18:43 +01:00
Kristofer Pettersson
4b7a8a294b Moved test case for bug 31157 from query_cache.test to subselect.test 2009-11-03 17:18:43 +01:00
Georgi Kodinov
1e7fb59272 merge 2009-10-30 11:56:32 +02:00
Georgi Kodinov
e8c608fe72 merge 2009-10-30 11:56:32 +02:00
Georgi Kodinov
851e250953 Bug #48293: crash with procedure analyse, view with > 10 columns,
having clause...

The fix for bug 46184 was not very complete. It was not covering
views using temporary tables and multiple tables in a FROM clause.
Fixed by reverting the fix for 46184 and making a more general
check that is checking at the right execution stage and for all
of the non-supported cases.
Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden.
Updated the analyse.test and subselect.test accordingly.
2009-10-30 11:40:44 +02:00
Georgi Kodinov
7ba875d6e6 Bug #48293: crash with procedure analyse, view with > 10 columns,
having clause...

The fix for bug 46184 was not very complete. It was not covering
views using temporary tables and multiple tables in a FROM clause.
Fixed by reverting the fix for 46184 and making a more general
check that is checking at the right execution stage and for all
of the non-supported cases.
Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden.
Updated the analyse.test and subselect.test accordingly.
2009-10-30 11:40:44 +02:00
Michael Widenius
358327618d Speed up of test suite:
- Added --disable_query_log ; begin ; .... commit; --enable_query_log around all while loops that does insert
2009-10-28 09:52:34 +02:00
Kristofer Pettersson
6eec4b9824 automerge 2009-11-03 17:23:05 +01:00
unknown
6aad537a6a Merge MySQL 5.1.39 into MariaDB 5.1. 2009-10-15 23:38:29 +02:00
Sergey Petrunya
29f0dcb563 Merge MySQL->MariaDB
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
  newer testsuite). They are expected to go after mergning with the latest
  xtradb.
2009-09-08 00:50:10 +04:00
Georgi Kodinov
38cb188e24 automerge 2009-08-31 16:40:35 +03:00
Georgi Kodinov
4adb05e282 automerge 2009-08-31 16:40:35 +03:00
Georgi Kodinov
a22c29d5e4 Bug #46749: Segfault in add_key_fields() with outer subquery level
field references

This error requires a combination of factors : 
1. An "impossible where" in the outermost SELECT
2. An aggregate in the outermost SELECT
3. A correlated subquery with a WHERE clause that includes an outer 
field reference as a top level WHERE sargable predicate

When JOIN::optimize detects an "impossible WHERE" it will bail out
without doing the rest of the work and initializations. It will not
call make_join_statistics() as well.  And make_join_statistics fills 
in various structures for each table referenced.
When processing the result of the "impossible WHERE" the query must
send a single row of data if there are aggregate functions in it.
In this case the server marks all the aggregates as having received 
no rows and calls the relevant Item::val_xxx() method on the SELECT
list. However if this SELECT list happens to contain a correlated 
subquery this subquery is evaluated in a normal evaluation mode.
And if this correlated subquery has a reference to a field from the 
outermost "impossible where" SELECT the add_key_fields will mistakenly
consider the outer field reference as a "local" field reference when 
looking for sargable predicates.
But since the SELECT where the outer field reference refers to is not
completely initialized due to the "impossible WHERE" in this level
we'll get a NULL pointer reference.
Fixed by making a better condition for discovering if a field is "local"
to the SELECT level being processed. 
It's not enough to look for OUTER_REF_TABLE_BIT in this case since 
for outer references to constant tables the Item_field::used_tables() 
will return 0 regardless of whether the field reference is from the 
local SELECT or not.
2009-08-27 14:40:42 +03:00
Georgi Kodinov
8ca8f70daa Bug #46749: Segfault in add_key_fields() with outer subquery level
field references

This error requires a combination of factors : 
1. An "impossible where" in the outermost SELECT
2. An aggregate in the outermost SELECT
3. A correlated subquery with a WHERE clause that includes an outer 
field reference as a top level WHERE sargable predicate

When JOIN::optimize detects an "impossible WHERE" it will bail out
without doing the rest of the work and initializations. It will not
call make_join_statistics() as well.  And make_join_statistics fills 
in various structures for each table referenced.
When processing the result of the "impossible WHERE" the query must
send a single row of data if there are aggregate functions in it.
In this case the server marks all the aggregates as having received 
no rows and calls the relevant Item::val_xxx() method on the SELECT
list. However if this SELECT list happens to contain a correlated 
subquery this subquery is evaluated in a normal evaluation mode.
And if this correlated subquery has a reference to a field from the 
outermost "impossible where" SELECT the add_key_fields will mistakenly
consider the outer field reference as a "local" field reference when 
looking for sargable predicates.
But since the SELECT where the outer field reference refers to is not
completely initialized due to the "impossible WHERE" in this level
we'll get a NULL pointer reference.
Fixed by making a better condition for discovering if a field is "local"
to the SELECT level being processed. 
It's not enough to look for OUTER_REF_TABLE_BIT in this case since 
for outer references to constant tables the Item_field::used_tables() 
will return 0 regardless of whether the field reference is from the 
local SELECT or not.
2009-08-27 14:40:42 +03:00
Sergey Glukhov
51f4ccfa43 5.0-bugteam->5.1-bugteam merge 2009-08-27 15:59:25 +05:00
Sergey Glukhov
be4b02784a 5.0-bugteam->5.1-bugteam merge 2009-08-27 15:59:25 +05:00
Sergey Glukhov
367c14b854 Bug#46184 Crash, SELECT ... FROM derived table procedure analyze
The crash happens because select_union object is used as result set
for queries which have derived tables.
select_union use temporary table as data storage and if
fields count exceeds 10(count of values for procedure ANALYSE())
then we get a crash on fill_record() function.


mysql-test/r/analyse.result:
  test result
mysql-test/r/subselect.result:
  result fix
mysql-test/t/analyse.test:
  test case
mysql-test/t/subselect.test:
  test fix
sql/sql_yacc.yy:
  The crash happens because select_union object is used as result set
  for queries which have derived tables.
  select_union use temporary table as data storage and if
  fields count exceeds 10(count of values for procedure ANALYSE())
  then we get a crash on fill_record() function.
2009-08-27 15:22:19 +05:00
Sergey Glukhov
d9d71d0f50 Bug#46184 Crash, SELECT ... FROM derived table procedure analyze
The crash happens because select_union object is used as result set
for queries which have derived tables.
select_union use temporary table as data storage and if
fields count exceeds 10(count of values for procedure ANALYSE())
then we get a crash on fill_record() function.
2009-08-27 15:22:19 +05:00
Evgeny Potemkin
bc016c54ca Merged fix for the bug#46051. 2009-07-19 16:49:40 +04:00
Evgeny Potemkin
5032380084 Bug#46051: Incorrectly market field caused wrong result.
When during the optimization an item is moved to the upper select
the item's context left unchanged. This caused wrong result in the 
PS/SP mode.
The Item_ident::remove_dependence_processor now sets the context
of the select to which the item is moved to.

mysql-test/r/subselect.result:
  The test case for the bug#46051 is adjusted.
mysql-test/t/subselect.test:
  The test case for the bug#46051 is adjusted.
sql/item.cc:
  Bug#46051: Incorrectly market field caused wrong result.
  The Item_ident::remove_dependence_processor now sets the context
  of the select to which the item is moved to.
2009-07-18 18:09:56 +04:00
Evgeny Potemkin
32b02e0b4d Bug#46051: Incorrectly market field caused wrong result.
When during the optimization an item is moved to the upper select
the item's context left unchanged. This caused wrong result in the 
PS/SP mode.
The Item_ident::remove_dependence_processor now sets the context
of the select to which the item is moved to.
2009-07-18 18:09:56 +04:00
Evgeny Potemkin
63e6a59d73 Bug#46051: Incorrectly market field caused wrong result.
In a subselect all fields from outer selects are marked as dependent on
selects they are belong to. In some cases optimizer substitutes it for an
equivalent expression. For example "a_field IN (SELECT outer_field)" is
substituted with "a_field = outer_field". As we moved the outer_field to the
upper select it's not really outer anymore. But it was left marked as outer.
If exists an index over a_field optimizer choose wrong execution plan and thus
return wrong result.

Now the Item_in_subselect::single_value_transformer function removes dependent
marking from fields when a subselect is optimized away.

mysql-test/r/subselect.result:
  Added a test case for the bug#46051.
mysql-test/t/subselect.test:
  Added a test case for the bug#46051.
sql/item_subselect.cc:
  Bug#46051: Incorrectly market field caused wrong result.
  Now the Item_in_subselect::single_value_transformer function removes dependent
  marking from fields when a subselect is optimized away.
2009-07-16 19:43:46 +04:00
Evgeny Potemkin
af2c91b701 Bug#46051: Incorrectly market field caused wrong result.
In a subselect all fields from outer selects are marked as dependent on
selects they are belong to. In some cases optimizer substitutes it for an
equivalent expression. For example "a_field IN (SELECT outer_field)" is
substituted with "a_field = outer_field". As we moved the outer_field to the
upper select it's not really outer anymore. But it was left marked as outer.
If exists an index over a_field optimizer choose wrong execution plan and thus
return wrong result.

Now the Item_in_subselect::single_value_transformer function removes dependent
marking from fields when a subselect is optimized away.
2009-07-16 19:43:46 +04:00
Evgeny Potemkin
d7b3d5d373 Merged fix for the bug#46051. 2009-07-19 16:49:40 +04:00
Chad MILLER
14f923c028 Merge 5.0.80 release and 5.0 community. Version left at 5.0.80. 2009-04-14 13:20:13 -04:00
Chad MILLER
978e8e06b0 Merge 5.0.80 release and 5.0 community. Version left at 5.0.80. 2009-04-14 13:20:13 -04:00
Guilhem Bichot
c71aae73f6 merge of 5.1-main into 5.1-maria. MyISAM changes are propagated to Maria except
those of davi.arnaut@sun.com-20090219210935-9vilvcisyyieffxl (TODO).
2009-04-01 11:34:52 +02:00
Guilhem Bichot
704b4845aa merge of 5.1-main into 5.1-maria. Myisam->Maria change propagation will follow.
There were so many changes into mtr (this is the new mtr coming) that I rather
copied mtr from 6.0-main here (at least this one knows how to run Maria tests).
I also fixed suite/maria tests to be accepted by the new mtr.

mysys/thr_mutex.c:
  adding DBUG_PRINT here, so that we can locate where the warning is issued.
2009-02-12 15:08:56 +01:00
Matthias Leich
0ef6e2a5ab Merge 5.0 -> 5.1 2009-02-09 22:00:15 +01:00
Matthias Leich
f1a55f8fcf Merge 5.0 -> 5.1 2009-02-09 22:00:15 +01:00
Matthias Leich
0fab1a857c 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
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
41e6a1f89c 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
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
Georgi Kodinov
87eb2cb938 merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
Georgi Kodinov
3aec7ca415 merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
Sergey Petrunia
a9608b196d BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL regardless of
whether subquery produced any records, this was a documented limitation.

The limitation has been removed (see bugs 8804, 24085, 24127) now
Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
Item_in_optimizer::is_null() invoke val_int() to return correct values for
"NULL IN (SELECT ...)".


mysql-test/r/subselect.result:
  BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
  - Testcase
mysql-test/t/subselect.test:
  BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
  - Testcase
2009-01-28 22:18:27 +03:00
Sergey Petrunia
cd4f6cc17b BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL regardless of
whether subquery produced any records, this was a documented limitation.

The limitation has been removed (see bugs 8804, 24085, 24127) now
Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
Item_in_optimizer::is_null() invoke val_int() to return correct values for
"NULL IN (SELECT ...)".
2009-01-28 22:18:27 +03:00
Michael Widenius
910284e6e6 Fixed bugs found by pushbuild
Added code to detect and give error when doing an insert into a view where we accessed fields in a not yet read table
Disabled test in subselect.test as the CHECK_OPTION for views doesn't work for insert.
This needs to be fixed properly later.

The problem with views are described in Bug #41760 Inserting into multiple-table views is not working

mysql-test/r/insert.result:
  Fixed wrong usage of insert into view.
mysql-test/r/subselect.result:
  Disabled wrong test (temporary)
mysql-test/suite/maria/r/maria.result:
  Added test of size of table
mysql-test/suite/maria/t/maria.test:
  Added test of size of table
mysql-test/t/insert.test:
  Fixed wrong usage of insert into view
  The bug is that during insert/update we currently don't read any of the referenced tables of the view.
  This means that we can't get a value from another table to use as part of the update.
mysql-test/t/subselect.test:
  Disabled not working test until someone has time to fix insert into view properly
  Here we where refering to last used value in t2, which is wrong.
sql/sql_insert.cc:
  Detect if we are trying to update one table in a view based on value in another, not yet read, table.
  This fixes the problem discovered in insert.test
storage/maria/ma_blockrec.c:
  Don't ignore not critical changes to the last page in the table.
  We need to write the last page as otherwise we can during aborting of a row with a duplicate key get
  state.data_file_length and the real length of file out of sync
storage/maria/ma_check.c:
  Flush the page cache even if we got an error during zerofill.
  (This fixes a call to assert() in case of a too short data file)
storage/maria/ma_pagecache.c:
  Mark page as read when we do a write of a full page.
  This fixes a bug when we got an error during read and then used direct write to page to update it
storage/maria/ma_state.c:
  Restore info->lock.type after call to maria_versioning.
  Fixed crash in maria_recover.test
storage/maria/maria_read_log.c:
  Don't write thread id in debug log. (Not needed as maria_read_log is a single treaded program)
2008-12-27 04:05:16 +02:00
Alfranio Correia
19f859a27e merge 5.1 --> 5.1-rpl 2008-12-13 19:42:12 +00:00
Alfranio Correia
3175a06a13 merge 5.1 --> 5.1-rpl 2008-12-13 19:42:12 +00:00
Guilhem Bichot
926aaf4635 Merge of 5.1-main into 5.1-maria. There were no changes to storage/myisam, mysys/mf_keycache.c, mysql-test/t/*myisam*
since previous merge. MARIA_PAGECACHE_READS in maria-preload.test are down a little bit (5%), which must be a good
side-effect of some sql/ change.
2008-12-10 10:02:25 +01:00
Sergey Glukhov
9ac57f01d7 5.0-bugteam->5.1-bugteam merge 2008-11-27 18:11:54 +04:00
Sergey Glukhov
04824289dd 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
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
Sergey Glukhov
bd6376f1d1 Bug#34760 Character set autodetection appears to fail
the problem is the same as reported in bug#20835,
so the fix is backport of bug#20835 patch.


mysql-test/r/subselect.result:
  test result
mysql-test/t/subselect.test:
  test case
2008-11-21 16:39:59 +04:00
Sergey Glukhov
a72c980c74 Bug#34760 Character set autodetection appears to fail
the problem is the same as reported in bug#20835,
so the fix is backport of bug#20835 patch.
2008-11-21 16:39:59 +04:00
Michael Widenius
f47e003e1b Merged 5.1 with maria 5.1 2008-10-10 18:28:41 +03:00
He Zhenxing
b17458dcc1 Merge 5.1 main -> 5.1-rpl 2008-09-06 08:51:17 +08:00
He Zhenxing
6e86e05823 Merge 5.1 main -> 5.1-rpl 2008-09-06 08:51:17 +08:00
Georgi Kodinov
0b24a95498 merged 5.1-bugteam into B37548 tree 2008-08-27 18:39:09 +03:00
Georgi Kodinov
a320e8676e merged 5.1-bugteam into B37548 tree 2008-08-27 18:39:09 +03:00
Georgi Kodinov
cab267ecc7 Bug#37548: result value erronously reported being NULL in certain subqueries
When switching to indexed ORDER BY we must be sure to reset the index read
flag if we are switching from a covering index to non-covering.

mysql-test/r/subselect.result:
  Bug#37548: test case
mysql-test/t/subselect.test:
  Bug#37548: test case
sql/sql_select.cc:
  Bug#37548: update the index read flag if the index for indexed ORDER BY is not
      covering.
2008-08-27 18:19:22 +03:00
Georgi Kodinov
3468f4b4b3 Bug#37548: result value erronously reported being NULL in certain subqueries
When switching to indexed ORDER BY we must be sure to reset the index read
flag if we are switching from a covering index to non-covering.
2008-08-27 18:19:22 +03:00
He Zhenxing
113deaec30 Merge 5.1-rpl-testfixes -> 5.1-rpl 2008-08-14 17:38:22 +08:00
He Zhenxing
c6c2e66c67 Merge 5.1-rpl-testfixes -> 5.1-rpl 2008-08-14 17:38:22 +08:00
Sven Sandberg
4cf30d44ef merged 5.1 main to 5.1-rpl
manually resolved conflicts:
Text conflict in client/mysqltest.c
Contents conflict in mysql-test/include/have_bug25714.inc
Text conflict in mysql-test/include/have_ndbapi_examples.inc
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/suite/parts/inc/partition_check_drop.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check1.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check2.inc
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_basic_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_engine_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_syntax_myisam.result
Text conflict in mysql-test/suite/rpl_ndb/t/disabled.def
Text conflict in mysql-test/t/disabled.def
2008-08-04 07:04:47 +02:00
Sven Sandberg
73e253370b merged 5.1 main to 5.1-rpl
manually resolved conflicts:
Text conflict in client/mysqltest.c
Contents conflict in mysql-test/include/have_bug25714.inc
Text conflict in mysql-test/include/have_ndbapi_examples.inc
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/suite/parts/inc/partition_check_drop.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check1.inc
Text conflict in mysql-test/suite/parts/inc/partition_layout_check2.inc
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_1_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter1_2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter2_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_alter3_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_innodb.result
Text conflict in mysql-test/suite/parts/r/partition_basic_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_engine_myisam.result
Text conflict in mysql-test/suite/parts/r/partition_syntax_myisam.result
Text conflict in mysql-test/suite/rpl_ndb/t/disabled.def
Text conflict in mysql-test/t/disabled.def
2008-08-04 07:04:47 +02:00
Georgi Kodinov
a3cd2e2dab merged 34159 and 37662 5.0-bugteam->5.1-bugteam 2008-07-31 12:50:24 +03:00
Georgi Kodinov
3d215551bb merged 34159 and 37662 5.0-bugteam->5.1-bugteam 2008-07-31 12:50:24 +03:00
Igor Babaev
b6e3a9e28c Fixed bug #38191.
Calling List<Cached_item>::delete_elements for the same list twice
caused a crash of the server in the function JOIN::cleaunup.
Ensured that delete_elements() in JOIN::cleanup would be called only once.


mysql-test/r/subselect.result:
  Added a test case for bug #38191.
mysql-test/t/subselect.test:
  Added a test case for bug #38191.
sql/sql_select.cc:
  Fixed bug #38191.
  Ensured that delete_elements() in JOIN::cleanup would be called only once.
2008-07-26 13:44:07 -07:00
Igor Babaev
da156dde08 Fixed bug #38191.
Calling List<Cached_item>::delete_elements for the same list twice
caused a crash of the server in the function JOIN::cleaunup.
Ensured that delete_elements() in JOIN::cleanup would be called only once.
2008-07-26 13:44:07 -07:00
Sven Sandberg
1fc4954d30 Post-merge fixes.
The file tree in mtr's vardir has changed so an old
hard-coded path in mysql-test/t/subselect.test didn't
work.
Fix: update the paths in the test.


mysql-test/r/subselect.result:
  Updated result file.
mysql-test/t/subselect.test:
  Problem: The file tree in mtr's vardir has changed
  so an old hard-coded path didn't work.
  Fix: update the paths in the test.
2008-07-07 14:20:08 +02:00
Sven Sandberg
af7ed3f9be Post-merge fixes.
The file tree in mtr's vardir has changed so an old
hard-coded path in mysql-test/t/subselect.test didn't
work.
Fix: update the paths in the test.
2008-07-07 14:20:08 +02:00
Georgi Kodinov
50853ac31a Bug#37627: addendum :
- moved the test into a separate file to check for presence of the test variable

mysql-test/r/subselect.result:
  Bug#37627: moved the test to a separate file
mysql-test/r/subselect_debug.result:
  Bug#37627: moved the test to a separate file
mysql-test/t/subselect.test:
  Bug#37627: moved the test to a separate file
mysql-test/t/subselect_debug.test:
  Bug#37627: moved the test to a separate file
2008-07-07 11:43:56 +03:00
Georgi Kodinov
0a638f6b0d Bug#37627: addendum :
- moved the test into a separate file to check for presence of the test variable
2008-07-07 11:43:56 +03:00
Georgi Kodinov
0e1709bde6 Bug#37627: Killing query with sum(exists()) or avg(exists()) reproducibly crashes server
When there is an error executing EXISTS predicates they return NULL as their string
or decimal value but don't set the NULL value flag.
Fixed by returning 0 (as a decimal or a string) on error exectuting the subquery.
Note that we can't return NULL as EXISTS is not supposed to return NULL.

mysql-test/r/subselect.result:
  Bug#37627: test case
mysql-test/t/subselect.test:
  Bug#37627: test case
sql/item_subselect.cc:
  Bug#37627: return decimal (or string) 0 isntead of a NULL pointer on
  error calculating an EXISTS predicate.
2008-07-04 17:02:17 +03:00
Georgi Kodinov
730847898d Bug#37627: Killing query with sum(exists()) or avg(exists()) reproducibly crashes server
When there is an error executing EXISTS predicates they return NULL as their string
or decimal value but don't set the NULL value flag.
Fixed by returning 0 (as a decimal or a string) on error exectuting the subquery.
Note that we can't return NULL as EXISTS is not supposed to return NULL.
2008-07-04 17:02:17 +03:00
Matthias Leich
e72132a5b0 Upmerge 5.0 -> 5.1 2008-06-25 19:01:17 +02:00
Matthias Leich
81e7bd8679 Upmerge 5.0 -> 5.1 2008-06-25 19:01:17 +02:00
Matthias Leich
49417ad7c8 Fix for
Bug#37492 timing bug in subselect.test
+ similar weaknesses found during testing
+ replace error numbers by error names
2008-06-25 16:59:38 +02:00
Matthias Leich
69a1c78eba Fix for
Bug#37492 timing bug in subselect.test
+ similar weaknesses found during testing
+ replace error numbers by error names
2008-06-25 16:59:38 +02:00
Tatiana A. Nurnberg
f13393db22 Fixed bug #37004.
The value of JOIN::tables must be set to 0 when there
is no matching min/max row.

mysql-test/r/subselect.result:
  Added a test case for bug #37004.
mysql-test/t/subselect.test:
  Added a test case for bug #37004.
2008-06-19 05:08:41 +02:00
Tatiana A. Nurnberg
d6c476b8c8 Fixed bug #37004.
The value of JOIN::tables must be set to 0 when there
is no matching min/max row.
2008-06-19 05:08:41 +02:00
unknown
277e783d13 Merge magare.gmz:/home/kgeorge/mysql/work/B36011-take2-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam


sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge of bug 36011 to 5.1-bugteam
mysql-test/t/subselect.test:
  merge of bug 36011 to 5.1-bugteam
2008-05-16 19:03:50 +03:00
gkodinov/kgeorge@magare.gmz
b98922b7cc Merge magare.gmz:/home/kgeorge/mysql/work/B36011-take2-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam
2008-05-16 19:03:50 +03:00
unknown
0fb1527e95 Bug #36011: server crash with explain extended on query
with dependent subqueries
An IN subquery is executed on EXPLAIN when it's not correlated.
If the subquery required a temporary table for its execution
not all the internal structures were restored from pointing to
the items of the temporary table to point back to the items of
the subquery.
Fixed by restoring the ref array when a temp tables were used in
executing the IN subquery during EXPLAIN EXTENDED.


mysql-test/r/subselect.result:
  Bug #36011: test case
mysql-test/t/subselect.test:
  Bug #36011: test case
sql/sql_select.cc:
  Bug #36011: restore the ref array after execution 
  when there were temp tables.
2008-05-16 17:05:55 +03:00
gkodinov/kgeorge@magare.gmz
df3341a764 Bug #36011: server crash with explain extended on query
with dependent subqueries
An IN subquery is executed on EXPLAIN when it's not correlated.
If the subquery required a temporary table for its execution
not all the internal structures were restored from pointing to
the items of the temporary table to point back to the items of
the subquery.
Fixed by restoring the ref array when a temp tables were used in
executing the IN subquery during EXPLAIN EXTENDED.
2008-05-16 17:05:55 +03:00
unknown
304c4381e6 Merge host.loc:/home/uchum/work/5.0-bugteam
into  host.loc:/home/uchum/work/5.1-bugteam


mysql-test/r/subselect.result:
  Merge with 5.0-bugteam (bug#36139).
mysql-test/t/subselect.test:
  Merge with 5.0-bugteam (bug#36139).
2008-04-23 14:29:48 +05:00
gshchepa/uchum@host.loc
0b226a9299 Merge host.loc:/home/uchum/work/5.0-bugteam
into  host.loc:/home/uchum/work/5.1-bugteam
2008-04-23 14:29:48 +05:00
unknown
415112a940 subselect.test, subselect.result:
Post-commit minor cleanup of testcase (bug#36139).


mysql-test/r/subselect.result:
  Post-commit minor cleanup of testcase (bug#36139).
mysql-test/t/subselect.test:
  Post-commit minor cleanup of testcase (bug#36139).
2008-04-23 14:22:49 +05:00
gshchepa/uchum@host.loc
9c70737410 subselect.test, subselect.result:
Post-commit minor cleanup of testcase (bug#36139).
2008-04-23 14:22:49 +05:00
unknown
6b4179ec5b Merge mysql.com:/home/psergey/mysql-5.0-bugteam
into  mysql.com:/home/psergey/mysql-5.1-bugteam
  BUG#36139: manual merge


sql/item.cc:
  Auto merged
mysql-test/r/subselect.result:
  BUG#36139: Manual merge
mysql-test/t/subselect.test:
  BUG#36139: Manual merge
2008-04-22 03:36:24 +04:00
sergefp@pslp.mylan
45c8043596 Merge mysql.com:/home/psergey/mysql-5.0-bugteam
into  mysql.com:/home/psergey/mysql-5.1-bugteam
  BUG#36139: manual merge
2008-04-22 03:36:24 +04:00
unknown
1c1f0a62e1 BUG#36139 "float, zerofill, crash with subquery"
- Make convert_zerofill_number_to_string() take into account that the 
  constant it is converting may evaluate to NULL.


mysql-test/r/subselect.result:
  BUG#36139 "float, zerofill, crash with subquery"
  - Testcase
mysql-test/t/subselect.test:
  BUG#36139 "float, zerofill, crash with subquery"
  - Testcase
2008-04-22 02:53:12 +04:00
sergefp@mysql.com
dc01e1d612 BUG#36139 "float, zerofill, crash with subquery"
- Make convert_zerofill_number_to_string() take into account that the 
  constant it is converting may evaluate to NULL.
2008-04-22 02:53:12 +04:00
unknown
daffceb4e2 Bug#33266: Incorrect test case for the bug#31048 failing on some platforms.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.

The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.


mysql-test/t/subselect.test:
  Corrected test case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected test case for the bug#31048.
2008-02-20 17:41:39 +03:00
evgen@moonbone.local
56d955a5a0 Bug#33266: Incorrect test case for the bug#31048 failing on some platforms.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.

The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.
2008-02-20 17:41:39 +03:00
unknown
2e6a7416cd Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-maria


include/my_sys.h:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Auto merged
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_insert.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/unireg.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
sql/log_event_old.h:
  SCCS merged
BitKeeper/triggers/post-commit:
  merged
client/mysqldump.c:
  merged
configure.in:
  merged
client/mysqltest.c:
  merged
include/Makefile.am:
  merged
include/atomic/nolock.h:
  merged
mysql-test/lib/mtr_report.pl:
  merged
sql/handler.h:
  merged
sql/mysqld.cc:
  merged
sql/sql_select.cc:
  merged
2008-02-05 16:47:11 +01:00
unknown
8f081d6fa2 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


mysql-test/r/subselect.result:
  Manual merge.
mysql-test/t/subselect.test:
  Manual merge.
2008-01-20 13:50:26 +03:00
kaa@kaamos.(none)
fa20bb5afe Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-01-20 13:50:26 +03:00
unknown
f80b593d21 Fixed a PushBuild failure of the system_mysql_db test caused by the lack
of cleanups in the test case for bug33794.
2008-01-20 13:46:55 +03:00
kaa@kaamos.(none)
6619db580d Fixed a PushBuild failure of the system_mysql_db test caused by the lack
of cleanups in the test case for bug33794.
2008-01-20 13:46:55 +03:00
unknown
153771ed7f Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  Manual merge.
mysql-test/t/group_by.test:
  Manual merge.
mysql-test/t/subselect.test:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2008-01-19 21:09:22 +03:00
kaa@kaamos.(none)
e91bf15d5c Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-01-19 21:09:22 +03:00
unknown
c71a6428d8 BUG#33794 "MySQL crashes executing specific query":
The problem occurred when one had a subquery that had an equality X=Y where 
Y referred to a named select list expression from the parent select. MySQL 
crashed when trying to use the X=Y equality for ref-based access. 

Fixed by allowing non-Item_field items in the described case.


mysql-test/r/subselect.result:
  BUG#33794 "MySQL crashes executing specific query"
  - Testcase
mysql-test/t/subselect.test:
  BUG#33794 "MySQL crashes executing specific query"
  - Testcase
sql/sql_select.cc:
  BUG#33794 "MySQL crashes executing specific query"
  get_store_key() assumed that if it got a reference
    t.key=Item_outer_ref(Item_direct_ref(x)) 
  then x was an Item_field object, which is not the case when one refers to a
  named select list expression out ot subquery.
2008-01-18 22:50:36 +03:00
sergefp@mysql.com
d56ac2f37b BUG#33794 "MySQL crashes executing specific query":
The problem occurred when one had a subquery that had an equality X=Y where 
Y referred to a named select list expression from the parent select. MySQL 
crashed when trying to use the X=Y equality for ref-based access. 

Fixed by allowing non-Item_field items in the described case.
2008-01-18 22:50:36 +03:00
unknown
1040bea9ae Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


sql/field.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
mysql-test/r/subselect.result:
  Manual merge.
mysql-test/t/subselect.test:
  Manual merge.
sql/filesort.cc:
  Manual merge.
2008-01-10 14:35:11 +03:00
kaa@kaamos.(none)
36773c170d Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-01-10 14:35:11 +03:00
unknown
8845553a81 Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
server crash.

The filesort implementation has an optimization for subquery execution which
consists of reusing previously allocated buffers. In particular the call to
the read_buffpek_from_file function might be skipped when a big enough buffer
for buffer descriptors (buffpeks) is already allocated. Beside allocating
memory for buffpeks this function fills allocated buffer with data read from
disk. Skipping it might led to using an arbitrary memory as fields' data and
finally to a crash.

Now the read_buffpek_from_file function is always called. It allocates
new buffer only when necessary, but always fill it with correct data.


sql/filesort.cc:
  Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
  server crash.Now the read_buffpek_from_file function is always called. It allocates
  new buffer only when necessary, but always fill it with correct data.
mysql-test/r/subselect.result:
  Added a test case for the bug#33675: Usage of an uninitialized memory by
  filesort in a subquery caused server crash.
mysql-test/t/subselect.test:
  Added a test case for the bug#33675: Usage of an uninitialized memory by
  filesort in a subquery caused server crash.
2008-01-09 00:40:41 +03:00
evgen@moonbone.local
ce111a0d73 Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
server crash.

The filesort implementation has an optimization for subquery execution which
consists of reusing previously allocated buffers. In particular the call to
the read_buffpek_from_file function might be skipped when a big enough buffer
for buffer descriptors (buffpeks) is already allocated. Beside allocating
memory for buffpeks this function fills allocated buffer with data read from
disk. Skipping it might led to using an arbitrary memory as fields' data and
finally to a crash.

Now the read_buffpek_from_file function is always called. It allocates
new buffer only when necessary, but always fill it with correct data.
2008-01-09 00:40:41 +03:00
unknown
dd3bba09f2 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.new


BitKeeper/etc/ignore:
  auto-union
BUILD/compile-dist:
  Auto merged
client/mysqladmin.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
config/ac-macros/plugins.m4:
  Auto merged
configure.in:
  Auto merged
dbug/dbug.c:
  Auto merged
include/keycache.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Auto merged
mysql-test/t/delayed.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/query_cache_notembedded.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysys/CMakeLists.txt:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/my_delete.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_symlink2.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_xmlfunc.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event_old.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/udf_example.c:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/rt_index.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/myisammrg/ha_myisammrg.h:
  Auto merged
strings/llstr.c:
  Auto merged
support-files/compiler_warnings.supp:
  Auto merged
Makefile.am:
  Manual merge from 5.1 to maria.
client/mysqltest.c:
  Manual merge from 5.1 to maria.
include/my_base.h:
  Manual merge from 5.1 to maria.
mysql-test/t/merge.test:
  Manual merge from 5.1 to maria.
mysys/my_getopt.c:
  Manual merge from 5.1 to maria.
mysys/thr_mutex.c:
  Manual merge from 5.1 to maria.
sql/mysqld.cc:
  Manual merge from 5.1 to maria.
sql/set_var.cc:
  Manual merge from 5.1 to maria.
sql/sql_table.cc:
  Manual merge from 5.1 to maria.
sql/sql_yacc.yy:
  Manual merge from 5.1 to maria.
sql/unireg.cc:
  Manual merge from 5.1 to maria.
2007-12-16 17:03:44 +02:00
unknown
3058e02573 Many files:
Test case for the bug#31048 is moved to the subselect_notembedded tests as the embedded server isn't affected by this bug.


mysql-test/r/subselect.result:
  Test case for the bug#31048 is moved to the subselect_notembedded tests as the embedded server isn't affected by this bug.
mysql-test/r/subselect_notembedded.result:
  Test case for the bug#31048 is moved to the subselect_notembedded tests as the embedded server isn't affected by this bug.
mysql-test/t/subselect.test:
  Test case for the bug#31048 is moved to the subselect_notembedded tests as the embedded server isn't affected by this bug.
mysql-test/t/subselect_notembedded.test:
  Test case for the bug#31048 is moved to the subselect_notembedded tests as the embedded server isn't affected by this bug.
2007-11-26 22:21:46 +03:00
evgen@moonbone.local
66258ff324 Many files:
Test case for the bug#31048 is moved to the subselect_notembedded tests as the embedded server isn't affected by this bug.
2007-11-26 22:21:46 +03:00
unknown
cf84ca46ba Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32036-5.0-opt


mysql-test/r/subselect.result:
  merge of fix for bug 32036 to 5.0-opt
mysql-test/t/subselect.test:
  merge of fix for bug 32036 to 5.0-opt
2007-11-26 14:02:02 +02:00
gkodinov/kgeorge@magare.gmz
6008aa2187 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32036-5.0-opt
2007-11-26 14:02:02 +02:00
unknown
b7a2960fee Merge magare.gmz:/home/kgeorge/mysql/work/B32036-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32036-5.1-opt


mysql-test/r/subselect.result:
  merged fix for bug 32036 to 5.1-opt
mysql-test/t/subselect.test:
  merged fix for bug 32036 to 5.1-opt
sql/sql_yacc.yy:
  merged fix for bug 32036 to 5.1-opt
2007-11-26 13:48:22 +02:00
gkodinov/kgeorge@magare.gmz
fe9b132a18 Merge magare.gmz:/home/kgeorge/mysql/work/B32036-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32036-5.1-opt
2007-11-26 13:48:22 +02:00
unknown
f3f9855d13 Bug #32036: EXISTS within a WHERE clause with a UNION
crashes MySQL 5.122
There was a difference in how UNIONs are handled
on top level and when in sub-query.
Because the rules for sub-queries were syntactically
allowing cases that are not currently supported by
the server we had crashes (this bug) or wrong results
(bug 32051).
Fixed by making the syntax rules for UNIONs match the 
ones at top level.

These rules however do not support nesting UNIONs, e.g.
(SELECT a FROM t1 UNION ALL SELECT b FROM t2) 
 UNION
(SELECT c FROM t3 UNION ALL SELECT d FROM t4)
Supports for statements with nested UNIONs will be
added in a future version.


mysql-test/r/subselect.result:
  Bug #32036: test case
mysql-test/t/subselect.test:
  Bug #32036: test case
sql/sql_yacc.yy:
  Bug #32036: Make the syntax rules for UNIONs in subqueries the same
  as for top level UNIONs.
2007-11-26 13:36:24 +02:00
gkodinov/kgeorge@magare.gmz
55afc5c201 Bug #32036: EXISTS within a WHERE clause with a UNION
crashes MySQL 5.122
There was a difference in how UNIONs are handled
on top level and when in sub-query.
Because the rules for sub-queries were syntactically
allowing cases that are not currently supported by
the server we had crashes (this bug) or wrong results
(bug 32051).
Fixed by making the syntax rules for UNIONs match the 
ones at top level.

These rules however do not support nesting UNIONs, e.g.
(SELECT a FROM t1 UNION ALL SELECT b FROM t2) 
 UNION
(SELECT c FROM t3 UNION ALL SELECT d FROM t4)
Supports for statements with nested UNIONs will be
added in a future version.
2007-11-26 13:36:24 +02:00
unknown
10c1aa796a Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32400-5.0-opt


tests/mysql_client_test.c:
  Auto merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/subselect.test:
  SCCS merged
2007-11-23 15:30:16 +02:00
gkodinov/kgeorge@magare.gmz
0b40c63fd3 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32400-5.0-opt
2007-11-23 15:30:16 +02:00
unknown
042a58e049 Merge magare.gmz:/home/kgeorge/mysql/work/B32400-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32400-5.1-opt


BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
sql/item.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/t/subselect.test:
  merge of bug 32400 to 5.1-opt
2007-11-23 14:41:47 +02:00
gkodinov/kgeorge@magare.gmz
b35e378f6b Merge magare.gmz:/home/kgeorge/mysql/work/B32400-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32400-5.1-opt
2007-11-23 14:41:47 +02:00
unknown
c00bfc3bee Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt


mysql-test/r/gis.result:
  Auto merged
mysql-test/r/type_bit.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
mysql-test/t/type_bit.test:
  Auto merged
mysql-test/t/type_blob.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/subselect.result:
  null merge. resolve latete.
mysql-test/t/subselect.test:
  merge 5.0-opt -> 5.1-opt
sql/key.cc:
  merge 5.0-opt -> 5.1-opt
sql/sql_class.h:
  merge 5.0-opt -> 5.1-opt
sql/sql_insert.cc:
  merge 5.0-opt -> 5.1-opt
sql/sql_table.cc:
  merge 5.0-opt -> 5.1-opt
2007-11-23 12:26:19 +02:00
gkodinov/kgeorge@magare.gmz
784b5d7b72 Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
2007-11-23 12:26:19 +02:00
unknown
a197c4e95d opt_range.cc:
Fix for the bug#31048 for 64bit platforms.
subselect.test, subselect.result:
  Corrected text case for the bug#31048.


mysql-test/t/subselect.test:
  Corrected text case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected text case for the bug#31048.
sql/opt_range.cc:
  Fix for the bug#31048 for 64bit platforms.
2007-11-23 00:16:17 +03:00
evgen@moonbone.local
3f163915bf opt_range.cc:
Fix for the bug#31048 for 64bit platforms.
subselect.test, subselect.result:
  Corrected text case for the bug#31048.
2007-11-23 00:16:17 +03:00
unknown
4b9106764d Merge magare.gmz:/home/kgeorge/mysql/work/B30788-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30788-5.1-opt


mysql-test/r/subselect3.result:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge of bug 30788 to 5.1-opt
mysql-test/t/subselect.test:
  merge of bug 30788 to 5.1-opt
2007-11-21 13:19:50 +02:00
gkodinov/kgeorge@magare.gmz
9d860c8cdf Merge magare.gmz:/home/kgeorge/mysql/work/B30788-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30788-5.1-opt
2007-11-21 13:19:50 +02:00
unknown
bb3e878159 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30788-5.0-opt


sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge of 5.0-opt
mysql-test/t/subselect.test:
  merge of 5.0-opt
2007-11-21 11:46:15 +02:00
gkodinov/kgeorge@magare.gmz
430157e666 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30788-5.0-opt
2007-11-21 11:46:15 +02:00
unknown
e9832ceeac Bug #30788: Inconsistent retrieval of char/varchar
Index lookup does not always guarantee that we can
simply remove the relevant conditions from the WHERE
clause. Reasons can be e.g. conversion errors, 
partial indexes etc. 
The optimizer was removing these parts of the WHERE 
condition without any further checking.
This leads to "false positives" when using indexes.
Fixed by checking the index reference conditions
(using WHERE) when using indexes with sub-queries.


mysql-test/r/subselect.result:
  Bug #30788: 
   - using where
   - test case
mysql-test/r/subselect3.result:
  Bug #30788: using where
mysql-test/t/subselect.test:
  Bug #30788: test case
sql/item.h:
  Bug #30788: 
   - Declare eq() method of Item_cache descendants : this is used in
   test_if_ref()
   - preserve the field that is being cached for type comparisions
sql/sql_select.cc:
  Bug #30788: Don't remove the WHERE when using index lookup 
  with subqueries.
2007-11-21 11:40:05 +02:00
gkodinov/kgeorge@magare.gmz
2e2ac428ae Bug #30788: Inconsistent retrieval of char/varchar
Index lookup does not always guarantee that we can
simply remove the relevant conditions from the WHERE
clause. Reasons can be e.g. conversion errors, 
partial indexes etc. 
The optimizer was removing these parts of the WHERE 
condition without any further checking.
This leads to "false positives" when using indexes.
Fixed by checking the index reference conditions
(using WHERE) when using indexes with sub-queries.
2007-11-21 11:40:05 +02:00
unknown
870d46819e Bug #32400: Complex SELECT query returns correct result
only on some occasions

Referencing an element from the SELECT list in a WHERE 
clause is not permitted. The namespace of the WHERE
clause is the table columns only. This was not enforced
correctly when resolving outer references in sub-queries.

Fixed by not allowing references to aliases in a 
sub-query in WHERE.


mysql-test/include/ps_query.inc:
  Bug #32400: fixed old test queries
mysql-test/r/ps_2myisam.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_3innodb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_4heap.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_5merge.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_6bdb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_7ndb.result:
  Bug #32400: fixed old test queries
mysql-test/r/subselect.result:
  Bug #32400: test case
mysql-test/t/subselect.test:
  Bug #32400: test case
sql/item.cc:
  Bug #32400: don't allow references to aliases in WHERE
tests/mysql_client_test.c:
  Bug #32400: fixed old test queries
2007-11-20 19:18:21 +02:00
gkodinov/kgeorge@magare.gmz
846cbf3cd0 Bug #32400: Complex SELECT query returns correct result
only on some occasions

Referencing an element from the SELECT list in a WHERE 
clause is not permitted. The namespace of the WHERE
clause is the table columns only. This was not enforced
correctly when resolving outer references in sub-queries.

Fixed by not allowing references to aliases in a 
sub-query in WHERE.
2007-11-20 19:18:21 +02:00
unknown
b3347a6a98 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31048-bug-5.0-opt-mysql


sql/item_subselect.cc:
  Auto merged
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
2007-11-19 21:15:53 +00:00
evgen@moonbone.local
6f6fe52ad2 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31048-bug-5.0-opt-mysql
2007-11-19 21:15:53 +00:00
unknown
13105534fa Bug#31048: Many nested subqueries may cause server crash.
This bug is actually two. The first one manifests itself on an EXPLAIN
SELECT query with nested subqueries that employs the filesort algorithm.
The whole SELECT under explain is marked as UNCACHEABLE_EXPLAIN to preserve
some temporary structures for explain. As a side-effect of this values of
nested subqueries weren't cached and subqueries were re-evaluated many
times. Each time buffer for filesort was allocated but wasn't freed because
freeing occurs at the end of topmost SELECT. Thus all available memory was
eaten up step by step and OOM event occur.
The second bug manifests itself on SELECT queries with conditions where
a subquery result is compared with a key field and the subquery itself also
has such condition. When a long chain of such nested subqueries is present
the stack overrun occur. This happens because at some point the range optimizer
temporary puts the PARAM structure on the stack. Its size if about 8K and
the stack is exhausted very fast.

Now the subselect_single_select_engine::exec function allows subquery result
caching when the UNCACHEABLE_EXPLAIN flag is set.
Now the SQL_SELECT::test_quick_select function calls the check_stack_overrun
function for stack checking purposes to prevent server crash.


mysql-test/t/subselect.test:
  Added a test case for the bug#31048: Many nested subqueries may cause server crash.
mysql-test/r/subselect.result:
  Added a test case for the bug#31048: Many nested subqueries may cause server crash.
sql/opt_range.cc:
  Bug#31048: Many nested subqueries may cause server crash.
  Now the SQL_SELECT::test_quick_select function calls the check_stack_overrun
  function for stack checking purposes to preven server crash.
sql/item_subselect.cc:
  Bug31048: Many nested subqueries may cause server crash.
  Now the subselect_single_select_engine::exec function allows subquery result
  caching when the UNCACHEABLE_EXPLAIN flag is set.
2007-11-19 20:00:25 +00:00
evgen@moonbone.local
67cae0d48d Bug#31048: Many nested subqueries may cause server crash.
This bug is actually two. The first one manifests itself on an EXPLAIN
SELECT query with nested subqueries that employs the filesort algorithm.
The whole SELECT under explain is marked as UNCACHEABLE_EXPLAIN to preserve
some temporary structures for explain. As a side-effect of this values of
nested subqueries weren't cached and subqueries were re-evaluated many
times. Each time buffer for filesort was allocated but wasn't freed because
freeing occurs at the end of topmost SELECT. Thus all available memory was
eaten up step by step and OOM event occur.
The second bug manifests itself on SELECT queries with conditions where
a subquery result is compared with a key field and the subquery itself also
has such condition. When a long chain of such nested subqueries is present
the stack overrun occur. This happens because at some point the range optimizer
temporary puts the PARAM structure on the stack. Its size if about 8K and
the stack is exhausted very fast.

Now the subselect_single_select_engine::exec function allows subquery result
caching when the UNCACHEABLE_EXPLAIN flag is set.
Now the SQL_SELECT::test_quick_select function calls the check_stack_overrun
function for stack checking purposes to prevent server crash.
2007-11-19 20:00:25 +00:00
unknown
bed60e0175 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/select.result:
  manual merge
mysql-test/t/select.test:
  manual merge
2007-11-14 17:26:22 +04:00
gluh@eagle.(none)
246c6c35a9 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-11-14 17:26:22 +04:00
unknown
2892d3a2ab Merge gleb.loc:/home/uchum/5.0-opt
into  gleb.loc:/home/uchum/5.1-opt


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sp_rcontext.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
mysql-test/r/subselect.result:
  Merge with 5.0-opt.
mysql-test/t/subselect.test:
  Merge with 5.0-opt.
2007-11-11 06:07:38 +04:00
gshchepa/uchum@gleb.loc
f457080109 Merge gleb.loc:/home/uchum/5.0-opt
into  gleb.loc:/home/uchum/5.1-opt
2007-11-11 06:07:38 +04:00
unknown
e7c6a81f25 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.


sql/item.cc:
  Fixed bug #28076.
  The Item_cache_str::save_in_field method has been overloaded
  to check cached values for an illegal padding before the saving
  into a field.
sql/item.h:
  Fixed bug #28076.
  The Item_cache_str::is_varbinary flag has been added and the
  Item_cache_str::save_in_field method has been overloaded to prevent
  cached values from an illegal padding when saving in fields.
  The signature of the Item_cache::get_cache method has been
  changed to accept pointers to Item instead of Item_result
  values.
sql/item_cmpfunc.cc:
  Fixed bug #28076.
  The Item_in_optimizer::fix_left method has been modified to
  to call Item_cache::get_cache in a new manner.
sql/item_subselect.cc:
  Fixed bug #28076.
  The subselect_indexsubquery_engine::exec method has been
  modified to take into account field conversion errors
  (copy&paste from subselect_uniquesubquery_engine::exec).
sql/sp_rcontext.cc:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method has been
  modified to call Item_cache::get_cache in a new manner.
sql/sp_rcontext.h:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method signature
  has been modified to pass Item pointers to the
  Item_cache::get_cache method.
sql/sql_class.cc:
  Fixed bug #28076.
  The select_max_min_finder_subselect::send_data method has been
  modified to call Item_cache::get_cache in a new manner.
mysql-test/t/subselect.test:
  Added test case for bug #28076.
mysql-test/r/subselect.result:
  Added test case for bug #28076.
2007-11-10 23:44:48 +04:00
gshchepa/uchum@gleb.loc
0aabb89ee1 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.
2007-11-10 23:44:48 +04:00
unknown
6f12c92439 Bug#32108 - subselect.test produces warnings files
Comment sign of -- at line begin in test files lead to warnings
from mysqltest.
  
Changed -- to #.


mysql-test/t/subselect.test:
  Bug#32108 - subselect.test produces warnings files
  Changed -- to # at comment begin to avoid warnings files.
2007-11-05 14:44:38 +01:00
istruewing@stella.local
2481d2c1e3 Bug#32108 - subselect.test produces warnings files
Comment sign of -- at line begin in test files lead to warnings
from mysqltest.
  
Changed -- to #.
2007-11-05 14:44:38 +01:00
unknown
abdb052bae Merge magare.gmz:/home/kgeorge/mysql/work/B31884-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31884-5.1-opt


sql/item_subselect.h:
  Auto merged
mysql-test/r/subselect.result:
  merged the fix for bug 31884 to 5.1-opt
mysql-test/t/subselect.test:
  merged the fix for bug 31884 to 5.1-opt
2007-10-30 16:21:17 +02:00
gkodinov/kgeorge@magare.gmz
a9e65c8940 Merge magare.gmz:/home/kgeorge/mysql/work/B31884-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31884-5.1-opt
2007-10-30 16:21:17 +02:00
unknown
6bbdacae20 Bug #31884: Assertion + crash in subquery in the SELECT clause.
Item_in_subselect's only externally callable method is val_bool().
However the nullability in the wrapper class (Item_in_optimizer) is 
established by calling the "forbidden" method val_int().

Fixed to use the correct method (val_bool() ) to establish nullability 
of Item_in_subselect in Item_in_optimizer.


mysql-test/r/subselect.result:
  Bug #31884: test case
mysql-test/t/subselect.test:
  Bug #31884: test case
sql/item_subselect.h:
  Bug #31884: Use the correct method to establish nullability
2007-10-30 14:27:21 +02:00
gkodinov/kgeorge@magare.gmz
01fe24cd68 Bug #31884: Assertion + crash in subquery in the SELECT clause.
Item_in_subselect's only externally callable method is val_bool().
However the nullability in the wrapper class (Item_in_optimizer) is 
established by calling the "forbidden" method val_int().

Fixed to use the correct method (val_bool() ) to establish nullability 
of Item_in_subselect in Item_in_optimizer.
2007-10-30 14:27:21 +02:00
unknown
f4afcec393 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-maria


BitKeeper/etc/ignore:
  auto-union
BUILD/SETUP.sh:
  Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~99a50df6:
  Auto merged
Makefile.am:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
include/Makefile.am:
  Auto merged
include/keycache.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/lib/mtr_timer.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_events.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_insert.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_insert_delayed.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_insert.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysys/array.c:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_symlink2.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_xmlfunc.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/udf_example.c:
  Auto merged
sql/uniques.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/csv/ha_tina.h:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/myisam/ft_stopwords.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_extra.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_locking.c:
  Auto merged
storage/myisam/mi_log.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
storage/myisam/mi_test2.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisam/sp_test.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/myisammrg/ha_myisammrg.h:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
support-files/compiler_warnings.supp:
  Auto merged
client/mysqltest.c:
  Manual merge between mysql-5.1 and mysql-maria
include/my_base.h:
  Manual merge between mysql-5.1 and mysql-maria
include/my_global.h:
  Manual merge between mysql-5.1 and mysql-maria
include/myisam.h:
  Manual merge between mysql-5.1 and mysql-maria
libmysql/Makefile.shared:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/r/events_logs_tests.result:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/t/disabled.def:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/t/events_logs_tests.test:
  Manual merge between mysql-5.1 and mysql-maria
mysys/my_compress.c:
  Manual merge between mysql-5.1 and mysql-maria
mysys/my_getsystime.c:
  Manual merge between mysql-5.1 and mysql-maria
mysys/my_open.c:
  Manual merge between mysql-5.1 and mysql-maria
sql/handler.cc:
  Manual merge between mysql-5.1 and mysql-maria
sql/set_var.h:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_class.h:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_show.cc:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_sort.h:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_yacc.yy:
  Manual merge between mysql-5.1 and mysql-maria
sql/table.cc:
  Manual merge between mysql-5.1 and mysql-maria
storage/csv/ha_tina.cc:
  Manual merge between mysql-5.1 and mysql-maria
storage/myisam/mi_open.c:
  Manual merge between mysql-5.1 and mysql-maria
storage/myisam/myisamdef.h:
  Manual merge between mysql-5.1 and mysql-maria
unittest/mysys/my_atomic-t.c:
  Manual merge between mysql-5.1 and mysql-maria
2007-09-27 17:05:07 +03:00
unknown
c7f9cf127c Tests which use INSERT DELAYED or MERGE tables should explicitely
specify that they want a MyISAM table, otherwise they fail
when run with --default-storage-engine=maria.


mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
  uses INSERT DELAYED so has to specify MyISAM
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
  uses INSERT DELAYED so has to specify MyISAM
mysql-test/r/query_cache.result:
  result update
mysql-test/r/rpl_insert.result:
  result update
mysql-test/r/rpl_stm_flsh_tbls.result:
  result update
mysql-test/r/rpl_stm_insert_delayed.result:
  result update
mysql-test/r/rpl_switch_stm_row_mixed.result:
  result update
mysql-test/r/subselect.result:
  result update
mysql-test/t/query_cache.test:
  uses MERGE so has to specify MyISAM
mysql-test/t/query_cache_merge.test:
  uses MERGE so has to specify MyISAM
mysql-test/t/rpl_insert.test:
  uses INSERT DELAYED so has to specify MyISAM
mysql-test/t/rpl_stm_flsh_tbls.test:
  specifying the engine lengthens the query in binlog so shifts
  positions
mysql-test/t/rpl_switch_stm_row_mixed.test:
  uses INSERT DELAYED so has to specify MyISAM
mysql-test/t/subselect.test:
  uses INSERT DELAYED so has to specify MyISAM
2007-08-08 17:56:15 +02:00