mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for Bug 3481
CREATE statement allowed extra unnecessary commas mysql-test/r/alias.result: Extra comma removed in CREATE statement mysql-test/r/create.result: New test for Bug 3481 mysql-test/r/func_str.result: Extra comma removed in CREATE statement mysql-test/r/rpl_multi_update.result: Extra comma removed in CREATE statement mysql-test/t/alias.test: Extra comma removed in CREATE statement mysql-test/t/create.test: New test for bug 3481 mysql-test/t/func_str.test: Extra comma removed in CREATE statement mysql-test/t/rpl_multi_update.test: Extra comma removed in CREATE statement sql/sql_yacc.yy: Fix for bug 3481 No path through the grammar which has no clauses BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
@ -63,7 +63,7 @@ CREATE TABLE t1 (
|
||||
AUFNR varchar(12) NOT NULL default '',
|
||||
PLNFL varchar(6) NOT NULL default '',
|
||||
VORNR varchar(4) NOT NULL default '',
|
||||
xstatus_vor smallint(5) unsigned NOT NULL default '0',
|
||||
xstatus_vor smallint(5) unsigned NOT NULL default '0'
|
||||
);
|
||||
INSERT INTO t1 VALUES ('40004712','000001','0010',9);
|
||||
INSERT INTO t1 VALUES ('40004712','000001','0020',0);
|
||||
|
@ -222,3 +222,9 @@ create database `db1 `;
|
||||
Incorrect database name 'db1 '
|
||||
create table t1(`a ` int);
|
||||
Incorrect column name 'a '
|
||||
create table t1 (a int,);
|
||||
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
|
||||
create table t1 (a int,,b int);
|
||||
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 'b int)' at line 1
|
||||
create table t1 (,b int);
|
||||
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 'b int)' at line 1
|
||||
|
@ -247,7 +247,7 @@ CREATE TABLE t1 (
|
||||
wid int(10) unsigned NOT NULL auto_increment,
|
||||
data_podp date default NULL,
|
||||
status_wnio enum('nowy','podp','real','arch') NOT NULL default 'nowy',
|
||||
PRIMARY KEY(wid),
|
||||
PRIMARY KEY(wid)
|
||||
);
|
||||
INSERT INTO t1 VALUES (8,NULL,'real');
|
||||
INSERT INTO t1 VALUES (9,NULL,'nowy');
|
||||
|
@ -7,7 +7,7 @@ slave start;
|
||||
drop table if exists t1,t2;
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
b int unsigned,
|
||||
b int unsigned
|
||||
) TYPE=MyISAM;
|
||||
CREATE TABLE t2 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
|
@ -71,8 +71,7 @@ CREATE TABLE t1 (
|
||||
AUFNR varchar(12) NOT NULL default '',
|
||||
PLNFL varchar(6) NOT NULL default '',
|
||||
VORNR varchar(4) NOT NULL default '',
|
||||
xstatus_vor smallint(5) unsigned NOT NULL default '0',
|
||||
|
||||
xstatus_vor smallint(5) unsigned NOT NULL default '0'
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES ('40004712','000001','0010',9);
|
||||
|
@ -191,3 +191,15 @@ create table `t1 `(a int);
|
||||
create database `db1 `;
|
||||
--error 1166;
|
||||
create table t1(`a ` int);
|
||||
|
||||
#
|
||||
# Test for Bug #3481
|
||||
# "Parser permits multiple commas without syntax error"
|
||||
#
|
||||
|
||||
--error 1064
|
||||
create table t1 (a int,);
|
||||
--error 1064
|
||||
create table t1 (a int,,b int);
|
||||
--error 1064
|
||||
create table t1 (,b int);
|
||||
|
@ -133,7 +133,7 @@ CREATE TABLE t1 (
|
||||
wid int(10) unsigned NOT NULL auto_increment,
|
||||
data_podp date default NULL,
|
||||
status_wnio enum('nowy','podp','real','arch') NOT NULL default 'nowy',
|
||||
PRIMARY KEY(wid),
|
||||
PRIMARY KEY(wid)
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES (8,NULL,'real');
|
||||
|
@ -3,7 +3,7 @@ drop table if exists t1,t2;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
b int unsigned,
|
||||
b int unsigned
|
||||
) TYPE=MyISAM;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
|
Reference in New Issue
Block a user