Skip to content

Commit 3afa191

Browse files
committed
merge
2 parents ebcfde2 + 3630d78 commit 3afa191

21 files changed

+318
-88
lines changed

include/mysql/psi/psi.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
1+
/* Copyright (C) 2008-2010 Sun Microsystems, Inc
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -614,6 +614,9 @@ typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
614614
/** Delete the current thread instrumentation. */
615615
typedef void (*delete_current_thread_v1_t)(void);
616616

617+
/** Delete a thread instrumentation. */
618+
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
619+
617620
/**
618621
Get a mutex instrumentation locker.
619622
@param mutex the instrumented mutex to lock
@@ -890,6 +893,8 @@ struct PSI_v1
890893
set_thread_v1_t set_thread;
891894
/** @sa delete_current_thread_v1_t. */
892895
delete_current_thread_v1_t delete_current_thread;
896+
/** @sa delete_thread_v1_t. */
897+
delete_thread_v1_t delete_thread;
893898
/** @sa get_thread_mutex_locker_v1_t. */
894899
get_thread_mutex_locker_v1_t get_thread_mutex_locker;
895900
/** @sa get_thread_rwlock_locker_v1_t. */

include/mysql/psi/psi_abi_v1.h.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
typedef struct PSI_thread* (*get_thread_v1_t)(void);
128128
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
129129
typedef void (*delete_current_thread_v1_t)(void);
130+
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
130131
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
131132
(struct PSI_mutex *mutex, enum PSI_mutex_operation op);
132133
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
@@ -204,6 +205,7 @@
204205
get_thread_v1_t get_thread;
205206
set_thread_v1_t set_thread;
206207
delete_current_thread_v1_t delete_current_thread;
208+
delete_thread_v1_t delete_thread;
207209
get_thread_mutex_locker_v1_t get_thread_mutex_locker;
208210
get_thread_rwlock_locker_v1_t get_thread_rwlock_locker;
209211
get_thread_cond_locker_v1_t get_thread_cond_locker;

mysql-test/collections/default.experimental

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ main.plugin # Bug#47146 Linking problem with exampl
1616
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
1717
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
1818

19-
perfschema.tampered_perfschema_table1 @windows # Bug#50478 2010-01-20 alik perfschema.tampered_perfschema_table1 fails sporadically on Windows and Solaris
20-
perfschema.tampered_perfschema_table1 @solaris # Bug#50478 2010-01-20 alik perfschema.tampered_perfschema_table1 fails sporadically on Windows and Solaris
21-
2219
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
2320
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
2421
rpl.rpl_innodb_bug28430* # Bug#46029

mysql-test/r/constraints.result

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ create table t1 (a int check (a>0));
33
insert into t1 values (1);
44
insert into t1 values (0);
55
drop table t1;
6-
create table t1 (a int ,b int, check a>b);
6+
create table t1 (a int, b int, check (a>b));
77
insert into t1 values (1,0);
88
insert into t1 values (0,1);
99
drop table t1;
@@ -27,3 +27,19 @@ t1 CREATE TABLE `t1` (
2727
UNIQUE KEY `key_2` (`a`)
2828
) ENGINE=MyISAM DEFAULT CHARSET=latin1
2929
drop table t1;
30+
drop table if exists t_illegal;
31+
create table t_illegal (a int, b int, check a>b);
32+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a>b)' at line 1
33+
create table t_illegal (a int, b int, constraint abc check a>b);
34+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a>b)' at line 1
35+
create table t_illegal (a int, b int, constraint abc);
36+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
37+
drop table if exists t_11714;
38+
create table t_11714(a int, b int);
39+
alter table t_11714 add constraint cons1;
40+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
41+
drop table t_11714;
42+
CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
43+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something (whatever))' at line 1
44+
CREATE TABLE t_illegal (col_1 INT CHECK something);
45+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'something)' at line 1

mysql-test/r/foreign_key.result

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,45 @@ foreign key (a,b) references t3 (c,d) on update set null);
1313
create index a on t1 (a);
1414
create unique index b on t1 (a,b);
1515
drop table t1;
16+
drop table if exists t_34455;
17+
create table t_34455 (
18+
a int not null,
19+
foreign key (a) references t3 (a) match full match partial);
20+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match partial)' at line 3
21+
create table t_34455 (
22+
a int not null,
23+
foreign key (a) references t3 (a) on delete set default match full);
24+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 3
25+
create table t_34455 (
26+
a int not null,
27+
foreign key (a) references t3 (a) on update set default match full);
28+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 3
29+
create table t_34455 (
30+
a int not null,
31+
foreign key (a) references t3 (a)
32+
on delete set default on delete set default);
33+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete set default)' at line 4
34+
create table t_34455 (
35+
a int not null,
36+
foreign key (a) references t3 (a)
37+
on update set default on update set default);
38+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update set default)' at line 4
39+
create table t_34455 (a int not null);
40+
alter table t_34455
41+
add foreign key (a) references t3 (a) match full match partial);
42+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match partial)' at line 2
43+
alter table t_34455
44+
add foreign key (a) references t3 (a) on delete set default match full);
45+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 2
46+
alter table t_34455
47+
add foreign key (a) references t3 (a) on update set default match full);
48+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'match full)' at line 2
49+
alter table t_34455
50+
add foreign key (a) references t3 (a)
51+
on delete set default on delete set default);
52+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete set default)' at line 3
53+
alter table t_34455
54+
add foreign key (a) references t3 (a)
55+
on update set default on update set default);
56+
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update set default)' at line 3
57+
drop table t_34455;

