summaryrefslogtreecommitdiff
path: root/sql/opt_table_elimination.cc
Commit message (Collapse)AuthorAgeFilesLines
* Windows : Fix truncation warnings in sql/Vladislav Vaintroub2017-10-101-4/+4
|
* Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-1/+1
|\
| * Correct FSF addressiangilfillan2017-03-101-1/+1
| |
* | cleanup: change Item::walk() to take void* not uchar*Sergei Golubchik2016-06-301-1/+1
| | | | | | | | | | and remove all related casts to uchar* also remove a couple of unused methods
* | The implementation of the template bubble_sort assumedIgor Babaev2016-04-011-1/+1
|/ | | | | | | | | | | | | | that the call-back comparison function returns a positive number when arg1 < arg2, and a negative number when arg1 > arg2. This is not in line with other implementation of sorting algorithm. Changed bubble_sort: now a negative result from the comparison function means that arg1 < arg2, and positive result means that arg1 > arg2. Changed accordingly all call-back functions that are used as parameters in the call of bubble_sort. Added a test case to check the proper sorting of window functions.
* MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-08-271-3/+4
| | | | | | | | - 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()
* Clean-up: moving compare_collation() from Item to Item_bool_func.Alexander Barkov2015-08-211-8/+13
|
* Stage 2 of MDEV-6152:Monty2015-08-211-1/+1
| | | | | | | | - 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
* MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)Sergey Vojtovich2015-08-211-7/+7
| | | | | | | 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.
* MDEV-6989 BINARY and COLLATE xxx_bin comparisions are not used for ↵Alexander Barkov2015-03-131-21/+1
| | | | optimization in some cases
* MDEV-6978 Bad results with join comparing case insensitive VARCHAR/ENUM/SETAlexander Barkov2014-11-191-1/+3
| | | | | expression to a _bin ENUM column
* MDEV-6950 Bad results with joins comparing DATE/DATETIME and ↵Alexander Barkov2014-11-181-0/+2
| | | | | | | | | | | | | 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.
* MDEV-5314 - Compiling fails on OSX using clangSergey Vojtovich2014-02-191-3/+3
| | | | | | | | | | | | | 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++.
* Fixes to get valgrind to work with jemallocMichael Widenius2014-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* 10.0-base mergeSergei Golubchik2013-12-161-0/+15
|\
| * Merge 5.3 -> 5.5Alexander Barkov2013-12-021-0/+15
| |\ | | | | | | | | | | | | | | | pending merges: Sergey Petrunya 2013-11-27 MDEV-5344: LEFT OUTER JOIN table data is lost...
| | * MDEV-5344: LEFT OUTER JOIN table data is lost in ON DUPLICATE KEY UPDATE sectionSergey Petrunya2013-11-271-0/+15
| | | | | | | | | | | | | | | - For INSERT ... SELECT ... ON DUPLICATE KEY UPDATE, table elimination should check which tables are referenced in the ON DUPLICATE KEY UPDATE clause.
* | | 10.0-base merge.Sergei Golubchik2013-09-211-3/+6
|\ \ \ | |/ / | | | | | | | | | Partitioning/InnoDB changes are *not* merged (they'll come from 5.6) TokuDB does not compile (not updated to 10.0 SE API)
| * | MDEV-4840: Wrong result (missing rows) on LEFT JOIN with InnoDB tablesSergey Petrunya2013-08-221-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | 10.0-monty mergeSergei Golubchik2013-07-211-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Applied all changes from Igor and SanjaMichael Widenius2013-06-151-1/+1
| | | |
| * | | Temporary commit of 10.0-mergeMichael Widenius2013-03-261-2/+2
| |/ /
* | | Adding support for MySQL-5.6 temporal column types:Alexander Barkov2013-07-101-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | fix the include guards and add missing gplv2 headersSergei Golubchik2012-02-171-0/+16
| |
* | 5.3->5.5 mergeSergei Golubchik2011-11-221-2/+2
|\ \ | |/
| * 5.2->5.3 mergeSergei Golubchik2011-11-121-0/+2
| |\
| | * BUG#884184: Wrong result with RIGHT JOIN + derived_mergeSergey Petrunya2011-11-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
| | * Change TABLE->alias to String for less memory reallocationMichael Widenius2011-02-281-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | BUG#884631: Table elimination works 5.3 release builds even if turned offSergey Petrunya2011-11-011-2/+0
| | | | | | | | | | | | - Make table elimination to actually switch itself on/off in release builds.
* | | merge with 5.3Sergei Golubchik2011-10-191-8/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Fixed LP bugs #717577, #724942.Igor Babaev2011-04-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Fixed LP bug #698882.Igor Babaev2011-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Code cleanup to get fewer reallocs() during execution.Michael Widenius2010-11-241-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | lots of post-merge changesSergei Golubchik2011-04-251-1/+0
|/ /
* | Merge 5.2->5.3Sergey Petrunya2010-10-101-1/+1
|\ \ | |/ | | | | | | | | - Re-commit Monty's merge, partially fixed by Igor and SergeyP, but still broken
| * Merge with MariaDB 5.1.49Michael Widenius2010-08-051-1/+1
| | | | | | | | | | Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
* | Merge MariaDB-5.2 -> MariaDB 5.3Sergey Petrunya2010-03-201-2/+10
|\ \ | |/
| * LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDBSergey Petrunya2010-02-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Change Field_enumerator to enumerate Item_field-s not Field-s.Sergey Petrunya2010-02-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Backport of subquery optimizations to 5.3.Sergey Petrunya2010-01-171-1/+5
|/ | | | | | There are still test failures because of: - Wrong query results in outer join + semi join - EXPLAIN output differences
* MWL#17: Table elimination: fixes for windowsSergey Petrunya2009-09-161-2/+2
| | | | | | | | | | | | | | | | | 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.
* Fix compiler warnings.unknown2009-09-071-4/+4
|
* MWL#17: Table eliminationSergey Petrunya2009-09-021-28/+44
| | | | | | - Address review feedback R4: better comments, formatting
* MWL#17: Table-eliminationSergey Petrunya2009-09-011-749/+1027
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* MWL#17: Table elimination:Sergey Petrunya2009-08-271-1/+5
| | | | | | | | | | | | - 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
* MWL#17: Table eliminationSergey Petrunya2009-08-251-10/+12
| | | | | | - Mark gcov deadcode
* MWL#17: Table eliminationSergey Petrunya2009-08-251-10/+3
| | | | | | | - More test coverage - Remove unused code
* MWL#17: Table eliminationSergey Petrunya2009-08-251-10/+3
| | | | | | | | | | | | | | | | | | | | | | | - 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
* MWL#17: Table elimination: last fixesSergey Petrunya2009-08-241-73/+122
| | | | | | | | | | | | | | | - 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
* MWL#17: Table eliminationSergey Petrunya2009-08-241-2/+12
| | | | | | | - Correctly handle the case where we have multi-table DELETE and a table that we're deleting from looks like it could be eliminated.