Commit graph

69 commits

Author SHA1 Message Date
aivanov@mysql.com
4b245a2803 join_outer.result, opt_range.cc, item_cmpfunc.cc:
Post merge changes
sql_yacc.yy:
  Post merge changes
sql_select.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions (post merge changes).
   The function add_key_fields() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
2005-09-07 17:42:47 +04:00
aivanov@mysql.com
2165167200 Merge mysql.com:/home/alexi/dev/mysql-4.1-0
into  mysql.com:/home/alexi/dev/mysql-5.0-0
2005-09-06 23:49:54 +04:00
aivanov@mysql.com
fa51afedeb item_cmpfunc.h:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The classes Item_func_between, Item_func_if, Item_func_in are modified.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
   The class Item_func_opt_neg is added to factor out the functionality
   common for the modified classes Item_func_between and Item_func_in.
item_cmpfunc.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
   Item_func_in::fix_fields(). They correct generic calculation of
   the not_null_tables attribute when it is needed.
   Modified Item_func_between::val_int(), Item_func_in::val_int().
opt_range.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The function get_mm_tree() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql_yacc.yy:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
join_outer.test:
  Added testcases for bugs #12101, #12102
2005-09-06 18:03:08 +04:00
timour@mysql.com
e040300393 WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
  coalesced columns. The patch allows such columns to be qualified
  with a table (and db) name, as it is in 4.1.
  Based on a patch from Monty.

* Adjusted tests accordingly to test both backwards compatible name
  resolution of qualified columns, and ANSI-style resolution of
  non-qualified columns.
  For this, each affected test has two versions - one with qualified
  columns, and one without.
2005-08-23 18:08:04 +03:00
timour@mysql.com
a247282aa6 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task
2005-08-12 17:57:19 +03:00
igor@rurik.mysql.com
46325044d0 join_outer.result, join_outer.test:
Added a test case for bug #11285.
sql_select.cc:
  Fixed bug #11285.
  The problem occurred with Item_equal in an 'on expression'
  that was evaluated to false.
2005-06-15 02:02:25 -07:00
igor@rurik.mysql.com
2433210829 join_outer.test, join_outer.result:
Added test cases for bug #9938.
item.h:
  Fixed bug #9938: missing method not_null_tables for Item_ref.
