Merge lp:~linuxjedi/drizzle/trunk-bug-707832 into lp:drizzle/7.0

Proposed by Andrew Hutchings
Status: Merged
Approved by: Brian Aker
Approved revision: 2115
Merged at revision: 2120
Proposed branch: lp:~linuxjedi/drizzle/trunk-bug-707832
Merge into: lp:drizzle/7.0
Diff against target: 49 lines (+27/-2)
3 files modified
drizzled/sql_yacc.yy (+6/-2)
tests/suite/regression/r/707832.result (+13/-0)
tests/suite/regression/t/707832.test (+8/-0)
To merge this branch: bzr merge lp:~linuxjedi/drizzle/trunk-bug-707832
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+47519@code.launchpad.net

Description of the change

Support float(N) in a create table statment, basically it now ignores the braces. More compatible with the MySQL way of doing it.

To post a comment you must log in.

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 2011-01-25 08:34:23 +0000
3+++ drizzled/sql_yacc.yy 2011-01-26 12:40:22 +0000
4@@ -1526,8 +1526,12 @@
5 ;
6
7 opt_precision:
8- /* empty */ {}
9- | precision {}
10+ /* empty */
11+ { Lex->dec=Lex->length= (char*)0; }
12+ | '(' NUM ')'
13+ { Lex->length=Lex->dec= (char*)0; }
14+ | precision
15+ {}
16 ;
17
18 opt_attribute:
19
20=== added file 'tests/suite/regression/r/707832.result'
21--- tests/suite/regression/r/707832.result 1970-01-01 00:00:00 +0000
22+++ tests/suite/regression/r/707832.result 2011-01-26 12:40:22 +0000
23@@ -0,0 +1,13 @@
24+drop table if exists t1;
25+create table t1 (a int, b float(5));
26+show create table t1;
27+Table Create Table
28+t1 CREATE TABLE `t1` (
29+ `a` INT DEFAULT NULL,
30+ `b` DOUBLE DEFAULT NULL
31+) ENGINE=InnoDB COLLATE = utf8_general_ci
32+insert into t1 values (1, 99.99);
33+select * from t1;
34+a b
35+1 99.99
36+drop table t1;
37
38=== added file 'tests/suite/regression/t/707832.test'
39--- tests/suite/regression/t/707832.test 1970-01-01 00:00:00 +0000
40+++ tests/suite/regression/t/707832.test 2011-01-26 12:40:22 +0000
41@@ -0,0 +1,8 @@
42+--disable_warnings
43+drop table if exists t1;
44+--enable_warnings
45+create table t1 (a int, b float(5));
46+show create table t1;
47+insert into t1 values (1, 99.99);
48+select * from t1;
49+drop table t1;

Subscribers

People subscribed via source and target branches