Below is the list of changes that have just been committed into a local
4.1 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2483 06/01/16 14:23:20 gluh@stripped +3 -0
Fix for bug#15316 SET value having comma not correctly handled
to disallow the use of comma in SET members
sql/sql_yacc.yy
1.397 06/01/16 14:22:32 gluh@stripped +19 -3
Fix for bug#15316 SET value having comma not correctly handled
to disallow the use of comma in SET members
mysql-test/t/create.test
1.65 06/01/16 14:22:32 gluh@stripped +6 -0
Fix for bug#15316 SET value having comma not correctly handled
test case
mysql-test/r/create.result
1.91 06/01/16 14:22:32 gluh@stripped +2 -0
Fix for bug#15316 SET value having comma not correctly handled
test case
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gluh
# Host: eagle.intranet.mysql.r18.ru
# Root: /home/gluh/MySQL/Bugs/4.1.15316
--- 1.396/sql/sql_yacc.yy Fri Oct 21 14:39:55 2005
+++ 1.397/sql/sql_yacc.yy Mon Jan 16 14:22:32 2006
@@ -612,7 +612,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
opt_constraint constraint ident_or_empty
%type <string>
- text_string opt_gconcat_separator
+ text_string opt_gconcat_separator text_string_without_comma
%type <num>
type int_type real_type order_dir opt_field_spec lock_option
@@ -732,7 +732,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
precision subselect_start opt_and charset
subselect_end select_var_list select_var_list_init help opt_len
opt_extended_describe
- prepare prepare_src execute deallocate
+ prepare prepare_src execute deallocate string_without_comma_list
END_OF_INPUT
%type <NONE>
@@ -1466,7 +1466,7 @@ type:
{ $$=FIELD_TYPE_DECIMAL;}
| ENUM {Lex->interval_list.empty();} '(' string_list ')' opt_binary
{ $$=FIELD_TYPE_ENUM; }
- | SET { Lex->interval_list.empty();} '(' string_list ')' opt_binary
+ | SET { Lex->interval_list.empty();} '(' string_without_comma_list ')' opt_binary
{ $$=FIELD_TYPE_SET; }
| LONG_SYM opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; }
| SERIAL_SYM
@@ -1835,6 +1835,10 @@ string_list:
text_string { Lex->interval_list.push_back($1); }
| string_list ',' text_string { Lex->interval_list.push_back($3); };
+string_without_comma_list:
+ text_string_without_comma {
Lex->interval_list.push_back($1); }
+ | string_list ',' text_string_without_comma { Lex->interval_list.push_back($3); };
+
/*
** Alter table
*/
@@ -4900,6 +4904,18 @@ text_string:
(String*) 0;
}
;
+
+text_string_without_comma:
+ text_string
+ {
+ if (strchr($1->ptr(), ','))
+ {
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+ }
+ $$= $1;
+ }
+ ;
param_marker:
PARAM_MARKER
--- 1.90/mysql-test/r/create.result Wed Dec 7 22:54:06 2005
+++ 1.91/mysql-test/r/create.result Mon Jan 16 14:22:32 2006
@@ -694,3 +694,5 @@ t2 CREATE TABLE `t2` (
`a2` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
+create table t1(a set("a,b","c,d") not null);
+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 ') not null)' at line 1
--- 1.64/mysql-test/t/create.test Wed Dec 7 22:54:06 2005
+++ 1.65/mysql-test/t/create.test Mon Jan 16 14:22:32 2006
@@ -596,4 +596,10 @@ show create table t2;
drop table t1, t2;
+#
+# Bug #15316 SET value having comma not correctly handled
+#
+--error 1064
+create table t1(a set("a,b","c,d") not null);
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (gluh:1.2483) BUG#15316 | gluh | 16 Jan |