summaryrefslogtreecommitdiff
path: root/sql/share
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-6112 multiple triggers per tableMonty2016-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to MysQL Worklog 3253, but with a different implementation. The disk format and SQL syntax is identical with MySQL 5.7. Fetures supported: - "Any" ammount of any trigger - Supports FOLLOWS and PRECEDES to be able to put triggers in a certain execution order. Implementation details: - Class Trigger added to hold information about a trigger. Before this trigger information was stored in a set of lists in Table_triggers_list and in Table_triggers_list::bodies - Each Trigger has a next field that poinst to the next Trigger with the same action and time. - When accessing a trigger, we now always access all linked triggers - The list are now only used to load and save trigger files. - MySQL trigger test case (trigger_wl3253) added and we execute these identically. - Even more gracefully handling of wrong trigger files than before. This is useful if a trigger file uses functions or syntax not provided by the server. - Each trigger now has a "Created" field that shows when the trigger was created, with 2 decimals. Other comments: - Many of the changes in test files was done because of the new "Created" field in the trigger file. This shows up in SHOW ... TRIGGER and when using information_schema.trigger. - Don't check if all memory is released if on uses --gdb; This is needed to be able to get a list from safemalloc of not freed memory while debugging. - Added option to trim_whitespace() to know how many prefix characters was skipped. - Changed a few ulonglong sql_mode to sql_mode_t, to find some wrong usage of sql_mode.
* Merge branch '10.2' into bb-10.2-janSergei Golubchik2016-09-192-23/+172
|\
| * Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-0/+4
| |\
| | * MDEV-10017: Get unexpected `Empty Set` for correlated subquery with ↵mariadb-10.1.17Oleksandr Byelkin2016-08-291-0/+3
| | | | | | | | | | | | | | | | | | aggregate functions (part 1) Make aggregate function dependency visible.
| * | MDEV-8348: Add catchall to all table partitioning for list partitionsOleksandr Byelkin2016-09-071-0/+3
| | | | | | | | | | | | | | | DEFAULT partition support added to LIST and LIST COLUMN partitioning. Partitions Prunning added for DEFAULT partititon.
| * | MDEV-10421 duplicate CHECK CONSTRAINTs.Alexey Botchkov2016-09-061-2/+2
| | | | | | | | | | | | | | | | | | mysql_prepare_create_table fixed so it doesn't let duplicating constraint names. Syntax for CONSTRAINT IF NOT EXISTS added and handled in mysql_alter_table.
| * | MDEV-9711 NO PAD collationsAlexander Barkov2016-09-061-1/+138
| | | | | | | | | | | | Based on the patch from Daniil Medvedev (a Google Summer of Code task)
| * | Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mdev9864Igor Babaev2016-08-311-16/+15
| |\ \
| | * | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-4/+0
| | | | | | | | | | | | | | | | Transaction tracker
| | * | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-15/+15
| | | | | | | | | | | | | | | | System variables tracking
| | * | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-1/+4
| | | | | | | | | | | | | | | | initial commit to test
| * | | Merge 10.2 into 10.2-mdev9864.Igor Babaev2016-08-301-53/+65
| |\ \ \ | | |/ /
| * | | mdev-9864: cleanup, re-factoring.Igor Babaev2016-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added comments. Added reaction for exceeding maximum number of elements in with clause. Added a test case to check this reaction. Added a test case where the specification of a recursive table uses two non-recursive with tables.
| * | | mdev-9864: cleanup, re-factoring.Igor Babaev2016-08-261-1/+1
| | | | | | | | | | | | | | | | Added comments.
| * | | Added a proper check for acceptable mutually recursive CTE.Igor Babaev2016-06-301-0/+2
| | | |
| * | | Merge branch '10.2' into 10.2-mdev986410.2-test1234Galina Shalygina2016-05-251-0/+2
| |\ \ \
| * | | | Fixed the problem of wrong identification of WITH tables defined in WITH ↵Galina Shalygina2016-05-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clauses without RECURSIVE. Added test cases to check the fix. Fixed the problem of wrong types of recursive tables when the type of anchor part does not coincide with the type of recursive part. Prevented usage of marerialization and subquery cache for subqueries with recursive references. Introduced system variables 'max_recursion_level'. Added a test case to test usage of this variable.
| * | | | Fixed many problems in the code of With_element::check_unrestricted_recursive().Galina Shalygina2016-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the check whether there are set functions in the specifications of recursive CTE. Added the check whether there are recursive references in subqueries. Introduced boolean system variable 'standards_compliant_cte'. By default it's set to 'on'. When it's set to 'off' non-standard compliant CTE can be executed.
| * | | | Fixed merge problems to allow mysql-test suite 'main' to passGalina Shalygina2016-05-101-3/+0
| | | | |
| * | | | Main patch for mdev-9864Galina Shalygina2016-05-091-0/+4
| | | | |
| * | | | Merge branch '10.2' into 10.2-mdev9864Galina Shalygina2016-05-081-0/+47
| | | | |
* | | | | fix some quoting in error messagesSergei Golubchik2016-09-161-4/+4
| | | | | | | | | | | | | | | | | | | | add_identifier change comes from 5.7, everything else is a follow-up
* | | | | Remove a bunch of TODO's, fix perfschema.threads_innodb testSergei Golubchik2016-09-111-0/+2
| | | | |
* | | | | misc after-merge changes:Sergei Golubchik2016-09-101-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove new InnoDB-specific ER_ and HA_ERR_ codes * renamed few old ER_ and HA_ERR_ error messages to be less MyISAM-specific * remove duplicate enum definitions (durability_properties, icp_result) * move new mysql-test include files to their owner suite * rename xtradb.rdiff files to *-disabled * remove mistakenly committed helper perl module * remove long obsolete handler::ha_statistic_increment() method * restore the standard C xid_t structure to not have setters and getters * remove xid_t::reset that was cleaning too much * move MySQL-5.7 ER_ codes where they belong * fir innodb to include service_wsrep.h not internal wsrep headers * update tests and results
* | | | | Merge InnoDB 5.7 from mysql-5.7.14.Jan Lindström2016-09-081-0/+18
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contains also: MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan) Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) enable tests that were fixed in MDEV-10549 MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
* | | | clarify ER_CANT_DROP_FIELD_OR_KEYSergei Golubchik2016-07-021-23/+21
| | | | | | | | | | | | | | | | include the dropped object type
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-3/+3
|\ \ \ \ | | |_|/ | |/| |
| * | | MDEV-9949 Connect Engine: long SRCDEF leads to broken tableSergei Golubchik2016-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two bugs here: * the server could create an frm (with a long attribute value) that it could not read back * Connect engine opened files from inside DROP TABLE and was ignoring the error (correctly) but was not hiding it from the server (incorrectly). This caused a crash later when DROP TABLE was finishing successfully while stmt_da already have seen an error. Also added a text case for MDEV-7935 CREATE TABLE ... AS SELECT ... can cause a Server crash (Assertion `0' in Protocol::end_statement) because Connect stopped clearing the error status in stmt_da as a fix for MDEV-7935
| * | | small parser cleanupSergei Golubchik2016-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * my_yyabort_error() helper * s/lex->thd/thd/ * remove 'else' after MYSQL_YYABORT (for consistency, 95% of the parser did not use 'else' in this case) * simplify ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
* | | | move all new 10.2 error codes to start from 4000Sergei Golubchik2016-06-301-15/+15
| | | |
* | | | better ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWEDSergei Golubchik2016-06-301-2/+2
| | | |
* | | | restore ER_VIEW_CHECK_FAILED to be different from ER_CONSTRAINT_FAILEDSergei Golubchik2016-06-301-32/+37
| | | | | | | | | | | | | | | | | | | | | | | | collaterals: * use %`s, not '%s' * use correct SQLSTATE codes for these two errors
* | | | various cleanupsMichael Widenius2016-06-301-4/+4
| | | |
* | | | MDEV-7563 Support CHECK constraint as in (or close to) SQL StandardMichael Widenius2016-06-301-8/+16
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | MDEV-10102 Disallow CREATE VIEW .. PROCEDURE ANALYSE() syntacticallyAlexander Barkov2016-05-231-0/+2
| | |
* | | Merge branch '10.2' into bb-10.2-mdev9543Sergei Petrunia2016-04-071-0/+15
|\ \ \ | | | | | | | | | | | | | | | | - Make Window Functions errors use the MariaDB's extra error range. - Fix a trivial bug in check_error_mesg
| * | | Added new range of MariaDB error messages, starting from 3000Monty2016-04-051-0/+17
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | This is done by splitting variables.errmsg and locale.errmsg to variables.errmsg_extra and locale.errmsg_extra The ER() macros in unireg.h now looks more complex than before, but this isn't critical as most usage of them are with constants and the compiler will remove most of the test code.
* | | Implement ntile window function.Vicențiu Ciorbaru2016-04-041-0/+2
| | | | | | | | | | | | | | | The current implementation does not allow for a dynamic expression within the sum function's parameter.
* | | Merge branch '10.2' into bb-10.2-mdev9543Sergei Petrunia2016-03-281-17/+35
|\ \ \ | |/ /
| * | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-1/+1
| |\ \ | | |/
| | * Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
| | |\
| | | * Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| | | |
| * | | Manual merge of branch 'bb-10.2-mdev8789' into 10.2Igor Babaev2016-03-211-0/+8
| |\ \ \
| | * | | Addressed the issues raised in the review for the main patchbb-10.2-mdev8789Igor Babaev2016-02-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of mdev-8789. Fixed a bug in TABLE_LIST::print. Fixed another bug for the case when the definition of a WITH table contained column list while the join in the main query used two instances of this table.
| | * | | MDEV-8789 Implement non-recursive common table expressionsGalina Shalygina2015-12-181-0/+8
| | | | | | | | | | | | | | | | | | | | Initial implementation
| * | | | MDEV-9058: protocol: COM_MULTI command (part 2)Oleksandr Byelkin2016-03-181-0/+7
| | | | | | | | | | | | | | | | | | | | simple COM_MULTI support (no prepared statements chain yet).
| * | | | Yet more fixes covering thread_id type changeSergey Vojtovich2016-02-271-15/+15
| | | | |
| * | | | Merge branch '10.1' into 10.2Monty2016-02-061-1/+4
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: VERSION cmake/plugin.cmake config.h.cmake configure.cmake plugin/server_audit/server_audit.c sql/sql_yacc.yy
| | * | | MDEV-9118 ANALYZE TABLE for Engine independent status fetchs blob/text ↵Oleksandr Byelkin2016-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | columns without use Do not include BLOB fields by default.
| | * | | Merge branch 'tmp' into tmp-10.1Kristian Nielsen2016-01-151-1/+1
| | |\ \ \ | | | |/ / | | |/| / | | | |/ | | | | Conflicts: sql/slave.cc