Kaydet (Commit) 05d73829 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

hsqldb does not support "select * from t limit n"

If limit clause follow from clause directly than the statement
parser of hsqldb parses "LIMIT" token like a table alias and
that's why the next number is unexpected.
The problem was that the limit token was not added to a "keyword"
vector in which parser search while working with form clause.
If the algorithm find a keyword after table names than it
knows it is the end of the form clause. That's why it
worked with any other keywords like "ORDER_BY",
"WHERE", "GROUP BY" and so on.

Change-Id: Iacd3ea3493c85eb0f2579aaad6903537ac65d25a
üst 059f041d
......@@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\
hsqldb/patches/i103528.patch \
hsqldb/patches/i104901.patch \
hsqldb/patches/fdo36824.patch \
hsqldb/patches/limit_as_table_alias.patch \
$(if $(filter YES,$(HSQLDB_USE_JDBC_4_1)),\
hsqldb/patches/jdbc-4.1.patch \
) \
......
--- misc/hsqldb/src/org/hsqldb/Token.java 2013-06-13 10:04:28.975934479 +0200
+++ misc/build/hsqldb/src/org/hsqldb/Token.java 2013-06-13 10:06:09.915931966 +0200
@@ -819,7 +819,7 @@
Token.T_EXTRACT, Token.T_FOR, Token.T_FROM, Token.T_GROUP,
Token.T_HAVING, Token.T_IF, Token.T_INTO, Token.T_IFNULL,
Token.T_IS, Token.T_IN, Token.T_INTERSECT, Token.T_JOIN,
- Token.T_INNER, Token.T_LEADING, Token.T_LIKE, Token.T_MAX,
+ Token.T_INNER, Token.T_LEADING, Token.T_LIKE, Token.T_LIMIT, Token.T_MAX,
Token.T_MIN, Token.T_NEXT, Token.T_NULLIF, Token.T_NOT,
Token.T_NVL, Token.T_MINUS, Token.T_ON, Token.T_ORDER, Token.T_OR,
Token.T_OUTER, Token.T_POSITION, Token.T_PRIMARY, Token.T_SELECT,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment