Closed processdatatech closed 5 months ago
建表:CREATE TABLE test.test( a varchar(255))
报错:
org.jkiss.dbeaver.model.sql.DBSQLException: SQL 错误 [50000] [HY000]: General error: "java.lang.NullPointerException: Cannot read field ""isQuery"" because ""ack"" is null" [50000-1]
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:133)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:600)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$2(SQLQueryJob.java:503)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:190)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:510)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:962)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:4123)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:123)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:190)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:121)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:5148)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.lealone.common.exceptions.JdbcSQLException: General error: "java.lang.NullPointerException: Cannot read field ""isQuery"" because ""ack"" is null" [50000-1]
at org.lealone.common.exceptions.DbException.getJdbcSQLException(DbException.java:342)
at org.lealone.common.exceptions.DbException.get(DbException.java:162)
at org.lealone.common.exceptions.DbException.convert(DbException.java:293)
at org.lealone.common.exceptions.DbException.toSQLException(DbException.java:266)
at org.lealone.common.trace.TraceObject.logAndConvert(TraceObject.java:164)
at org.lealone.client.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:367)
at org.lealone.client.jdbc.JdbcStatement.execute(JdbcStatement.java:260)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:330)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:131)
... 12 more
Caused by: java.lang.NullPointerException: Cannot read field "isQuery" because "ack" is null
at org.lealone.client.command.ClientPreparedSQLCommand.prepare(ClientPreparedSQLCommand.java:63)
at org.lealone.client.command.ClientPreparedSQLCommand.
刚开局使用,感觉有点没信心了
执行 CREATE database test 后,需要重新打开一个客户端,然后加上 -database test 参数连上 test 数据库, 执行 CREATE TABLE test.test( a varchar(255)) 时不需要加 test 前缀。
lealone 跟 mysql 不一样的, lealone 是 database -> schema -> table,如果你在 表名前加前缀,那就是 schema 不是 database。
如果你想用 mysql 的习惯,可以参考这里 https://github.com/lealone-plugins/lealone-mysql 装上 mysql 的插件,然后就可以按你熟悉的用法用 mysql 客户端访问了。
如果你用 lealone 的客户端然后又用 mysql 的习惯去使用 sql 一定会错的。
http://lealone.org/grammar.html 的地址访问不了,所以尝试了mysql 的用法规则,之前确实主要使用mysql,hive 。
之前确实没关注到 database -- schema---table 的这种模型,学习到了,我也了解下两者的区别
http://lealone.org/grammar.html 的地址访问不了,所以尝试了mysql 的用法规则,之前确实主要使用mysql,hive 。
把 https://github.com/lealone/Lealone-Docs 的代码下载到你的电脑上,然后用浏览器打开里面的 官网文档/index.html 就能看到所有的文档了。
lealone.org 域名不能在国内注册,只能放在 godaddy 托管,但是 godaddy 已经被墙了。
建库:CREATE database test; 执行 use test;语句 SQL 错误 [90079] [90079]: Schema "TEST" not found; SQL statement: use test [90079-1]