summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
Commit message (Collapse)AuthorAgeFilesLines
* SQL: followup misc rename on versioningAleksey Midenkov2019-09-301-1/+1
| | | | vers_sys_type_t -> vers_kind_t
* MDEV-16144 Default TIMESTAMP clause for SELECT from versionedAleksey Midenkov2019-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Removed TIMESTAMP/TRANSACTION unit auto-detection in favor of default TIMESTAMP. Reasons: 1.1. rare practical use and doubtful advantage of such auto-detection; 1.2. it conflicts with MDEV-16226 (TRX_ID-based versioned tables performance improvement). Needless check_unit membership removed. 2. SQL: versioning type handling refactoring Vers_type_handler hierarchy stores versioning properties of type. virtual Type_handler::vers() accesses specialization of Vers_type_handler for specific type. virtual Vers_type_handler::kind() returns versioning kind (timestamp/trx_id). Removed Type_handler::Vers_history_point_check_unit() in favor of Type_handler::vers(). Renames: require_timestamp() -> require_timestamp_error() require_trx_id() -> require_trx_id_error() EDIT by Alexander Barkov (@abarkov): check_sys_fields() moved to Vers_type_handler::check_sys_fields()
* Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2019-09-241-144/+293
|\
| * MDEV-19956 Queries with subqueries containing UNION are not parsedIgor Babaev2019-09-231-144/+293
| | | | | | | | | | | | | | | | Shift-Reduce conflicts prevented parsing some queries with subqueries that used set operations when the subqueries occurred in expressions or in IN predicands. The grammar rules for query expression were transformed in order to avoid these conflicts. New grammar rules employ an idea taken from MySQL 8.0.
* | Merge 10.4 into 10.5Marko Mäkelä2019-09-241-31/+28
|\ \ | |/
| * Merge 10.3 into 10.4Marko Mäkelä2019-09-231-2/+0
| |\ | | | | | | | | | Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
| | * Merge 10.2 into 10.3Marko Mäkelä2019-09-231-2/+0
| | |\
| | | * MDEV-19679 - CREATE SERVER needs tweaks for compatibility with CONNECT engineAnel Husakovic2019-09-201-1/+0
| | | |
| * | | MDEV-20634 Report disallowed subquery errors as such (instead of parse error)Alexander Barkov2019-09-201-29/+28
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-121-7/+10
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-09-121-7/+10
| |\ \ \ | | |/ /
| | * | Adding missing semicolons to sql_yacc.yy (10.3), indentation cleanups.Alexander Barkov2019-09-111-15/+18
| | | |
| | * | Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2019-09-111-16/+37
| | |\ \ | | | |/
| | | * Adding missing semicolons to sql_yacc.yy (10.2)Alexander Barkov2019-09-111-16/+38
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-4/+4
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-09-021-4/+4
| |\ \ \ | | |/ /
| | * | MDEV-18501 Partition pruning doesn't work for historical queries (cleanup)Aleksey Midenkov2019-09-011-4/+4
| | | | | | | | | | | | | | | | Cleanup removes useless allocation.
* | | | MDEV-18844 Implement EXCEPT ALL and INTERSECT ALL operationsWayneXia2019-08-241-4/+4
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-161-0/+6
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-08-141-0/+6
| |\ \ \ | | |/ /
| | * | MDEV-19127 Assertion `row_start_field' failed in vers_prepare_keys upon ↵Aleksey Midenkov2019-08-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALTER TABLE Prevent conflicting clauses at parser level. Clear HA_VERSIONED_TABLE flag for DROP SYSTEM VERSIONING (for the sake of strictness).
* | | | MDEV-20353 Add separate type handlers for unsigned integer data typesAlexander Barkov2019-08-151-26/+34
| | | |
* | | | Revert "MDEV-20342 Turn Field::flags from a member to a method"Alexander Barkov2019-08-141-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e86010f909fb6b8c4ffd9d6df92991ac079e67e7. Reverting on Monty's request, as this change makes merging things from 10.5 to 10.2 much harder.
* | | | MDEV-20342 Turn Field::flags from a member to a methodAlexander Barkov2019-08-141-18/+18
| | | |
* | | | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2019-08-131-33/+34
|\ \ \ \ | |/ / /
| * | | Merge commit '43882e764d6867c6855b1ff057758a3f08b25c55' into 10.4Alexander Barkov2019-08-131-1/+6
| |\ \ \ | | |/ /
| | * | MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOBAlexander Barkov2019-08-061-1/+6
| | | |
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-07-281-32/+28
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-07-261-18/+20
| | |\ \ | | | |/
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2019-07-261-16/+19
| | | |\
| | | | * Merge branch '5.5' into 10.1Oleksandr Byelkin2019-07-251-16/+19
| | | | |\
| | | | | * MDEV-19421 Basic 3-way join queries are not parsed.Igor Babaev2019-07-111-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser returned a syntax error message for the queries with join expressions like this t1 JOIN t2 [LEFT | RIGHT] JOIN t3 ON ... ON ... when the second operand of the outer JOIN operation with ON clause was another join expression with ON clause. In this expression the JOIN operator is right-associative, i.e. expression has to be parsed as the expression t1 JOIN (t2 [LEFT | RIGHT] JOIN t3 ON ... ) ON ... Such join expressions are hard to parse because the outer JOIN is left-associative if there is no ON clause for the first outer JOIN operator. The patch implements the solution when the JOIN operator is always parsed as right-associative and builds first the right-associative tree. If it happens that there is no corresponding ON clause for this operator the tree is converted to left-associative. The idea of the solution was taken from the patch by Martin Hansson "WL#8083: Fixed the join_table rule" from MySQL-8.0 code line. As the grammar rules related to join expressions in MySQL-8.0 and MariaDB-5.5+ are quite different MariaDB solution could not borrow any code from the MySQL-8.0 solution.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-131-16/+16
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-20108: [ERROR] mysqld got signal 11 in st_select_lex::add_table_to_listbb-10.4-MDEV-20108Oleksandr Byelkin2019-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use the same select as for usual table list.
| * | | | | MDEV-19996 Bison grammar: turn singe-character operators into <kwd>Alexander Barkov2019-07-091-15/+15
| | | | | |
* | | | | | MDEV-20009 Add CAST(expr AS pluggable_type)Alexander Barkov2019-07-101-2/+12
| | | | | |
* | | | | | MDEV-19994 Add class Function_collectionAlexander Barkov2019-07-091-27/+13
| | | | | |
* | | | | | MDEV-19944 Remove GIS data types from keyword list in lex.hAlexander Barkov2019-07-041-69/+15
| | | | | |
* | | | | | MDEV-19923 Add type handlers for geometry sub-typesAlexander Barkov2019-07-031-36/+16
| | | | | |
* | | | | | MDEV-19855: Create "Sql_cmd_show_slave_status" class for "SHOW SLAVE STATUS" ↵Sujatha2019-07-011-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command. Create "Sql_cmd_show_slave_status" class for "SHOW SLAVE STATUS" command.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-06-201-35/+73
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2019-06-191-35/+73
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-17363 - Compressed columns cannot be restored from dumpAlexander Barkov2019-06-181-35/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In collaboration with Sergey Vojtovich <svoj@mariadb.org> The COMPRESSED clause is now a part of the data type and goes immediately after the data type and length, but before the CHARACTER SET clause, and before column attributes such as DEFAULT, COLLATE, ON UPDATE, SYSTEM VERSIONING, engine specific column attributes. In the old reduction, the COMPRESSED clause was a column attribute. New syntax: <varchar or text data type> <length> <compression> <character set> <column attributes> <varbinary or blob data type> <length> <compression> <column attributes> New syntax examples: VARCHAR(1000) COMPRESSED CHARACTER SET latin1 DEFAULT '' BLOB COMPRESSED DEFAULT '' Deprecate syntax examples: VARCHAR(1000) CHARACTER SET latin1 COMPRESSED DEFAULT '' TEXT CHARACTER SET latin1 DEFAULT '' COMPRESSED VARBINARY(1000) DEFAULT '' COMPRESSED As a side effect: - COMPRESSED is not valid as an SP label name in SQL/PSM routines any more (but it's still valid as an SP label name in sql_mode=ORACLE) - COMPRESSED is now allowed in combination with GENERATED ALWAYS AS: TEXT COMPRESSED GENERATED ALWAYS AS REPEAT('a',1000)
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-06-181-44/+22
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-06-141-44/+22
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-06-141-45/+22
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge 10.1 into 10.2Marko Mäkelä2019-06-121-33/+19
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-19653 Add class Sql_cmd_create_tableAlexander Barkov2019-05-311-33/+19
| | | | | |
* | | | | | MDEV-19639 + MDEV-19640 fix + preparatory changes for WL#4179Alexander Barkov2019-06-041-130/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes: - MDEV-19639 sql_mode=ORACLE: Wrong SHOW PROCEDURE output for sysvar:=expr - MDEV-19640 Wrong SHOW PROCEDURE output for SET GLOBAL sysvar1=expr, sysvar2=expr - Preparatory refactoring for MySQL WL#4179 Detailed change list: 1. Changing sp_create_assignment_lex() to accept the position in the exact query buffer instead of a "bool no_lookahead". This actually fixes MDEV-19639. In the previous reduction sp_create_assignment_lex() was called too late, when the parser went far the from beginning of the statement, so only a part of the statement got into sp_instr_stmt. 2. Generating "SET" or "SET GLOBAL" inside sp_create_assignment_instr() depending on the option type. This fixes MDEV-19640. In the previous reduction the code passed (through no_lookahead) the position of the word GLOBAL inside sp_create_assignment_lex(), which worked only for the left-most assignment. 3. Fixing the affected rules to use: - ident_cli instead of ident - ident_cli_set_usual_case instead of ident_set_usual_case 4. Changing the input parameter in: - LEX::set_system_variable() - LEX::call_statement_start() - LEX::set_variable() from just LEX_CSTRING to Lex_ident_sys_st for stricter data type constrol: to make sure that noone passes an ident_cli (a fragment of the original query in the client character set) instead of server-side identifier (utf8 identifier allocated on THD when needed). 5. Adding Lex_ident_sys() in places where the affected functions are called. 6. Moving all calls of sp_create_assignment_lex() to the places just before parsing set_expr_or_default. This makes the grammar clearer, because sp_create_assignment_lex() and sp_create_assignment_instr() now stay near each other, so the balance of LEX's push/pop can be read easier. This will also help to WL#4179. 7. Adding class sp_lex_set_var Moving the initialization code from sp_create_assignment_lex() to the constructor of sp_lex_set_var. This will also help to WL#4179. 8. Moving a part of the "set" grammar rule into a separate rule "set_param". This makes the grammar easier to read and removes one shift/reduce conflict.
* | | | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2019-06-031-1/+17
|\ \ \ \ \ \ | |/ / / / /