Commit graph

77 commits

Author SHA1 Message Date
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Monty
3cb578c001 MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front()

Other things:
- Added THD as an argument to some partition functions.
- Added memory overflow checking for XML tag's in read_xml()
2015-08-27 22:21:08 +03:00
Alexander Barkov
98ba2bf424 Clean-up: moving compare_collation() from Item to Item_bool_func. 2015-08-21 17:08:55 +04:00
Monty
1bae0d9e56 Stage 2 of MDEV-6152:
- Added mem_root to all calls to new Item
- Added private method operator new(size_t size) to Item to ensure that
  we always use a mem_root when creating an item.

This saves use once call to current_thd per Item creation
2015-08-21 10:40:51 +04:00
Sergey Vojtovich
31e365efae MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor.
Added thd parameter to all routines that may create items.
Also removed "current_thd" from Item::Item. This reduced number of
pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
2015-08-21 10:40:39 +04:00
Alexander Barkov
75d65b5f4e MDEV-6989 BINARY and COLLATE xxx_bin comparisions are not used for optimization in some cases 2015-03-13 15:48:39 +04:00
Alexander Barkov
55dd89e919 MDEV-6978 Bad results with join comparing case insensitive VARCHAR/ENUM/SET
expression to a _bin ENUM column
2014-11-19 10:33:49 +04:00
Alexander Barkov
e52b1637e0 MDEV-6950 Bad results with joins comparing DATE/DATETIME and INT/DECIMAL/DOUBLE/ENUM/VARCHAR columns
MDEV-6971 Bad results with joins comparing TIME and DOUBLE/DECIMAL columns
Disallow using indexes on non-temporal columns to optimize
ref access, range access and table elimination when the counterpart's
cmp_type is TIME_RESULT, e.g.:
  SELECT * FROM t1 WHERE indexed_int_column=time_expression;
Only index on a temporal column can be used to optimize temporal comparison
operations.
2014-11-18 16:33:29 +04:00
Sergey Vojtovich
d12c7adf71 MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863.

revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
  Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM

  Rename test() macro to MY_TEST() to avoid conflict with libc++.
2014-02-19 14:05:15 +04:00
Michael Widenius
273078c5fa Fixes to get valgrind to work with jemalloc
- Added MALLOC_LIBRARY variable to hold name of malloc library
- Back ported valgrind related fixes from jemalloc 3.4.1 to the included jemalloc 3.3.1
- Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
- Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
- Show version related variables in mysqld --help
  -- Added SHOW_VALUE_IN_HELP marker

Increased back_log to 150 as the original value was a bit too small


CMakeLists.txt:
  Added MALLOC_LIBRARY variable to hold name of malloc library
cmake/jemalloc.cmake:
  Added MALLOC_LIBRARY variable to hold name of malloc library
config.h.cmake:
  Added MALLOC_LIBRARY variable to hold name of malloc library
extra/jemalloc/ChangeLog:
  Updates changelog
extra/jemalloc/include/jemalloc/internal/arena.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/private_namespace.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/include/jemalloc/internal/tcache.h:
  Backported valgrind fixes from jemalloc 3.4.1
extra/jemalloc/src/arena.c:
  Backported valgrind fixes from jemalloc 3.4.1
include/my_bitmap.h:
  Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1
mysql-test/mysql-test-run.pl:
  Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc
mysql-test/valgrind.supp:
  Supression of memory leak in OpenSuse 12.3
mysys/my_bitmap.c:
  Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free()
sql/ha_ndbcluster_binlog.cc:
  Renames
sql/ha_ndbcluster_cond.h:
  Renames
sql/ha_partition.cc:
  Renames
sql/handler.cc:
  Renames
sql/item_subselect.cc:
  Renames
sql/log_event.cc:
  Renames
sql/log_event_old.cc:
  Renames
sql/mysqld.cc:
  Renames
  Show version related variables in mysqld --help
sql/opt_range.cc:
  Renames
sql/opt_table_elimination.cc:
  Renames
sql/partition_info.cc:
  Renames
sql/rpl_injector.h:
  Renames
sql/set_var.h:
  Renames
sql/slave.cc:
  Renames
