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
1=== modified file 'drizzled/sql_yacc.yy'
2--- drizzled/sql_yacc.yy 2013-01-29 13:10:03 +0000
3+++ drizzled/sql_yacc.yy 2013-02-26 23:30:29 +0000
4@@ -1155,6 +1155,7 @@
5 {
6 $$.assign(YYSession->mem.strdup($1.data(), $1.length), $1.length);
7 }
8+ | TEXT_STRING_sys { $$=$1;}
9 ;
10
11 opt_select_from:
12
13=== added file 'tests/suite/regression/r/802248.result'
14--- tests/suite/regression/r/802248.result 1970-01-01 00:00:00 +0000
15+++ tests/suite/regression/r/802248.result 2013-02-26 23:30:29 +0000
16@@ -0,0 +1,13 @@
17+create table test (a int) engine=innodb row_format=compaCT;
18+show create table test;
19+Table Create Table
20+test CREATE TABLE `test` (
21+ `a` INT DEFAULT NULL
22+) ENGINE=InnoDB ROW_FORMAT='compaCT' COLLATE = utf8_general_ci
23+drop table test;
24+CREATE TABLE `test` (
25+`a` INT DEFAULT NULL
26+) ENGINE=InnoDB ROW_FORMAT='compaCT' COLLATE = utf8_general_ci;
27+DROP TABLE test;
28+create table test (a int) engine=innodb row_format='totally incorrect value';
29+ERROR HY000: Unknown table engine option key/pair ROW_FORMAT = totally incorrect value.
30
31=== added file 'tests/suite/regression/t/802248.test'
32--- tests/suite/regression/t/802248.test 1970-01-01 00:00:00 +0000
33+++ tests/suite/regression/t/802248.test 2013-02-26 23:30:29 +0000
34@@ -0,0 +1,9 @@
35+create table test (a int) engine=innodb row_format=compaCT;
36+show create table test;
37+drop table test;
38+ CREATE TABLE `test` (
39+ `a` INT DEFAULT NULL
40+) ENGINE=InnoDB ROW_FORMAT='compaCT' COLLATE = utf8_general_ci;
41+DROP TABLE test;
42+--error ER_UNKNOWN_ENGINE_OPTION
43+create table test (a int) engine=innodb row_format='totally incorrect value';

Subscribers

People subscribed via source and target branches

to all changes: