summaryrefslogtreecommitdiff
path: root/sql/partition_info.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.3' into 10.4Oleksandr Byelkin2019-09-021-4/+3
|\
| * MDEV-18501 Partition pruning doesn't work for historical queries (refactoring)Aleksey Midenkov2019-09-011-2/+2
| | | | | | | | | | | | | | | | | | SYSTEM_TYPE partitioning: COLUMN properties removed. Partitioning is now pure RANGE based on UNIX_TIMESTAMP(row_end). DECIMAL type is now allowed as RANGE partitioning, we can partition by UNIX_TIMESTAMP() (but not for DATETIME which depends on local timezone of course).
| * MDEV-18501 Partition pruning doesn't work for historical queries (cleanup)Aleksey Midenkov2019-09-011-2/+1
| | | | | | | | Cleanup removes useless allocation.
* | Merge 10.3 into 10.4Marko Mäkelä2019-05-221-1/+10
|\ \ | |/
| * MDEV-18136 Server crashes in Item_func_dyncol_create::prepare_argumentsAleksey Midenkov2019-05-201-2/+12
| | | | | | | | [Closes tempesta-tech/mariadb#572]
* | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | |\
| | | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-121-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-12-121-0/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-12-121-0/+1
| | |\ \ \ | | | |/ /
| | | * | Merge 10.0 into 10.1Marko Mäkelä2018-12-121-0/+1
| | | |\ \
| | | | * | MDEV-17032: Estimates are higher for partitions of a table with ↵Varun Gupta2018-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @@use_stat_tables= PREFERABLY The problem here is EITS statistics does not calculate statistics for the partitions of the table. So a temporary solution would be to not read EITS statistics for partitioned tables. Also disabling reading of EITS for columns that participate in the partition list of a table.
* | | | | | MDEV-17317 Add THD* parameter into Item::get_date() and stricter data type ↵Alexander Barkov2018-09-281-2/+3
|/ / / / / | | | | | | | | | | | | | | | control to "fuzzydate"
* | | | | dead code - related to vtmdSergei Golubchik2018-04-101-1/+0
| | | | | | | | | | | | | | | | | | | | (will be added back when it'll be used)
* | | | | PARTITION BY SYSTEM_TIME INTERVAL ...Sergei Golubchik2018-02-231-155/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of changes: * calculate the current history partition in ::external_lock(), not in ::write_row() or ::update_row() * remove dynamically collected per-partition row_end stats * no full table scan in open_table_from_share to calculate these stats, no manual MDL/thr_locks in open_table_from_share * no shared stats in TABLE_SHARE = no mutexes or condition waits when calculating current history partition * always compare timestamps, don't convert them to MYSQL_TIME (avoid DST ambiguity, and it's faster too) * correct interval handling, 1 month = 1 month, not 30 * 24 * 3600 seconds * save/restore first partition start time, and count intervals from there * only allow to drop first partitions if INTERVAL * when adding new history partitions, split the data in the last history parition, if it was overflowed * show partition boundaries in INFORMATION_SCHEMA.PARTITIONS
* | | | | cleanup: partition_info::check_constantsSergei Golubchik2018-02-231-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partition_info had a bunch of function pointers to avoid if()'s when invoking part_type specific functionality (like get_part_id, etc). But check_range_constants() and check_list_constants() were still invoked conditionally, with if()'s. Create partition_info::check_constants function pointer, get rid of if()'s Also remove alloc argument of check_range_constants(), added in 26a3ff0a22e. Broken system versioning will be fixed in following commits.
* | | | | Vers SQL: partition rotation by INTERVAL fixAleksey Midenkov2018-02-231-2/+3
| | | | | | | | | | | | | | | | | | | | Update partition stats on ha_partition::write_row()
* | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | | | MDEV-11084 Select statement with partition selection against MyISAM table ↵Alexey Botchkov2018-01-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | opens all partitions. Now we don't open partitions if it was explicitly cpecified. ha_partition::m_opened_partition bitmap added to track partitions that were actually opened.
* | | | | compilation warning on windowsSergei Golubchik2018-01-171-3/+3
| | | | |
* | | | | MDEV-14923 Assertion upon INSERT into locked versioned partitioned tableAleksey Midenkov2018-01-131-1/+1
| | | | |
* | | | | System Versioning 1.0 pre8Aleksey Midenkov2018-01-101-22/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk
| * \ \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extMonty2018-01-011-0/+1
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/make_dist.cmake.in mysql-test/r/func_json.result mysql-test/r/ps.result mysql-test/t/func_json.test mysql-test/t/ps.test sql/item_cmpfunc.h
| | * | | | Merge remote-tracking branch 'origin/10.1' into 10.2Vicențiu Ciorbaru2017-12-221-0/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-12-201-0/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge remote-tracking branch '5.5' into 10.0Vicențiu Ciorbaru2017-12-201-0/+1
| | | | |\ \ | | | | | |/
| | | | | * MDEV-13788 Server crash when issuing bad SQL partition syntaxAlexander Barkov2017-11-201-0/+1
| | | | | |
* | | | | | MDEV-14821 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())` ↵Eugene Kosov2018-01-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | failed in Diagnostics_area::set_ok_status
* | | | | | Partition: uninitialized vers_info fixAleksey Midenkov2017-12-221-1/+1
| | | | | |
* | | | | | Timestamp-based versioning for InnoDB [closes #209]Aleksey Midenkov2017-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed integer_fields check * Reworked Vers_parse_info::check_sys_fields() * Misc renames * versioned as vers_sys_type_t * Removed versioned_by_sql(), versioned_by_engine() versioned() works as before; versioned(VERS_TIMESTAMP) is versioned_by_sql(); versioned(VERS_TRX_ID) is versioned_by_engine(). * create_tmp_table() fix * Foreign constraints for timestamp-based * Range auto-specifier fix * SQL: 1-row partition rotation fix [fixes #260] * Fix 'drop system versioning, algorithm=inplace'
* | | | | | Partitioning syntax for versioningSergei Golubchik2017-12-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partition by system_time ( partition p0 history, partition pn current )
* | | | | | fix win32 warningsEugene Kosov2017-11-131-1/+1
| | | | | |
* | | | | | System Versioning pre0.12Aleksey Midenkov2017-11-071-1/+222
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3
| * | | | | SQL: partitioning misc fixes [closes #242]Aleksey Midenkov2017-09-071-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cleanup: *never* use assert(A && B) * vers_setup_1() revisited * vers_setup_2() renamed * partition_element::type removed * Copy ctor instead of memcpy() * Handle return value from check_range_constants() * Malloc error fix * error, style, misc fixes
| * | | | | Style: partitioning, sysvars, handler fixesAleksey Midenkov2017-09-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sys_var_vers_asof formatting * Vers_field_stats renamed to Vers_min_max_stats * Item_temporal_literal::set_lower()/set_higher() replaced by operator>()/operator<() * handler API comments
| * | | | | Style: API renamesAleksey Midenkov2017-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | part_recs_slow() -> part_records(); HTON_SUPPORTS_SYS_VERSIONING -> HTON_NATIVE_SYS_VERSIONING.
| * | | | | IB, SQL: InnoDB partitioning [closes #118]Aleksey Midenkov2017-05-051-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | * native InnoDB partitioning for BY SYSTEM_TIME partitions.
| * | | | | SQL: (0.6) Pruning for VERSIONING partitions [closes #97]Aleksey Midenkov2017-05-051-10/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * based on RANGE pruning by COLUMNS (sys_trx_end) condition * removed DEFAULT; AS OF NOW is always last; current VERSIONING as last non-empty (or first empty) * Min/Max stats in TABLE_SHARE * ALTER TABLE ADD PARTITION adds before AS OF NOW partition
| * | | | | SQL: (0.5) Versioned partitions [closes #77]Aleksey Midenkov2017-05-051-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * one `AS OF NOW`, multiple `VERSIONING` partitions; * rotation of `VERSIONING` partitions by record count, time period; * rotation is multi-threaded; * conventional subpartitions as bottom level for versioned partitions; * `DEFAULT` keyword selects first `VERSIONING` partition; * ALTER TABLE ADD/DROP partition; * REBUILD PARTITION basic operation.
* | | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-07-121-3/+2
|\ \ \ \ \ \ | | |/ / / / | |/| | | |
| * | | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-07-081-3/+2
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | Merge branch '10.0' into 10.1Sergei Golubchik2017-07-071-3/+2
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | Merge branch '5.5' into 10.0Sergei Golubchik2017-07-061-3/+2
| | | |\ \ \ | | | | | |/ | | | | |/|
* | | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-07-071-7/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | cleanup: part_func_string and subpart_func_stringSergei Golubchik2017-07-051-7/+0
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Remove now-unused part_func_string and subpart_func_string from partition_info.
* | | | | Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-231-3/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits of this patch: - Removed a lot of calls to strlen(), especially for field_string - Strings generated by parser are now const strings, less chance of accidently changing a string - Removed a lot of calls with LEX_STRING as parameter (changed to pointer) - More uniform code - Item::name_length was not kept up to date. Now fixed - Several bugs found and fixed (Access to null pointers, access of freed memory, wrong arguments to printf like functions) - Removed a lot of casts from (const char*) to (char*) Changes: - This caused some ABI changes - lex_string_set now uses LEX_CSTRING - Some fucntions are now taking const char* instead of char* - Create_field::change and after changed to LEX_CSTRING - handler::connect_string, comment and engine_name() changed to LEX_CSTRING - Checked printf() related calls to find bugs. Found and fixed several errors in old code. - A lot of changes from LEX_STRING to LEX_CSTRING, especially related to parsing and events. - Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING* - Some changes for char* to const char* - Added printf argument checking for my_snprintf() - Introduced null_clex_str, star_clex_string, temp_lex_str to simplify code - Added item_empty_name and item_used_name to be able to distingush between items that was given an empty name and items that was not given a name This is used in sql_yacc.yy to know when to give an item a name. - select table_name."*' is not anymore same as table_name.* - removed not used function Item::rename() - Added comparision of item->name_length before some calls to my_strcasecmp() to speed up comparison - Moved Item_sp_variable::make_field() from item.h to item.cc - Some minimal code changes to avoid copying to const char * - Fixed wrong error message in wsrep_mysql_parse() - Fixed wrong code in find_field_in_natural_join() where real_item() was set when it shouldn't - ER_ERROR_ON_RENAME was used with extra arguments. - Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already give the error. TODO: - Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c - Change code to not modify LEX_CSTRING for database name (as part of lower_case_table_names)
* | | | cleanup: remove dead (half-merged) code from partition_info.*Sergei Golubchik2016-12-121-50/+1
| | | |