summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
Commit message (Collapse)AuthorAgeFilesLines
* bugfix: table->get_fields_in_item_tree=trueSergei Golubchik2016-12-121-0/+1
| | | | | | | | | partitioning was setting subj as a partitioning-specific hack (GET_FIXED_FIELDS_FLAG field flag to detect partitioning fields) inside init_lex_with_single_table(). But vcols also use init_lex_with_single_table(), they run fix_fields() in open_table_from_share() before partitioning and this messes up partitioning GET_FIXED_FIELDS_FLAG logic.
* cleanup: set_field_ptr()Sergei Golubchik2016-12-121-47/+14
|
* Merge branch '10.2_warnings' of https://github.com/kevgs/server into ↵Marko Mäkelä2016-11-251-2/+4
| | | | | | | | | | kevgs-10.2_warnings Revert the XtraDB changes, because 10.2 does not currently build with XtraDB. Also omit some changes that need further investigation. Ensure that all callers of partition_info::get_clone() are passing this!=NULL.
* MDEV-10763: Wrong result - server does not return NULL values from default ↵Oleksandr Byelkin2016-09-091-2/+13
| | | | | | list partition after ALTER table Fixed partition pruning for NULL value.
* MDEV-10765: Wrong result - query does not retrieve values from default ↵Oleksandr Byelkin2016-09-091-0/+6
| | | | | | partition on a table partitioned by list columns Partial matches should be treat as not exact one.
* MDEV-8348: Add catchall to all table partitioning for list partitionsOleksandr Byelkin2016-09-071-13/+105
| | | | | DEFAULT partition support added to LIST and LIST COLUMN partitioning. Partitions Prunning added for DEFAULT partititon.
* various cleanupsSergei Golubchik2016-06-301-40/+15
| | | | | | | | | | | | | | * remove a confusing method name - Field::set_default_expression() * remove handler::register_columns_for_write() * rename stuff * add asserts * remove unlikely unlikely * remove redundant if() conditions * fix mark_unsupported_function() to report the most important violation * don't scan vfield list for default values (vfields don't have defaults) * move handling for DROP CONSTRAINT IF EXIST where it belongs * don't protect engines from Alter_inplace_info::ALTER_ADD_CONSTRAINT * comments
* cleanup: change Item::walk() to take void* not uchar*Sergei Golubchik2016-06-301-6/+3
| | | | | and remove all related casts to uchar* also remove a couple of unused methods
* MDEV-8715 - Obsolete sql_alloc() in favor of THD::alloc() and thd_alloc()Sergey Vojtovich2015-11-261-2/+2
| | | | | | | | | | | | | | The following left in semi-improved state to keep patch size reasonable: - Field operator new: left thd_alloc(current_thd) - Sql_alloc operator new: left thd_alloc(thd_get_current_thd()) - Item_args constructors: left thd_alloc(thd) - Item_func_interval::fix_length_and_dec(): no THD arg, have to call current_thd - Item_func_dyncol_exists::val_int(): same - Item_dyncol_get::val_str(): same - Item_dyncol_get::val_int(): same - Item_dyncol_get::val_real(): same - Item_dyncol_get::val_decimal(): same - Item_singlerow_subselect::fix_length_and_dec(): same
* MDEV-8716 - Obsolete sql_calloc() in favor of THD::calloc() and thd_calloc()Sergey Vojtovich2015-11-261-14/+15
|
* Merge branch '10.0' into 10.1Sergei Golubchik2015-11-191-1/+0
|\
| * remove unneded #include's that had a dubious explanationSergei Golubchik2015-10-241-1/+0
| |
* | MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-08-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | - Part 4: Removing calls to sql_alloc() and sql_calloc() Other things: - Added current_thd in some places to make it clear that it's called (easier to remove later) - Move memory allocation from Item_func_case::fix_length_and_dec() to Item_func_case::fix_fields() - Added mem_root to some new calls - Fixed some wrong UNINIT_VAR() calls - Fixed a bug in generate_partition_syntax() in case of errors - Added mem_root to argument to new thread_info - Simplified my_parse_error() call in sql_yacc.yy
* | MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-08-271-8/+9
| | | | | | | | | | | | | | | | - 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()
* | MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)Sergey Vojtovich2015-08-211-1/+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.
* | - Renaming variables so that they don't shadow others (After this patch one ↵Monty2015-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | can compile with -Wshadow and get much fewer warnings) - Changed ER(ER_...) to ER_THD(thd, ER_...) when thd was known or if there was many calls to current_thd in the same function. - Changed ER(ER_..) to ER_THD_OR_DEFAULT(current_thd, ER...) in some places where current_thd is not necessary defined. - Removing calls to current_thd when we have access to thd Part of this is optimization (not calling current_thd when not needed), but part is bug fixing for error condition when current_thd is not defined (For example on startup and end of mysqld) Notable renames done as otherwise a lot of functions would have to be changed: - In JOIN structure renamed: examined_rows -> join_examined_rows record_count -> join_record_count - In Field, renamed new_field() to make_new_field() Other things: - Added DBUG_ASSERT(thd == tmp_thd) in Item_singlerow_subselect() just to be safe. - Removed old 'tab' prefix in JOIN_TAB::save_explain_data() and use members directly - Added 'thd' as argument to a few functions to avoid calling current_thd.
* | Merge tag 'mariadb-10.0.19' into 10.1Sergei Golubchik2015-06-011-1/+0
|\ \ | |/
| * remove unused file and unnecessary #includeSergei Golubchik2015-05-031-1/+0
| |
* | MDEV-7856: EXPLAIN FORMAT=JSON should show partitionsOleksandr Byelkin2015-04-091-1/+10
| |
* | cleanup: s/const CHARSET_INFO/CHARSET_INFO/Sergei Golubchik2014-12-041-3/+3
| | | | | | | | | | as CHARSET_INFO is already const, using const on it is redundant and results in compiler warnings (on Windows)
* | Merge branch '10.0' into bb-10.1-mergeSergei Golubchik2014-12-021-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
| * MDEV-5120 Test suite test maria-no-logging failsMichael Widenius2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for the failure was a bug in an include file on debian that causes 'struct stat' to have different sized depending on the environment. This patch fixes so that we always include my_global.h or my_config.h before we include any other files. Other things: - Removed #include <my_global.h> in some include files; Better to always do this at the top level to have as few "always-include-this-file-first' files as possible. - Removed usage of some include files that where already included by my_global.h or by other files. client/mysql_plugin.c: Use my_global.h first client/mysqlslap.c: Remove duplicated include files extra/comp_err.c: Remove duplicated include files include/m_string.h: Remove duplicated include files include/maria.h: Remove duplicated include files libmysqld/emb_qcache.cc: Use my_global.h first plugin/semisync/semisync.h: Use my_pthread.h first sql/datadict.cc: Use my_global.h first sql/debug_sync.cc: Use my_global.h first sql/derror.cc: Use my_global.h first sql/des_key_file.cc: Use my_global.h first sql/discover.cc: Use my_global.h first sql/event_data_objects.cc: Use my_global.h first sql/event_db_repository.cc: Use my_global.h first sql/event_parse_data.cc: Use my_global.h first sql/event_queue.cc: Use my_global.h first sql/event_scheduler.cc: Use my_global.h first sql/events.cc: Use my_global.h first sql/field.cc: Use my_global.h first Remove duplicated include files sql/field_conv.cc: Use my_global.h first sql/filesort.cc: Use my_global.h first Remove duplicated include files sql/gstream.cc: Use my_global.h first sql/ha_ndbcluster.cc: Use my_global.h first sql/ha_ndbcluster_binlog.cc: Use my_global.h first sql/ha_ndbcluster_cond.cc: Use my_global.h first sql/ha_partition.cc: Use my_global.h first sql/handler.cc: Use my_global.h first sql/hash_filo.cc: Use my_global.h first sql/hostname.cc: Use my_global.h first sql/init.cc: Use my_global.h first sql/item.cc: Use my_global.h first sql/item_buff.cc: Use my_global.h first sql/item_cmpfunc.cc: Use my_global.h first sql/item_create.cc: Use my_global.h first sql/item_geofunc.cc: Use my_global.h first sql/item_inetfunc.cc: Use my_global.h first sql/item_row.cc: Use my_global.h first sql/item_strfunc.cc: Use my_global.h first sql/item_subselect.cc: Use my_global.h first sql/item_sum.cc: Use my_global.h first sql/item_timefunc.cc: Use my_global.h first sql/item_xmlfunc.cc: Use my_global.h first sql/key.cc: Use my_global.h first sql/lock.cc: Use my_global.h first sql/log.cc: Use my_global.h first sql/log_event.cc: Use my_global.h first sql/log_event_old.cc: Use my_global.h first sql/mf_iocache.cc: Use my_global.h first sql/mysql_install_db.cc: Remove duplicated include files sql/mysqld.cc: Remove duplicated include files sql/net_serv.cc: Remove duplicated include files sql/opt_range.cc: Use my_global.h first sql/opt_subselect.cc: Use my_global.h first sql/opt_sum.cc: Use my_global.h first sql/parse_file.cc: Use my_global.h first sql/partition_info.cc: Use my_global.h first sql/procedure.cc: Use my_global.h first sql/protocol.cc: Use my_global.h first sql/records.cc: Use my_global.h first sql/records.h: Don't include my_global.h Better to do this at the upper level sql/repl_failsafe.cc: Use my_global.h first sql/rpl_filter.cc: Use my_global.h first sql/rpl_gtid.cc: Use my_global.h first sql/rpl_handler.cc: Use my_global.h first sql/rpl_injector.cc: Use my_global.h first sql/rpl_record.cc: Use my_global.h first sql/rpl_record_old.cc: Use my_global.h first sql/rpl_reporting.cc: Use my_global.h first sql/rpl_rli.cc: Use my_global.h first sql/rpl_tblmap.cc: Use my_global.h first sql/rpl_utility.cc: Use my_global.h first sql/set_var.cc: Added comment sql/slave.cc: Use my_global.h first sql/sp.cc: Use my_global.h first sql/sp_cache.cc: Use my_global.h first sql/sp_head.cc: Use my_global.h first sql/sp_pcontext.cc: Use my_global.h first sql/sp_rcontext.cc: Use my_global.h first sql/spatial.cc: Use my_global.h first sql/sql_acl.cc: Use my_global.h first sql/sql_admin.cc: Use my_global.h first sql/sql_analyse.cc: Use my_global.h first sql/sql_audit.cc: Use my_global.h first sql/sql_base.cc: Use my_global.h first sql/sql_binlog.cc: Use my_global.h first sql/sql_bootstrap.cc: Use my_global.h first Use my_global.h first sql/sql_cache.cc: Use my_global.h first sql/sql_class.cc: Use my_global.h first sql/sql_client.cc: Use my_global.h first sql/sql_connect.cc: Use my_global.h first sql/sql_crypt.cc: Use my_global.h first sql/sql_cursor.cc: Use my_global.h first sql/sql_db.cc: Use my_global.h first sql/sql_delete.cc: Use my_global.h first sql/sql_derived.cc: Use my_global.h first sql/sql_do.cc: Use my_global.h first sql/sql_error.cc: Use my_global.h first sql/sql_explain.cc: Use my_global.h first sql/sql_expression_cache.cc: Use my_global.h first sql/sql_handler.cc: Use my_global.h first sql/sql_help.cc: Use my_global.h first sql/sql_insert.cc: Use my_global.h first sql/sql_lex.cc: Use my_global.h first sql/sql_load.cc: Use my_global.h first sql/sql_locale.cc: Use my_global.h first sql/sql_manager.cc: Use my_global.h first sql/sql_parse.cc: Use my_global.h first sql/sql_partition.cc: Use my_global.h first sql/sql_plugin.cc: Added comment sql/sql_prepare.cc: Use my_global.h first sql/sql_priv.h: Added error if we use this before including my_global.h This check is here becasue so many files includes sql_priv.h first. sql/sql_profile.cc: Use my_global.h first sql/sql_reload.cc: Use my_global.h first sql/sql_rename.cc: Use my_global.h first sql/sql_repl.cc: Use my_global.h first sql/sql_select.cc: Use my_global.h first sql/sql_servers.cc: Use my_global.h first sql/sql_show.cc: Added comment sql/sql_signal.cc: Use my_global.h first sql/sql_statistics.cc: Use my_global.h first sql/sql_table.cc: Use my_global.h first sql/sql_tablespace.cc: Use my_global.h first sql/sql_test.cc: Use my_global.h first sql/sql_time.cc: Use my_global.h first sql/sql_trigger.cc: Use my_global.h first sql/sql_udf.cc: Use my_global.h first sql/sql_union.cc: Use my_global.h first sql/sql_update.cc: Use my_global.h first sql/sql_view.cc: Use my_global.h first sql/sys_vars.cc: Added comment sql/table.cc: Use my_global.h first sql/thr_malloc.cc: Use my_global.h first sql/transaction.cc: Use my_global.h first sql/uniques.cc: Use my_global.h first sql/unireg.cc: Use my_global.h first sql/unireg.h: Removed inclusion of my_global.h storage/archive/ha_archive.cc: Added comment storage/blackhole/ha_blackhole.cc: Use my_global.h first storage/csv/ha_tina.cc: Use my_global.h first storage/csv/transparent_file.cc: Use my_global.h first storage/federated/ha_federated.cc: Use my_global.h first storage/federatedx/federatedx_io.cc: Use my_global.h first storage/federatedx/federatedx_io_mysql.cc: Use my_global.h first storage/federatedx/federatedx_io_null.cc: Use my_global.h first storage/federatedx/federatedx_txn.cc: Use my_global.h first storage/heap/ha_heap.cc: Use my_global.h first storage/innobase/handler/handler0alter.cc: Use my_global.h first storage/maria/ha_maria.cc: Use my_global.h first storage/maria/unittest/ma_maria_log_cleanup.c: Remove duplicated include files storage/maria/unittest/test_file.c: Added comment storage/myisam/ha_myisam.cc: Move sql_plugin.h first as this includes my_global.h storage/myisammrg/ha_myisammrg.cc: Use my_global.h first storage/oqgraph/oqgraph_thunk.cc: Use my_config.h and my_global.h first One could not include my_global.h before oqgraph_thunk.h (don't know why) storage/spider/ha_spider.cc: Use my_global.h first storage/spider/hs_client/config.cpp: Use my_global.h first storage/spider/hs_client/escape.cpp: Use my_global.h first storage/spider/hs_client/fatal.cpp: Use my_global.h first storage/spider/hs_client/hstcpcli.cpp: Use my_global.h first storage/spider/hs_client/socket.cpp: Use my_global.h first storage/spider/hs_client/string_util.cpp: Use my_global.h first storage/spider/spd_conn.cc: Use my_global.h first storage/spider/spd_copy_tables.cc: Use my_global.h first storage/spider/spd_db_conn.cc: Use my_global.h first storage/spider/spd_db_handlersocket.cc: Use my_global.h first storage/spider/spd_db_mysql.cc: Use my_global.h first storage/spider/spd_db_oracle.cc: Use my_global.h first storage/spider/spd_direct_sql.cc: Use my_global.h first storage/spider/spd_i_s.cc: Use my_global.h first storage/spider/spd_malloc.cc: Use my_global.h first storage/spider/spd_param.cc: Use my_global.h first storage/spider/spd_ping_table.cc: Use my_global.h first storage/spider/spd_sys_table.cc: Use my_global.h first storage/spider/spd_table.cc: Use my_global.h first storage/spider/spd_trx.cc: Use my_global.h first storage/xtradb/handler/handler0alter.cc: Use my_global.h first storage/xtradb/handler/i_s.cc: Use my_global.h first
* | Merge 10.0.14 into 10.1Sergei Golubchik2014-10-151-19/+24
|\ \ | |/
| * 5.5.39 mergeSergei Golubchik2014-08-071-19/+24
| |\
| | * mysql-5.5.39 mergeSergei Golubchik2014-08-021-32/+38
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | ~40% bugfixed(*) applied ~40$ bugfixed reverted (incorrect or we're not buggy) ~20% bugfixed applied, despite us being not buggy (*) only changes in the server code, e.g. not cmakefiles
| | | * BUG#18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONSNisha Gopalakrishnan2014-06-241-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CORRUPTS FRM Analysis: --------- ALTER TABLE on a partitioned table resulted in the wrong engine being written into the table's FRM file and displayed in SHOW CREATE TABLE. The prep_alter_part_table() modifies the partition_info object for TABLE instance representing the old version of table. If the ALTER TABLE ENGINE statement fails, the partition_info object for the TABLE contains the altered storage engine name. The SHOW CREATE TABLE uses the TABLE object to display the table information, hence displays incorrect storage engine for the table. Also a subsequent successful ALTER TABLE operation will write the incorrect engine information into the FRM file. Fix: --- A copy of the partition_info object is created before modification so that any changes would not cause the the original partition_info object to be modified if the ALTER TABLE fails.(Backported part of the code provided as fix for bug#14156617 in mysql-5.6.6).
| | | * Bug#17909699: WRONG RESULTS WITH PARTITION BY LIST COLUMNS()Mattias Jonsson2014-05-061-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typo leading to not including the last list values (partition). Also improved pruning to skip last partition if not used. rb#4762 approved by Aditya and Marko.
| | * | MDEV-6322: The PARTITION engine can return wrong query resultsSergey Petrunya2014-07-231-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL Bug#71095: Wrong results with PARTITION BY LIST COLUMNS() MySQL Bug#72803: Wrong "Impossible where" with LIST partitioning MDEV-6240: Wrong "Impossible where" with LIST partitioning - Backprot the fix from MySQL Bug#71095.
* | | | MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)Sergei Golubchik2014-10-111-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | remove: * NDB from everywhere * IM from mtr-v1 * packaging/rpm-oel and packaging/rpm-uln * few unused spec files * plug.in file * .bzrignore
* | | remove append_escaped(), use String::append_for_single_quote() insteadSergei Golubchik2014-03-261-3/+1
| | |
* | | MDEV-5314 - Compiling fails on OSX using clangSergey Vojtovich2014-02-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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++.
* | | Automatic mergeMichael Widenius2014-02-051-3/+3
|\ \ \
| * | | Fixes to get valgrind to work with jemallocMichael Widenius2014-01-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 Golubchik2014-02-031-0/+2
|\ \ \ \ | |/ / / |/| | |
| * | | 5.5 mergeSergei Golubchik2014-02-011-0/+2
| |\ \ \ | | |/ /
| | * | MySQL-5.5.35 mergeSergei Golubchik2014-01-221-0/+2
| | |\ \ | | | |/
| | | * Bug#17559867 AFTER REBUILDING , A MYISAM PARTITION ENDS UP Aditya A2013-10-181-0/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | AS A INNODB PARTITTION. [Merged from 5.1]
| | | | * Bug#17559867 AFTER REBUILDING,A MYISAM PARTITION ENDS UP Aditya A2013-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AS A INNODB PARTITTION. PROBLEM ------- The correct engine_type was not being set during rebuild of the partition due to which the handler was always created with the default engine, which is innodb for 5.5+ ,therefore even if the table was myisam, after rebuilding the partitions ended up as innodb partitions. FIX --- Set the correct engine type during rebuild. [Approved by mattiasj #rb3599]
| | | | * Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-191-1/+1
| | | | |
| | | | * Updated/added copyright headers.Murthy Narkedimilli2013-02-251-1/+1
| | | | |
| | | * | Fix for Bug#16614004 CRASH AFTER READING FREED MEMORY AFTER DOING DDL IN ↵Guilhem Bichot2013-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STORED ROUTINE Inside a loop in a stored procedure, we create a partitioned table. The CREATE statement is thus treated as a prepared statement: it is prepared once, and then executed by each iteration. Thus its Lex is reused many times. This Lex contains a part_info member, which describes how the partitions should be laid out, including the partitioning function. Each execution of the CREATE does this, in open_table_from_share (): tmp= mysql_unpack_partition(thd, share->partition_info_str, share->partition_info_str_len, outparam, is_create_table, share->default_part_db_type, &work_part_info_used); ... tmp= fix_partition_func(thd, outparam, is_create_table); The first line calls init_lex_with_single_table() which creates a TABLE_LIST, necessary for the "field fixing" which will be done by the second line; this is how it is created: if ((!(table_ident= new Table_ident(thd, table->s->db, table->s->table_name, TRUE))) || (!(table_list= select_lex->add_table_to_list(thd, table_ident, NULL, 0)))) return TRUE; it is allocated in the execution memory root. Then the partitioning function ("id", stored in Lex -> part_info) is fixed, which calls Item_ident:: fix_fields (), which resolves "id" to the table_list above, and stores in the item's cached_table a pointer to this table_list. The table is created, later it is dropped by another statement, then we execute again the prepared CREATE. This reuses the Lex, thus also its part_info, thus also the item representing the partitioning function (part_info is cloned but it's a shallow cloning); CREATE wants to fix the item again (which is normal, every execution fixes items again), fix_fields () sees that the cached_table pointer is set and picks up the pointed table_list. But this last object does not exist anymore (it was allocated in the execution memory root of the previous execution, so it has been freed), so we access invalid memory. The solution: when creating the table_list, mark that it cannot be cached.
* | | | | MDEV-5281 Partitioning issue after upgrade from 10.0.3-1 to 10.0.5-1Sergei Golubchik2013-11-281-14/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merged from 5.6: Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING Bug#16589511: MYSQL_UPGRADE FAILS TO WRITE OUT ENTIRE ALTER TABLE ... ALGORITHM= ... STATEMENT Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN DOWNGRADED FROM 5.6.11 TO 5.6.10 plus minor changes from 5.6, mainly comments
* | | | | 10.0-base merge.Sergei Golubchik2013-09-211-142/+207
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | Partitioning/InnoDB changes are *not* merged (they'll come from 5.6) TokuDB does not compile (not updated to 10.0 SE API)
| * | | | 5.5 merge and fixes for compiler/test errorsSergei Golubchik2013-09-181-142/+207
| |\ \ \ \ | | |/ / /
| | * | | mysql-5.5.33 mergeSergei Golubchik2013-09-061-142/+207
| | |\ \ \ | | | |/ /
| | | * | Bug#16447483: PARTITION PRUNING IS NOT CORRECT FOR RANGE COLUMNSMattias Jonsson2013-05-161-142/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was in get_partition_id_cols_range_for_endpoint and cmp_rec_and_tuple_prune, which stepped one partition too long. Solution was to move a small portion of logic to cmp_rec_and_tuple_prune, to simplify both get_partition_id_cols_range_for_endpoint and get_partition_id_cols_list_for_endpoint.
* | | | | 10.0-monty mergeSergei Golubchik2013-07-211-485/+567
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Fixed issues with partitions and create temporary table SELECT ...Michael Widenius2013-07-031-138/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged all ddl_logging code. Merged sql_partition.cc innodb_mysql_lock2.test and partition_cache.test now works. Changed interface to strconvert() to make it easier to use with not \0 terminated strings. sql/sql_partition.cc: Full merge with 5.6 sql/sql_table.cc: Merged all ddl_logging code sql/strfunc.cc: Added from_length argument to strconvert() to make it possible to use without end terminated strings. sql/strfunc.h: Added from_length argument to strconvert() to make it possible to use without end terminated strings.
| * | | | | ha_partition.cc and ha_partition.h are now completely mergedMichael Widenius2013-06-271-4/+75
| | | | | | | | | | | | | | | | | | | | | | | | Added sql_mode_t to simplify merges
| * | | | | Applied all changes from Igor and SanjaMichael Widenius2013-06-151-191/+367
| | | | | |