sql/sql_bitmap.h:
  Renames
sql/sql_insert.cc:
  Renames
sql/sql_lex.h:
  Renames
sql/sql_parse.cc:
  Renames
sql/sql_partition.cc:
  Renames
sql/sql_select.cc:
  Renames
sql/sql_show.cc:
  Renames
sql/sql_update.cc:
  Renames
sql/sys_vars.cc:
  Show version related variables in mysqld --help
sql/sys_vars.h:
  Added SHOW_VALUE_IN_HELP marker for variables that should be shown in --help
sql/table.cc:
  Renames
sql/table.h:
  Removed not used bitmap_init_value
storage/connect/ha_connect.cc:
  Removed compiler warning
storage/maria/ma_open.c:
  Renames
unittest/mysys/bitmap-t.c:
  Renames
2014-01-02 11:19:19 +02:00
Sergei Golubchik
d28d3ba40d 10.0-base merge 2013-12-16 13:02:21 +01:00
Alexander Barkov
87355a453d Merge 5.3 -> 5.5
pending merges:
  Sergey Petrunya 2013-11-27 MDEV-5344: LEFT OUTER JOIN table data is lost...
2013-12-02 15:17:21 +04:00
Sergey Petrunya
928543ca6c MDEV-5344: LEFT OUTER JOIN table data is lost in ON DUPLICATE KEY UPDATE section
- For INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, table elimination should 
  check which tables are referenced in the ON DUPLICATE KEY UPDATE clause.
2013-11-27 17:43:16 +04:00
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Sergey Petrunya
37e9714c5e MDEV-4840: Wrong result (missing rows) on LEFT JOIN with InnoDB tables
Fix two problems in table elimination code:
- Before marking a "value" as bound, check if it is already bound. Marking the 
  same value as bound twice could confuse a module that depends on this value, 
  because Dep_module_XXX use counters to know when they become bound.

- When checking whether field is part of a key, ignore "extended keys" property.
2013-08-22 14:12:10 +04:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Alexander Barkov
5b0774ee1c Adding support for MySQL-5.6 temporal column types:
TIME, DATETIME, TIMESTAMP


added:
  mysql-test/r/type_temporal_mysql56.result
  mysql-test/std_data/mysql56datetime.MYD
  mysql-test/std_data/mysql56datetime.MYI
  mysql-test/std_data/mysql56datetime.frm
  mysql-test/std_data/mysql56time.MYD
  mysql-test/std_data/mysql56time.MYI
  mysql-test/std_data/mysql56time.frm
  mysql-test/std_data/mysql56timestamp.MYD
  mysql-test/std_data/mysql56timestamp.MYI
  mysql-test/std_data/mysql56timestamp.frm
  mysql-test/suite/rpl/r/rpl_temporal_mysql56.result
  mysql-test/suite/rpl/t/rpl_temporal_mysql56.test
  mysql-test/t/type_temporal_mysql56.test
  sql/compat56.cc
  sql/compat56.h
modified:
  client/mysqlbinlog.cc
  include/my_time.h
  include/mysql.h.pp
  include/mysql_com.h
  mysql-test/r/statistics.result
  mysql-test/r/strict.result
  mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
  mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
  sql-common/my_time.c
  sql/CMakeLists.txt
  sql/field.cc
  sql/field.h
  sql/item.cc
  sql/item_strfunc.cc
  sql/item_sum.cc
  sql/item_timefunc.cc
  sql/log_event.cc
  sql/opt_range.cc
  sql/opt_table_elimination.cc
  sql/protocol.cc
  sql/rpl_utility.cc
  sql/rpl_utility.h
  sql/sql_partition.cc
  sql/sql_prepare.cc
  sql/sql_select.cc
  sql/sql_table.cc
  sql/table.cc
  storage/perfschema/pfs_engine_table.cc
