Documentation fixed according bug 185 fixing patch (1.1551 03/04/23 00:

Docs/internals.texi:
  Documentation fixed according bug 185 fixing patch (1.1551 03/04/23 00:01:19)
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
This commit is contained in:
unknown 2003-04-28 20:40:41 +03:00
parent c9a7f29bc6
commit 4ceb257849
2 changed files with 14 additions and 4 deletions

View File

@ -13,6 +13,7 @@ arjen@george.bitbike.com
bar@bar.mysql.r18.ru
bar@bar.udmsearch.izhnet.ru
bar@gw.udmsearch.izhnet.ru
bell@laptop.sanja.is.com.ua
bell@sanja.is.com.ua
bk@admin.bk
davida@isil.mysql.com

View File

@ -649,7 +649,7 @@ Item_in_subselect inherit mechanism of getting value from
Item_exists_subselect.
@item
Select_transformer stores reference to left expression in its
conditions: (in WHERE in case 'a' and in a HAVING in case 'b')
conditions: (in WHERE & HAVING in case 'a' and in a HAVING in case 'b')
@item
Item from item list of this select (t2.a) can be referred with special
reference (Item_ref_null_helper or Item_asterisk_remover).
@ -704,6 +704,13 @@ ORDER BY without LIMIT here.
If IN subselect union condition of every select in UNION will be changed
personally.
If condition should be added to WHERE clause it will be presented as
"(item OR item IS NULL)" and Item_is_not_null_test(item) will be added
to HAVING clause. Item_is_not_null_test register NULL value as
Item_ref_null_helper does it and return FALSE if argument is NULL.
With above trick we will register NULL value of Item even in case
of index optimization of WHERE clause (case 'a' of following example).
Following is examples of IN transformations:
@example
a) <left_expression> IN (SELECT <item> FROM t
@ -712,8 +719,11 @@ a) <left_expression> IN (SELECT <item> FROM t
will be represented as
(SELECT 1 FROM t
WHERE <where_exp> and
Item_ref(<cached_left_expression>)=<Item_asterisk_remover(<Item>)>)
WHERE
<where_exp> and
(Item_ref(<cached_left_expression>)=<Item_asterisk_remover(<Item>)> or
<Item> is null)
HAVING Item_is_not_null_test(<Item>))
b) <left_expression> IN (SELECT <item> FROM t
@ -721,7 +731,6 @@ b) <left_expression> IN (SELECT <item> FROM t
ORDER BY 1)
will be represented as
(SELECT <item> as ref_null_helper FROM t
HAVING <having_exp> AND
Item_ref(<cached_left_expression>) = ref_null_helper)