GBase 8a常见报错码,错误码

本文列举GBase 8a数据库集群,能验证的,遇到过的报错码或错误码。

如下错误码是:ERROR + gbase_errorno + (SQLSTATE)

目录导航

ERROR 1046 (3D000)

没有指定数据库。

gbase> SELECT DATABASE() FROM dual;
ERROR 1046 (3D000): No database selected

ERROR 1049 (42000)

指定的数据库不存在。Unknown database

gbase> create table testdb2.t1 (id int);
ERROR 1049 (42000): Unknown database 'testdb2'

ERROR 1050 (42S01)

表已经存在,不能重复创建。Table already exists

gbase> create table t1 (id int);
ERROR 1050 (42S01): Table 't1' already exists

ERROR 1061 (42000)

Duplicate key name

键值名字重复。

gbase> CREATE TABLE t (a int,b int,c int,d int, GROUPED a(b,c), GROUPED a(d));
ERROR 1061 (42000): Duplicate key name 'a'

ERROR 1064 (42000)

You have an error in your SQL syntax

语法错误,请检查SQL手册,按照语法要求编写SQL。

gbase> drop table x1@gc_dblink;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
 corresponds to your GBase server version for the right syntax to use near '@gc_dblink' at
 line 1

gbase> alter table t1 modify id comment '编号';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your GBase server version for the right syntax to use near 'comment '编号'' at line 1

ERROR 1105 (HY000)

DBLink-Table does not support update operation

dblink表不支持update操作。

update x1@gc_dblink set id2 =1;
ERROR 1105 (HY000): DBLink-Table does not support update operation.

ERROR 1109 (42S02)

目前测试结果,在支持express引擎的库,会报 ERROR 1702 (HY000): gcluster table error: (GBA-02DD-0017),否则报这个错误。

gbase> drop table aaaaaa;
ERROR 1109 (42S02): Unknown table 'aaaaaa' in information_schema

ERROR 1133 (42000)

Can’t find any matching row in the user table

指定的用户名没有找到,常见于gccli,其默认使用ssh登录时的操作系统用户名,作为gccli没有指定-u时的用户名。如果没有找到则报这个错误。

解决方法就是gccli每次都用-u指定用户名,而不是使用默认的ssh登录操作系统用户名。

[root@rh6-1 ~]# ssh test@10.0.2.201
test@10.0.2.201's password:
[test@rh6-1 ~]$ su - gbase
Password:
[gbase@rh6-1 ~]$ gccli
ERROR 1133 (42000): Can't find any matching row in the user table
[gbase@rh6-1 ~]$ gccli -uabc
ERROR 1045 (28000): Access denied for user 'abc'@'localhost' (using password: NO)

ERROR 1142 (42000)

SELECT command denied to user

无权限访问某个对象,比如表。解决方案是用grant授权该用户可以访问。

ERROR 1142 (42000): SELECT command denied to user 'test'@'localhost' for table 'dual'

ERROR 1146 (42S02)

表不存在。Table doesn't exist

gbase> select * from table_not_exists;
ERROR 1146 (42S02): Table 'testdb.table_not_exists' doesn't exist

ERROR 1149 (42000)

contains function can ONLY in WHERE clause

contains函数只能出现在where部分。

gbase> SELECT contains(a ,'通用') FROM t WHERE contains(a ,'中国') AND score(0) >10;
ERROR 1149 (42000): contains function can ONLY in WHERE clause

score function can ONLY in SELECT, GROUP BY or ORDER BY clause

SCORE 函数只能用于投影列、GROUP BY 和 ORDER BY 子句中

gbase> SELECT * FROM t WHERE contains(a ,'中国',0) AND score(0) >10;
ERROR 1149 (42000): score function can ONLY in SELECT, GROUP BY or ORDER BY clause

not match the number of score func

果没有与其 SCORE 标号一致的全文查询函数 CONTAINS

gbase> SELECT score(1) a1 FROM t WHERE contains(a ,'中国',0);
ERROR 1149 (42000): not match the number of score func

Can’t DO Merge when not able to build hash

Merge功能只适合Hash分布表,且join条件必须包含hash分布列