2013-07-10 11:49:17 +04:00
Michael Widenius
5f1f2fc0e4 Applied all changes from Igor and Sanja 2013-06-15 18:32:08 +03:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Sergei Golubchik
5bf311e1e8 fix the include guards and add missing gplv2 headers 2012-02-17 12:19:38 +01:00
Sergei Golubchik
d2755a2c9c 5.3->5.5 merge 2011-11-22 18:04:38 +01:00
Sergei Golubchik
557f0d3ad0 5.2->5.3 merge 2011-11-12 18:08:12 +01:00
Sergey Petrunya
f2b6f4e3df BUG#884184: Wrong result with RIGHT JOIN + derived_merge
- Make eliminate_tables_for_list() take into account that it is not possible
  to eliminate a table if it is used in the upper-side ON expressions. Example:

    xxx JOIN (t1 LEFT JOIN t2 ON cond ) ON func(t2.columns)

  Here it would eliminate t2 which is not possible because of use of t2.columns.
2011-11-01 12:36:43 +04:00
Sergey Petrunya
acb2d4aad8 BUG#884631: Table elimination works 5.3 release builds even if turned off
- Make table elimination to actually switch itself on/off in release builds.
2011-11-01 12:04:11 +04:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
Igor Babaev
8d9dd21d85 Fixed LP bugs #717577, #724942.
Both these two bugs happened due to the following problem.
When a view column is referenced in the query an Item_direct_view_ref
object is created that is refers to the Item_field for the column.
All references to the same view column refer to the same Item_field.
Different references can belong to different AND/OR levels and,
as a result, can be included in different Item_equal object.
These Item_equal objects may include different constant objects.
If these constant objects are substituted for the Item_field created
for a view column we have a conflict situation when the second
substitution annuls the first substitution. This leads to
wrong result sets returned by the query. Bug #724942 demonstrates
such an erroneous behaviour.
Test case of the bug #717577 produces wrong result sets because best
equal fields of the multiple equalities built for different OR levels
of the WHERE condition differs. The subsitution for the best equal field
in the second OR branch overwrites the the substitution made for the
first branch.

To avoid such conflicts we have to substitute for the references
to the view columns rather than for the underlying field items.
To make such substitutions possible we have to include into
multiple equalities references to view columns rather than 
field items created for such columns.

This patch modifies the Item_equal class to include references
to view columns into multiple equality objects. It also performs
a clean up of the class methods and adds more comments. The methods
of the Item_direct_view_ref class that assist substitutions for
references to view columns has been also added by this patch.
2011-04-26 19:58:41 -07:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Michael Widenius
ff3da0f963 Change TABLE->alias to String for less memory reallocation
Changed some String.ptr() -> String.c_ptr() for String that are not guaranteed to end with \0
Removed some c_ptr() usage from parameters to functions that takes ptr & length
Use preallocate buffers to avoid calling malloc() for most operations. 


sql/event_db_repository.cc:
  alias is now a String
sql/event_scheduler.cc:
  c_ptr -> c_ptr_safe() to avoid warnings from valgrind.
sql/events.cc:
  c_ptr -> c_ptr_safe() to avoid warnings from valgrind.
  c_ptr -> ptr() as function takes ptr & length
sql/field.cc:
  alias is now a String
sql/field.h:
  alias is now a String
sql/ha_partition.cc:
  alias is now a String
sql/handler.cc:
  alias is now a String
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/item.cc:
  Store error parameter in separarte buffer to ensure correct error message
sql/item_func.cc:
  ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated
sql/item_sum.h:
  Use my_strtod() instead of my_atof() to not have to make string \0 terminated
sql/lock.cc:
  alias is now a String
sql/log.cc:
  c_ptr() -> ptr() as function takes ptr & length
sql/log_event.cc:
  c_ptr_quick() -> ptr() as we only want to get the pointer to String buffer
sql/opt_range.cc:
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/opt_table_elimination.cc:
  alias is now a String
sql/set_var.cc:
  ptr() -> c_ptr() as string is not guaranteed to be \0 terminated
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  c_ptr() -> ptr() as function takes ptr & length
  Simplify some code.
sql/sp.cc:
  c_ptr() -> ptr() as function takes ptr & length
sql/sp_rcontext.cc:
  alias is now a String
sql/sql_base.cc:
  alias is now a String.
  Here we win a realloc() for most alias usage.
sql/sql_class.cc:
  Use size descriptor for printf() to avoid accessing bytes outside of buffer
