Merge lp:~stewart/drizzle/bug802248 into lp:drizzle

Proposed by Stewart Smith
Status: Merged
Merged at revision: 2627
Proposed branch: lp:~stewart/drizzle/bug802248
Merge into: lp:drizzle
Diff against target: 43 lines (+23/-0)
3 files modified
drizzled/sql_yacc.yy (+1/-0)
tests/suite/regression/r/802248.result (+13/-0)
tests/suite/regression/t/802248.test (+9/-0)
To merge this branch: bzr merge lp:~stewart/drizzle/bug802248
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Drizzle Trunk Pending
Review via email: mp+150694@code.launchpad.net

Description of the change

We were treating ROW_FORMAT a bit specially in parser. We should allow any text value in there too, it's up to the engine to decide.

To post a comment you must log in.
Revision history for this message
Stewart Smith (stewart) wrote :

discussed (and approved) with Brian over email

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'drizzled/sql_yacc.yy'
--- drizzled/sql_yacc.yy 2013-01-29 13:10:03 +0000
+++ drizzled/sql_yacc.yy 2013-02-26 23:30:29 +0000
@@ -1155,6 +1155,7 @@
1155 {1155 {
1156 $$.assign(YYSession->mem.strdup($1.data(), $1.length), $1.length);1156 $$.assign(YYSession->mem.strdup($1.data(), $1.length), $1.length);
1157 }1157 }
1158 | TEXT_STRING_sys { $$=$1;}
1158 ;1159 ;
11591160
1160opt_select_from:1161opt_select_from:
11611162
=== added file 'tests/suite/regression/r/802248.result'
--- tests/suite/regression/r/802248.result 1970-01-01 00:00:00 +0000
+++ tests/suite/regression/r/802248.result 2013-02-26 23:30:29 +0000
@@ -0,0 +1,13 @@
1create table test (a int) engine=innodb row_format=compaCT;
2show create table test;
3Table Create Table
4test CREATE TABLE `test` (
5 `a` INT DEFAULT NULL
6) ENGINE=InnoDB ROW_FORMAT='compaCT' COLLATE = utf8_general_ci
7drop table test;
8CREATE TABLE `test` (
9`a` INT DEFAULT NULL
10) ENGINE=InnoDB ROW_FORMAT='compaCT' COLLATE = utf8_general_ci;
11DROP TABLE test;
12create table test (a int) engine=innodb row_format='totally incorrect value';
13ERROR HY000: Unknown table engine option key/pair ROW_FORMAT = totally incorrect value.
014
=== added file 'tests/suite/regression/t/802248.test'
--- tests/suite/regression/t/802248.test 1970-01-01 00:00:00 +0000
+++ tests/suite/regression/t/802248.test 2013-02-26 23:30:29 +0000
@@ -0,0 +1,9 @@
1create table test (a int) engine=innodb row_format=compaCT;
2show create table test;
3drop table test;
4 CREATE TABLE `test` (
5 `a` INT DEFAULT NULL
6) ENGINE=InnoDB ROW_FORMAT='compaCT' COLLATE = utf8_general_ci;
7DROP TABLE test;
8--error ER_UNKNOWN_ENGINE_OPTION
9create table test (a int) engine=innodb row_format='totally incorrect value';

Subscribers

People subscribed via source and target branches

to all changes: