Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b0d9dc43
Commit
b0d9dc43
authored
Dec 18, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQL: system_versioning_transaction_registry default OFF
parent
db13dbc7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
9 deletions
+80
-9
mysql-test/suite/versioning/common.opt
mysql-test/suite/versioning/common.opt
+1
-0
mysql-test/suite/versioning/r/insert.result
mysql-test/suite/versioning/r/insert.result
+4
-2
mysql-test/suite/versioning/r/trx_id.result
mysql-test/suite/versioning/r/trx_id.result
+28
-0
mysql-test/suite/versioning/t/insert.test
mysql-test/suite/versioning/t/insert.test
+2
-2
mysql-test/suite/versioning/t/trx_id.test
mysql-test/suite/versioning/t/trx_id.test
+32
-0
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+3
-0
sql/sys_vars.cc
sql/sys_vars.cc
+9
-4
sql/table.h
sql/table.h
+1
-1
No files found.
mysql-test/suite/versioning/common.opt
View file @
b0d9dc43
--system-versioning-hide=implicit
--system-versioning-transaction-registry=1
--plugin-load=versioning
mysql-test/suite/versioning/r/insert.result
View file @
b0d9dc43
...
...
@@ -284,11 +284,13 @@ rollback to a;
commit;
call verify_vtq;
No A B C D
set global transaction_registry= off;
set global
system_versioning_
transaction_registry= off;
insert into t2(x) values (1);
insert into t1(x) values (1);
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
set global transaction_registry= on;
set global system_versioning_transaction_registry= on;
Warnings:
Warning 4145 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
create or replace table t1 (
x int,
y int as (x) virtual,
...
...
mysql-test/suite/versioning/r/trx_id.result
0 → 100644
View file @
b0d9dc43
select @@system_versioning_transaction_registry;
@@system_versioning_transaction_registry
0
create or replace table t1 (
x int,
sys_trx_start bigint(20) unsigned generated always as row start,
sys_trx_end bigint(20) unsigned generated always as row end,
period for system_time (sys_trx_start, sys_trx_end)
) with system versioning engine innodb;
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
set global system_versioning_transaction_registry= 1;
Warnings:
Warning 4145 Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
create or replace table t1 (
x int,
sys_trx_start bigint(20) unsigned generated always as row start,
sys_trx_end bigint(20) unsigned generated always as row end,
period for system_time (sys_trx_start, sys_trx_end)
) with system versioning engine innodb;
insert into t1 (x) values (1);
set global system_versioning_transaction_registry= 0;
insert into t1 (x) values (2);
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
delete from t1;
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
update t1 set x= 3;
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
drop table t1;
mysql-test/suite/versioning/t/insert.test
View file @
b0d9dc43
...
...
@@ -188,11 +188,11 @@ rollback to a;
commit
;
call
verify_vtq
;
set
global
transaction_registry
=
off
;
set
global
system_versioning_
transaction_registry
=
off
;
insert
into
t2
(
x
)
values
(
1
);
--
error
ER_VERS_TRT_IS_DISABLED
insert
into
t1
(
x
)
values
(
1
);
set
global
transaction_registry
=
on
;
set
global
system_versioning_
transaction_registry
=
on
;
# virtual columns
create
or
replace
table
t1
(
...
...
mysql-test/suite/versioning/t/trx_id.test
0 → 100644
View file @
b0d9dc43
--
source
include
/
have_innodb
.
inc
select
@@
system_versioning_transaction_registry
;
--
error
ER_VERS_TRT_IS_DISABLED
create
or
replace
table
t1
(
x
int
,
sys_trx_start
bigint
(
20
)
unsigned
generated
always
as
row
start
,
sys_trx_end
bigint
(
20
)
unsigned
generated
always
as
row
end
,
period
for
system_time
(
sys_trx_start
,
sys_trx_end
)
)
with
system
versioning
engine
innodb
;
set
global
system_versioning_transaction_registry
=
1
;
create
or
replace
table
t1
(
x
int
,
sys_trx_start
bigint
(
20
)
unsigned
generated
always
as
row
start
,
sys_trx_end
bigint
(
20
)
unsigned
generated
always
as
row
end
,
period
for
system_time
(
sys_trx_start
,
sys_trx_end
)
)
with
system
versioning
engine
innodb
;
insert
into
t1
(
x
)
values
(
1
);
set
global
system_versioning_transaction_registry
=
0
;
--
error
ER_VERS_TRT_IS_DISABLED
insert
into
t1
(
x
)
values
(
2
);
--
error
ER_VERS_TRT_IS_DISABLED
delete
from
t1
;
--
error
ER_VERS_TRT_IS_DISABLED
update
t1
set
x
=
3
;
drop
table
t1
;
sql/share/errmsg-utf8.txt
View file @
b0d9dc43
...
...
@@ -7928,3 +7928,6 @@ ER_VERS_DUPLICATE_ROW_START_END
ER_VERS_ALREADY_VERSIONED
eng "Table %`s is already system-versioned"
WARN_VERS_TRT_EXPERIMENTAL
eng "Transaction-based system versioning is EXPERIMENTAL and is subject to change in future."
sql/sys_vars.cc
View file @
b0d9dc43
...
...
@@ -426,14 +426,19 @@ static Sys_var_enum Sys_vers_alter_history(
static
bool
update_transaction_registry
(
sys_var
*
self
,
THD
*
thd
,
enum_var_type
type
)
{
use_transaction_registry
=
opt_transaction_registry
;
if
(
use_transaction_registry
)
{
push_warning
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
WARN_VERS_TRT_EXPERIMENTAL
,
ER_THD
(
thd
,
WARN_VERS_TRT_EXPERIMENTAL
));
}
return
false
;
}
static
Sys_var_mybool
Sys_transaction_registry
(
"transaction_registry"
,
"Enable or disable update of
transaction_registry
"
,
static
Sys_var_mybool
Sys_
vers_
transaction_registry
(
"
system_versioning_
transaction_registry"
,
"Enable or disable update of
`mysql`.`transaction_registry`
"
,
GLOBAL_VAR
(
opt_transaction_registry
),
CMD_LINE
(
OPT_ARG
),
DEFAULT
(
TRU
E
),
NO_MUTEX_GUARD
,
NOT_IN_BINLOG
,
DEFAULT
(
FALS
E
),
NO_MUTEX_GUARD
,
NOT_IN_BINLOG
,
0
,
ON_UPDATE
(
update_transaction_registry
));
static
Sys_var_ulonglong
Sys_binlog_cache_size
(
...
...
sql/table.h
View file @
b0d9dc43
...
...
@@ -1499,7 +1499,6 @@ struct TABLE
int
update_virtual_field
(
Field
*
vf
);
int
update_virtual_fields
(
handler
*
h
,
enum_vcol_update_mode
update_mode
);
int
update_default_fields
(
bool
update
,
bool
ignore_errors
);
void
vers_update_fields
();
void
reset_default_fields
();
inline
ha_rows
stat_records
()
{
return
used_stat_records
;
}
...
...
@@ -1558,6 +1557,7 @@ struct TABLE
ulonglong
vers_end_id
()
const
;
int
delete_row
();
void
vers_update_fields
();
/** Number of additional fields used in versioned tables */
#define VERSIONING_FIELDS 2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment