Merge lp:~hartmut-php/maria/10.0-check-constraint-warning into lp:maria

Proposed by Hartmut Holzgraefe
Status: Needs review
Proposed branch: lp:~hartmut-php/maria/10.0-check-constraint-warning
Merge into: lp:maria
Diff against target: 68 lines (+28/-0) (has conflicts)
3 files modified
mysql-test/r/create.result (+10/-0)
mysql-test/t/create.test (+12/-0)
sql/sql_yacc.yy (+6/-0)
Text conflict in mysql-test/r/create.result
Text conflict in mysql-test/t/create.test
To merge this branch: bzr merge lp:~hartmut-php/maria/10.0-check-constraint-warning
Reviewer Review Type Date Requested Status
Sergei Golubchik Approve
Review via email: mp+159891@code.launchpad.net

Description of the change

Raise a "not supported" warning when CHECK constraints are used in CREATE or ALTER TABLE

To post a comment you must log in.
Revision history for this message
Sergei Golubchik (sergii) wrote :

looks ok. please resolve the merge conflicts, run the complete test suite and feel free to push

review: Approve
Revision history for this message
Hartmut Holzgraefe (hartmut-php) wrote :

On 05/03/2013 05:20 PM, Sergei wrote:
> Review: Approve
>
> looks ok. please resolve the merge conflicts, run the complete test suite and feel free to push
>

how should i deal with a changelog entry for this?

--
hartmut

Revision history for this message
Sergei Golubchik (sergii) wrote :

Hi, Hartmut!

On May 03, Hartmut Holzgraefe wrote:
> On 05/03/2013 05:20 PM, Sergei wrote:
> > Review: Approve
> >
> > looks ok. please resolve the merge conflicts, run the complete test
> > suite and feel free to push
>
> how should i deal with a changelog entry for this?

What do you mean?
Changeset comment?
Changelog page of the next release in the KB?

Regards,
Sergei

Unmerged revisions

3491. By Hartmut Holzgraefe

added warning about CHECK constraints not being supported yet

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mysql-test/r/create.result'
2--- mysql-test/r/create.result 2013-04-09 21:27:07 +0000
3+++ mysql-test/r/create.result 2013-04-19 20:58:09 +0000
4@@ -2418,6 +2418,7 @@
5 1 1
6 drop table t1;
7 #
8+<<<<<<< TREE
9 # Checking that CREATE IF NOT EXISTS is not blocked by running SELECT
10 #
11 create table t1 (a int, b int) engine=myisam;
12@@ -2445,3 +2446,12 @@
13 1 1
14 unlock tables;
15 drop table t1,t2;
16+=======
17+# Test for CHECK(...) constraint not supported warning
18+#
19+create table if not exists t1 (a int CHECK(a < 10));
20+Warnings:
21+Warning 1235 This version of MariaDB doesn't yet support 'CHECK'
22+drop table t1;
23+#
24+>>>>>>> MERGE-SOURCE
25
26=== modified file 'mysql-test/t/create.test'
27--- mysql-test/t/create.test 2013-04-09 13:35:07 +0000
28+++ mysql-test/t/create.test 2013-04-19 20:58:09 +0000
29@@ -1993,6 +1993,7 @@
30 ignore select 1 as a, 1 as b union select 1 as a, 2 as b;
31 select * from t1;
32 drop table t1;
33+<<<<<<< TREE
34
35 --echo #
36 --echo # Checking that CREATE IF NOT EXISTS is not blocked by running SELECT
37@@ -2018,3 +2019,14 @@
38 select * from t1;
39 unlock tables;
40 drop table t1,t2;
41+=======
42+
43+--echo #
44+--echo # Test for CHECK(...) constraint not supported warning
45+--echo #
46+
47+create table if not exists t1 (a int CHECK(a < 10));
48+drop table t1;
49+
50+--echo #
51+>>>>>>> MERGE-SOURCE
52
53=== modified file 'sql/sql_yacc.yy'
54--- sql/sql_yacc.yy 2013-04-17 13:17:01 +0000
55+++ sql/sql_yacc.yy 2013-04-19 20:58:09 +0000
56@@ -5610,6 +5610,12 @@
57
58 check_constraint:
59 CHECK_SYM '(' expr ')'
60+ {
61+ push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
62+ ER_NOT_SUPPORTED_YET,
63+ ER(ER_NOT_SUPPORTED_YET),
64+ "CHECK");
65+ }
66 ;
67
68 opt_constraint:

Subscribers

People subscribed via source and target branches