sql/sql_insert.cc:
  Change allocation of TABLE as it's now contains a String
  _ptr() -> ptr() as function takes ptr & length
sql/sql_load.cc:
  Use preallocate buffers to avoid calling malloc() for most operations.
sql/sql_parse.cc:
  Use c_ptr_safe() to ensure string is \0 terminated.
sql/sql_plugin.cc:
  c_ptr_quick() -> ptr() as function takes ptr & length
sql/sql_select.cc:
  alias is now a String
sql/sql_show.cc:
  alias is now a String
sql/sql_string.h:
  Added move() function to change who owns the string (owner does the free)
sql/sql_table.cc:
  alias is now a String
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
sql/sql_test.cc:
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  alias is now a String
sql/sql_trigger.cc:
  c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
  Use field->init() to setup pointers to alias.
sql/sql_update.cc:
  alias is now a String
sql/sql_view.cc:
  ptr() -> c_ptr_safe() as string is not guaranteed to be \0 terminated
sql/sql_yacc.yy:
  r() -> c_ptr() as string is not guaranteed to be \0 terminated
sql/table.cc:
  alias is now a String
sql/table.h:
  alias is now a String
storage/federatedx/ha_federatedx.cc:
  Remove extra 1 byte alloc that is automaticly done by strmake()
  Ensure that error message ends with \0
storage/maria/ha_maria.cc:
  alias is now a String
storage/myisam/ha_myisam.cc:
  alias is now a String
2011-02-28 12:48:50 +02:00
Igor Babaev
84a0c9b2a2 Fixed LP bug #698882.
Made sure that the optimal fields are used by TABLE_REF objects
when building index access keys to joined tables.
Fixed a bug in the template function that sorts the elements of
a list using the bubble sort algorithm. The bug caused poor
performance of the function. Also added an optimization that
skips comparison with the most heavy elements that has been 
already properly placed in the list.
Made the comparison of the fields belonging to the same Item_equal
more granular: fields belonging to the same table are also ordered
according to some rules.
2011-01-15 11:14:36 -08:00
Michael Widenius
52090a4434 Code cleanup to get fewer reallocs() during execution.
- Changed TABLE->alias to String to get fewer reallocs when alias are used.
- Preallocate some buffers

Changed some String->c_ptr() -> String->ptr() when \0 is not needed.
Fixed wrong usage of String->ptr() when we need a \0 terminated string.
Use my_strtod() instead of my_atof() to avoid having to add \0 to string.
c_ptr() -> c_ptr_safe() to avoid warnings from valgrind.
zr 

sql/event_db_repository.cc:
  Update usage of TABLE->alias
sql/event_scheduler.cc:
  c_ptr() -> c_ptr_safe()
sql/events.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/field.cc:
  Update usage of TABLE->alias
sql/field.h:
  Update usage of TABLE->alias
sql/ha_partition.cc:
  Update usage of TABLE->alias
sql/handler.cc:
  Update usage of TABLE->alias
  Fixed wrong usage of str.ptr()
sql/item.cc:
  Fixed error where code wrongly assumed string was \0 terminated.
sql/item_func.cc:
  c_ptr() -> c_ptr_safe()
  Update usage of TABLE->alias
sql/item_sum.h:
  Use my_strtod() instead of my_atof() to avoid having to add \0 to string
sql/lock.cc:
  Update usage of TABLE->alias
sql/log.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/log_event.cc:
  c_ptr_quick() -> ptr() as \0 was not needed
sql/opt_range.cc:
  ptr() -> c_ptr() as \0 is needed
sql/opt_subselect.cc:
  Update usage of TABLE->alias
sql/opt_table_elimination.cc:
  Update usage of TABLE->alias
sql/set_var.cc:
  ptr() -> c_ptr() as \0 is needed
  c_ptr() -> c_ptr_safe()
sql/sp.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/sp_rcontext.cc:
  
  Update usage of TABLE->alias
sql/sql_base.cc:
  Preallocate buffers
  Update usage of TABLE->alias
sql/sql_class.cc:
  Fix arguments to sprintf() to work even if string is not \0 terminated
