summaryrefslogtreecommitdiff
path: root/sql/lex.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-19944 Remove GIS data types from keyword list in lex.hAlexander Barkov2019-07-041-8/+0
|
* 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 branch '11.0' into 10.1Oleksandr Byelkin2018-09-061-3/+3
| | | |\ \
| | | | * | compilation failureSergei Golubchik2018-09-041-3/+3
| | | | | |
* | | | | | MDEV-7597 Expiration of user passwordsRobert Bindar2019-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for expiring user passwords. The following statements are extended: CREATE USER user@localhost PASSWORD EXPIRE [option] ALTER USER user@localhost PASSWORD EXPIRE [option] If no option is specified, the password is expired with immediate effect. If option is DEFAULT, global policy applies according to the default_password_lifetime system var (if 0, password never expires, if N, password expires every N days). If option is NEVER, the password never expires and if option is INTERVAL N DAY, the password expires every N days. The feature also supports the disconnect_on_expired_password system var and the --connect-expired-password client option. Closes #1166
* | | | | | MDEV-16973 Application-time periods: DELETENikita Malyavin2019-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * inject portion of time updates into mysql_delete main loop * triggered case emits delete+insert, no updates * PORTION OF `SYSTEM_TIME` is forbidden * `DELETE HISTORY .. FOR PORTION OF ...` is forbidden as well
* | | | | | MDEV-13095 Implement User Account lockingRobert Bindar2019-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add server support for user account locking. This patch extends the ALTER/CREATE USER statements for denying a user's subsequent login attempts: ALTER USER user [, user2] ACCOUNT [LOCK | UNLOCK] CREATE USER user [, user2] ACCOUNT [LOCK | UNLOCK] The SHOW CREATE USER statement was updated to display the locking state of an user. Closes #1006
* | | | | | Added syntax and implementation for BACKUP STAGE'sMonty2018-12-091-0/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()
* | | | | MDEV-17687 Add sql_mode specific tokens for keywords BLOB, CLOB, NUMBER, ↵Alexander Barkov2018-11-121-5/+5
| | | | | | | | | | | | | | | | | | | | RAW, VARCHAR2
* | | | | MDEV-17669 Add sql_mode specific tokens for the keyword DECLAREAlexander Barkov2018-11-121-1/+1
| | | | |
* | | | | MDEV-17666 sql_mode=ORACLE: Keyword ELSEIF should not be reservedAlexander Barkov2018-11-121-1/+1
| | | | |
* | | | | A join patch for MDEV-17660 and MDEV-17661Alexander Barkov2018-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | MDEV-17660 sql_mode=ORACLE: Some keywords do not work as label names: history, system, versioning, without MDEV-17661 Add sql_mode specific tokens for the keyword DECODE
* | | | | MDEV-17652 Add sql_mode specific tokens for some keywordsAlexander Barkov2018-11-091-12/+12
| | | | |
* | | | | MDEV-16186 Concatenation operator || returns wrong results in sql_mode=ORACLEAlexander Barkov2018-05-161-1/+1
| | | | |
* | | | | MDEV-15664 : sql_mode=ORACLE: Make TRIM return NULL instead of empty stringhalfspawn2018-03-291-0/+1
| | | | |
* | | | | MDEV-11952 Oracle-style packages: stage#5mariadb-10.3.5bb-10.3-compatibilityAlexander Barkov2018-02-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CREATE PACKAGE [BODY] statements are now entirely written to mysql.proc with type='PACKAGE' and type='PACKAGE BODY'. - CREATE PACKAGE BODY now supports IF NOT EXISTS - DROP PACKAGE BODY now supports IF EXISTS - CREATE OR REPLACE PACKAGE [BODY] is now supported - CREATE PACKAGE [BODY] now support the DEFINER clause: CREATE DEFINER user@host PACKAGE pkg ... END; CREATE DEFINER user@host PACKAGE BODY pkg ... END; - CREATE PACKAGE [BODY] now supports SQL SECURITY and COMMENT clauses, e.g.: CREATE PACKAGE p1 SQL SECURITY INVOKER COMMENT "comment" AS ... END; - Package routines are now created from the package CREATE PACKAGE BODY statement and don't produce individual records in mysql.proc. - CREATE PACKAGE BODY now supports package-wide variables. Package variables can be read and set inside package routines. Package variables are stored in a separate sp_rcontext, which is cached in THD on the first packate routine call. - CREATE PACKAGE BODY now supports the initialization section. - All public routines (i.e. declared in CREATE PACKAGE) must have implementations in CREATE PACKAGE BODY - Only public package routines are available outside of the package - {CREATE|DROP} PACKAGE [BODY] now respects CREATE ROUTINE and ALTER ROUTINE privileges - "GRANT EXECUTE ON PACKAGE BODY pkg" is now supported - SHOW CREATE PACKAGE [BODY] is now supported - SHOW PACKAGE [BODY] STATUS is now supported - CREATE and DROP for PACKAGE [BODY] now works for non-current databases - mysqldump now supports packages - "SHOW {PROCEDURE|FUNCTION) CODE pkg.routine" now works for package routines - "SHOW PACKAGE BODY CODE pkg" now works (the package initialization section) - A new package body level MDL was added - Recursive calls for package procedures are now possible - Routine forward declarations in CREATE PACKATE BODY are now supported. - Package body variables now work as SP OUT parameters - Package body variables now work as SELECT INTO targets - Package body variables now support ROW, %ROWTYPE, %TYPE
* | | | | Fix testsSergei Golubchik2017-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * test results * HISTORY in ora parser
* | | | | System Versioning 1.0 pre6Aleksey Midenkov2017-12-151-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Merge remote-tracking branch 'mariadb/bb-10.3-temporal-serg' into trunk
| * | | | | Partitioning syntax for versioningSergei Golubchik2017-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partition by system_time ( partition p0 history, partition pn current )
* | | | | | System Versioning 1.0 pre5 [closes #407]Aleksey Midenkov2017-12-151-0/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge branch '10.3' into trunk Both field_visibility and VERS_HIDDEN_FLAG exist independently. TODO: VERS_HIDDEN_FLAG should be replaced with SYSTEM_INVISIBLE (or COMPLETELY_INVISIBLE?).
| * | | | | MDEV-10177 Invisible Columns and Invisible IndexSachin Setiya2017-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature Definition:- This feature adds invisible column functionality to server. There is 4 level of "invisibility": 1. Not invisible (NOT_INVISIBLE) — Normal columns created by the user 2. A little bit invisible (USER_DEFINED_INVISIBLE) — columns that the user has marked invisible. They aren't shown in SELECT * and they don't require values in INSERT table VALUE (...). Otherwise they behave as normal columns. 3. More invisible (SYSTEM_INVISIBLE) — Can be queried explicitly, otherwise invisible from everything. Think ROWID sytem column. Because they're invisible from ALTER TABLE and from CREATE TABLE they cannot be created or dropped, they're created by the system. User cant not create a column name which is same as of SYSTEM_INVISIBLE. 4. Very invisible (COMPLETELY_INVISIBLE) — as above, but cannot be queried either. They can only show up in EXPLAIN EXTENDED (might be possible for a very invisible indexed virtual column) but otherwise they don't exist for the user.If user creates a columns which has same name as of COMPLETELY_INVISIBLE then COMPLETELY_INVISIBLE column is renamed again. So it is completely invisible from user. Invisible Index(HA_INVISIBLE_KEY):- Creation of invisible columns require a new type of index which will be only visible to system. User cant see/alter/create/delete this index. If user creates a index which is same name as of invisible index then it will be renamed. Syntax Details:- Only USER_DEFINED_INVISIBLE column can be created by user. This can be created by adding INVISIBLE suffix after column definition. Create table t1( a int invisible, b int); Rules:- There are some rules/restrictions related to use of invisible columns 1. All the columns in table cant be invisible. Create table t1(a int invisible); \\error Create table t1(a int invisible, b int invisble); \\error 2. If you want invisible column to be NOT NULL then you have to supply Default value for the column. Create table t1(a int, b int not null); \\error 3. If you create a view/create table with select * then this wont copy invisible fields. So newly created view/table wont have any invisible columns. Create table t2 as select * from t1;//t2 wont have t1 invisible column Create view v1 as select * from t1;//v1 wont have t1 invisible column 4. Invisibility wont be forwarded to next table in any case of create table/view as select */(a,b,c) from table. Create table t2 as select a,b,c from t1; // t2 will have t1 invisible // column(b), but this wont be invisible in t2 Create view v1 as select a,b,c from t1; // v1 will have t1 invisible // column(b), but this wont be invisible in v1 Implementation Details:- Parsing:- INVISIBLE_SYM is added into vcol_attribute(so its like unique suffix), It is also added into keyword_sp_not_data_type so that table can have column with name invisible. Implementation detail is given by each modified function/created function. (Some function are left as they were self explanatory) (m= Modified, n= Newly Created) mysql_prepare_create_table(m):- Extra checks for invisible columns are added. Also some DEBUG_EXECUTE_IF are also added for test cases. mysql_prepare_alter_table(m):- Now this will drop all the COMPLETELY_INVISIBLE column and HA_INVISIBLE_KEY index. Further Modifications are made to stop drop/change/delete of SYSTEM_INVISIBLE column. build_frm_image(m):- Now this allows incorporating field_visibility status into frm image. To remain compatible with old frms field_visibility info will be only written when any of the field is not NOT_INVISIBLE. extra2_write_additional_field_properties(n):- This will write field visibility info into buffer. We first write EXTRA2_FIELD_FLAGS into buffer/frm , then each next char will have field_visibility for each field. init_from_binary_frm_image(m):- Now if we get EXTRA2_FIELD_FLAGS, then we will read the next n(n= number of fields) chars and set the field_visibility. We also increment thd->status_var.feature_invisible_columns. One important thing to note if we find out that key contains a field whose visibility is > USER_DEFINED_INVISIBLE then , we declare this key as invisible key. sql_show.cc is changed accordingly to make show table, show keys correct. mysql_insert(m):- If we get to know that we are doing insert in this way insert into t1 values(1,1); without explicitly specifying columns, then we check for if we have invisible fields if yes then we reset the whole record, Why ? Because first we want hidden columns to get default/null value. Second thing auto_increment has property no default and no null which voilates invisible key rule 2, And because of this it was giving error. Reseting table->record[0] eliminates this issue. More info put breakpoint on handler::write_row and see auto_increment value. fill_record(m):- we continue loop if we find invisible column because this is already reseted/will get its value if it is default. Test cases:- Since we can not directly add > USER_DEFINED_INVISIBLE column then I have debug_dbug to create it in mysql_prepare_create_table. Patch Credit:- Serg Golubchik
* | | | | | System Versioning 1.0 pre3Aleksey Midenkov2017-12-111-0/+1
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | Merge branch '10.3' into trunk
| * | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-11-301-0/+1
| |\ \ \ \ \
| | * \ \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-11-291-0/+1
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-11-211-0/+1
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | MDEV-12012/MDEV-11969 Can't remove GTIDs for a stale GTID Domain IDAndrei Elkin2017-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in MDEV-11969 "there's no way to ditch knowledge" about some domain that is no longer updated on a server. Besides being of annoyance to clutter output in DBA console stale domains can prevent the slave to connect the master as MDEV-12012 witnesses. What domain is obsolete must be evaluated by the user (DBA) according to whether the domain info is still relevant and will the domain ever receive any update. This patch introduces a method to discard obsolete gtid domains from the server binlog state. The removal requires no event group from such domain present in existing binlog files though. If there are any the containing logs must be first PURGEd in order for FLUSH BINARY LOGS DELETE_DOMAIN_ID=(list-of-domains) succeed. Otherwise the command returns an error. The list of obsolete domains can be computed through intersecting two sets - the earliest (first) binlog's Gtid_list and the current value of @@global.gtid_binlog_state - and extracting the domain id components from the intersection list items. The new DELETE_DOMAIN_ID featured FLUSH continues to rotate binlog omitting the deleted domains from the active binlog file's Gtid_list. Notice though when the command is ineffective - that none of requested to delete domain exists in the binlog state - rotation does not occur. Obsolete domain deletion is not harmful for connected slaves as long as master side binlog files *purge* is synchronized with FLUSH-DELETE_DOMAIN_ID. The slaves must have the last event from purged files processed as usual, in order not to bump later into requesting a gtid from a file which was already gone. While the command is not replicated (as ordinary FLUSH BINLOG LOGS is) slaves, even though having extra domains, won't suffer from reconnection errors thanks to master-slave gtid connection protocol allowing the master to be ignorant about a gtid domain. Should at failover such slave to be promoted into master role it may run the ex-master's FLUSH BINARY LOGS DELETE_DOMAIN_ID=(list-of-domains) to clean its own binlog state. NOTES. suite/perfschema/r/start_server_low_digest.result is re-recorded as consequence of internal parser codes changes.
* | | | | | | SQL: regression fix: make NOW a valid identifier again [#363]Sergei Golubchik2017-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * again, as in 10.2, NOW is a keyword only if followed by parentheses * use AS OF CURRENT_TIMESTAMP or AS OF NOW() * AS OF CURRENT_TIMESTAMP and AS OF NOW() mean AS OF NOW(6), not AS OF NOW(0), (same behavior as in a DEFAULT clause)
* | | | | | | System Versioning pre1.0Aleksey Midenkov2017-11-131-0/+4
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | Merge branch '10.3' into trunk
| * | | | | | Added the median function to the parser , it should behave as a ↵Varun Gupta2017-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | percentile_cont function with its argument fixed to 0.5
| * | | | | | MDEV-12985: syntax added for the percentile_cont and percentile_disc functionsVarun Gupta2017-11-011-0/+3
| | | | | | |
* | | | | | | System Versioning pre0.12Aleksey Midenkov2017-11-071-1/+6
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | Merge remote-tracking branch 'origin/archive/2017-10-17' into 10.3
| * | | | | | SQL: (0.5) Versioned partitions [closes #77]Aleksey Midenkov2017-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * | | | | | SQL: 0.3 per column versioning syntax, .frm, optimized updates and testsKosov Eugene2017-05-051-0/+1
| | | | | | |
| * | | | | | 0.1: SQL-level System VersioningDaniel Fiala2017-05-051-0/+4
| | | | | | |
* | | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-251-0/+1
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | MDEV-11553 Can't restore a PERSISTENT column that uses DATE_FORMAT()Sergei Golubchik2017-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 3-argument form of DATE_FORMAT
* | | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.310.3-MDEV-10953Alexander Barkov2017-05-171-0/+2
|\ \ \ \ \ \ \ | |/ / / / / / | | / / / / / | |/ / / / / |/| | | | |
| * | | | | MDEV-10139 Support for SEQUENCE objectsMonty2017-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - SETVAL(sequence_name, next_value, is_used, round) - ALTER SEQUENCE, including RESTART WITH Other things: - Added handler::extra() option HA_EXTRA_PREPARE_FOR_ALTER_TABLE to signal ha_sequence() that it should allow write_row statments. - ALTER ONLINE TABLE now works with SEQUENCE:s
* | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-04-071-1/+12
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-10139 Support for SEQUENCE objectsMonty2017-04-071-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-04-071-0/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-12461 TYPE OF and ROW TYPE OF anchored data typesAlexander Barkov2017-04-071-0/+1
| | | | | |
* | | | | | Merge bb-10.2-compatibility into 10.3Alexander Barkov2017-04-061-0/+13
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-12133 sql_mode=ORACLE: table%ROWTYPE in variable declarationsAlexander Barkov2017-04-051-0/+1
| | | | | |
| * | | | | MDEV-10697 GOTO statementhalfspawn2017-04-051-0/+1
| | | | | |
| * | | | | MDEV-10588 sql_mode=ORACLE: TRUNCATE TABLE t1 [ {DROP|REUSE} STORAGE ]Alexander Barkov2017-04-051-0/+1
| | | | | |