Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Add a session server variable @@system_versioning_insert_history which allows to use ROW_START and ROW_END columns in the INSERT (unless they are normal visible (in SELECT *) fields, they have to be explicitly specified in INSERT as any invisible fields are). And if @@secure_timestamp allows the current user to modify @@timestamp then he should be able to insert directly into ROW_START/ROW_END columns.
The use case of this is to be able to dump the history with mysqldump and to load it back later (MDEV-16029). It provides a convenient way to have a row in the system versioned table with row_start=A and row_end=B. Without @@system_versioning_insert_history it can be achieved with
set @@timestamp=A; |
insert t1 values (...); |
set @@timestamp=B; |
delete from t1 where ... -- a condition to match the row that was just inserted |
So this new feature does not provide any new functionality, but allows to load the history dump much faster than with timestamp manipulations as above. In particular it does not allow to do anything that wasn't possible to do before, it requires exactly the same set of privileges as the snippet above, and is subject to the same set of restrictions.
Attachments
Issue Links
- blocks
-
MDEV-16029 mysqldump: dump and restore historical data
-
- Closed
-
- causes
-
MDEV-29674 History modification inserts records into a wrong partition without warning
-
- Stalled
-
-
MDEV-29721 Inconsistency upon inserting history with visible system versioning columns
-
- Closed
-
-
MDEV-29722 History modification requires specifying values for both period columns
-
- Closed
-
-
MDEV-29732 mysqlbinlog produces syntactically incorrect output with system_versioning_insert_history
-
- Closed
-
-
MDEV-29738 REPLACE under system_versioning_insert_history allows to change existing historical records
-
- Closed
-
-
MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on
-
- Closed
-
-
MDEV-29750 Triggers can modify history
-
- Closed
-
-
MDEV-29805 Attempt to insert into system versioning columns on old server may make slave data diverge
-
- Closed
-
-
MDEV-29812 Confusing behavior upon ODKU trying to insert/modify history
-
- Closed
-
-
MDEV-29813 REPLACE/IGNORE does not work with historical records in InnoDB
-
- Closed
-
-
MDEV-29830 Assertion `table->versioned()' in THD::vers_insert_history_fast
-
- Closed
-
-
MDEV-29837 Column privileges prevent from direct history insert but not from timestamp tampering
-
- Open
-
- duplicates
-
MDEV-16734 LOAD DATA and system_versioning_modify_history
-
- Closed
-
- includes
-
MDEV-16587 Vers: SQL sysvers_show SELECT fix
-
- Closed
-
- is blocked by
-
MDEV-18727 System Versioning: optimize DML operation
-
- Closed
-
-
MDEV-29833 CREATE ... SELECT system_versioned_table causes invalid defaults
-
- Closed
-
- is part of
-
MDEV-29547 prepare 10.11.0 preview releases
-
- Closed
-
- relates to
-
MDEV-22413 Server hangs upon UPDATE/DELETE on a view reading from versioned partitioned table
-
- Closed
-
-
MDEV-29730 mysqldump --dump-history creates broken dump if there are precision-versioned tables
-
- Closed
-
-
MDEV-29736 mysqldump sets system_versioning_insert_history=1 twice and doesn't restore previous value
-
- Closed
-
-
MDEV-29737 mysqldump doesn't check for --tz-utc when it accepts --dump-history
-
- Closed
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Description |
1. Add SQL mode {{ALLOW_HISTORY_MODIFY}} which will allow to set values for *row_start*, *row_end* in DML operations.
2. If {{secure_timestamp}} is YES or REPLICATION, {{ALLOW_HISTORY_MODIFY}} does not have effect. If {{secure_timestamp}} is SUPER, {{ALLOW_HISTORY_MODIFY}} requires special privilege (same as for setting current timestamp). |
1. Add SQL mode {{ALLOW_HISTORY_MODIFY}} which will allow to set values for *row_start*, *row_end* in DML operations.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, {{ALLOW_HISTORY_MODIFY}} does not have effect. If {{secure_timestamp}} is *SUPER*, {{ALLOW_HISTORY_MODIFY}} requires special privilege (same as for setting current timestamp). |
Link |
This issue blocks |
Status | Open [ 1 ] | In Progress [ 3 ] |
Description |
1. Add SQL mode {{ALLOW_HISTORY_MODIFY}} which will allow to set values for *row_start*, *row_end* in DML operations.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, {{ALLOW_HISTORY_MODIFY}} does not have effect. If {{secure_timestamp}} is *SUPER*, {{ALLOW_HISTORY_MODIFY}} requires special privilege (same as for setting current timestamp). |
1. Add server variable *system_versioning_modify_history* which will allow to set values for *row_start*, *row_end* in DML operations.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, *system_versioning_modify_history* does not have effect. If {{secure_timestamp}} is *SUPER*, *system_versioning_modify_history* requires special privilege (same as for setting current timestamp). |
Attachment | google-chrome.desktop [ 45812 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Fix Version/s | 10.3 [ 22126 ] |
Link |
This issue relates to |
Attachment | google-chrome.desktop [ 45812 ] |
Link |
This issue blocks |
Remote Link | This issue links to "End user hitting problem in dba.stackexchange.com (Web Link)" [ 28701 ] |
Link | This issue relates to MDEV-15990 [ MDEV-15990 ] |
Fix Version/s | 10.4 [ 22408 ] |
Fix Version/s | 10.3 [ 22126 ] |
Link |
This issue is blocked by |
Comment | [ Updated task is in https://github.com/MariaDB/server/pull/1289 ] |
Link |
This issue blocks |
Link |
This issue relates to |
Link |
This issue relates to |
Link | This issue blocks MDEV-15990 [ MDEV-15990 ] |
Link | This issue relates to MDEV-15990 [ MDEV-15990 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.4 [ 22408 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Fix Version/s | 10.5 [ 23123 ] |
Link |
This issue relates to |
Link |
This issue blocks |
Link |
This issue blocks |
Fix Version/s | 10.6 [ 24028 ] |
Rank | Ranked higher |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Description |
1. Add server variable *system_versioning_modify_history* which will allow to set values for *row_start*, *row_end* in DML operations.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, *system_versioning_modify_history* does not have effect. If {{secure_timestamp}} is *SUPER*, *system_versioning_modify_history* requires special privilege (same as for setting current timestamp). |
1. Add server variable *system_versioning_modify_history* which will allow INSERT history rows.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, *system_versioning_modify_history* does not have effect. If {{secure_timestamp}} is *SUPER*, *system_versioning_modify_history* requires special privilege (same as for setting current timestamp). |
Description |
1. Add server variable *system_versioning_modify_history* which will allow INSERT history rows.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, *system_versioning_modify_history* does not have effect. If {{secure_timestamp}} is *SUPER*, *system_versioning_modify_history* requires special privilege (same as for setting current timestamp). |
1. Add server variable *system_versioning_insert_history* which will allow INSERT history rows.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, *system_versioning_insert_history* does not have effect. If {{secure_timestamp}} is *SUPER*, *system_versioning_insert_history* requires special privilege (same as for setting current timestamp). |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Link |
This issue duplicates |
Link |
This issue relates to |
Description |
1. Add server variable *system_versioning_insert_history* which will allow INSERT history rows.
2. If {{secure_timestamp}} is *YES* or *REPLICATION*, *system_versioning_insert_history* does not have effect. If {{secure_timestamp}} is *SUPER*, *system_versioning_insert_history* requires special privilege (same as for setting current timestamp). |
1. Add server variable force_fields_visible which makes
system-invisible and user-invisible fields visible on next table open (FLUSH TABLES required for already opened tables). 2. If secure_timestamp allows to modify timestamp variable then following DML commands: INSERT, INSERT..SELECT and LOAD DATA can specify row_start and row_end system field values. |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Link |
This issue includes |
Description |
1. Add server variable force_fields_visible which makes
system-invisible and user-invisible fields visible on next table open (FLUSH TABLES required for already opened tables). 2. If secure_timestamp allows to modify timestamp variable then following DML commands: INSERT, INSERT..SELECT and LOAD DATA can specify row_start and row_end system field values. |
Add a session server variable {{@@system_versioning_insert_history}} which allows to use ROW_START and ROW_END columns in the INSERT (they behave as invisible fields, have to be explicitly specified in INSERT). And if {{@@secure_timestamp}} allows the current user to modify {{@@timestamp}} then he should be able to insert directly into ROW_START/ROW_END columns. |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.6 [ 24028 ] |
Fix Version/s | 10.6 [ 24028 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.6 [ 24028 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Comment | [ A comment with security level 'Developers' was removed. ] |
Priority | Critical [ 2 ] | Major [ 3 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Priority | Critical [ 2 ] | Major [ 3 ] |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.7 [ 24805 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.8 [ 26121 ] |
Workflow | MariaDB v3 [ 87977 ] | MariaDB v4 [ 131768 ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.10 [ 27530 ] | |
Fix Version/s | 10.9 [ 26905 ] |
Fix Version/s | 10.11 [ 27614 ] | |
Fix Version/s | 10.10 [ 27530 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Comment | [ A comment with security level 'Developers' was removed. ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Status | In Review [ 10002 ] | In Testing [ 10301 ] |
Assignee | Sergei Golubchik [ serg ] | Elena Stepanova [ elenst ] |
Link |
This issue is part of |
Link | This issue relates to TODO-3607 [ TODO-3607 ] |
Description | Add a session server variable {{@@system_versioning_insert_history}} which allows to use ROW_START and ROW_END columns in the INSERT (they behave as invisible fields, have to be explicitly specified in INSERT). And if {{@@secure_timestamp}} allows the current user to modify {{@@timestamp}} then he should be able to insert directly into ROW_START/ROW_END columns. |
Add a session server variable {{@@system_versioning_insert_history}} which allows to use ROW_START and ROW_END columns in the INSERT (unless they are normal visible (in {{SELECT *}}) fields, they have to be explicitly specified in INSERT as any invisible fields are). And if {{@@secure_timestamp}} allows the current user to modify {{@@timestamp}} then he should be able to insert directly into ROW_START/ROW_END columns.
The use case of this is to be able to dump the history with mysqldump and to load it back later ( {code:sql} set @@timestamp=A; insert t1 values (...); set @@timestamp=B; delete from t1 where ... -- a condition to match the row that was just inserted {code} So this new feature does not provide any new functionality, but allows to load the history dump much faster than with timestamp manipulations as above. |
Description |
Add a session server variable {{@@system_versioning_insert_history}} which allows to use ROW_START and ROW_END columns in the INSERT (unless they are normal visible (in {{SELECT *}}) fields, they have to be explicitly specified in INSERT as any invisible fields are). And if {{@@secure_timestamp}} allows the current user to modify {{@@timestamp}} then he should be able to insert directly into ROW_START/ROW_END columns.
The use case of this is to be able to dump the history with mysqldump and to load it back later ( {code:sql} set @@timestamp=A; insert t1 values (...); set @@timestamp=B; delete from t1 where ... -- a condition to match the row that was just inserted {code} So this new feature does not provide any new functionality, but allows to load the history dump much faster than with timestamp manipulations as above. |
Add a session server variable {{@@system_versioning_insert_history}} which allows to use ROW_START and ROW_END columns in the INSERT (unless they are normal visible (in {{SELECT *}}) fields, they have to be explicitly specified in INSERT as any invisible fields are). And if {{@@secure_timestamp}} allows the current user to modify {{@@timestamp}} then he should be able to insert directly into ROW_START/ROW_END columns.
The use case of this is to be able to dump the history with mysqldump and to load it back later ( {code:sql} set @@timestamp=A; insert t1 values (...); set @@timestamp=B; delete from t1 where ... -- a condition to match the row that was just inserted {code} So this new feature does not provide any new functionality, but allows to load the history dump much faster than with timestamp manipulations as above. In particular it does not allow to do anything that wasn't possible to do before, it requires exactly the same set of privileges as the snippet above, and is subject to the same set of restrictions. |
Link | This issue causes MDEV-29674 [ MDEV-29674 ] |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Link | This issue blocks MDEV-15990 [ MDEV-15990 ] |
Link |
This issue causes |
Link | This issue causes MDEV-29837 [ MDEV-29837 ] |
Assignee | Elena Stepanova [ elenst ] | Sergei Golubchik [ serg ] |
Status | In Testing [ 10301 ] | Stalled [ 10000 ] |
Link |
This issue is blocked by |
Fix Version/s | 10.11.1 [ 28454 ] | |
Fix Version/s | 10.11 [ 27614 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Labels | Preview_10.11 |
Zendesk Related Tickets | 139667 114975 111284 |