gbase> merge into t1 using t2 on t1.id=t2.id when matched then update set t1.name=t2.name,t1.birth=t2.birth when not matched then insert(id,name,birth)values(t2.id,t2.name,t2.birth);
ERROR 1149 (42000): (GBA-02SC-1001) Can't DO Merge when not able to build hash (redistribution) JOIN relationship between merge target and source.

(GBA-02SC-1001) The query includes syntax that is not supported by the gcluster

SQL预计包含了默认不支持的语法。比如

gbase> select udfKQIScore('123');
ERROR 1149 (42000): (GBA-02SC-1001) The query includes syntax that is not supported by the gcluster.

ERROR 1191 (HY000)

Can’t find FULLTEXT index matching the column list

删除全文索引之后,索引内容也会删除,则不能继续使用全文索引功能查询。

gbase> SELECT COUNT(*) FROM sms WHERE contains(MB_Text,'"天津" | "培训班" - "水上"');
ERROR 1191 (HY000): Can't find FULLTEXT index matching the column list

ERROR 1210 (HY000)

Incorrect arguments to CONTAINS FUNCTION - SCORE FLAG COLLISION

多个 CONTAINS 函数的 SCORE 标号均与其一致。

gbase> SELECT score(0) FROM t WHERE contains(b, 'abc' , 0) AND contains(b, 'bcb' , 0);
ERROR 1210 (HY000): Incorrect arguments to CONTAINS FUNCTION - SCORE FLAG COLLISION

ERROR 1235 (42000)

This version of GBase doesn't yet support。

use dblink table in a FUNCTION/TRIGGER/VIEW

当前版本不支持在函数,视图里使用dblink的表。

create view v1 as select * from t1@testlink;
ERROR 1235 (42000): This version of GBase doesn't yet support 'use dblink table in a
 FUNCTION/TRIGGER/VIEW.'

update/merge on auto_increment column

UPDATE 时,不能更新自增列。

gbase> update t2 set a = 441 where b = 'a2';
ERROR 1235 (42000): This version of GBase doesn't yet support 'update/merge on auto_increment column'

ERROR 1256

Table has no partition for value

向分区表插入的数据,没有符合的分区。

ERROR 1264 (22003)

Out of range value for column

列的值超过范围。

gbase> INSERT INTO products(productnum) VALUES(191220.443);
ERROR 1264 (22003): Out of range value for column 'productnum' at row 1

ERROR 1292 (22007)

Incorrect date value for column

指定列不正确的date日期数值。

gbase> CREATE TABLE products (productDate DATE);
Query OK, 0 rows affected
gbase> INSERT INTO products(productDate) VALUES('2010-09-31');
ERROR 1292 (22007): Incorrect date value: '2010-09-31' for column
 'productDate' at row 1

Incorrect time value for column

指定列的time时间数据不正确

ERROR 1292 (22007): Incorrect time value: '14:08:89' for column 'producttime' at row 1

Incorrect datetime value for column

指定datetime字段的数据不正确。

gbase> INSERT INTO products(productDate) VALUES('2010-09-31 12:09:44');
ERROR 1292 (22007): Incorrect datetime value: '2010-09-31 12:09:44' for column 'productDate' at row 1

ERROR 1305 (42000)

FUNCTION does not exist

函数不存在

gbase> select abc();
ERROR 1305 (42000): FUNCTION testdb.abc does not exist

ERROR 1317 (70100)

Query execution was interrupted

查询在外部被中断,包括用户自行Ctrl+C或者发起节点主动强行关闭,比如加载超过了允许的错误行数,不再继续加载。

gbase> select * from lineitem@tpch_link l, orders@tpch_link o ;
ERROR 1317 (70100): Query execution was interrupted

ERROR 1702 (HY000): gcluster table error

GBA-02DD-0017

表不存在。

gbase> drop table table_not_exists;
ERROR 1702 (HY000): gcluster table error: (GBA-02DD-0017) Unknown table 'testdb.table_not_exists'

ALTER column definition except increasing length of varchar’

不支持修改字段定义,除了增加varchar的长度。

ERROR 1702 (HY000): gcluster table error: This version of GBase doesn't yet support 'ALTER column definition except increasing length of varchar'.

详情介绍看这个文章:GBase 8a报错

ERROR 1708 (HY000): Failed to query in gnode

GBA-01EX-0006

结果集行数太多了。

 (GBA-01EX-0006) Express out of resources error:Too many tuples.

