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
17f8e0ec
Commit
17f8e0ec
authored
Feb 23, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unify error messages a bit
parent
5282d0dc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
12 deletions
+36
-12
mysql-test/suite/versioning/r/truncate.result
mysql-test/suite/versioning/r/truncate.result
+12
-2
mysql-test/suite/versioning/t/truncate.test
mysql-test/suite/versioning/t/truncate.test
+16
-2
sql/share/errmsg-utf8.txt
sql/share/errmsg-utf8.txt
+4
-4
sql/sql_delete.cc
sql/sql_delete.cc
+2
-2
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+2
-2
No files found.
mysql-test/suite/versioning/r/truncate.result
View file @
17f8e0ec
...
@@ -65,14 +65,24 @@ create or replace table t (i int) with system versioning;
...
@@ -65,14 +65,24 @@ create or replace table t (i int) with system versioning;
delete history from t;
delete history from t;
create or replace view v as select * from t;
create or replace view v as select * from t;
delete history from v;
delete history from v;
ERROR
HY000: DELETE HISTORY from VIEW is prohibited
ERROR
42S02: 'v' is a view
create or replace table t (i int);
create or replace table t (i int);
delete history from t;
delete history from t;
ERROR HY000: Table `t` is not system-versioned
ERROR HY000: Table `t` is not system-versioned
create or replace view v as select * from t;
create or replace view v as select * from t;
delete history from v;
delete history from v;
ERROR
HY000: DELETE HISTORY from VIEW is prohibited
ERROR
42S02: 'v' is a view
prepare stmt from 'delete history from t';
prepare stmt from 'delete history from t';
ERROR HY000: Table `t` is not system-versioned
ERROR HY000: Table `t` is not system-versioned
drop table t;
drop table t;
drop view v;
drop view v;
create or replace table t (i int);
create or replace view v as select * from t;
drop table v;
ERROR 42S02: 'test.v' is a view
lock table v write;
delete history from v before system_time now(6);
ERROR 42S02: 'v' is a view
unlock tables;
drop view v;
drop table t;
mysql-test/suite/versioning/t/truncate.test
View file @
17f8e0ec
...
@@ -60,17 +60,31 @@ select * from t for system_time all;
...
@@ -60,17 +60,31 @@ select * from t for system_time all;
create
or
replace
table
t
(
i
int
)
with
system
versioning
;
create
or
replace
table
t
(
i
int
)
with
system
versioning
;
delete
history
from
t
;
delete
history
from
t
;
create
or
replace
view
v
as
select
*
from
t
;
create
or
replace
view
v
as
select
*
from
t
;
--
error
ER_
VERS_TRUNCATE
_VIEW
--
error
ER_
IT_IS_A
_VIEW
delete
history
from
v
;
delete
history
from
v
;
create
or
replace
table
t
(
i
int
);
create
or
replace
table
t
(
i
int
);
--
error
ER_VERS_NOT_VERSIONED
--
error
ER_VERS_NOT_VERSIONED
delete
history
from
t
;
delete
history
from
t
;
create
or
replace
view
v
as
select
*
from
t
;
create
or
replace
view
v
as
select
*
from
t
;
--
error
ER_
VERS_TRUNCATE
_VIEW
--
error
ER_
IT_IS_A
_VIEW
delete
history
from
v
;
delete
history
from
v
;
--
error
ER_VERS_NOT_VERSIONED
--
error
ER_VERS_NOT_VERSIONED
prepare
stmt
from
'delete history from t'
;
prepare
stmt
from
'delete history from t'
;
drop
table
t
;
drop
table
t
;
drop
view
v
;
drop
view
v
;
#
# MDEV-15402 Assertion `table' failed in mysql_delete on attempt to delete history from view
#
create
or
replace
table
t
(
i
int
);
create
or
replace
view
v
as
select
*
from
t
;
--
error
ER_IT_IS_A_VIEW
drop
table
v
;
lock
table
v
write
;
--
error
ER_IT_IS_A_VIEW
delete
history
from
v
before
system_time
now
(
6
);
unlock
tables
;
drop
view
v
;
drop
table
t
;
sql/share/errmsg-utf8.txt
View file @
17f8e0ec
...
@@ -7897,14 +7897,14 @@ ER_VERS_DUPLICATE_ROW_START_END
...
@@ -7897,14 +7897,14 @@ ER_VERS_DUPLICATE_ROW_START_END
ER_VERS_ALREADY_VERSIONED
ER_VERS_ALREADY_VERSIONED
eng "Table %`s is already system-versioned"
eng "Table %`s is already system-versioned"
ER_
VERS_TRUNCATE_VIEW
ER_
UNUSED_24
eng "DELETE HISTORY from VIEW is prohibited
"
eng "You should never see it
"
ER_VERS_TEMPORARY
ER_VERS_TEMPORARY
eng "System versioning prohibited for TEMPORARY tables"
eng "System versioning prohibited for TEMPORARY tables"
ER_VERS_
INPLACE_NOT_IMPLEMEN
TED
ER_VERS_
NOT_SUPPOR
TED
eng "
Not implemented for
system-versioned tables"
eng "
%s is not supported for %s
system-versioned tables"
ER_INDEX_FILE_FULL
ER_INDEX_FILE_FULL
eng "The index file for table '%-.192s' is full"
eng "The index file for table '%-.192s' is full"
ER_UPDATED_COLUMN_ONLY_ONCE
ER_UPDATED_COLUMN_ONLY_ONCE
...
...
sql/sql_delete.cc
View file @
17f8e0ec
...
@@ -310,7 +310,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
...
@@ -310,7 +310,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
{
if
(
table_list
->
is_view_or_derived
())
if
(
table_list
->
is_view_or_derived
())
{
{
my_error
(
ER_
VERS_TRUNCATE_VIEW
,
MYF
(
0
)
);
my_error
(
ER_
IT_IS_A_VIEW
,
MYF
(
0
),
table_list
->
table_name
.
str
);
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
}
}
...
@@ -938,7 +938,7 @@ l
...
@@ -938,7 +938,7 @@ l
{
{
if
(
table_list
->
is_view
())
if
(
table_list
->
is_view
())
{
{
my_error
(
ER_
VERS_TRUNCATE_VIEW
,
MYF
(
0
)
);
my_error
(
ER_
IT_IS_A_VIEW
,
MYF
(
0
),
table_list
->
table_name
.
str
);
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
}
}
if
(
select_lex
->
vers_setup_conds
(
thd
,
table_list
,
conds
))
if
(
select_lex
->
vers_setup_conds
(
thd
,
table_list
,
conds
))
...
...
storage/innobase/handler/handler0alter.cc
View file @
17f8e0ec
...
@@ -699,7 +699,7 @@ ha_innobase::check_if_supported_inplace_alter(
...
@@ -699,7 +699,7 @@ ha_innobase::check_if_supported_inplace_alter(
if
((
table
->
versioned
(
VERS_TIMESTAMP
)
||
altered_table
->
versioned
(
VERS_TIMESTAMP
))
if
((
table
->
versioned
(
VERS_TIMESTAMP
)
||
altered_table
->
versioned
(
VERS_TIMESTAMP
))
&&
innobase_need_rebuild
(
ha_alter_info
,
table
))
{
&&
innobase_need_rebuild
(
ha_alter_info
,
table
))
{
ha_alter_info
->
unsupported_reason
=
ha_alter_info
->
unsupported_reason
=
innobase_get_err_msg
(
ER_VERS_INPLACE_NOT_IMPLEMENTED
)
;
"Not implemented for system-versioned tables"
;
DBUG_RETURN
(
HA_ALTER_INPLACE_NOT_SUPPORTED
);
DBUG_RETURN
(
HA_ALTER_INPLACE_NOT_SUPPORTED
);
}
}
...
@@ -1239,7 +1239,7 @@ ha_innobase::check_if_supported_inplace_alter(
...
@@ -1239,7 +1239,7 @@ ha_innobase::check_if_supported_inplace_alter(
if
((
table
->
versioned
(
VERS_TRX_ID
)
||
altered_table
->
versioned
(
VERS_TRX_ID
))
if
((
table
->
versioned
(
VERS_TRX_ID
)
||
altered_table
->
versioned
(
VERS_TRX_ID
))
&&
innobase_need_rebuild
(
ha_alter_info
,
table
))
{
&&
innobase_need_rebuild
(
ha_alter_info
,
table
))
{
ha_alter_info
->
unsupported_reason
=
ha_alter_info
->
unsupported_reason
=
innobase_get_err_msg
(
ER_VERS_INPLACE_NOT_IMPLEMENTED
)
;
"Not implemented for system-versioned tables"
;
online
=
false
;
online
=
false
;
}
}
...
...
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