sql/sql_insert.cc:
  Update usage of TABLE->alias
  c_ptr() -> ptr() as \0 was not needed
sql/sql_load.cc:
  Preallocate buffers
  Trivial optimizations
sql/sql_parse.cc:
  Trivial optimization
sql/sql_plugin.cc:
  c_ptr() -> ptr() as \0 was not needed
sql/sql_select.cc:
  Update usage of TABLE->alias
sql/sql_show.cc:
  Update usage of TABLE->alias
sql/sql_string.h:
  Added move() function to move allocated memory from one object to another.
sql/sql_table.cc:
  Update usage of TABLE->alias
  c_ptr() -> c_ptr_safe()
sql/sql_test.cc:
  ptr() -> c_ptr_safe()
sql/sql_trigger.cc:
  Update usage of TABLE->alias
  c_ptr() -> c_ptr_safe()
sql/sql_update.cc:
  Update usage of TABLE->alias
sql/sql_view.cc:
  ptr() -> c_ptr_safe()
sql/sql_yacc.yy:
  ptr() -> c_ptr()
sql/table.cc:
  
  Update usage of TABLE->alias
sql/table.h:
  Changed TABLE->alias to String to get fewer reallocs when alias are used.
storage/federatedx/ha_federatedx.cc:
  Use c_ptr_safe() to ensure strings are \0 terminated.
storage/maria/ha_maria.cc:
  Update usage of TABLE->alias
storage/myisam/ha_myisam.cc:
  Update usage of TABLE->alias
storage/xtradb/row/row0sel.c:
  Ensure that null bits in record are properly reset.
  (Old code didn't work as row_search_for_mysql() can be called twice while reading fields from one row.
2010-11-24 00:08:48 +02: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
d042146e5b Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
2010-08-05 22:56:11 +03:00
Sergey Petrunya
7df026676b Merge MariaDB-5.2 -> MariaDB 5.3 2010-03-20 15:01:47 +03:00
Sergey Petrunya
71a2047d6b Change Field_enumerator to enumerate Item_field-s not Field-s.
In Item_ref::fix_fields() do invoke mark_as_dependent() for outside 
references in all cases (see email for more details)

sql/item.cc:
  In Item_ref::fix_fields() do invoke mark_as_dependent() for outside references in all cases.
sql/item.h:
  Change Field_enumerator to enumerate Item_field-s not Field-s.
sql/item_subselect.cc:
  Change Field_enumerator to enumerate Item_field-s not Field-s.
sql/opt_table_elimination.cc:
  Change Field_enumerator to enumerate Item_field-s not Field-s.
2010-02-21 08:32:23 +02:00
Sergey Petrunya
69028d5127 LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
- When analying multiple equalities, take into account that they 
  may not have a single table field that belongs to one of the tables
  that we're trying to eliminate (and they are not useful for table
  elimination in that case)

mysql-test/r/table_elim.result:
  LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
  - Testcase
mysql-test/t/table_elim.test:
  LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
  - Testcase
2010-02-18 15:03:52 +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
Sergey Petrunya
2f93e7cd3f MWL#17: Table elimination: fixes for windows
include/my_global.h:
  MWL#17: Table elimination: fixes for windows
  - Add ALIGN_MAX_UNIT (assume malloc returns data aligned to this much)
mysql-test/r/table_elim.result:
  MWL#17: Table elimination: fixes for windows
  - Use only lower-case as EXPLAIN [EXTENDED] changes case of table names
    on windows
mysql-test/t/table_elim.test:
  MWL#17: Table elimination: fixes for windows
  - Use only lower-case as EXPLAIN [EXTENDED] changes case of table names
    on windows
sql/opt_table_elimination.cc:
  MWL#17: Table elimination: fixes for windows
  - Add extra alignment-padding-space for stack-allocated buffers.
2009-09-16 23:05:03 +04:00
unknown
be70bfe043 Fix compiler warnings. 2009-09-07 09:12:38 +02:00
Sergey Petrunya
24c2fea6ad MWL#17: Table elimination
- Address review feedback R4: better comments, formatting
2009-09-02 01:41:16 +04:00
Sergey Petrunya
d762bf21cc MWL#17: Table-elimination
- Addressing review feedback, generation 4.