GBA-01EX-700

SQL语法当前版本的引擎不支持。可以参考 GBase 8a集群查询报错The query includes syntax that is not supported by the Express engine

ERROR 1708 (HY000): [192.168.3.26:5050](GBA-02EX-0005) Failed to query
in gnode:
DETAIL: Query failed.
CAUSE:(GBA-01EX-700) The query includes syntax that is not supported by the Express engine. Either restructure the query with supported syntax, or enable the GBase Query Path in the configuration file to execute the query with reduced performance.

GBA-02AD-0005

incorrect parameter in function to_date

to_date函数的参数格式与数据不匹配。

gbase> SELECT TO_DATE('2020-4-14 13:00:00','YYYY-MM-DD HH:MI:SS') FROM dual;
ERROR 1708 (HY000): [172.168.83.12:5050](GBA-02AD-0005)Failed to query in gnode:
DETAIL: incorrect parameter in function to_date.
SQL: SELECT 

ERROR 1712 (HY000): gcluster view error

视图不存在。报错信息里显示的还是有table字样。

gbase> drop view aaaaa;
ERROR 1712 (HY000): gcluster view error: Unknown table 'aaaaa'.

ERROR 1722 (HY000)

GBA-02DD-0006

Can’t update distributed column

不能更新Hash分布列。

gbase> UPDATE student SET stu_no = 4 WHERE stu_no = 2;
ERROR 1722 (HY000): (GBA-02DD-0006) Can't update distributed column 'stu_no'

ERROR 1729 (HY000)

set table extend failed: must be between 1M and 2G

指定预租磁盘空间大小超出支持范围。

gbase> CREATE TABLE t1(a int) AUTOEXTEND ON NEXT 3G;
ERROR 1729 (HY000): set table extend failed: must be between 1M and 2G

ERROR 1733 (HY000)

GBA-01-600

Too many bad records

错误记录行数超过参数允许值。

gbase> LOAD DATA INFILE 'http://192.168.153.32/1.txt' INTO TABLE test_2 FIELDS TERMINATED BY '|' MAX_BAD_RECORDS 1;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Task 268 failed, [192.168.153.32:5050](GBA-02AD-0005)Failed to query in gnode:
DETAIL: (GBA-01-600) Gbase internal error: Task 268, Too many bad records!SQL: LOAD /*+ TID('11471') */ DATA INFILE 

GBA-01EX-700

参数超过了允许范围

gbase> SELECT *, nth_value(totalamount, NULL) over (partition by uname
order by dt) as nth_value from tt;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: argument[2]
of nth_value is out of range

通配符匹配加载失败

gbase>LOAD DATA INFILE 'http://192.168.153.32/*.txt' INTO TABLE
test_3 FIELDS TERMINATED BY '|' SKIP_BAD_FILE 0;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Expanding
wildcard operation failed with error - I/O operation on
http://192.168.153.32/2.txt failed with error - Access denied to
remote resource, HTTP/1.1 403 Forbidden, File name
http://192.168.153.32/2.txt uri : http://192.168.153.32/%2a.txt

Empty or invalid index path

指定的索引数据路径不存在。

gbase> CREATE TABLE text1 (col1 varchar(100), FULLTEXT INDEX fti_col1(col1) INDEX_DATA_PATH='/index/dat/');
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Empty or invalid index path

The disk space of User has exceeded the limit value

用户次磁盘使用超过了限额。

