Skip to content

Error Specification

Ziyue Pan edited this page Jun 18, 2020 · 2 revisions

This page describes the syntax error and runtime error you may encounter when operating SQLino.


Syntax Errors

Error Code Specification Situation
1 QUIT instruction cannot be executed in script 在脚本中执行QUIT语句
2 EXECFILE instruction cannot be executed in script 在脚本中执行EXECFILE语句
3 invalid operation 无法被识别出的操作
4 invalid escape character 在字符串中出现了不支持的转义字符
5 redundant back slash 在字符串外出现了反斜杠
6 unquoted string 出现了不匹配的单个引号
7 invalid argument, expecting 'FROM' DELETE语句后面没有出现FROM
8 invalid delete table 删除的表不是一个合法的表名
9 invalid delete condition 删除语句不是以WHERE条件或者分号结尾
10 invalid where expression 不是一个合法的WHERE表达式
11 invalid comparison expression 不是一个合法的比较符号
12 invalid where expression 在比较符号之后,不是一个合法的WHERE表达式
13 invalid where argument WHERE条件之后不是AND或者分号结尾
14 expect ';' to finish query 查询语句没有以分号结尾
15 invalid DROP object, expect 'INDEX' or 'TABLE' DROP语句后面不是INDEX或TABLE
16 invalid drop index DROP INDEX的对象不是一个合法的索引名
17 invalid token, expect ';' to finish query DROP INDEX查询没有以分号结尾
18 invalid drop table DROP TABLE的对象不是一个合法的表名
19 invalid token, expect ';' to finish query DROP TABLE查询没有以分号结尾
20 invalid keyword, expect 'INTO' INSERT语句后面不是INTO
21 invalid insert table INSERT的对象不是一个合法的表名
22 invalid keyword, expect 'VALUES' INSERT对象之后不是VALUES关键字
23 invalid keyword, expect '(' VALUES之后没有出现左括号
24 cannot insert nothing to a table! 左括号之后里面出现了右括号
25 invalid insert value 不是一个合法的INT、FLOAT或CHAR对象
26 invalid symbol 插入值之后不是以右括号或者逗号结束
27 expect another insert value 当出现逗号时,没有给出下一个INSERT的值
28 invalid insert value 不合法的插入值
29 invalid keyword, expect ';' to finish query INSERT语句没有以分号结束
30 invalid keyword, expect 'TABLE' or 'INDEX' CREATE的对象不是INDEX或TABLE
31 invalid create index name CREATE对象不是合法的索引名
32 invalid argument, expect 'ON' CREATE INDEX语句后没有出现ON关键词
33 invalid table name 不合法的CREATEINDEX ON对象
34 invalid symbol, expect '(' CREATE INDEX语句没有出现表名后的左括号
35 invalid attribute name 不合法的CREATE INDEX的属性名
36 invalid symbol, expect ')' 没有出现CREATE INDEX对象的右括号
37 invalid symbol, expect ';' to finish query CREATE INDEX语句没有以分号结尾
38 invalid create table name 不合法的CREATE TABLE表名
39 invalid symbol, expect '(' 属性列表没有以左括号结尾
40 invalid keyword, expect attribute or 'PRIMARY' 不是合法的属性名或PRIMARY KEY指定
41 invalid keyword, expect 'KEY' PRIMARY之后没有出现相配的KEY关键字
42 invalid keyword, expect '(' PRIMARY KEY之后没有出现相配的左括号
43 invalid primary attribute name 不是合法的主键属性名
44 invalid primary attribute name PRIMARY KEY语句后没有出现右括号
45 invalid symbol, expect ')' or ',' 属性列表后没有出现逗号或右括号作为结尾
46 invalid create attribute 不合法的属性名
47 invalid attribute type 不合法的属性类型
48 invalid argument 在属性类型之后出现不合法的token,应为逗号、分号或UNIQUE指定
49 invalid symbol, expect '(' after 'CHAR' CHAR类型后没有出现左括号
50 invalid char length, expect between [1~255] CHAR长度没有在1到255之间
51 is not a valid char length CHAR括号中的内容不是一个整型变量
52 invalid symbol, expect ')' to bracket char length CHAR类型之后没有出现右括号
53 invalid argument 在CHAR类型之后出现不合法的token,应为逗号、分号或UNIQUE指定
54 invalid symbol, expect ';' to finish query CREATE TABLE语句没有以分号结尾
55 invalid select attribute 不是合法SELECT对象,应该为*或属性名
56 invalid argument, expect 'FROM' 在SELECT *之后没有出现FROM关键词
57 invalid argument, expect 'FROM' or ',' 属性列表之后没有出现FROM或者逗号
58 invalid select table SELECT语句的对象不是合法的表名
59 invalid select attribute 不是合法的SELECT属性名
60 invalid keyword expect 'WHERE' condition or ';' to finish query SELECT语句之后不是WHERE条件或是分号结束查询
61 invalid WHERE expression 不是合法的WHERE条件表达式
62 invalid comparison expression SELECT语句中没有出现合法的比较符
63 invalid WHERE expression 不是合法的WHERE表达式
64 invalid where argument, expect 'AND' or ';' 一个WHERE条件之后没有以AND或分号结尾
65 invalid WHERE expression 在AND之后没有出现合法的关键词

Runtime Errors

Error Code Specification Situation
1 failed to initialize API 初始化API失败,无法从外部存储中读取数据
2 failed to save 无法保存数据到外部存储
3 failed to create table, create_table has already existed! 创建表时已经有了同名的表
4 too many attributes 属性数大于规定的32个
5 failed to create table, attr.name has duplicate attributes! 同一个属性列表中包含多个同名属性
6 failed to create table, temp_primary is not a defined attribute! 定义了主键,但主键在属性列表中没有出现
7 cannot drop table, table does not exist! DROP TABLE的表不存在
8 cannot insert value, table does not exist! INSERT VALUE的表不存在
9 attribute number does not match VALUES的数量和表的属性数量不一致
10 attribute type does not match 插入数据的类型与表的定义的数据类型不一致
11 exceed the char length CHAR类型数据的长度超出了定义超度
12 duplicate unique attribute 插入数据违反了UNIQUE的定义
13 table does not exist SELECT的表不存在
14 attribute does not exist 查询的属性不存在
15 attribute does not exist WHERE条件中的属性不存在
16 conditions cannot be both constants WHERE条件中的两边不能都为常量
17 cannot delete, table does not exist DELETE的表不存在
18 attribute does not exist WHERE条件中的属性不存在
19 conditions cannot be both constants WHERE条件中的两边不能都为常量
20 this index has been created 存在相同名称的索引名
21 this table does not exist 建索引的表格不存在
22 this attribute does not exist 建索引的属性不存在
23 this attribute has been created index on 该属性已经建立过索引
24 cannot create index on not-unique attribute 无法在非UNIQUE属性上建索引
25 this index does not exist DROP INDEX的索引不存在
26 cannot open file EXECFILE无法打开文件
27 cannot write error log to file 无法将错误信息写到日志文件中
28 script execution failed, check log file 脚本执行失败,查看日志文件观察程序运行出错的问题
29 cannot define primary key on multiple attributes 无法指定多个属性为主键
30 read block failed 从文件中读取block出错
31 failed to create table, cannot create table file named 无法读取表对应的文件
32 cannot find block to insert 找不到可以插入数据的block
33 cannot compare this two expressions WHERE条件中出现一边为CHAR,另一边为INT / FLOAT的情况
34 (index) does not exist Catalog Manager中索引不存在
35 cannot find index Catalog Manager无法找到索引
36 (attribute) does not exist Catalog Manager中属性不存在
37 (table) does not exist Catalog Manager中表不存在
38 cannot delete file DROP TABLE中无法删除数据文件
39 fail to save 无法将block写回到外部存储中

Clone this wiki locally