include/my_global.h:
  Make ALIGN_PTR's action correspond to that of ALIGN_SIZE
sql/item.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item.h:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item_cmpfunc.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item_subselect.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/item_subselect.h:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
sql/opt_table_elimination.cc:
  MWL#17: Table-elimination
  - Addressing review feedback, generation 4: abstract everything in case
    we would need to change it for something else in the future.
sql/sql_list.h:
  MWL#17: Table-elimination
  - Introduce exchange_sort(List<T> ...) template function
sql/sql_select.cc:
  MWL#17: Table-elimination
  - Review feedback: function renames, better comments
2009-09-01 00:02:09 +04:00
Sergey Petrunya
005c24e973 MWL#17: Table elimination:
- Fix a trivial problem when OR-merging two multi-equalities
- Amend testsuite to provide full gcov coverage

mysql-test/r/table_elim.result:
  MWL#17: Table elimination:
  - Amend testsuite to provide full gcov coverage
mysql-test/t/table_elim.test:
  MWL#17: Table elimination:
  - Amend testsuite to provide full gcov coverage
2009-08-27 01:01:40 +04:00
Sergey Petrunya
0e7a18e4a8 MWL#17: Table elimination
- Mark gcov deadcode
2009-08-25 17:59:15 +03:00
Sergey Petrunya
de41681afa MWL#17: Table elimination
- More test coverage
- Remove unused code
2009-08-25 13:38:22 +03:00
Sergey Petrunya
9400700b99 MWL#17: Table elimination
- Add more testcases.
- Fix trivial compile failure
- Remove handling of "column IN (one_element)". This is converted to equality 
  elsewhere

mysql-test/r/table_elim.result:
  MWL#17: Table elimination
  - Add more testcases.
  - Fix trivial compile failure
mysql-test/t/table_elim.test:
  MWL#17: Table elimination
  - Add more testcases
sql/mysqld.cc:
  MWL#17: Table elimination
  - Fix trivial compile failure
sql/opt_table_elimination.cc:
  MWL#17: Table elimination
  - Add more testcases.
  - Remove handling of "column IN (one_element)".This is converted to equality 
    elsewhere
2009-08-25 12:27:50 +03:00
Sergey Petrunya
d294aae6c8 MWL#17: Table elimination: last fixes
- Add an @@optimizer_switch flag for table_elimination for debug build
- Better comments 

mysql-test/t/index_merge_myisam.test:
  MWL#17: Table elimination: last fixes
  - Add an @@optimizer_switch flag for table_elimination for debug build
sql/mysql_priv.h:
  MWL#17: Table elimination: last fixes
  - Add an @@optimizer_switch flag for table_elimination for debug build
sql/mysqld.cc:
  MWL#17: Table elimination: last fixes
  - Add an @@optimizer_switch flag for table_elimination for debug build
2009-08-24 22:10:48 +03:00
Sergey Petrunya
21d2573908 MWL#17: Table elimination
- Correctly handle the case where we have multi-table DELETE and a table
  that we're deleting from looks like it could be eliminated.
2009-08-24 10:12:42 +02:00
Sergey Petrunya
f3d0b1c04e MWL#17: Table elimination
- Remove a piece of code that's not needed anymore.
2009-08-21 15:36:06 +02:00
Sergey Petrunya
9c1336801e MWL#17: Table elimination
- More testcases
- Set correct dependencies for non-bound multi-equalities.

mysql-test/r/table_elim.result:
  MWL#17: Table elimination
  - More testcases
mysql-test/t/table_elim.test:
  MWL#17: Table elimination
  - More testcases
sql/opt_table_elimination.cc:
  MWL#17: Table elimination
  - Set correct dependencies for non-bound multi-equalities.
2009-08-21 09:48:22 +02:00
Sergey Petrunya
3f5b494900 MWL#17: Table elimination
- Multiple-equality handling
2009-08-20 17:51:02 +02:00
Sergey Petrunya
46c9677628 Variable/function renames 2009-08-19 15:06:59 +03:00