mysql-test/suite/perfschema/r/aggregate.result

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ b CHAR(100) DEFAULT 'initial value')
1616
ENGINE=MyISAM;
1717
insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
1818
update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
19+
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
1920
set @dump_all=FALSE;
2021
"Verifying file aggregate consistency"
2122
SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
@@ -51,22 +52,22 @@ SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
5152
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
5253
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
5354
GROUP BY EVENT_NAME
54-
HAVING (e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT))
55+
HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
5556
OR @dump_all;
5657
EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT)
5758
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
5859
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
5960
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
6061
GROUP BY EVENT_NAME
61-
HAVING (e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT))
62+
HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
6263
AND (MIN(i.MIN_TIMER_WAIT) != 0)
6364
OR @dump_all;
6465
EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT)
6566
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
6667
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
6768
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
6869
GROUP BY EVENT_NAME
69-
HAVING (e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT))
70+
HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
7071
OR @dump_all;
7172
EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT)
7273
"Verifying waits aggregate consistency (thread)"
@@ -75,15 +76,15 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
7576
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
7677
USING (EVENT_NAME)
7778
GROUP BY EVENT_NAME
78-
HAVING (e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT))
79+
HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
7980
OR @dump_all;
8081
EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT)
8182
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
8283
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
8384
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
8485
USING (EVENT_NAME)
8586
GROUP BY EVENT_NAME
86-
HAVING (e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT))
87+
HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
8788
AND (MIN(t.MIN_TIMER_WAIT) != 0)
8889
OR @dump_all;
8990
EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT)
@@ -92,7 +93,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
9293
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
9394
USING (EVENT_NAME)
9495
GROUP BY EVENT_NAME
95-
HAVING (e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT))
96+
HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
9697
OR @dump_all;
9798
EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT)
9899
update performance_schema.SETUP_CONSUMERS set enabled = 'YES';

mysql-test/suite/perfschema/r/dml_mutex_instances.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
select * from performance_schema.MUTEX_INSTANCES limit 1;
22
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
3-
# # NULL
3+
# # #
44
select * from performance_schema.MUTEX_INSTANCES
55
where name='FOO';
66
NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID

mysql-test/suite/perfschema/r/dml_rwlock_instances.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
select * from performance_schema.RWLOCK_INSTANCES limit 1;
22
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
3-
# # NULL 0
3+
# # # #
44
select * from performance_schema.RWLOCK_INSTANCES
55
where name='FOO';
66
NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT

mysql-test/suite/perfschema/r/dml_setup_instruments.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ wait/synch/mutex/sql/LOCK_delayed_create YES YES
1616
wait/synch/mutex/sql/LOCK_delayed_insert YES YES
1717
select * from performance_schema.SETUP_INSTRUMENTS
1818
where name like 'Wait/Synch/Rwlock/sql/%'
19-
order by name limit 10;
19+
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
20+
order by name limit 10;
2021
NAME ENABLED TIMED
2122
wait/synch/rwlock/sql/LOCK_dboptions YES YES
2223
wait/synch/rwlock/sql/LOCK_grant YES YES

mysql-test/suite/perfschema/t/aggregate.test

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2009 Sun Microsystems, Inc
1+
# Copyright (C) 2009-2010 Sun Microsystems, Inc
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -50,6 +50,8 @@ insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
5050

5151
# Stop recording data, so the select below don't add noise.
5252
update performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO';
53+
# Disable all consumers, for long standing waits
54+
update performance_schema.SETUP_CONSUMERS set enabled = 'NO';
5355

5456
# Helper to debug
5557
set @dump_all=FALSE;
@@ -132,22 +134,22 @@ SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
132134
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
133135
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
134136
GROUP BY EVENT_NAME
135-
HAVING (e.SUM_TIMER_WAIT <> SUM(i.SUM_TIMER_WAIT))
137+
HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
136138
OR @dump_all;
137139

138140
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
139141
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
140142
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
141143
GROUP BY EVENT_NAME
142-
HAVING (e.MIN_TIMER_WAIT <> MIN(i.MIN_TIMER_WAIT))
144+
HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
143145
AND (MIN(i.MIN_TIMER_WAIT) != 0)
144146
OR @dump_all;
145147

146148
SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
147149
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
148150
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE AS i USING (EVENT_NAME)
149151
GROUP BY EVENT_NAME
150-
HAVING (e.MAX_TIMER_WAIT <> MAX(i.MAX_TIMER_WAIT))
152+
HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
151153
OR @dump_all;
152154

153155
--echo "Verifying waits aggregate consistency (thread)"
@@ -157,15 +159,15 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
157159
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
158160
USING (EVENT_NAME)
159161
GROUP BY EVENT_NAME
160-
HAVING (e.SUM_TIMER_WAIT <> SUM(t.SUM_TIMER_WAIT))
162+
HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
161163
OR @dump_all;
162164

163165
SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
164166
FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
165167
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
166168
USING (EVENT_NAME)
167169
GROUP BY EVENT_NAME
168-
HAVING (e.MIN_TIMER_WAIT <> MIN(t.MIN_TIMER_WAIT))
170+
HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
169171
AND (MIN(t.MIN_TIMER_WAIT) != 0)
170172
OR @dump_all;
171173

@@ -174,7 +176,7 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_BY_EVENT_NAME AS e
174176
JOIN performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME AS t
175177
USING (EVENT_NAME)
176178
GROUP BY EVENT_NAME
177-
HAVING (e.MAX_TIMER_WAIT <> MAX(t.MAX_TIMER_WAIT))
179+
HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
178180
OR @dump_all;
179181

180182

mysql-test/suite/perfschema/t/dml_mutex_instances.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
--source include/not_embedded.inc
1919
--source include/have_perfschema.inc
2020

21-
--replace_column 1 # 2 #
21+
--replace_column 1 # 2 # 3 #
2222
select * from performance_schema.MUTEX_INSTANCES limit 1;
2323

2424
select * from performance_schema.MUTEX_INSTANCES

mysql-test/suite/perfschema/t/dml_rwlock_instances.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
--source include/not_embedded.inc
1919
--source include/have_perfschema.inc
2020

21-
--replace_column 1 # 2 #
21+
--replace_column 1 # 2 # 3 # 4 #
2222
select * from performance_schema.RWLOCK_INSTANCES limit 1;
2323

2424
select * from performance_schema.RWLOCK_INSTANCES

mysql-test/suite/perfschema/t/dml_setup_instruments.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ select * from performance_schema.SETUP_INSTRUMENTS
3636
and name not in ('wait/synch/mutex/sql/DEBUG_SYNC::mutex')
3737
order by name limit 10;
3838

39+
# CRYPTO_dynlock_value::lock is dependent on the build (SSL)
40+
3941
select * from performance_schema.SETUP_INSTRUMENTS
4042
where name like 'Wait/Synch/Rwlock/sql/%'
43+
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
4144
order by name limit 10;
4245

4346
# COND_handler_count is dependent on the build (Windows only)

mysql-test/t/constraints.test

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ create table t1 (a int check (a>0));
1010
insert into t1 values (1);
1111
insert into t1 values (0);
1212
drop table t1;
13-
create table t1 (a int ,b int, check a>b);
13+
create table t1 (a int, b int, check (a>b));
1414
insert into t1 values (1,0);
1515
insert into t1 values (0,1);
1616
drop table t1;
@@ -29,3 +29,45 @@ show create table t1;
2929
drop table t1;
3030

3131
# End of 4.1 tests
32+
33+
#
34+
# Bug#35578 (Parser allows useless/illegal CREATE TABLE syntax)
35+
#
36+
37+
--disable_warnings
38+
drop table if exists t_illegal;
39+
--enable_warnings
40+
41+
--error ER_PARSE_ERROR
42+
create table t_illegal (a int, b int, check a>b);
43+
44+
--error ER_PARSE_ERROR
45+
create table t_illegal (a int, b int, constraint abc check a>b);
46+
47+
--error ER_PARSE_ERROR
48+
create table t_illegal (a int, b int, constraint abc);
49+
50+
#
51+
# Bug#11714 (Non-sensical ALTER TABLE ADD CONSTRAINT allowed)
52+
#
53+
54+
--disable_warnings
55+
drop table if exists t_11714;
56+
--enable_warnings
57+
58+
create table t_11714(a int, b int);
59+
60+
--error ER_PARSE_ERROR
61+
alter table t_11714 add constraint cons1;
62+
63+
drop table t_11714;
64+
65+
#
66+
# Bug#38696 (CREATE TABLE ... CHECK ... allows illegal syntax)
67+
68+
--error ER_PARSE_ERROR
69+
CREATE TABLE t_illegal (col_1 INT CHECK something (whatever));
70+
71+
--error ER_PARSE_ERROR
72+
CREATE TABLE t_illegal (col_1 INT CHECK something);
73+

0 commit comments

Comments
 (0)