File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
main/jjtree/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/statement/create Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -5093,7 +5093,7 @@ ColDataType ColDataType():
5093
5093
[LOOKAHEAD(2) "(" {tk2 =null;} ( ( ( tk=<S_LONG> [ LOOKAHEAD(2) (tk2=<K_BYTE> | tk2=<K_CHAR>) ] ) | tk=<S_CHAR_LITERAL> | tk=<S_IDENTIFIER> | tk=<K_CHAR> )
5094
5094
{ argumentsStringList.add(tk.image + (tk2!=null?" " + tk2.image:"")); } ["," {/*argumentsStringList.add(",");*/}] )* ")"]
5095
5095
[( "[" {tk=null;} [ tk=<S_LONG> ] { array.add(tk!=null?Integer.valueOf(tk.image):null); } "]" )+ { colDataType.setArrayData(array); } ]
5096
- [LOOKAHEAD(2) <K_CHARACTER> <K_SET> tk=<S_IDENTIFIER> { colDataType.setCharacterSet(tk.image); } ]
5096
+ [LOOKAHEAD(2) <K_CHARACTER> <K_SET> ( tk=<S_IDENTIFIER> | tk=<K_BINARY>) { colDataType.setCharacterSet(tk.image); } ]
5097
5097
5098
5098
{
5099
5099
if (argumentsStringList.size() > 0)
@@ -5273,6 +5273,8 @@ List<String> CreateParameter():
5273
5273
|
5274
5274
tk=<K_PARALLEL> { param.add(tk.image); }
5275
5275
|
5276
+ tk=<K_BINARY> { param.add(tk.image); }
5277
+ |
5276
5278
(<K_ARRAY_LITERAL> exp=ArrayConstructor(true)) { param.add(exp.toString()); }
5277
5279
|
5278
5280
tk="::" colDataType = ColDataType() { param.add(tk.image); param.add(colDataType.toString()); }
Original file line number Diff line number Diff line change @@ -857,4 +857,9 @@ public void testCreateUnionIssue1309() throws JSQLParserException {
857
857
assertSqlCanBeParsedAndDeparsed (
858
858
"CREATE TABLE temp.abc AS (SELECT c FROM t1) UNION (SELECT c FROM t2)" );
859
859
}
860
+
861
+ @ Test
862
+ public void testCreateTableBinaryIssue1518 () throws JSQLParserException {
863
+ assertSqlCanBeParsedAndDeparsed ("CREATE TABLE `s` (`a` enum ('a', 'b', 'c') CHARACTER SET binary COLLATE binary)" );
864
+ }
860
865
}
You can’t perform that action at this time.
0 commit comments