summaryrefslogtreecommitdiff
path: root/sql/sql_const.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-17551 assert or crashed table when using blobsMonty2019-06-271-1/+1
| | | | | | | | | | | | | | The bug was that when long item-strings was converted to VARCHAR, type_handler::string_type_handler() didn't take into account max VARCHAR length. The resulting Aria temporary table was created with a VARCHAR field of length 1 when it should have been 65537. This caused MariaDB to send impossible records to ma_write() and Aria reported eventually the table as crashed. Fixed by updating Type_handler::string_type_handler() to not create too long VARCHAR fields. To make things extra safe, I also added checks in when writing dynamic Aria records to ensure we find the wrong record during write instead of during read.
* Merge 10.2 into 10.3Marko Mäkelä2019-05-291-0/+8
|\
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-281-0/+8
| |\
| | * Merge 5.5 into 10.1Marko Mäkelä2019-05-281-0/+8
| | |\
| | | * MDEV-18479 Assertion `join->best_read < double(1.79769313486231570815e+308L)'Igor Babaev2019-05-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or server crashes in JOIN::fix_all_splittings_in_plan after EXPLAIN This patch resolves the problem of overflowing when performing calculations to estimate the cost of an evaluated query execution plan. The overflowing in a non-debug build could cause different kind of problems uncluding crashes of the server.
* | | | 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 branch '10.2' into 10.3Sergei Golubchik2019-01-031-1/+11
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2mariadb-10.2.21Sergei Golubchik2018-12-301-1/+11
| |\ \ \ | | |/ /
| | * | Merge branch '10.0' into 10.1Sergei Golubchik2018-12-291-1/+11
| | |\ \
| | | * | MDEV-17589: Stack-buffer-overflow with indexed varchar (utf8) fieldbb-10.0-varunVarun Gupta2018-12-191-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new constant MAX_DATA_LENGTH_FOR_KEY. Replace the value of MAX_KEY_LENGTH to also include the LENGTH and NULL BYTES of a field.
* | | | | MDEV-16697: Fix difference between 32bit/windows and 64bit systems in ↵Oleksandr Byelkin2018-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | allowed select nest level
* | | | | Merge remote-tracking branch '10.2' into 10.3Vicențiu Ciorbaru2018-04-121-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2018-04-101-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Adjust table_open_cache to avoid getting error 24 (too many open files)Monty2018-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV--15609 engines/funcs.crash_manytables_number crashes with error 24 (too many open files) MDEV-10286 Adjustment of table_open_cache according to system limits does not work when open-files-limit option is provided Fixed by adjusting tc_size downwards if there is not enough file descriptors to use. Other changes: - Ensure that there is 30 (was 10) extra file descriptors for other usage - Decrease TABLE_OPEN_CACHE_MIN to 200 as it's better to have a smaller table cache than getting error 24 - Increase minimum of max_connections and table_open_cache from 1 to 10 as 1 is not usable for any real application, only for testing.
* | | | | This is a full cost-based implementation of the optimization that employsIgor Babaev2017-12-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | splitting technique for equi-joins of materialized derived tables/views/CTEs. (see mdev-13369 and mdev-13389).
* | | | | Reducing memory when using information schemaMonty2017-11-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The background is that one user had a lot of views and using some complex queries on information schema temporary memory of more than 2G was used. - Added new element 'total_alloc' to MEM_ROOT for easier debugging. - Added MAX_MEMORY_USED to information_schema.processlist. - Added new status variable "Memory_used_initial" that shows how much MariaDB uses at startup. This gives the base value for "Memory_used". - Reuse memory continuously for information schema queries instead of only freeing memory at query end. Other things - Removed some not needed set_notnull() calls for not null columns.
* | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-301-1/+12
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-10-241-1/+12
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-221-1/+12
| | |\ \ \ | | | |/ /
| | | * | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-181-1/+12
| | | |\ \ | | | | |/
| | | | * MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535Alexander Barkov2017-10-131-1/+12
| | | | |
* | | | | Merge tag 'mariadb-10.2.6' into bb-10.2-extAlexander Barkov2017-05-261-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-0/+1
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| | * | | Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-0/+1
| | |\ \ \ | | | |/ /
| | | * | Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-0/+1
| | | |\ \ | | | | |/
| | | | * Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-111-0/+1
| | | | |\
| | | | | * Updated/added copyright headersKent Boortz2011-06-301-1/+1
| | | | | |
| | | | | * Backport: Remove unused and ancient files, functions, and facilities.Davi Arnaut2010-05-281-6/+0
| | | | | |
| | | | | * WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
| | | | * MDEV-10524 Assertion `arg1_int >= 0' failed in ↵Alexander Barkov2016-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_func_additive_op::result_precision() This change is a backport from 10.0 to 5.5 for: 1. The full patch for: MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD() 9adb6e991ec87b65d04929f115d9d0c899e4ab19 2. A small fragment of: MDEV-5298 Illegal mix of collations on timestamp 03f6778d61a74bdd7d09103a16473a2a5624cf66 which overrides Item_temporal_hybrid_func::cmp_type(), and adds a new line into cache_temporal_4265.result.
* | | | | MDEV-10139 Support for SEQUENCE objectsMonty2017-04-071-0/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working features: CREATE OR REPLACE [TEMPORARY] SEQUENCE [IF NOT EXISTS] name [ INCREMENT [ BY | = ] increment ] [ MINVALUE [=] minvalue | NO MINVALUE ] [ MAXVALUE [=] maxvalue | NO MAXVALUE ] [ START [ WITH | = ] start ] [ CACHE [=] cache ] [ [ NO ] CYCLE ] ENGINE=xxx COMMENT=".." SELECT NEXT VALUE FOR sequence_name; SELECT NEXTVAL(sequence_name); SELECT PREVIOUS VALUE FOR sequence_name; SELECT LASTVAL(sequence_name); SHOW CREATE SEQUENCE sequence_name; SHOW CREATE TABLE sequence_name; CREATE TABLE sequence-structure ... SEQUENCE=1 ALTER TABLE sequence RENAME TO sequence2; RENAME TABLE sequence TO sequence2; DROP [TEMPORARY] SEQUENCE [IF EXISTS] sequence_names Missing features - SETVAL(value,sequence_name), to be used with replication. - Check replication, including checking that sequence tables are marked not transactional. - Check that a commit happens for NEXT VALUE that changes table data (may already work) - ALTER SEQUENCE. ANSI SQL version of setval. - Share identical sequence entries to not add things twice to table list. - testing insert/delete/update/truncate/load data - Run and fix Alibaba sequence tests (part of mysql-test/suite/sql_sequence) - Write documentation for NEXT VALUE / PREVIOUS_VALUE - NEXTVAL in DEFAULT - Ensure that NEXTVAL in DEFAULT uses database from base table - Two NEXTVAL for same row should give same answer. - Oracle syntax sequence_table.nextval, without any FOR or FROM. - Sequence tables are treated as 'not read constant tables' by SELECT; Would be better if we would have a separate list for sequence tables so that select doesn't know about them, except if refereed to with FROM. Other things done: - Improved output for safemalloc backtrack - frm_type_enum changed to Table_type - Removed lex->is_view and replaced with lex->table_type. This allows use to more easy check if item is view, sequence or table. - Added table flag HA_CAN_TABLES_WITHOUT_ROLLBACK, needed for handlers that want's to support sequences - Added handler calls: - engine_name(), to simplify getting engine name for partition and sequences - update_first_row(), to be able to do efficient sequence implementations. - Made binlog_log_row() global to be able to call it from ha_sequence.cc - Added handler variable: row_already_logged, to be able to flag that the changed row is already logging to replication log. - Added CF_DB_CHANGE and CF_SCHEMA_CHANGE flags to simplify deny_updates_if_read_only_option() - Added sp_add_cfetch() to avoid new conflicts in sql_yacc.yy - Moved code for add_table_options() out from sql_show.cc::show_create_table() - Added String::append_longlong() and used it in sql_show.cc to simplify code. - Added extra option to dd_frm_type() and ha_table_exists to indicate if the table is a sequence. Needed by DROP SQUENCE to not drop a table.
* | | | MDEV-7563 Support CHECK constraint as in (or close to) SQL StandardMichael Widenius2016-06-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-10134 Add full support for DEFAULT - Added support for using tables with MySQL 5.7 virtual fields, including MySQL 5.7 syntax - Better error messages also for old cases - CREATE ... SELECT now also updates timestamp columns - Blob can now have default values - Added new system variable "check_constraint_checks", to turn of CHECK constraint checking if needed. - Removed some engine independent tests in suite vcol to only test myisam - Moved some tests from 'include' to 't'. Should some day be done for all tests. - FRM version increased to 11 if one uses virtual fields or constraints - Changed to use a bitmap to check if a field has got a value, instead of setting HAS_EXPLICIT_VALUE bit in field flags - Expressions can now be up to 65K in total - Ensure we are not refering to uninitialized fields when handling virtual fields or defaults - Changed check_vcol_func_processor() to return a bitmap of used types - Had to change some functions that calculated cached value in fix_fields to do this in val() or getdate() instead. - store_now_in_TIME() now takes a THD argument - fill_record() now updates default values - Add a lookahead for NOT NULL, to be able to handle DEFAULT 1+1 NOT NULL - Automatically generate a name for constraints that doesn't have a name - Added support for ALTER TABLE DROP CONSTRAINT - Ensure that partition functions register virtual fields used. This fixes some bugs when using virtual fields in a partitioning function
* | | | Increase value of thread_cache_size to 32Monty2016-03-221-0/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Added 5 minute timeout before automaticlally removing threads from thread cache. This solves a problem with jemalloc, which is slow with a small thread cache and also makes thread_cache big enough that most users doesn't have to touch it
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-11-191-1/+3
|\ \ \ | |/ /
| * | remove unneded #include's that had a dubious explanationSergei Golubchik2015-10-241-1/+3
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-121-2/+2
|\ \ \ | |/ /
| * | MDEV-8450: PATCH] Wrong macro expansion in Query_cache::send_result_to_client()Oleksandr Byelkin2015-09-061-2/+2
| | | | | | | | | | | | Expression in macro protected by ()
* | | MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-041-1/+1
| | | | | | | | | | | | stopped with no-zero size)
* | | - Changed default values of query_prealloc_size and query_alloc_block_sizeMonty2014-12-051-3/+3
|/ / | | | | | | | | | | so that a simple query with one join would not have to call my_malloc. - Allow lower limites for query_prealloc_size for testing. - Fixed wrong initialization of trans_alloc_block_size
* | MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()Alexander Barkov2013-08-221-1/+1
| |
* | 10.0-monty mergeSergei Golubchik2013-07-211-3/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | 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
| * | Fixes for innodb suite, merging tests from 5.6.Sergei Golubchik2013-07-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes 5.6 changesets for: ***** Fix for BUG#13489996 valgrind:conditional jump or move depends on uninitialised values-field_blob. blob_ptr_size was not initialized properly: remove this variable. ***** Bug#14021323 CRASH IN FIELD::SET_NULL WHEN INSERTING ROWS TO NEW TABLE *****
| * | Temporary commit of 10.0-mergeMichael Widenius2013-03-261-2/+9
| | |
* | | Fixed: MDEV-4352; LOAD DATA was not multi-source safeMichael Widenius2013-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Calls to cleanup_load_tmpdir() could delete temporary files for another master connection - Concurrent LOAD DATA commands from two master connections could use the same file name Other bug fixes: - Enlarge buffer for connection names with 'special characters' one can't store in filenames Optimization: - Don't do 'lower case' of connection names. We can use cmp_connection_name, where we already have the connection name in lower case. mysql-test/suite/multi_source/load_data.result: Test case for MDEV-4352 mysql-test/suite/multi_source/load_data.test: Test case for MDEV-4352 sql/log_event.cc: Fixed: MDEV-4352 - Calls to cleanup_load_tmpdir() could delete temporary files for another master connection - Concurrent LOAD DATA commands from two master connections could use the same file name The fix was to add the connection name (if one exists) to all slave temporary files used by LOAD DATA sql/rpl_mi.cc: Enlarge buffer for connection names with 'special characters' one can't store in filenames Use mi->cmp_connection_name for connection file names. sql/rpl_rli.cc: Use mi->cmp_connection_name for connection file names. sql/slave.cc: Removed not needed empty line sql/sql_const.h: Added MAX_FILENAME_MBWIDTH to be able to calculate buffer length for connection_names stored in file names sql/sql_repl.cc: Use mi->cmp_connection_name for connection file names.
* | | Merge 5.5->10.0-baseIgor Babaev2013-03-311-1/+1
|\ \ \ | |/ / |/| / | |/
| * MDEV-4243 : remove several clang warnings.Vladislav Vaintroub2013-03-291-1/+1
| |
* | 5.5 mergeSergei Golubchik2013-01-291-2/+2
|\ \ | |/