Commit graph

78 commits

Author SHA1 Message Date
unknown
e275e347e3 merge
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-08-23 15:50:59 +03:00
unknown
095b686c09 Fix for bug#4912 "mysqld crashs in case a statement is executed
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement 
execute a subtree with negation was replaced with equivalent 
subtree without NOTs.
The problem was that although this transformation was permanent, 
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(), 
  Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
  THD::free_temporary_pool_for_ps_preparing(); they
  were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
  prepared statement, it points at the thd. 
The rest of the patch contains mainly mechanical changes and
cleanups.


mysql-test/r/ps.result:
  Test results updated (test case for Bug#4912)
mysql-test/t/ps.test:
  A test case for Bug#4912 "mysqld crashs in case a statement is 
  executed a second time"
sql/item_cmpfunc.cc:
  current_statement -> current_arena
sql/item_subselect.cc:
  Statement -> Item_arena, current_statement -> current_arena
sql/item_subselect.h:
  Item_subselect does not need to save thd->current_statement.
sql/item_sum.cc:
  Statement -> Item_arena
sql/item_sum.h:
  Statement -> Item_arena
sql/mysql_priv.h:
  Statement -> Item_arena
sql/sql_base.cc:
  current_statement -> current_arena
sql/sql_class.cc:
  - Item_arena
  - convenient set_n_backup_statement, restore_backup_statement
  (nice idea, Sanja)
sql/sql_class.h:
  - Item_arena: backport from 5.0
  - allocate_temporary_pool_for_ps_preparing,
    free_temporary_pool_for_ps_preparing removed.
sql/sql_derived.cc:
  current_statement -> current_arena
sql/sql_lex.cc:
  current_statement -> current_arena
sql/sql_parse.cc:
  Deploy invariant that thd->free_list never contains junk items
  (backport from 5.0).
sql/sql_prepare.cc:
  - backporting Item_arena
  - no need to allocate_temporary_pool_for_ps_preparing().
sql/sql_select.cc:
  Fix for bug#4912 "mysqld crashs in case a statement is 
  executed a second time": if this is the first execute of
  a prepared statement, negation elimination is
  done in memory of the prepared statement.
sql/sql_union.cc:
  Backporting Item_arena from 5.0.
2004-08-21 02:02:46 +04:00
unknown
d0c87702f7 skip resolving field in table list if table list is not accessable due to groupping (BUG#4814)
mysql-test/r/func_gconcat.result:
  fix of test queries
mysql-test/r/subselect.result:
  resolving fields of grouped outer SELECT
mysql-test/t/func_gconcat.test:
  fix of test queries
mysql-test/t/subselect.test:
  resolving fields of grouped outer SELECT
sql/item.cc:
  skip resolving field in table list if table list is not accessable due to groupping
  layout fixed
sql/item_subselect.cc:
  detection of place of subquery
sql/item_subselect.h:
  detection of place of subquery
sql/mysql_priv.h:
  enum_parsing_place made global type
sql/sql_lex.cc:
  enum_parsing_place made global type
sql/sql_lex.h:
  enum_parsing_place made global type
sql/sql_yacc.yy:
  enum_parsing_place made global type
2004-08-13 10:01:30 +03:00
unknown
cc74326b2a aggregate functions check during substitution made only for single row subselects (BUG#4400)
restoring current senect pointer before PS rexecution (backport from 5.0)
removed spaces at  lines ends


mysql-test/r/subselect.result:
  Aggregate function comparation with ALL/ANY/SOME subselect test
mysql-test/t/subselect.test:
  Aggregate function comparation with ALL/ANY/SOME subselect test
sql/item_subselect.cc:
  removed spaces at  lines ends
  aggregate functions check during substitution made only for single row subselects
sql/item_subselect.h:
  removed spaces at  lines ends
sql/sql_prepare.cc:
  restoring current senect pointer before PS rexecution (backport from 5.0)
2004-07-04 08:46:28 +03:00
unknown
e54ca13b66 keep old engine & JOIN if we changed subquery Item (Bug #3646)
mysql-test/r/subselect.result:
  ALL/ANY test
mysql-test/t/subselect.test:
  ALL/ANY test
sql/item_subselect.cc:
  keep old engine & JOIN if we changed subquery Item, which allow avoid second all SELECT items fix_fields call with pervios clean up (because of second setup_tables which remove table->key_use and maybe something else)
  keep list when we change Item in SELECT list
  processing inserted max/min function (now JOIN::prepare will be called only once)
  methods of changing item for subselect engines
sql/item_subselect.h:
  change item & results procedure
sql/item_sum.cc:
  Item_sum_hybrid::clear moved to .cc file (to keep .h clean and to make inserving/removing debug info easy)
sql/item_sum.h:
  Item_sum_hybrid::clear moved to .cc file (to keep .h clean and to make inserving/removing debug info easy)
sql/sql_lex.cc:
  note about new method
sql/sql_lex.h:
  method for changing result of UNION JOINs
sql/sql_select.cc:
  method for changing result in JOIN
sql/sql_select.h:
  method for changing result in JOIN
sql/sql_union.cc:
  method for changing result in JOIN
2004-05-07 23:06:11 +03:00
unknown
526569690e Fixed (portability) bug in handler.h, and tried to silence cast warnings on some platforms.
sql/handler.h:
  Fixed (portability) bug. No qualified method names in the class definition.
sql/item_cmpfunc.h:
  Attempt to silence cast warnings on some platforms.
sql/item_subselect.h:
  Attempt to silence cast warnings on some platforms.
sql/set_var.cc:
  Silence warning (missing cast).
sql/spatial.h:
  Attempt to silence cast warnings on some platforms.
sql/sql_cache.cc:
  Silence warning (wrong cast).
sql/sql_lex.h:
  Attempt to silence cast warnings on some platforms.
2004-05-06 19:55:12 +02:00
unknown
930399d773 Merging
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
mysql-test/r/subselect.result:
  merging
mysql-test/t/subselect.test:
  merging
2004-03-04 17:52:06 +04:00
unknown
541cb675c8 fixed subquery with PS (BUG#2462)
fixed UNION preparation


sql/item.cc:
  debug output added
sql/item.h:
  debug output added
sql/item_cmpfunc.cc:
  correct cleunup() for Item_in_optimizer
sql/item_cmpfunc.h:
  correct cleunup() for Item_in_optimizer
  debug output added
sql/item_func.h:
  debug output added
sql/item_subselect.cc:
  support of prepared statemnts added - mostly memorry allocation manegement, only one trabsformatio & correct cleupup()
sql/item_subselect.h:
  support of prepared statemnts added - mostly memorry allocation manegement, only one trabsformatio & correct cleupup()
sql/item_sum.cc:
  debug output added
sql/item_sum.h:
  debug output added
sql/sql_class.cc:
  function to switch allocation arena for Items
sql/sql_class.h:
  function to switch allocation arena for Items
  pointer on current prepared statement added
sql/sql_lex.cc:
  comment fixed
sql/sql_lex.h:
  item cleanup support
sql/sql_prepare.cc:
  - fixed preparation of PS to avoid storing junk in its memory + correct work with union
  - fixed tables cleanup for UNION & subqueries
sql/sql_select.cc:
  removed condition which is always true for now
  fixed layout
sql/sql_union.cc:
  support of UNION subquery cleanup
tests/client_test.c:
  test of repeatable subqueries
  test of correct UNION initialisation
2004-02-08 20:14:13 +02:00
unknown
367ded9f71 Fix for prepared statements
Here i added Item_*::cleanup() functions,
removed a lot of ~Item_*'s,
added code to restore order_list and group_list


sql/item.cc:
  cleanups methods implemented
  Item_ref constructors changed
sql/item.h:
  cleanups declared
  Item_ref constructors changed
  some ~Item_* deleted
sql/item_cmpfunc.cc:
  new Item_ref format
sql/item_cmpfunc.h:
  saving/restoring of the original arguments added to
  eq and equal functions
sql/item_func.cc:
  New Item_ref format
sql/item_func.h:
  destructors removed/changed to 'cleanup()'
sql/item_row.cc:
  New Item_ref format
sql/item_row.h:
  ~Item_row -> cleanup()
sql/item_strfunc.cc:
  new Item_ref format
sql/item_strfunc.h:
  destructors removed
sql/item_subselect.cc:
  Item_subselect implementation,
  new Item_ref() format
sql/item_subselect.h:
  cleanups for subselects declared
sql/item_sum.cc:
  cleanups implementations
sql/item_sum.h:
  cleanups declarations
  destructors removed
sql/mysql_priv.h:
  free_items, cleanup_items exported
sql/sql_prepare.cc:
  cleanup_items, free_items calls added
  stmt->query_id= thd->query_id restored
  cleanup procedures for group_list and order_list added
sql/sql_yacc.yy:
  New Item_ref() format
2003-12-30 14:08:19 +04:00
unknown
859f599e1e Fix for #1992
This bug happens when a query, having subselects in the fields list,
needs temporary table.
Item_subselect::get_tmp_table_item isn't implemented and just returns
*this. So the tmp_table_item takes value not from temporary but
from original table.


mysql-test/r/subselect.result:
  appropriate test result added
mysql-test/t/subselect.test:
  test case added
sql/item_subselect.cc:
  Item_subselect::get_tmp_table_item implementation
sql/item_subselect.h:
  Item_subselect::get_tmp_table_item declaration
2003-12-06 23:37:24 +04:00
unknown
76bf7d2224 Added missing SSL library (Should be in source distribution)
Fixed compiler warnings (a lot of hidden variables detected by the Forte compiler)
Added a lot of 'version_xxx' strings to 'show variables'
Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
Fixed problem with printing sub selects to debug log


Docs/mysqld_error.txt:
  Updated error messages
Makefile.am:
  Added missing SSL library (Should be in source distribution)
configure.in:
  Added missing SSL library
include/sql_common.h:
  Move duplicated prototypes
innobase/os/os0file.c:
  Added comment for line that could be removed
innobase/srv/srv0srv.c:
  Added comment for line that could be removed
innobase/srv/srv0start.c:
  Added comment for line that could be removed
innobase/trx/trx0sys.c:
  Added cast to remove compiler warning
isam/isamchk.c:
  Fixed compiler warning
libmysql/conf_to_src.c:
  Include files in proper order
myisam/mi_check.c:
  Removed else part that caused compiler warning
myisam/mi_delete.c:
  Added cast
myisam/mi_page.c:
  Added cast
myisam/mi_preload.c:
  Added cast
myisam/mi_write.c:
  Added cast
myisam/myisampack.c:
  changed 'byte' to 'current_byte' to avoid compiler warnings
mysql-test/mysql-test-run.sh:
  Removed start-from as test '<' is not portable and this can easily be done from command line
mysys/hash.c:
  Added cast
mysys/mf_wcomp.c:
  Removed not reached line
mysys/my_append.c:
  Fixed include file order to get this more portable
mysys/my_copy.c:
  Fixed include file order to get this more portable
mysys/my_redel.c:
  Fixed include file order to get this more portable
sql-common/client.c:
  More DBUG_PRINT
sql-common/pack.c:
  Added casts becasue Fortre compiler apparently compares (ulonglong) < (longlong) as signed
sql/ha_heap.cc:
  Changed variable names to not cause hidden variables
sql/ha_innodb.cc:
  Changed variable names to not cause hidden variables
sql/item.cc:
  Changed variable names to not cause hidden variables
sql/item.h:
  Changed variable names to not cause hidden variables
sql/item_cmpfunc.h:
  Changed variable names to not cause hidden variables
sql/item_func.cc:
  Changed variable names to not cause hidden variables
sql/item_subselect.cc:
  Changed variable names to not cause hidden variables
sql/item_subselect.h:
  Changed variable names to not cause hidden variables
sql/item_sum.cc:
  Changed variable names to not cause hidden variables
sql/item_timefunc.cc:
  Changed variable names to not cause hidden variables
sql/log.cc:
  Changed variable names to not cause hidden variables
sql/protocol.cc:
  Changed variable names to not cause hidden variables
sql/protocol.h:
  Changed variable names to not cause hidden variables
  Remove function not declared in protocol.cc
sql/protocol_cursor.cc:
  Changed variable names to not cause hidden variables
sql/set_var.cc:
  Added a lot of 'version_xxx' strings
  Changed 'bdb_version' to 'version_bdb'
sql/sql_class.cc:
  Changed variable names to not cause hidden variables
  Add TMP_TABLE_PARAM::init() to allow one to initialize structure several times
sql/sql_class.h:
  Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
sql/sql_derived.cc:
  Avoid copying TMP_TABLE_PARAM (Use class version instead)
sql/sql_error.cc:
  More DBUG
sql/sql_help.cc:
  Fixed compiler warning
sql/sql_lex.cc:
  Changed variable names to not cause hidden variables
sql/sql_list.h:
  Changed variable names to not cause hidden variables
sql/sql_parse.cc:
  Changed variable names to not cause hidden variables
sql/sql_select.cc:
  Changed variable names to not cause hidden variables
  Ensure that you don't send NULL to printf() for %s
  Fixed problem with printing sub selects to debug log
sql/sql_select.h:
  Changed variable names to not cause hidden variables
sql/sql_union.cc:
  Changed variable names to not cause hidden variables
  Don't use local copy of TMP_TABLE_PARAM (Caused core dump on Solaris)
sql/sql_update.cc:
  Indentation cleanup
sql/sql_yacc.yy:
  Remove warning
strings/conf_to_src.c:
  Fixed include file order
2003-11-28 12:18:13 +02:00
unknown
79533975b1 fixed using 'uncachable' tag and RAND_TABLE_BIT setting
sql/item_create.cc:
  specify cause of uncachability
sql/item_func.cc:
  specify cause of uncachability
sql/item_subselect.cc:
  fixed setting RAND_TABLE_BIT
  specify cause of uncachability
sql/item_subselect.h:
  used one field for all uncachability causes
sql/mysql_priv.h:
  causes of uncachability
sql/sql_lex.cc:
  specify cause of uncachability
sql/sql_lex.h:
  used one field for all uncachability causes
sql/sql_select.cc:
  used one field for all uncachability causes
sql/sql_union.cc:
  used one field for all uncachability causes
sql/sql_yacc.yy:
  specify cause of uncachability
2003-11-17 20:53:40 +02:00
unknown
ef163ff0fc after review fix
mysql-test/r/func_str.result:
  new results
sql/item.cc:
  charset changed
  printing string moved to String
sql/item_cmpfunc.cc:
  new comparation class builder to avoid long switch
  new print_agrs used
sql/item_cmpfunc.h:
  new comparation class builder to avoid long switch
sql/item_func.cc:
  new print_agrs
sql/item_func.h:
  new print_agrs
sql/item_strfunc.cc:
  new print_agrs
sql/item_subselect.cc:
  new comparation class builder to avoid long switch
sql/item_subselect.h:
  new comparation class builder to avoid long switch
sql/item_timefunc.cc:
  charset changed
sql/mysql_priv.h:
  new comparation class builder to avoid long switch
sql/mysqld.cc:
  new comparation class builder to avoid long switch
sql/sql_parse.cc:
  new comparation class builder to avoid long switch
sql/sql_string.cc:
  string printing moved to String class
sql/sql_string.h:
  string printing moved to String class
sql/sql_yacc.yy:
  birect class creation where it is possible
2003-11-03 12:28:36 +02:00
unknown
22c9da4dee Merge
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/item_subselect.cc:
  SCCS merged
2003-11-03 08:47:27 +02:00
unknown
5fe5142694 fixed BUG#1645
all calls of fix_fields() are inspected
(copy of cset which I lost in accidatly tree delete)


mysql-test/r/subselect.result:
  test of BUG#1645
mysql-test/t/subselect.test:
  test of BUG#1645
sql/item_subselect.cc:
  removed passing left_expr through parameters, because it present in class fields
  fixed fix_fields() call
sql/item_subselect.h:
  removed passing left_expr through parameters, because it present in class fields
sql/set_var.cc:
  comments added
sql/sql_select.cc:
  fixed BUG#1645 (thd can be used in fix_fields of subqueries)
2003-11-02 17:27:35 +02:00
unknown
683dcaae6b merge
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2003-10-28 12:45:37 +02:00
unknown
30764334f7 fixed ALL/ANY optimisation with union (BUG#1668)
code cleanup


mysql-test/r/subselect.result:
  test for BUG#1668
mysql-test/t/subselect.test:
  test for BUG#1668
sql/item_subselect.cc:
  removed unused class field
  fixed min_max subquery used_tables()/const()
  fixed ALL/ANY optimisation for unions
sql/item_subselect.h:
  removed unused class field
  fixed min_max subquery used_tables()/const()
sql/sql_union.cc:
  fixed result object assignment
2003-10-27 01:01:27 +02:00
unknown
e4b7aaac47 fixed support of used_tables() and const_item() in subqueries
(BUG#1444)


mysql-test/r/subselect.result:
  BUG#1444 test
mysql-test/t/subselect.test:
  BUG#1444 test
sql/item.cc:
  storing used tables in Item_subselect
sql/item_subselect.cc:
  fixed support of used_tables() and const_item() in subqueries
sql/item_subselect.h:
  fixed support of used_tables() and const_item() in subqueries
2003-10-17 00:36:01 +03:00
unknown
724a6c3c6d subqueries made printable
new EXPLAIN parameter to show real query as it was interpreted
(SCRUM) (WL#1274)


mysql-test/r/subselect.result:
  new explains
mysql-test/r/union.result:
  new explains
mysql-test/t/subselect.test:
  new explains
mysql-test/t/union.test:
  new explains
sql/item.cc:
  fixed printability of Items in SELECT list
sql/item.h:
  fixed printability of Items in SELECT list
sql/item_cmpfunc.cc:
  fixed print()
sql/item_cmpfunc.h:
  fixed print()
sql/item_subselect.cc:
  subqueries made printable
sql/item_subselect.h:
  subqueries made printable
sql/mysql_priv.h:
  union option made looks like options
sql/sql_derived.cc:
  now this link is used
sql/sql_lex.cc:
  subqueries made printable
sql/sql_lex.h:
  subqueries made printable
  new EXPLAIN parameter support
sql/sql_parse.cc:
  new EXPLAIN parameter
sql/sql_select.cc:
  debug output
  new EXPLAIN parameter support
sql/sql_select.h:
  new EXPLAIN parameter support
sql/sql_yacc.yy:
  new EXPLAIN parameter support
  SELECT printability support
2003-10-16 15:54:47 +03:00
unknown
2c951d4cfa Merge laptop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into laptop.sanja.is.com.ua:/home/bell/mysql/bk/work-constructors-4.1


sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
2003-10-07 17:42:59 +03:00
unknown
1fded9e1e4 after merge fix 2003-10-07 17:37:20 +03:00
unknown
fae46f7c9f merge
sql/item_subselect.h:
  Auto merged
2003-10-07 16:22:48 +03:00
unknown
4d9cbc266a after merge fix 2003-10-07 13:31:44 +03:00
unknown
890f427fa7 merge
sql/item_subselect.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2003-10-07 11:24:38 +03:00
unknown
451cd9e37c merge
sql/sql_yacc.yy:
  Auto merged
2003-10-07 08:51:09 +03:00
unknown
1fd6a5700b merge 2003-10-07 07:51:14 +03:00
unknown
ff8c8fa1ef Merge
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/subselect.test:
  SCCS merged
2003-10-06 20:55:06 +03:00
unknown
45b96bb8af thd pointer storing moved to fix_fields() (WL#1254) (SCRUM)
sql/item_subselect.cc:
  thd pointer storing moved to fix_fields()
sql/item_subselect.h:
  thd pointer storing moved to fix_fields()
sql/sql_yacc.yy:
  thd pointer storing moved to fix_fields()
2003-10-02 22:19:41 +03:00
unknown
3b3b0d3a3d Don't print warnings about 'setrlimit' if --warnings is not given
Code review/cleanup of sub subselect_uniquesubquery_engine


sql/ha_myisam.cc:
  Removed unnecessary casts
sql/item_subselect.cc:
  Safety fix (reset engine)
  Code review/cleanup of sub subselect_uniquesubquery_engine
  Remove 'end_exec'. (Should be done on query end, not in the middle)
sql/item_subselect.h:
  Removed end_exec();
sql/mysqld.cc:
  Don't print warnings about 'setrlimit' if --warnings is not given
2003-09-29 12:39:38 +03:00
unknown
eb76a9b6ec code cleanup: removed unused constructors and methods
sql/item_subselect.cc:
  removed unused constructors
sql/item_subselect.h:
  removed unused constructors & methods
2003-09-20 18:31:56 +03:00
unknown
e3b11b1de7 renamed join_types (as was suggested by Peter Gulutzan) 2003-09-14 09:40:57 +03:00
unknown
834cfbd190 enum renamed (asked for compilation under windows) 2003-08-28 13:21:30 +03:00
unknown
12b769418a Merge laptop.sanja.is.com.ua:/home/bell/mysql/bk/work-all_any-4.1
into laptop.sanja.is.com.ua:/home/bell/mysql/bk/work-all_any_group-4.1


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2003-08-23 13:33:02 +03:00
unknown
93afa26ea7 fixed bug of lack of fix_fields call (after merge bugfix (SCRUM))
fixed bug in Item_sum
fixed bug in dependence remover
after merge fix


mysql-test/r/subselect.result:
  after merge fix
mysql-test/r/union.result:
  new test
mysql-test/t/subselect.test:
  after merge fix
mysql-test/t/union.test:
  new test
sql/item.cc:
  fixed returned value
sql/item.h:
  fixed flag dropper
  (I was not able to find Item whicj need more to be fix_fielded twice)
sql/item_subselect.h:
  fixed initialisation
sql/item_sum.cc:
  fixed absence of walk method of Item_sum
sql/item_sum.h:
  fixed absence of walk method of Item_sum
sql/mysql_priv.h:
  setup_fields reverter
sql/sql_base.cc:
  setup_fields reverter
sql/sql_derived.cc:
  fixed bug of lack of fix_fields call
sql/sql_union.cc:
  fixed bug of lack of fix_fields call
2003-08-23 13:29:38 +03:00
unknown
8c93e8ceb6 merge
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-08-20 22:17:57 +03:00
unknown
791f49f4e7 As far as now transformer called after setup_wild() it is impossible to have '*' 2003-08-16 02:04:29 +03:00
unknown
964ffc34b1 optimisation of independent ALL/ANY with aggregate function (WL#1115) (SCRUM)
mysql-test/r/subselect.result:
  test of new optimisation
mysql-test/t/subselect.test:
  test of new optimisation
sql/item_subselect.cc:
  special subselect to finding max/min of returned values
  optimisation of independent ALL/ANY with aggregate function
sql/item_subselect.h:
  special subselect to finding max/min of returned values
sql/sql_class.cc:
  class for collaction result for max/min subquery
sql/sql_class.h:
  class for collaction result for max/min subquery
2003-08-12 12:38:03 +03:00
unknown
c2b8eb33d2 merge
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2003-08-11 12:00:33 +03:00
unknown
57e31f158b fixed bug in used_tables() report of left expression of IN subquery
fixed number of rows of external field reported to optimizer
added check of choosen key (checked left expression tag)
(SCRUM fix for simple IN optimisation)


mysql-test/r/subselect.result:
  new EXPLAIN results ufter fixing used_tables() of Item_cache
sql/item_cmpfunc.cc:
  fixed used_tables asignment
sql/item_subselect.cc:
  added left expression referenca tag
sql/item_subselect.h:
  fixed layout
sql/mysql_priv.h:
  left expression reference tag
sql/mysqld.cc:
  left expression reference tag
sql/sql_select.cc:
  checked left expression reference tag
  fixed number of rows in outer reference (it should be constant)
2003-08-07 11:16:02 +03:00
unknown
9a3979e234 independent ALL/ANY subselect on top of WHERE clause (subselect without GROUP BY or aggregate functions) optimisation
(SCRUM) (WL#1086)


mysql-test/r/subselect.result:
  new optimisation tests
mysql-test/t/subselect.test:
  new optimisation tests
sql/item_cmpfunc.cc:
  new NOT
sql/item_cmpfunc.h:
  new NOT
sql/item_subselect.cc:
  independent ALL/ANY in top of WHERE clause optimisation
sql/item_subselect.h:
  independent ALL/ANY in top of WHERE clause optimisation
sql/item_sum.cc:
  prevent fixlields call for parameters of min/max if it is already done
sql/sql_union.cc:
  removed debuging print
sql/sql_yacc.yy:
  support of ALL optimisation
2003-07-24 15:26:21 +03:00
unknown
ed8be699fe new optimisation for ref_null (SCRUM) (WL#818)
mysql-test/r/subselect.result:
  results of new optimisation
mysql-test/t/subselect.test:
  results of new optimisation
sql/item_cmpfunc.h:
  function type
sql/item_func.h:
  function type
sql/item_subselect.cc:
  new optimisation for ref_or_null
sql/item_subselect.h:
  new optimisation for ref_or_null
sql/sql_select.cc:
  new optimisation for ref_or_null
sql/sql_select.h:
  item_subselect.cc need safe_index_read
2003-07-17 19:39:31 +03:00
unknown
210c4aba95 new IN subquery engine added for simple IN with non-primary index but without NULL returning
(SCRUM) (part of WL#818)


mysql-test/r/subselect.result:
  test of new engine
mysql-test/t/subselect.test:
  test of new engine
sql/item_subselect.cc:
  new engine added
  some common operation moved in separate method
sql/item_subselect.h:
  new engine added
  some common operation moved in separate method
sql/sql_select.cc:
  new engine added
  some common operation moved in separate method
sql/sql_select.h:
  some common operation moved in separate method
2003-07-08 00:08:00 +03:00
unknown
923dba86b1 Optimisation if simple IN subselect with primary index
(SCRUM) (part of WL#818)


mysql-test/r/subselect.result:
  test of new optimisation
mysql-test/t/subselect.test:
  test of new optimisation
sql/item_subselect.cc:
  new engine for simple IN with primary index
sql/item_subselect.h:
  new engine for simple IN with primary index
sql/sql_lex.h:
  fixed typo
sql/sql_select.cc:
  engine changing
  report_error can't be static, because it used in new engine
sql/sql_select.h:
  new JT_ type (just for information in EXPLAIN statement)
  report_error can't be static, because it used in new engine
2003-07-07 18:40:19 +03:00
unknown
585cec0564 after review changes (SCRUM)
removed outer resolving flag (because of movingtransformation after fix_fields)


sql/item.cc:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item.h:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_cmpfunc.cc:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_cmpfunc.h:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_func.cc:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_func.h:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_row.cc:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_row.h:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_strfunc.h:
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_subselect.cc:
  after review changes
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/item_subselect.h:
  after review changes
  removed outer resolving flag (because of movingtransformation after fix_fields)
sql/mysql_priv.h:
  after review changes
sql/sql_base.cc:
  after review changes
sql/sql_lex.cc:
  after review changes
sql/sql_lex.h:
  after review changes
sql/sql_select.cc:
  after review changes
sql/sql_union.cc:
  after review changes
2003-07-02 01:45:22 +03:00
unknown
16aaba7060 merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/subselect.result:
  merging (wiil be fixed after building)
sql/item_subselect.cc:
  merging
sql/sql_select.cc:
  merging
2003-06-25 23:52:15 +03:00
unknown
a100c0e951 added mem_root switching for subselect if it is necessary
(bug #518 fixed)


mysql-test/r/subselect.result:
  test of bug #518
mysql-test/t/subselect.test:
  test of bug #518
sql/item_subselect.cc:
  test and switch mem_root if it is necessary
  exec() - wrapper around engine->exec() to test and switch mem_root if necessary
sql/item_subselect.h:
  added storing THD for mem_root testinmg & switching
  exec() - wrapper around engine->exec() to test and switch mem_root if necessary
2003-05-28 16:52:56 +03:00
unknown
a32b868c3b subselect transformation moved in after-fix_field place
removed "of is null" if it is possible
  (this cset should be SCRUM related, but not approved as scrum task yet)


mysql-test/r/subselect.result:
  new subselect test result (new place of error detecting & and more subselect reducing)
sql/item.cc:
  layout fix
sql/item.h:
  unneed ';'
  fixed print pethod
sql/item_cmpfunc.cc:
  new method to support transformation after fix_fields
sql/item_cmpfunc.h:
  new method to support transformation after fix_fields
  fixed Item printing
sql/item_subselect.cc:
  new transformation
sql/item_subselect.h:
  new transformation
sql/sql_derived.cc:
  'table' & 'table_list' now is not union
sql/sql_lex.cc:
  'table' & 'table_list' now is not union to support reinit only shared tables (but all)
sql/sql_lex.h:
  mark fake st_select_lex
sql/sql_olap.cc:
  fixed table assignment
  TODO added
sql/sql_select.cc:
  'table' & 'table_list' now is not union
  transforming subselect
sql/sql_union.cc:
  prepare make on fix_fields
sql/sql_yacc.yy:
  fixed layout
sql/table.h:
  'table & 'table_list' now is different fields
2003-05-14 21:51:33 +03:00
unknown
06017a0db0 fixed bug 185 (constant IN (SELECT field ...) do not return NULL correctly)
mysql-test/r/subselect.result:
  new test results
  test of bug 185
mysql-test/t/subselect.test:
  test of bug 185
sql/item.h:
  new method
sql/item_cmpfunc.cc:
  new Item to control NULL value in HAVING clouse
sql/item_cmpfunc.h:
  new Item to control NULL value in HAVING clouse
sql/item_subselect.cc:
  if IN was rewrited through WHERE thien it will be rewrited in following way:
  
  WHERE left_expr=item or is null(item) heving is_not_null_test(item)
sql/item_subselect.h:
  Item_is_not_null_test can change was_null flag
sql/sql_select.cc:
  some layout fix
2003-04-23 00:01:19 +03:00
unknown
a0ddb72d52 cyclic reference test removed, becouse testing of Item::fixed field apply more strict limitation
mysql-test/r/subselect.result:
  test of cyclic reference false alarm
mysql-test/t/subselect.test:
  test of cyclic reference false alarm
2003-01-30 14:35:07 +02:00
unknown
ca0d06d599 fixed bugs in temporary tables in subselect implementation (SCRUM)
merging with switching on static tables optimization (SCRUM)
fixed subselects with uncacheable results
added test for fixed bugs from bugreports


mysql-test/r/subselect.result:
  changes in subselect test after switching on static tables optimization
  fixed bug test added
  uncacheable subselects
mysql-test/t/subselect.test:
  changes in subselect test after switching on static tables optimization
  fixed bug test added
  uncacheable subselects
sql/item_create.cc:
  fixed subselects with uncacheable results
sql/item_func.cc:
  fixed subselects with uncacheable results
sql/item_subselect.cc:
  fixed subselects with uncacheable results
  clean up
sql/item_subselect.h:
  fixed subselects with uncacheable results
sql/sql_lex.cc:
  fixed subselects with uncacheable results
sql/sql_lex.h:
  fixed subselects with uncacheable results
sql/sql_select.cc:
  fixed bugs in temporary tables in subselect implementation
  fixed subselects with uncacheable results
sql/sql_union.cc:
  fixed subselects with uncacheable results
sql/sql_yacc.yy:
  fixed subselects with uncacheable results
2003-01-28 14:48:12 +02:00