2005-05-21 08:44:50 -07:00
serg@serg.mylan
e7b2de98ee be sure to call top_level_item() on the new Item_cond_and,
that merges ON and WHERE (BUG#10162)
2005-04-27 01:32:44 +02:00
jimw@mysql.com
bb215f648b Merge 2005-04-04 23:03:56 -07:00
jimw@mysql.com
247f2ac563 Merge new tests 2005-04-04 18:29:18 -07:00
serg@serg.mylan
f04bef8faf merged 2005-03-14 18:46:30 +01:00
serg@serg.mylan
dba1e0889a Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-03-14 14:47:51 +01:00
serg@serg.mylan
ada959edf8 anotehr fix for Item_func_isnotnull::not_null_tables() 2005-03-14 11:04:42 +01:00
serg@serg.mylan
9248f0d714 Item_func_isnotnull::not_null_tables - return 0 if not top-level item 2005-03-13 23:56:25 +01:00
serg@serg.mylan
18343b9454 correct not_null_tables() for XOR and AND
correct top_level_item for XOR
2005-03-13 16:34:40 +01:00
igor@rurik.mysql.com
7d8b91060d Manual merge 2005-03-13 00:40:55 -08:00
igor@rurik.mysql.com
a90d2bd97c join_outer.result, join_outer.test:
Added a test case for bug #9017.
item_cmpfunc.h:
  A wrong not_null_tables method for Item_cond_xor
  caused a conversion of a left join into an inner join
  that was not valid.
2005-03-12 23:31:52 -08:00
sergefp@mysql.com
f9322a85a4 Merge mysql.com:/home/psergey/mysql-4.1-bug8711
into mysql.com:/home/psergey/mysql-5.0-bug8711
2005-03-11 02:26:38 +03:00
sergefp@mysql.com
763039a17b Merge 2005-03-11 02:23:16 +03:00
sergefp@mysql.com
5d865045c9 Fix for BUG#8711: "<=>" may have true value for NULL arguments, so make
Item_func_equal::not_null_tables() always return 0.
2005-03-11 02:17:03 +03:00
jimw@mysql.com
624f855e94 Make sure that warning message when GROUP_CONCAT() cuts values is also
updated with the correct number of lines. (Bug #8681)
2005-02-23 17:58:20 -08:00
sergefp@mysql.com
48d7fe1671 Fix for valgrind failures in get_mm_tree. 2005-01-18 23:50:42 +03:00
sergefp@mysql.com
e89f5a7136 Fix for BUG#4480: In joins with SELECT_STRAIGHT_JOIN re-order tables by outer join dependency,
so we read dependent tables after tables they depend on (this is needed for outer joins)
2004-12-21 01:59:58 +03:00
monty@mysql.com
1087186657 Merge with 4.1 to get new thd->mem_root handling 2004-11-08 17:53:32 +02:00
igor@rurik.mysql.com
ca355c8a46 join_outer.result, join_outer.test:
Added cases for bugs #6307 and #6460.
sql_select.cc:
  Fixed the problem of bug reports #6307 and #6460.
  The reported wrong result sets were due to the fact that
  the added call of the fix_fields method for the built
  AND condition that joined WHERE and ON conditions
  broke ON expression, as it removed extra AND levels
  in the built condition. 
  It looks like that no attributes of the built condition
  are needed, so we don't have to call fix_fields here.
2004-11-05 22:15:24 -08:00
igor@rurik.mysql.com
a9b759af3e join_outer.result, join_outer.test:
Added a test case for bug #5896.
sql_select.cc:
  Fixed the problem of ignoring on expressions depending
  only on outer table when outer table either contains
  1 row or is guaranteed to return only 1 row (bug #5896).
2004-10-04 22:26:36 -07:00
monty@mysql.com
f2829d0386 After merge fixes of merge with 4.1 that included the new arena code.
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset
Prefix addresses with 0x for easier comparisons of debug logs
Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index
This fix changed some 'index' queries to 'range' queries in the test suite
Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause.
This fix removed of a lot of 'Using where' notes in the test suite.
Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS
Give NOTE instead of WARNING for safe field-type conversions
2004-09-09 06:59:26 +03:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
sergefp@mysql.com
263f2e3fe2 Fix for bug#5088:
* When executing EXPLAIN, do the same as for the query: convert join type to JT_CONST if keyuse array covers all key parts and all of them are constants.
 * In remove_const, don't remove conditions that depend on some-const-table and current-table.
2004-08-23 12:31:56 +04:00
igor@rurik.mysql.com
4b760fcb94 null.test, null.result:
Added test case for bug #4256.
join_outer.result:
  Fixed bug #4256.
item_cmpfunc.h:
  Fixed inconsistency of values of used_tables_cache and
  const_item_cache for Item_func_isnull objects.
  This inconsistency caused bug #4256.
2004-08-20 23:48:30 -07:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
igor@rurik.mysql.com
64d46dfe9b After merge fix 2004-06-25 06:48:10 -07:00
sergefp@mysql.com
f874071a26 Range optimizer fix:
If cost(full_scan_on_shortest_covering_index) < cost(best_range_scan) <  cost(full_table_scan)
  use full_scan_on_shortest_covering_index
(before this fix best_range_scan was used)
2004-06-22 04:47:28 +04:00
paul@ice.snake.net
fd1d01e098 Language/consistency edits to error messages
and affected test results.
2004-06-15 22:18:20 -05:00
igor@rurik.mysql.com
356cbe4fa2 join_nested.test, join_nested.result:
new file
Many files:
  Nested joins added.
2004-06-10 22:27:21 -07:00
ram@gw.mysql.r18.ru
fd01314cc8 Fix for the bug #2976: NATURAL JOIN produces duplicate columns.
Improvement natural join code in the setup_conds().
2004-03-19 12:36:55 +04:00
monty@mysql.com
031390a9a4 Fixes after merge with 4.0
Cleaned up embedded library access and query cache handling
Changed min stack size to 128K (to allow longer MyISAM keys)
Fixed wrong priority for XOR (should be less than NEG to get -1^1 to work)
2003-12-19 16:25:50 +02:00
monty@mysql.com
e0cc6799ec Merge with 4.0.17 2003-12-17 17:35:34 +02:00
hf@deer.(none)
e6e0937dc4 Proposed fix for #2093
it happens because of the LEFT JOINT optimization in add_key_part()
This optimization does exactly the same in JOIN and in WHERE conditions 
Not right.
I moved that optimization one level upper.
2003-12-12 21:26:20 +04:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
fcf96dbb18 WorkLog#1323
Deprecate the use of TYPE=... Preferred syntax is ENGINE=
2003-12-10 04:31:42 +00:00
igor@rurik.mysql.com
dcbbbe6b94 join_outer.result, null.result, null.test, item_cmpfunc.h:
Fixed inconsistency of values of used_tables_cache and
  const_item_cache for Item_func_isnull objects (bug #1990).
2003-12-01 13:59:09 -08:00
monty@narttu.mysql.fi
d9ff665102 Fixes after merge 2003-10-08 12:01:58 +03:00
monty@narttu.mysql.fi
6056cfadfc Merge with 4.0.16 2003-10-07 15:42:26 +03:00
kostja@oak.local
ab576328f0 Fixed bug in the optimiser for FULL TABLE SCAN case:
to estimate correctly cost of full table scan we should take into
account rows read and skipped on each iteration.
2003-09-15 22:21:39 +04:00
monty@mashka.mysql.fi
4f7512160b After merge fixes
Use server character set if --default-character-set is not used
Added convert_string() for more efficient alloc+character-set convert of strings
2003-08-19 00:08:08 +03:00
monty@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03:00
monty@mashka.mysql.fi
048d545a58 Code/testcase cleanups 2003-07-01 13:29:55 +03:00
monty@narttu.mysql.fi
23145cfed7 Added SQLSTATE to client/server protocol
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
2003-06-04 18:28:51 +03:00
monty@mashka.mysql.fi
6aa8929cf3 After merge fixes
Added initialization of all important global variables
2003-05-21 21:39:58 +03:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00