gbase> load data infile 'file://192.168.146.20/opt/ssbm/part.tbl' into table part data_format 3 FIELDS TERMINATED BY '|';
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Task 262152 failed, [192.168.146.20:5050](GBA-02AD-0005)Failed to query in gnode:
DETAIL: (GBA-01EX-700) Gbase general error: (gns_host: ::ffff:192.168.146.21) The disk space of User 'u' has exceeded the limit value.(Usage: 4437691, Limit: 1048576)
SQL: LOAD /*+

auto-increment column should not be specified in insert(...)

自增列不允许insert,参考 GBase 8a自增列不允许insert报错auto_increment column should not be specified in insert

gbase> insert into t_inc values(1,'First');
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: auto-increment column should not be specified in insert(...)

auto-increment column should not be specified in insert select

自增列不允许insert select。参考 GBase 8a自增列不允许insert报错auto_increment column should not be specified in insert

gbase> insert into t_inc select * from t_inc;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: auto-increment column should not be specified in insert select

ERROR 1739 (HY000)

GBA-01EX-0006

OR操作符超过了允许的最大深度:10.

ERROR 1739 (HY000): (GBA-01EX-0006) Express out of resources error:OR operation recursion depth overrun. Max depth: 10”

ERROR 1758 (HY000)

Operation CREATE USER failed for

创建用户报错,可能是用户已经存在。

gbase> create user abc identified by 'abc';
ERROR 1758 (HY000): gcluster dal error: Operation CREATE USER failed for 'abc'@'%'.

Operation DROP USER failed for

删除用户报错,可能是用户不存在。

gbase> drop user abc;
ERROR 1758 (HY000): gcluster dal error: Operation DROP USER failed for 'abc'@'%'.

Password is in history for user

密码重用策略不允许最近几次用过的密码。

gbase> set password=password('111111');
ERROR 1758 (HY000): gcluster dal error: 10.0.2.101:Password is in history for user 'root'@'%'..

ERROR 1802 (HY000)

Invalid password format

密码格式不合法,包括格式,大小写字母,数字等。

gbase> create encryption certificate identified by 'ddd~';
ERROR 1802 (HY000): Invalid password format,length should >= 4 and contain
'number'.

ERROR 1818 (HY000)

No VC selected

gccli 等客户端连接时,没有指定vc。在开启了虚拟集群时,指定数据库必须指定vc。

[gbase@gbase_rh7_001 gcinstall]$ gccli testdb
ERROR 1818 (HY000): No VC selected.

解决方案就是指定带vc的库名,或者不指定库

[gbase@gbase_rh7_001 gcinstall]$ gccli

GBase client 9.5.2.26.121440. Copyright (c) 2004-2021, GBase.  All Rights Reserved.

gbase> ^CAborted
[gbase@gbase_rh7_001 gcinstall]$ gccli vc01.testdb

GBase client 9.5.2.26.121440. Copyright (c) 2004-2021, GBase.  All Rights Reserved.

gbase>

ERROR 1829

encryption certificate already open

重复打开证书

-----------打开密钥证书示例
gbase> alter encryption certificate open identified by '1111';
Query OK, 0 rows affected (Elapsed: 00:00:04.76)
------------重复 open
gbase> alter encryption certificate open identified by '1111';
ERROR 1829 (HY000): encryption certificate already open.

encryption certificate not exists

证书不存在

-----------证书不存在
gbase> alter encryption certificate open identified by '1111';
ERROR 1829 (HY000): encryption certificate not exists.

decrypt failed, please check password

解密失败

-----------解密失败
gbase> alter encryption certificate open identified by '2222';
ERROR 1829 (HY000): decrypt failed, please check password.

ERROR 1830 (HY000)

You must reset your password using ALTER USER statement before executing this statement

密码过期了,必须先修改密码然后才能执行其它SQL。

参考: https://www.gbase8.cn/471

ERROR 1835 (HY000)

encryption certificate already exists

证书重复创建

-----------创建明文密钥证书示例
gbase> create encryption certificate identified by '';
Query OK, 0 rows affected (Elapsed: 00:00:00.00)
-----------证书重复创建
gbase> create encryption certificate identified by '';
ERROR 1835 (HY000): encryption certificate already exists.

ERROR 1838 (HY000)

Encrypt key invalid

加密的密钥当前不可用。

-----------关闭密钥证书
gbase> alter encryption certificate close;
Query OK, 0 rows affected (Elapsed: 00:00:00.00)
gbase> insert into t1 values(4);
ERROR 1838 (HY000): Encrypt key invalid.
gbase> select * from t1;
ERROR 1838 (HY000): Decrypt key invalid.

Decrypt key invalid

解密的密钥不可用。

-----------关闭密钥证书
gbase> alter encryption certificate close;
Query OK, 0 rows affected (Elapsed: 00:00:00.00)
gbase> select * from t1;
ERROR 1838 (HY000): Decrypt key invalid.

ERROR 2003

Can't connect to GBase server on IP (113)

目标服务无法连接,一般是服务没有启动,IP无法连接(比如防火墙开了)等。