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
c5d0c38e
Commit
c5d0c38e
authored
Dec 19, 2017
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-14676 Redundancy in error codes
ER_VERS_NOT_VERSIONED vs ER_VERSIONING_REQUIRED
parent
fc21529f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
36 additions
and
38 deletions
+36
-38
mysql-test/suite/versioning/r/insert.result
mysql-test/suite/versioning/r/insert.result
+1
-1
mysql-test/suite/versioning/r/optimized.result
mysql-test/suite/versioning/r/optimized.result
+17
-17
mysql-test/suite/versioning/r/partition.result
mysql-test/suite/versioning/r/partition.result
+6
-6
mysql-test/suite/versioning/r/select.result
mysql-test/suite/versioning/r/select.result
+1
-1
mysql-test/suite/versioning/r/select_sp.result
mysql-test/suite/versioning/r/select_sp.result
+1
-1
mysql-test/suite/versioning/r/truncate.result
mysql-test/suite/versioning/r/truncate.result
+2
-2
mysql-test/suite/versioning/r/trx_id.result
mysql-test/suite/versioning/r/trx_id.result
+1
-1
mysql-test/suite/versioning/t/select.test
mysql-test/suite/versioning/t/select.test
+1
-1
mysql-test/suite/versioning/t/select_sp.test
mysql-test/suite/versioning/t/select_sp.test
+1
-1
mysql-test/suite/versioning/t/truncate.test
mysql-test/suite/versioning/t/truncate.test
+2
-2
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+1
-3
sql/sql_select.cc
sql/sql_select.cc
+2
-2
No files found.
mysql-test/suite/versioning/r/insert.result
View file @
c5d0c38e
...
...
@@ -290,7 +290,7 @@ insert into t1(x) values (1);
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
set global system_versioning_transaction_registry= on;
Warnings:
Warning 414
5
Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
Warning 414
4
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/optimized.result
View file @
c5d0c38e
...
...
@@ -17,59 +17,59 @@ a b b+0
1 NULL NULL
3 NULL NULL
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6);
a b
1 NULL
3 NULL
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select count(*) from t for system_time as of timestamp now(6) group by b;
count(*)
2
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b asc;
a b
1 NULL
3 NULL
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b desc;
a b
1 NULL
3 NULL
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) group by a having a=2;
a b
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) group by b having b=2;
a b
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=2;
a
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=NULL;
a
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select a from t for system_time as of timestamp now(6) where b is NULL;
a
1
3
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
count(*) b
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select a, b from t;
a b
1 2
...
...
@@ -84,12 +84,12 @@ a b
1 NULL
3 NULL
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) where b is NULL;
a b
1 NULL
3 NULL
Warnings:
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
2
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
Warning 411
1
Attempt to read non-temporal field `b` in historical query
drop table t;
mysql-test/suite/versioning/r/partition.result
View file @
c5d0c38e
...
...
@@ -85,7 +85,7 @@ ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exact
alter table t1 add partition (
partition p1 history);
Warnings:
Warning 411
5
Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
Warning 411
4
Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
@@ -229,7 +229,7 @@ x
### warn about partition switching
delete from t1;
Warnings:
Note 411
6
Versioned table `test`.`t1`: switching from partition `p0` to `p1`
Note 411
5
Versioned table `test`.`t1`: switching from partition `p0` to `p1`
select * from t1 partition (p0);
x
1
...
...
@@ -241,7 +241,7 @@ insert into t1 values (4), (5);
### warn about full partition
delete from t1;
Warnings:
Warning 411
4
Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
Warning 411
3
Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
select * from t1 partition (p1) order by x;
x
3
...
...
@@ -276,7 +276,7 @@ x
insert into t1 values (4);
delete from t1;
Warnings:
Note 411
6
Versioned table `test`.`t1`: switching from partition `p0` to `p1`
Note 411
5
Versioned table `test`.`t1`: switching from partition `p0` to `p1`
select * from t1 partition (p1);
x
4
...
...
@@ -302,8 +302,8 @@ x
### warn about partition switching and about full partition
delete from t1;
Warnings:
Note 411
6
Versioned table `test`.`t1`: switching from partition `p0` to `p1`
Warning 411
4
Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
Note 411
5
Versioned table `test`.`t1`: switching from partition `p0` to `p1`
Warning 411
3
Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions
select * from t1 partition (p0sp0);
x
1
...
...
mysql-test/suite/versioning/r/select.result
View file @
c5d0c38e
...
...
@@ -202,7 +202,7 @@ A
create or replace table t1 (x int);
insert into t1 values (1);
select * from t1 for system_time all;
ERROR HY000:
System versioning required: t1
ERROR HY000:
Table `t1` is not system-versioned
create or replace table t1 (x int) with system versioning;
insert into t1 values (1);
select * from t1 for system_time all for update;
...
...
mysql-test/suite/versioning/r/select_sp.result
View file @
c5d0c38e
...
...
@@ -217,7 +217,7 @@ A
create or replace table t1 (x int);
insert into t1 values (1);
select * from t1 for system_time all;
ERROR HY000:
System versioning required: t1
ERROR HY000:
Table `t1` is not system-versioned
create or replace table t1 (x int) with system versioning;
insert into t1 values (1);
select * from t1 for system_time all for update;
...
...
mysql-test/suite/versioning/r/truncate.result
View file @
c5d0c38e
create table t (a int);
delete history from t before system_time now();
ERROR HY000:
System versioning required: t
ERROR HY000:
Table `t` is not system-versioned
create or replace table t (a int) with system versioning;
insert into t values (1);
update t set a=2;
...
...
@@ -53,7 +53,7 @@ delete history from v before system_time now();
ERROR HY000: TRUNCATE table_name TO doesn't work with VIEWs
create or replace table t (i int);
delete history from t before system_time now();
ERROR HY000:
System versioning required: t
ERROR HY000:
Table `t` is not system-versioned
create or replace view v as select * from t;
delete history from v before system_time now();
ERROR HY000: TRUNCATE table_name TO doesn't work with VIEWs
...
...
mysql-test/suite/versioning/r/trx_id.result
View file @
c5d0c38e
...
...
@@ -10,7 +10,7 @@ period for system_time (sys_trx_start, sys_trx_end)
ERROR HY000: Temporal operation requires `mysql.transaction_registry` (@@system_versioning_transaction_registry).
set global system_versioning_transaction_registry= 1;
Warnings:
Warning 414
5
Transaction-based system versioning is EXPERIMENTAL and is subject to change in future.
Warning 414
4
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 as row start invisible,
...
...
mysql-test/suite/versioning/t/select.test
View file @
c5d0c38e
...
...
@@ -117,7 +117,7 @@ select * from t1;
create
or
replace
table
t1
(
x
int
);
insert
into
t1
values
(
1
);
--
error
ER_VERS
IONING_REQUIR
ED
--
error
ER_VERS
_NOT_VERSION
ED
select
*
from
t1
for
system_time
all
;
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
...
...
mysql-test/suite/versioning/t/select_sp.test
View file @
c5d0c38e
...
...
@@ -115,7 +115,7 @@ select * from t1;
create
or
replace
table
t1
(
x
int
);
insert
into
t1
values
(
1
);
--
error
ER_VERS
IONING_REQUIR
ED
--
error
ER_VERS
_NOT_VERSION
ED
select
*
from
t1
for
system_time
all
;
create
or
replace
table
t1
(
x
int
)
with
system
versioning
;
...
...
mysql-test/suite/versioning/t/truncate.test
View file @
c5d0c38e
--
source
suite
/
versioning
/
engines
.
inc
create
table
t
(
a
int
);
--
error
ER_VERS
IONING_REQUIR
ED
--
error
ER_VERS
_NOT_VERSION
ED
delete
history
from
t
before
system_time
now
();
# TRUNCATE is not DELETE and trigger must not be called.
...
...
@@ -47,7 +47,7 @@ create or replace view v as select * from t;
delete
history
from
v
before
system_time
now
();
create
or
replace
table
t
(
i
int
);
--
error
ER_VERS
IONING_REQUIR
ED
--
error
ER_VERS
_NOT_VERSION
ED
delete
history
from
t
before
system_time
now
();
create
or
replace
view
v
as
select
*
from
t
;
--
error
ER_VERS_TRUNCATE_TO_VIEW
...
...
sql/share/errmsg-utf8.txt
View file @
c5d0c38e
...
...
@@ -7813,10 +7813,8 @@ ER_INVALID_VALUE_TO_LIMIT
ER_INVISIBLE_NOT_NULL_WITHOUT_DEFAULT
eng "Invisible column %`s must have a default value"
# MariaDB error numbers related to System Versioning
ER_VERSIONING_REQUIRED
eng "System versioning required: %s"
# MariaDB error numbers related to System Versioning
ER_UPDATE_INFO_WITH_SYSTEM_VERSIONING
eng "Rows matched: %ld Changed: %ld Inserted: %ld Warnings: %ld"
...
...
sql/sql_select.cc
View file @
c5d0c38e
...
...
@@ -741,7 +741,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables, COND **where_expr
versioned_tables
++
;
else
if
(
table
->
vers_conditions
.
user_defined
())
{
my_error
(
ER_VERS
IONING_REQUIR
ED
,
MYF
(
0
),
table
->
alias
);
my_error
(
ER_VERS
_NOT_VERSION
ED
,
MYF
(
0
),
table
->
alias
);
DBUG_RETURN
(
-
1
);
}
}
...
...
@@ -840,7 +840,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables, COND **where_expr
char
buf
[
NAME_LEN
*
2
+
sizeof
(
PART_VERS_ERR_MSG
)];
my_snprintf
(
buf
,
sizeof
(
buf
),
PART_VERS_ERR_MSG
,
table
->
alias
,
table
->
partition_names
->
head
()
->
c_ptr
());
my_error
(
ER_VERS
IONING_REQUIR
ED
,
MYF
(
0
),
buf
);
my_error
(
ER_VERS
_NOT_VERSION
ED
,
MYF
(
0
),
buf
);
DBUG_RETURN
(
-
1
);
}
else
...
...
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