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
a79183b0
Commit
a79183b0
authored
Dec 19, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct table name in CHECK failures during ALTER TABLE
parent
fca44b7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
mysql-test/r/partition_alter.result
mysql-test/r/partition_alter.result
+2
-2
mysql-test/t/partition_alter.test
mysql-test/t/partition_alter.test
+0
-2
sql/table.cc
sql/table.cc
+1
-1
No files found.
mysql-test/r/partition_alter.result
View file @
a79183b0
...
...
@@ -59,7 +59,7 @@ partition p2 values less than ('2020-10-19'));
insert t1 values (0, '2000-01-02', 0);
insert t1 values (1, '2020-01-02', 10);
alter table t1 add check (b in (0, 1));
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`
#sql-temporary
`
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`
t1
`
alter table t1 add check (b in (0, 10));
show create table t1;
Table Create Table
...
...
@@ -83,7 +83,7 @@ partition p2 values less than ('2020-10-19'));
insert t1 values (0, '2000-01-02', 0);
insert t1 values (1, '2020-01-02', 10);
alter table t1 add check (b in (0, 1));
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`
#sql-temporary
`
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`
t1
`
alter table t1 add check (b in (0, 10));
show create table t1;
Table Create Table
...
...
mysql-test/t/partition_alter.test
View file @
a79183b0
...
...
@@ -79,7 +79,6 @@ partition p1 values less than ('2016-10-18'),
partition
p2
values
less
than
(
'2020-10-19'
));
insert
t1
values
(
0
,
'2000-01-02'
,
0
);
insert
t1
values
(
1
,
'2020-01-02'
,
10
);
--
replace_regex
/
#sql-[0-9a-f_]*/#sql-temporary/
--
error
ER_CONSTRAINT_FAILED
alter
table
t1
add
check
(
b
in
(
0
,
1
));
alter
table
t1
add
check
(
b
in
(
0
,
10
));
...
...
@@ -96,7 +95,6 @@ partition p1 values less than ('2016-10-18'),
partition
p2
values
less
than
(
'2020-10-19'
));
insert
t1
values
(
0
,
'2000-01-02'
,
0
);
insert
t1
values
(
1
,
'2020-01-02'
,
10
);
--
replace_regex
/
#sql-[0-9a-f_]*/#sql-temporary/
--
error
ER_CONSTRAINT_FAILED
alter
table
t1
add
check
(
b
in
(
0
,
1
));
alter
table
t1
add
check
(
b
in
(
0
,
10
));
...
...
sql/table.cc
View file @
a79183b0
...
...
@@ -5178,7 +5178,7 @@ int TABLE::verify_constraints(bool ignore_failure)
field_error
.
append
((
*
chk
)
->
name
.
str
);
my_error
(
ER_CONSTRAINT_FAILED
,
MYF
(
ignore_failure
?
ME_JUST_WARNING
:
0
),
field_error
.
c_ptr
(),
s
->
db
.
str
,
s
->
table_name
.
str
);
s
->
db
.
str
,
s
->
error_table_name
()
);
return
ignore_failure
?
VIEW_CHECK_SKIP
:
VIEW_CHECK_ERROR
;
}
}
...
...
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