提交 1bfcd233 authored 作者: noelgrandin's avatar noelgrandin

Fix issue #404:SHOW COLUMNS FROM table_name does not work with ALLOW_LITERALS=NUMBERS

上级 cfe920f8
......@@ -64,6 +64,7 @@ Change Log
suggestion from Mark Addleman.
</li><li>Fix issue #438:JdbcDatabaseMetaData#getSchemas() no longer supported as of 1.3.169
</li><li>MySQL compatibility: support for ALTER TABLE tbl_name MODIFY [COLUMN] col_name column_definition, patch from Ville Koskela.
</li><li>Fix issue #404:SHOW COLUMNS FROM table_name does not work with ALLOW_LITERALS=NUMBERS
</li></ul>
<h2>Version 1.3.170 (2012-11-30)</h2>
......
......@@ -882,7 +882,13 @@ public class Parser {
// for MySQL compatibility
buff.append("SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA");
}
return prepare(session, buff.toString(), paramValues);
try {
// need to temporarily turn this on, in case we are in ALLOW_LITERALS_NUMBERS mode
session.setAllowLiterals(true);
return prepare(session, buff.toString(), paramValues);
} finally {
session.setAllowLiterals(false);
}
}
private static Prepared prepare(Session s, String sql, ArrayList<Value> paramValues) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论