---
title: "0001 ~ 3999 - OceanBase 数据库 V4.2.2 | OceanBase 文档中心"
description: "0001 ~ 3999 此错误码范围表示兼容 MySQL 的错误码。 ERROR 1007 (HY000) : Can&#x27;t create database &#x27;%s&#x27;; database exists OceanBase 错误码：5158 兼容 MySQL 错误码：1007 ERROR 1008 (HY000) : C…"
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 4.2.2

# 0001 ~ 3999

更新时间：2026-04-10 11:58:37

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.2.2/zh-CN/700.reference/900.error-code/600.error-code-of-mysql-mode/200.0001-3999-of-mysql-mode.md)  

此错误码范围表示兼容 MySQL 的错误码。

## ERROR 1007 (HY000) : Can't create database '%s'; database exists

- OceanBase 错误码：5158
 - 兼容 MySQL 错误码：1007

## ERROR 1008 (HY000) : Can't drop database '%.*s'; database doesn't exist

- OceanBase 错误码：5166
 - 兼容 MySQL 错误码：1008

## ERROR 1017 (HY000) : File not exist

- OceanBase 错误码：4027
 - 兼容 MySQL 错误码：1017

## ERROR 1018 (HY000) : Directory not exist

- OceanBase 错误码：4066
 - 兼容 MySQL 错误码：1018

## ERROR 1022 (23000) : Can't write; duplicate key in table \'%.*s\'

- OceanBase 错误码：5595
 - 兼容 MySQL 错误码：1022

## ERROR 1025 (HY000) : ## ERROR on rename of \'%s.%s\' to \'%s.%s\'

- OceanBase 错误码：5215
 - 兼容 MySQL 错误码：1025

## ERROR 1040 (08004) : Too many connections

- OceanBase 错误码：5271
 - 兼容 MySQL 错误码：1040

## ERROR 1041 (53000) : Out of resource

- OceanBase 错误码：4153
 - 兼容 MySQL 错误码：1041

## ERROR 1044 (42000) : Access denied for user '%.*s'@'%.*s' to database '%.*s'

- OceanBase 错误码：5170
 - 兼容 MySQL 错误码：1044

## ERROR 1045 (42000) : Access denied for user '%.*s'@'%.*s' (using password: %s)

- OceanBase 错误码：4043
 - 兼容 MySQL 错误码：1045

相关问题案例：

- [MySQL 模式下用户密码错误，错误代码 ERROR 1045](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217885)
 - [Oracle 模式下用户密码错误，错误代码 ERROR 1045](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217886)

## ERROR 1046 (3D000 ) : No database selected

- OceanBase 错误码：5134
 - 兼容 MySQL 错误码：1046

## ERROR 1047 (HY001) : Unknown packet

- OceanBase 错误码：4118
 - 兼容 MySQL 错误码：1047

## ERROR 1048 (23000) : Column '%.*s' cannot be null

- OceanBase 错误码：4235
 - 兼容 MySQL 错误码：1048

## ERROR 1049 (42000) : Unknown database '%.*s'

- OceanBase 错误码：5154
 - 兼容 MySQL 错误码：1049

## ERROR 1050 (42S01) : Table '%.*s' already exists

- OceanBase 错误码：5020
 - 兼容 MySQL 错误码：1050

相关问题案例：

- [创建表时表已存在，错误代码 ERROR 1050](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217887)

## ERROR 1051 (42S02) : Unknown table '%.*s'

- OceanBase 错误码：5201
 - 兼容 MySQL 错误码：1051

## ERROR 1052 (23000) : Column '%.*s' in %.*s is ambiguous

- OceanBase 错误码：5207
 - 兼容 MySQL 错误码：1052

## ERROR 1054 (42S22) : Unknown column '%.*s' in '%.*s'

- OceanBase 错误码：5217
 - 兼容 MySQL 错误码：1054

## ERROR 1055 (42000) : \'%.*s\' is not in GROUP BY

- OceanBase 错误码：5218
 - 兼容 MySQL 错误码：1055

相关问题案例：

- [使用 GROUP BY 报错 ERROR 1055](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000210006)

## ERROR 1056 (42000) : Can't group on '%.*s'

- OceanBase 错误码：5206
 - 兼容 MySQL 错误码：1056

## ERROR 1059 (42000) : Identifier name \'%.*s\' is too long

- OceanBase 错误码：5179、9526
 - 兼容 MySQL 错误码：1059

#### 说明

该错误码从 V3.2.4 版本开始引入。

## ERROR 1060 (42S21) : Duplicate column name '%.*s'

- OceanBase 错误码：5008
 - 兼容 MySQL 错误码：1060
 - 错误原因：查询语句列名重复。
 - 解决方法：检查并修改列名或优化查询语句。

## ERROR 1060 (42S21) : Duplicate column group name '%.*s'

- OceanBase 错误码：5404
 - 兼容 MySQL 错误码：1060

## ERROR 1061 (42000) : Duplicate key name \'%.*s\'

- OceanBase 错误码：5025
 - 兼容 MySQL 错误码：1061

## ERROR 1062 (23000) : Duplicate entry \'%s\' for key \'%.*s\'

- OceanBase 错误码：5024
 - 兼容 MySQL 错误码：1062

相关问题案例：

- [插入数据时提示重复的输入，错误代码 ERROR 1062](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217891)

## ERROR 1063 (42000) : Incorrect column specifier for column '%.*s'

- OceanBase 错误码：5165
 - 兼容 MySQL 错误码：1063

## ERROR 1064 (0B000) : Failed to init SQL parser

- OceanBase 错误码：5000
 - 兼容 MySQL 错误码：1064

## ERROR 1064 (42000) : Parse error", "%s near \'%.*s\' at line %d

- OceanBase 错误码：5001
 - 兼容 MySQL 错误码：1064

相关问题案例：

- [修改 Unit 规格时报错：Parse error](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207664)
 - [MySQL 租户执行细分到列的授权失败](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207670)
 - [建表时不支持创建全局分区索引](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207733)
 - [建表时定义 global partition index 报错](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000426280?back=kb)

## ERROR 1064 (42000) : Wrong number of partitions defined, mismatch with previous setting

- OceanBase 错误码：5282
 - 兼容 MySQL 错误码：1064

## ERROR 1065 (42000) : Query was empty

- OceanBase 错误码：5253
 - 兼容 MySQL 错误码：1065

## ERROR 1066 (42000) : Not unique table/alias: \'%.*s\'

- OceanBase 错误码：5208
 - 兼容 MySQL 错误码：1066

## ERROR 1067 (42000) : Invalid default value for \'%.*s\'

- OceanBase 错误码：5173
 - 兼容 MySQL 错误码：1067

## ERROR 1068 (42000) : Multiple primary key defined

- OceanBase 错误码：5210
 - 兼容 MySQL 错误码：1068

## ERROR 1069 (42000) : Too many keys specified; max %ld keys allowed

- OceanBase 错误码：5194
 - 兼容 MySQL 错误码：1069

## ERROR 1070 (42000) : Too many key parts specified; max %ld parts allowed

- OceanBase 错误码：5195
 - 兼容 MySQL 错误码：1070

## ERROR 1071 (42000) : Specified key was too long; max key length is %ld bytes

- OceanBase 错误码：5196
 - 兼容 MySQL 错误码：1071

相关问题案例：

- [创建索引报长度超过 16KB 的错误](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207734)

## ERROR 1072 (42000) : Key column '%.*s' doesn't exist in table

- OceanBase 错误码：5211
 - 兼容 MySQL 错误码：1072

## ERROR 1074 (42000) : Column length too big for column '%s' (max = %d)

- OceanBase 错误码：5198
 - 兼容 MySQL 错误码：1074

## ERROR 1074 (42000) : Column length too big for column '%.*s' (max = %d); use BLOB or TEXT instead

- OceanBase 错误码：9577
 - 兼容 MySQL 错误码：1074

#### 说明

该错误码从 V4.0.0 版本开始引入。

## ERROR 1075 (42000) : Incorrect table definition; there can be only one auto column

- OceanBase 错误码：5193
 - 兼容 MySQL 错误码：1075

## ERROR 1078 (01000) : (string):%s: Got signal %d. Aborting

- OceanBase 错误码：4662
 - 兼容 MySQL 错误码：1078

## ERROR 1082 (42S12) : Illegal index

- OceanBase 错误码：5028
 - 兼容 MySQL 错误码：1082

## ERROR 1082 (42000) : Index unavailable

- OceanBase 错误码：5073
 - 兼容 MySQL 错误码：1082

## ERROR 1083 (42000) : Field separator argument is not what is expected; check the manual

- OceanBase 错误码：5295
 - 兼容 MySQL 错误码：1083

## ERROR 1083 (HY000) : Non-ASCII separator arguments are not fully supported

- OceanBase 错误码：5609
 - 兼容 MySQL 错误码：1083

## ERROR 1083 (HY000) : First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY

- OceanBase 错误码：5610
 - 兼容 MySQL 错误码：1083

## ERROR 1086 (58000) : File already exist

- OceanBase 错误码：4117
 - 兼容 MySQL 错误码：1086

## ERROR 1089 (HY000) : Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys

- OceanBase 错误码：5190
 - 兼容 MySQL 错误码：1089

## ERROR 1090 (42000) : You can't delete all columns with ALTER TABLE; use DROP TABLE instead

- OceanBase 错误码：5187
 - 兼容 MySQL 错误码：1090

## ERROR 1091 (42000) : Can't DROP '%.*s'; check that column/key exists

- OceanBase 错误码：5209
 - 兼容 MySQL 错误码：1091

## ERROR 1093 (HY000) : You can\'t specify target table \'%s\' for update in FROM clause

- OceanBase 错误码：5174
 - 兼容 MySQL 错误码：1093

## ERROR 1094 (HY000) : Unknown thread id: %lu

- OceanBase 错误码：4174
 - 兼容 MySQL 错误码：1094

## ERROR 1095 (HY000) : You are not owner of thread %lu

- OceanBase 错误码：5251
 - 兼容 MySQL 错误码：1095

## ERROR 1096 (HY000) : No tables used

- OceanBase 错误码：5185
 - 兼容 MySQL 错误码：1096

## ERROR 1097 (HY000) : Too many strings for column %.*s and SET

- OceanBase 错误码：5336
 - 兼容 MySQL 错误码：1097

## ERROR 1101 (42000) : BLOB, TEXT, GEOMETRY or JSON column '%.*s' can't have a default value

- OceanBase 错误码：5430
 - 兼容 MySQL 错误码：1101

## ERROR 1102 (42000) : Incorrect database name '%.*s'

- OceanBase 错误码：5162
 - 兼容 MySQL 错误码：1102

## ERROR 1103 (42000) : Incorrect table name '%.*s'

- OceanBase 错误码：5163
 - 兼容 MySQL 错误码：1103

## ERROR 1105 (42000) : invalid xpath expression

- OceanBase 错误码：7404
 - 兼容 MySQL 错误码：1105
 - 错误原因：在使用 XPath 表达式时，表达式格式不正确或无效。
 - 解决方法：检查 XPath 表达式以及检查 XML 数据是否正确。

#### 说明

该错误码从 V4.2.2 版本开始引入。

## ERROR 1105 (42000) : Given XPATH expression not supported

- OceanBase 错误码：7409
 - 兼容 MySQL 错误码：1105
 - 错误原因：XPath 表达式不被支持。
 - 解决方法：检查使用的 XPath 表达式是否正确，以及数据库版本是否支持使用该 XPath 表达式。

## ERROR 1108 (HY000） : Incorrect parameters to procedure '%.*s'

- OceanBase 错误码：5406
 - 兼容 MySQL 错误码：1108

## ERROR 1109 (42S02) : Unknown table '%.*s' in %.*s

- OceanBase 错误码：5200
 - 兼容 MySQL 错误码：1109

相关问题案例：

- [mysqldump 工具导出数据错误，错误代码 1109](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000193)

## ERROR 1110 (42000): Column \'%s\' specified twice

- OceanBase 错误码：4228
 - 兼容 MySQL 错误码：1110

## ERROR 1111 (HY000) : Invalid use of group function

- OceanBase 错误码：5176
 - 兼容 MySQL 错误码：1111

## ERROR 1113 (42000) : A table must have at least 1 column

- OceanBase 错误码：5904
 - 兼容 MySQL 错误码：1113

## ERROR 1115 (42000) : Unknown character set: '%.*s'

- OceanBase 错误码：5142
 - 兼容 MySQL 错误码：1115

## ERROR 1117 (42000) : Too many columns

- OceanBase 错误码：5197
 - 兼容 MySQL 错误码：1117

相关问题案例：

- [OceanBase 建表时报错 Too many columns](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207739)

## ERROR 1118 (42000) : Row size too large

- OceanBase 错误码：5199
 - 兼容 MySQL 错误码：1118

相关问题案例：

- [建表错误，错误代码 1118](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000066?back=kb)

## ERROR 1122 (HY000) : Can not load function %s

- OceanBase 错误码：4291
 - 兼容 MySQL 错误码：1122

## ERROR 1123 (HY000) : Can not initialize function '%.*s'

- OceanBase 错误码：4292
 - 兼容 MySQL 错误码：1123

## ERROR 1124 (HY000) : No paths allowed for shared library

- OceanBase 错误码：4293
 - 兼容 MySQL 错误码：1124

## ERROR 1125 (HY000) : Function %.*s already exists

- OceanBase 错误码：4294
 - 兼容 MySQL 错误码：1125

## ERROR 1126 (HY000) : Can not open shared library '%.*s'

- OceanBase 错误码：4295
 - 兼容 MySQL 错误码：1126

## ERROR 1127 (HY000) : Can't find symbol %.*s in library

- OceanBase 错误码：4296
 - 兼容 MySQL 错误码：1127

## ERROR 1133 (42000) : Can not find any matching row in the user table'%.*s'

- OceanBase 错误码：4042
 - 兼容 MySQL 错误码：1133

## ERROR 1133 (42000) : Incorrect password

- OceanBase 错误码：5038
 - 兼容 MySQL 错误码：1133

## ERROR 1136 (21S01) : column count does not match value count at row '%d'

- OceanBase 错误码：5168
 - 兼容 MySQL 错误码：1136

## ERROR 1136 (21S01) : Column count doesn\'t match value count at row %ld

- OceanBase 错误码：5175
 - 兼容 MySQL 错误码：1136

## ERROR 1138 (22004) : Invalid use of NULL value

- OceanBase 错误码：5596
 - 兼容 MySQL 错误码：1138

## ERROR 1139 (42000) : Got error '%s' from regexp

- OceanBase 错误码：5115
 - 兼容 MySQL 错误码：1139

## ERROR 1140 (42000) : Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

- OceanBase 错误码：5221
 - 兼容 MySQL 错误码：1140

## ERROR 1142 (42000) : %.*s command denied to user '%.*s'@'%.*s' for table '%.*s'

- OceanBase 错误码：5171
 - 兼容 MySQL 错误码：1142

相关问题案例：

- [MySQL 模式下授予用户 all privileges 权限仍提示无权限查看表](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000262232)

## ERROR 1144 (42000) : Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used

- OceanBase 错误码：5183
 - 兼容 MySQL 错误码：1144

## ERROR 1146 (42S02) : Table \'%s.%s\' doesn\'t exist

- OceanBase 错误码：5019
 - 兼容 MySQL 错误码：1146

相关问题案例：

- [CTAS 建表成功后，部分通过 CTAS 创建的表被误删](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000045542)
 - [查询表时表不存在，错误代码 ERROR 1146](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217889)
 - [OBServer 重启失败，错误代码 5019](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000042?back=kb)
 - [CONSISTENCY_LEVEL 字段为-1](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000089)

## ERROR 1149 (42000) : You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use

- OceanBase 错误码：5006
 - 兼容 MySQL 错误码：1149

## ERROR 1153 (08S01) : Got a packet bigger than \'max_allowed_packet\' bytes"

- OceanBase 错误码：4254
 - 兼容 MySQL 错误码：1153

## ERROR 1166 (42000) : Incorrect column name '%.*s'

- OceanBase 错误码：5164
 - 兼容 MySQL 错误码：1166

## ERROR 1167 (42000) : The used storage engine can't index column '%.*s'

- OceanBase 错误码：5216
 - 兼容 MySQL 错误码：1167

相关问题案例：

- [OceanBase 数据库 BLOB 列无法直接创建索引](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207744)

## ERROR 1171 (42000) : Insert null into %.*s

- OceanBase 错误码：5030
 - 兼容 MySQL 错误码：1171

## ERROR 1171 (42000) : All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

- OceanBase 错误码：5256
 - 兼容 MySQL 错误码：1171

## ERROR 1172 (42000) : Result consisted of more than one row

- OceanBase 错误码：5294
 - 兼容 MySQL 错误码：1172

## ERROR 1173 (42000) : Primary key columns) not specified in the WHERE clause

- OceanBase 错误码：5047
 - 兼容 MySQL 错误码：1173

## ERROR 1175 (HY000) : You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

- OceanBase 错误码：5865
 - 兼容 MySQL 错误码：1175

## ERROR 1176 (42000) : Key '%.*s' doesn't exist in table '%.*s'

- OceanBase 错误码：5289
 - 兼容 MySQL 错误码：1176

## ERROR 1192 (HY000) : Can't execute the given command because you have active locked tables or an active transaction

- OceanBase 错误码：5236
 - 兼容 MySQL 错误码：1192

## ERROR 1193 (HY000) : Unknown system variable '%.*s'

- OceanBase 错误码：5044
 - 兼容 MySQL 错误码：1193

## ERROR 1203 (42000) : Too many sessions

- OceanBase 错误码：5059
 - 兼容 MySQL 错误码：1203

## ERROR 1205 (HY000) : Lock wait timeout exceeded; try restarting transaction

- OceanBase 错误码：6003
 - 兼容 MySQL 错误码：1205

## ERROR 1205 (HY000) : Lock wait timeout exceeded; try restarting transaction

- OceanBase 错误码：6006
 - 兼容 MySQL 错误码：1205

## ERROR 1210 (HY000) : Incorrect arguments to %s

- OceanBase 错误码：4002
 - 兼容 MySQL 错误码：1210

相关问题案例：

- [OBServer 启动失败，错误代码 4002](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000025?back=kb)
 - [资源池错误，错误代码 1210](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000010171?back=kb)
 - [修改 json 类型可能会导致 Invalid argument 问题](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000246036)

## ERROR 1210 (HY000) : Miss argument for %s

- OceanBase 错误码：4272
 - 兼容 MySQL 错误码：1210

## ERROR 1210 (HY000) : Miss argument for %s

- OceanBase 错误码：4277
 - 兼容 MySQL 错误码：1210

## ERROR 1213 (HY000) : Deadlock

- OceanBase 错误码：4101
 - 兼容 MySQL 错误码：1213

## ERROR 1215 (HY000) : Cannot add foreign key constraint

- OceanBase 错误码：5317
 - 兼容 MySQL 错误码：1215

相关问题案例：

- [MySQL 租户 foreign key 不支持非唯一键](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207714)
 - [添加外键时报错，错误代码 ERROR 1215](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217893)

## ERROR 1221 (HY000) : Incorrect usage of DB GRANT and GLOBAL PRIVILEGES

- OceanBase 错误码：5182
 - 兼容 MySQL 错误码：1221

## ERROR 1221 (HY000) :Incorrect usage of UNION and INTO

- OceanBase 错误码：9641
 - 兼容 MySQL 错误码：1221

## ERROR 1222 (21000) : The used SELECT statements have a different number of columns

- OceanBase 错误码：5007
 - 兼容 MySQL 错误码：1222

## ERROR 1225 (HY000) : Option '%s' used twice in statement

- OceanBase 错误码：4299
 - 兼容 MySQL 错误码：1225

## ERROR 1226 (42000) : User '%.*s' has exceeded the '%s' resource (current value: %lu)

- OceanBase 错误码：5967
 - 兼容 MySQL 错误码：1226

## ERROR 1227 (42501) : Access denied; you need (at least one of) the %s privilege(s) for this operation

- OceanBase 错误码：5036
 - 兼容 MySQL 错误码：1227

## ERROR 1228 (HY000) : Variable \'%.*s\' is a SESSION variable and can't be used with SET GLOBAL

- OceanBase 错误码：5100
 - 兼容 MySQL 错误码：1228

## ERROR 1229 (HY000) : Variable \'%.*s\' is a GLOBAL variable and should be set with SET GLOBAL

- OceanBase 错误码：5101
 - 兼容 MySQL 错误码：1229

## ERROR 1230 (42000) : Variable '%.*s' doesn't have a default value

- OceanBase 错误码：4256
 - 兼容 MySQL 错误码：1230

## ERROR 1231 (42000 ) : Variable \'%.*s\' can't be set to the value of \'%.*s\'

- OceanBase 错误码：5145
 - 兼容 MySQL 错误码：1231

## ERROR 1232 (42000) : Incorrect argument type to variable '%.*s'

- OceanBase 错误码：5180
 - 兼容 MySQL 错误码：1232

## ERROR 1234 (42000) : Incorrect usage/placement of '%s'

- OceanBase 错误码：5213
 - 兼容 MySQL 错误码：1234

## ERROR 1235 (0A000) : %s not supported

- OceanBase 错误码：4007
 - 兼容 MySQL 错误码：1235

相关问题案例：

- [减少 Unit 配置错误，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000096?back=kb)
 - [小规格租户资源池 (1C2G) 创建失败](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207672)
 - [修改租户 Locality 时报 1235 错误](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207661)
 - [清理分区失败，错误代码 4007](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000194?back=kb)
 - [删除分区失败，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000146?back=kb)
 - [分区表更新错误，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000157?back=kb)
 - [指定逆序索引报错，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000104?back=kb)
 - [DDL 语句添加外键错误，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000067?back=kb)
 - [跨节点访问数据错误，错误代码 1235](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000001060?back=kb)
 - [数据恢复报错 1235 should not have backup_dest and restore_source at the same time not supported](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000208053)
 - [执行 DDL 报错 ERROR 1235，不支持更改字符集或字符序](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207750)
 - [通过 ALTER TABLE 为表添加主键报错](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000001005)
 - [分区表不支持对 RANGE 索引进行 DROP 操作](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000111)
 - [sys 租户报错 ERROR 1235(0A000): uncertain plan voilating external consistency not supported](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000008215)
 - [INSERT IGNORE with global index 不支持](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000209997)
 - [对虚拟表执行 DML 操作报错](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000267161)

## ERROR 1235 (42000) : This version of MySQL doesn't yet support 'non-string DEFAULT value for a column in a JSON_TABLE expression'

- OceanBase 错误码：5517
 - 兼容 MySQL 错误码：1235
 - 错误原因：当前版本的 MySQL 模式不支持在 JSON_TABLE 表达式中为列指定非字符串类型的默认值。
 - 解决方法：升级到支持该功能的最新版本或修改列的默认值为字符串类型。

## ERROR 1235 (42000) : This version doesn't yet support 'references in JSON Schema.

- OceanBase 错误码：6284
 - 兼容 MySQL 错误码：1235
 - 错误原因：表示当前版本不支持在 JSON 模式中使用引用。
 - 解决方法：修改 JSON 模式的设计，以避免使用引用。

## ERROR 1235 (42000) : This version of OceanBase doesn't yet support 'multiple triggers with the same action time and event for one table'

- OceanBase 错误码：9581
 - 兼容 MySQL 错误码：1235

## ERROR 1238 (HY000) : Variable '%.*s' is a %.*s variable

- OceanBase 错误码：5103
 - 兼容 MySQL 错误码：1238

## ERROR 1239 (42000) : Incorrect foreign key definition: Key reference and table reference don't match

- OceanBase 错误码：5318
 - 兼容 MySQL 错误码：1239

## ERROR 1241 (21000) : Operand should contain %ld column(s)

- OceanBase 错误码：5042
 - 兼容 MySQL 错误码：1241

## ERROR 1243 (HY007) : statement not prepared, stmt_id=%u

- OceanBase 错误码：5043
 - 兼容 MySQL 错误码：1243

## ERROR 1242 (21000) : Subquery returns more than 1 row

- OceanBase 错误码：5153
 - 兼容 MySQL 错误码：1242

## ERROR 1243 (HY000) : Unknown prepared statement handle

- OceanBase 错误码：5560
 - 兼容 MySQL 错误码：1243

## ERROR 1247 (42S22) : Reference '%.*s' not supported (reference to group function)

- OceanBase 错误码：5225
 - 兼容 MySQL 错误码：1247

## ERROR 1250 (42000) : Table \'%.*s\' from one of the SELECTs cannot be used in global ORDER clause

- OceanBase 错误码：5238
 - 兼容 MySQL 错误码：1250

## ERROR 1252 (7280) : All parts of a SPATIAL index must be NOT NULL.

- OceanBase 错误码：5238
 - 兼容 MySQL 错误码：1252

## ERROR 1253 (42000) : COLLATION '%.*s' is not valid for CHARACTER SET '%.*s'

- OceanBase 错误码：5144
 - 兼容 MySQL 错误码：1253

## ERROR 1259 (HY000) : ZLIB: Input data corrupted

- OceanBase 错误码：5124
 - 兼容 MySQL 错误码：1259

## ERROR 1260 (42000) : Row %ld was cut by GROUP_CONCAT()

- OceanBase 错误码：5254
 - 兼容 MySQL 错误码：1260

## ERROR 1261 (1000) : Row %ld doesn't contain data for all columns

- OceanBase 错误码：5611
 - 兼容 MySQL 错误码：1261

## ERROR 1262 (1000) : Row %ld was truncated; it contained more data than there were input columns

- OceanBase 错误码：5612
 - 兼容 MySQL 错误码：1262

## ERROR 1264 (22003) : Out of range value for column '%.*s' at row %ld

- OceanBase 错误码：4224
 - 兼容 MySQL 错误码：1264

## ERROR 1264 (22003) : value larger than specified precision(%ld,%ld) allowed for this column

- OceanBase 错误码：5088
 - 兼容 MySQL 错误码：1264

## ERROR 1264 (22003) : value(%s) larger than specified precision(%ld,%ld) allowed for this column

- OceanBase 错误码：5089
 - 兼容 MySQL 错误码：1264

## ERROR 1264 (22003) : Result value was out of range when casting varchar to number

- OceanBase 错误码：5093
 - 兼容 MySQL 错误码：1264

## ERROR 1264 (22003) : Out of range value for column '%.*s' at row %ld

- OceanBase 错误码：5229
 - 兼容 MySQL 错误码：1264

## ERROR 1265 (01000) : Data truncated for column '%.*s' at row %ld

- OceanBase 错误码：4249
 - 兼容 MySQL 错误码：1265

相关问题案例：

- [插入数据时数据被截断，错误代码 ERROR 1265](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217850)

## ERROR 1265 (01000) : Timeout value truncated to 102 years

- OceanBase 错误码：4252
 - 兼容 MySQL 错误码：1265

## ERROR 1267 (HY000) : Illegal mix of collations

- OceanBase 错误码：5177
 - 兼容 MySQL 错误码：1267

## ERROR 1273 (HY000) : Unknown collation: '%.*s'

- OceanBase 错误码：5143
 - 兼容 MySQL 错误码：1273

## ERROR 1280 (42000) : Incorrect index name '%.*s'

- OceanBase 错误码：5224
 - 兼容 MySQL 错误码：1280

## ERROR 1283 (HY000) : Column '%.*s' cannot be part of FULLTEXT index

- OceanBase 错误码：5288
 - 兼容 MySQL 错误码：1283

## ERROR 1283 (42000) : A FTS index may only contain a text type column.

- OceanBase 错误码：7289
 - 兼容 MySQL 错误码：1283
 - 错误原因：全文搜索（FTS）索引只能包含文本类型的列。
 - 解决方法：请确保您正在尝试创建的全文搜索索引列的数据类型是文本类型，如 VARCHAR、TEXT 或 CHAR 等。

## ERROR 1286 (42000) : Unknown storage engine \'%.*s\'

- OceanBase 错误码：5259
 - 兼容 MySQL 错误码：1286

## ERROR 1287 (HY000) : %s is deprecated and will be removed in a future release. Please use '%s' instead

- OceanBase 错误码：5516
 - 兼容 MySQL 错误码：1287
 - 错误原因：此语法不推荐使用，并将在将来的版本中删除。
 - 解决方法：请使用 `SET variable=expression, ...` 或 `SELECT expression(s) INTO variables(s)` 语法。

## ERROR 1288 (HY000) : The target table %.*s of the %.*s is not updatable

- OceanBase 错误码：5228
 - 兼容 MySQL 错误码：1288

## ERROR 1290 (HY000) : The MySQL server is running with the --read-only option so it cannot execute this statement

- OceanBase 错误码：5233
 - 兼容 MySQL 错误码：1290

## ERROR 1291 (HY000) : Column '%.*s' has duplicated value '%.*s' in %s

- OceanBase 错误码：5334
 - 兼容 MySQL 错误码：1291

## ERROR 1292 (22007) : %s=%d must between %d and %d

- OceanBase 错误码：4158
 - 兼容 MySQL 错误码：1292

## ERROR 1292 (22007) : Incorrect value

- OceanBase 错误码：4190
 - 兼容 MySQL 错误码：1292

## ERROR 1292 (01000) : Truncated incorrect DOUBLE value: '%.*s'

- OceanBase 错误码：4262
 - 兼容 MySQL 错误码：1292

相关问题案例：

- [SQL 执行报 Truncated incorrect DOUBLE value](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000284435)

## ERROR 1292 (22007) : Incorrect datetime value: '%.*s' for column '%s'

- OceanBase 错误码：4219
 - 兼容 MySQL 错误码：1292

## ERROR 1292 (22007) : Truncated incorrect %.*s value: '%.*s'

- OceanBase 错误码：5222
 - 兼容 MySQL 错误码：1292

## ERROR 1294 (HY000) : Invalid ON UPDATE clause for \'%s\' column

- OceanBase 错误码：5172
 - 兼容 MySQL 错误码：1294

## ERROR 1295 (HY000) : This command is not supported in the prepared statement protocol yet

- OceanBase 错误码：5568
 - 兼容 MySQL 错误码：1295

## ERROR 1298 (HY000) : Unknown or incorrect time zone: \'%.*s\'

- OceanBase 错误码：5192
 - 兼容 MySQL 错误码：1298

## ERROR 1300 (HY000) : Invalid %.*s character string: \'%.*s\'

- OceanBase 错误码：5250
 - 兼容 MySQL 错误码：1300

相关问题案例：

- [mysqldump 还原导入错误，错误代码 1300](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000084?back=kb)

## ERROR 1301 (HY000) : Result of %s() was larger than max_allowed_packet (%d) truncated

- OceanBase 错误码：5316
 - 兼容 MySQL 错误码：1301

## ERROR 1302 (42000) : Conflicting declarations: '%s' and '%s'

- OceanBase 错误码：5858
 - 兼容 MySQL 错误码：1302

## ERROR 1303 (2F003) : Cant create a routine from within another routine

- OceanBase 错误码：5582
 - 兼容 MySQL 错误码：1303

## ERROR 1304 (42000) : %s %.*s already exists

- OceanBase 错误码：5541
 - 兼容 MySQL 错误码：1304

## ERROR 1305 (42000) : %s %.*s does not exist

- OceanBase 错误码：5055
 - 兼容 MySQL 错误码：1305

## ERROR 1305 (42000) : %s %.*s.%.*s does not exist

- OceanBase 错误码：5542
 - 兼容 MySQL 错误码：1305

## ERROR 1305 (42000) : savepoint does not exist

- OceanBase 错误码：6242
 - 兼容 MySQL 错误码：1305

## ERROR 1308 (42000) : no matching label: %.*s

- OceanBase 错误码：5546，9505
 - 兼容 MySQL 错误码：1308

## ERROR 1308 (42000) : %s with no matching label: %s

- OceanBase 错误码：5593
 - 兼容 MySQL 错误码：1308

## ERROR 1309 (42000) : Redefining label '%.*s'

- OceanBase 错误码：9579
 - 兼容 MySQL 错误码：1309

## ERROR 1313 (42000) : RETURN is only allowed in a FUNCTION

- OceanBase 错误码：5583
 - 兼容 MySQL 错误码：1313

## ERROR 1314 (HY000) : '%.*s' is not allowed in stored procedure

- OceanBase 错误码：9580
 - 兼容 MySQL 错误码：1314

## ERROR 1317 (70100) : Query execution was interrupted

- OceanBase 错误码：5065
 - 兼容 MySQL 错误码：1317

相关问题案例：

- [分区表 JOIN 报错，错误码 1317](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000018?back=kb)

## ERROR 1318 (42000) : Incorrect number of arguments for %s %s; expected %u, got %u

- OceanBase 错误码：5555
 - 兼容 MySQL 错误码：1318

## ERROR 1319 (42000) : Undefined CONDITION: %.*s

- OceanBase 错误码：5545
 - 兼容 MySQL 错误码：1319

## ERROR 1320 (42000) : No Return found in FUNCTION '%.*s'

- OceanBase 错误码：9575
 - 兼容 MySQL 错误码：1320

## ERROR 1321 (2F005) : FUNCTION %s ended without RETURN

- OceanBase 错误码：5580
 - 兼容 MySQL 错误码：1321

## ERROR 1323 (42000) : Cursor SELECT must not have INTO

- OceanBase 错误码：5584
 - 兼容 MySQL 错误码：1323

## ERROR 1324 (42000) : Undefined CURSOR: %.*s

- OceanBase 错误码：5547
 - 兼容 MySQL 错误码：1324

## ERROR 1325 (24000) : Cursor is already open

- OceanBase 错误码：5589
 - 兼容 MySQL 错误码：1325

## ERROR 1326 (24000) : Cursor is not open

- OceanBase 错误码：5590
 - 兼容 MySQL 错误码：1326

## ERROR 1327 (42000) : Undeclared variable: %.*s

- OceanBase 错误码：5543
 - 兼容 MySQL 错误码：1327

## ERROR 1327 (42000) : Undeclared type: %.*s

- OceanBase 错误码：5544
 - 兼容 MySQL 错误码：1327

## ERROR 1328 (HY000) : Incorrect number of FETCH variables

- OceanBase 错误码：5554
 - 兼容 MySQL 错误码：1328

## ERROR 1329 (02000) : No data - zero rows fetched, selected, or processed

- OceanBase 错误码：4026
 - 兼容 MySQL 错误码：1329

## ERROR 1330 (42000) : Duplicate parameter: %.*s

- OceanBase 错误码：5548
 - 兼容 MySQL 错误码：1330

## ERROR 1330 (42000) : Duplicate type: %.*s

- OceanBase 错误码：5550
 - 兼容 MySQL 错误码：1330

## ERROR 1330 (42000) : Duplicate label: %.*s

- OceanBase 错误码：5552
 - 兼容 MySQL 错误码：1330

## ERROR 1331 (42000) : Duplicate variable: %.*s

- OceanBase 错误码：5549
 - 兼容 MySQL 错误码：1331

## ERROR 1332 (42000) : Duplicate condition: %.*s

- OceanBase 错误码：5551
 - 兼容 MySQL 错误码：1332

## ERROR 1333 (42000) : Duplicate cursor: %.*s

- OceanBase 错误码：5553
 - 兼容 MySQL 错误码：1333

## ERROR 1336 (0A000) : %s is not allowed in stored function or trigger

- OceanBase 错误码：5569
 - 兼容 MySQL 错误码：1336

## ERROR 1337 (42000) : Variable or condition declaration after cursor or handler declaration

- OceanBase 错误码：5586
 - 兼容 MySQL 错误码：1337

## ERROR 1338 (42000) : Cursor declaration after handler declaration

- OceanBase 错误码：5587
 - 兼容 MySQL 错误码：1338

## ERROR 1339 (20000) : Case not found for CASE statement

- OceanBase 错误码：5571
 - 兼容 MySQL 错误码：1339

## ERROR 1347 (HY000) : \'%s.%s\' is not %s

- OceanBase 错误码：5214
 - 兼容 MySQL 错误码：1347

## ERROR 1348 (HY000) : Column '%.*s' is not updatable

- OceanBase 错误码：5719
 - 兼容 MySQL 错误码：1348

## ERROR 1349 (HY000) : View's SELECT contains a subquery in the FROM clause

- OceanBase 错误码：4238
 - 兼容 MySQL 错误码：1349

## ERROR 1350 (HY000) : View's SELECT contains a 'INTO' clause.

- OceanBase 错误码：5503
 - 兼容 MySQL 错误码：1350
 - 错误原因：视图的 SELECT 语句包含了 'INTO' 子句。
 - 解决方式：移除视图的 SELECT 语句中的 'INTO' 子句。

#### 说明

该错误码从 V4.2.1 版本开始引入。

## ERROR 1353 (HY000) : View's SELECT and view's field list have different column counts

- OceanBase 错误码：5740
 - 兼容 MySQL 错误码：1353

## ERROR 1356 (42S22) : View \'%.*s.%.*s\' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

- OceanBase 错误码：5231
 - 兼容 MySQL 错误码：1356

## ERROR 1360 (HY000) : Trigger does not exist

- OceanBase 错误码：5733
 - 兼容 MySQL 错误码：1360

## ERROR 1362 (HY000) : Updating of %s row is not allowed in %s trigger

- OceanBase 错误码：9584
 - 兼容 MySQL 错误码：1362

## ERROR 1363 (HY000) : There is no %s row in on %s trigger

- OceanBase 错误码：9640
 - 兼容 MySQL 错误码：1363

## ERROR 1364 (HY000): Field \'%s\' doesn't have a default value

- OceanBase 错误码：4227
 - 兼容 MySQL 错误码：1364

## ERROR 1365 (22012) : Divided by zero

- OceanBase 错误码：4078
 - 兼容 MySQL 错误码：1365

## ERROR 1366 (22007) : Incorrect datetime value: '%s' for column '%s'

- OceanBase 错误码：4219
 - 兼容 MySQL 错误码：1366

## ERROR 1366 (HY000) : Incorrect integer value for column '%.*s' at row %ld

- OceanBase 错误码：4226
 - 兼容 MySQL 错误码：1366

## ERROR 1366 (HY000) : Incorrect string value for column '%.*s' at row %ld

- OceanBase 错误码：4258
 - 兼容 MySQL 错误码：1366

## ERROR 1367 (22007) : Illegal %s '%.*s' value found during parsing

- OceanBase 错误码：5332
 - 兼容 MySQL 错误码：1367

## ERROR 1368 (HY000) : CHECK OPTION on non-updatable view '%.*s.%.*s'

- OceanBase 错误码：5972
 - 兼容 MySQL 错误码：1368

## ERROR 1369 (HY000) : CHECK OPTION failed '%.*s.%.*s'

- OceanBase 错误码：5971
 - 兼容 MySQL 错误码：1369

## ERROR 1370 (42000) : %.*s command denied to user '%.*s'@'%.*s' for routine '%.*s'

- OceanBase 错误码：5387
 - 兼容 MySQL 错误码：1370
 - 错误原因：拒绝向用户发出例程命令。
 - 解决方法：确认用户是否有对应权限，以及检查存储过程或函数是否存在拼写错误。

## ERROR 1382 (HY000) : The '%.*s' syntax is reserved for purposes internal to the OceanBase Server

- OceanBase 错误码：5405
 - 兼容 MySQL 错误码：1382

## ERROR 1390 (54000) : Prepared statement contains too many placeholders

- OceanBase 错误码：5080
 - 兼容 MySQL 错误码：1390

## ERROR 1391 (HY000) : Key part \'%.*s\' length cannot be 0

- OceanBase 错误码：5191
 - 兼容 MySQL 错误码：1391

## ERROR 1393 (HY000) : Can not modify more than one base table through a join view '%.*s.%.*s'

- OceanBase 错误码：5718
 - 兼容 MySQL 错误码：1393

## ERROR 1395 (HY000) : Can not delete from join view '%.*s.%.*s'

- OceanBase 错误码：5720
 - 兼容 MySQL 错误码：1395

## ERROR 1396 (HY000) : Operation %.*s failed for %.*s

- OceanBase 错误码：5155
 - 兼容 MySQL 错误码：1396

## ERROR 1397 (XAE04) : Unknown XID

- OceanBase 错误码：6245
 - 兼容 MySQL 错误码：1397

## ERROR 1398 (XAE05) : XAER_INVAL: Invalid arguments (or unsupported command)

- OceanBase 错误码：6249
 - 兼容 MySQL 错误码：1398

## ERROR 1399 (XAE07) : The command cannot be executed when global transaction is in the %s state

- OceanBase 错误码：6246
 - 兼容 MySQL 错误码：1399

## ERROR 1399 (XAE07) : RMFAIL: The command cannot be executed when global transaction is in the %s state

- OceanBase 错误码：6258
 - 兼容 MySQL 错误码：1399

## ERROR 1400 (XAE09) : Some work is done outside global transaction

- OceanBase 错误码：6248
 - 兼容 MySQL 错误码：1400

## ERROR 1401 (XAE03) : XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency

- OceanBase 错误码：6250
 - 兼容 MySQL 错误码：1401

## ERROR 1402 (XA100) : XA_RBROLLBACK: Transaction branch was rolled back

- OceanBase 错误码：6252
 - 兼容 MySQL 错误码：1402

## ERROR 1406 (22001) : Data too long for column '%.*s' at row %ld

- OceanBase 错误码：5167
 - 兼容 MySQL 错误码：1406

相关问题案例：

- [OceanBase 数据库 MySQL 模式 LONGTEXT 字段兼容问题](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207745)

## ERROR 1406 (22001) : Data too long for column

- OceanBase 错误码：5354
 - 兼容 MySQL 错误码：1406

## ERROR 1407 (42000) : Bad SQLSTATE: \'%.*s\'

- OceanBase 错误码：5585
 - 兼容 MySQL 错误码：1407

## ERROR 1410 (42000) : You are not allowed to create a user with GRANT

- OceanBase 错误码：5169
 - 兼容 MySQL 错误码：1410

## ERROR 1411 (HY000) : Incorrect %.*s value: '%.*s' for function %.*s

- OceanBase 错误码：5936
 - 兼容 MySQL 错误码：1411

## ERROR 1413 (42000) : Duplicate handler declared in the same block

- OceanBase 错误码：5581
 - 兼容 MySQL 错误码：1413

## ERROR 1414 (42000) : OUT or INOUT argument %d for routine %.*s is not a variable

- OceanBase 错误码：5592
 - 兼容 MySQL 错误码：1414

## ERROR 1415 (0A000) : Not allowed to return a result set from a %s

- OceanBase 错误码：5579
 - 兼容 MySQL 错误码：1415

## ERROR 1416 (22003) : Cannot get geometry object from data you send to the GEOMETRY field.

- OceanBase 错误码：7276
 - 兼容 MySQL 错误码：1416

#### 说明

该错误码从 V4.0.0 版本开始弃用。

## ERROR 1422 (HY000) : Explicit or implicit commit is not allowed in stored function or trigger

- OceanBase 错误码：5576
 - 兼容 MySQL 错误码：1422

## ERROR 1422 (HY000) : '%.*s' is not allowed in stored function or trigger

- OceanBase 错误码：9576
 - 兼容 MySQL 错误码：1422

## ERROR 1424 (HY000) : Recursive stored functions are not allowed

- OceanBase 错误码：5570
 - 兼容 MySQL 错误码：1424

## ERROR 1425 (42000) : Too big scale %d specified for column '%s'. Maximum is %ld

- OceanBase 错误码：5202
 - 兼容 MySQL 错误码：1425

## ERROR 1426 (42000) : Too big precision %d specified for column '%s'. Maximum is %ld

- OceanBase 错误码：5203
 - 兼容 MySQL 错误码：1426

## ERROR 1427 (42000) : For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%s')

- OceanBase 错误码：5204
 - 兼容 MySQL 错误码：1427

## ERROR 1435 (HY000) : Trigger in wrong schema

- OceanBase 错误码：9582
 - 兼容 MySQL 错误码：1435

## ERROR 1439 (42000) : Display width out of range for column '%s' (max = %ld)

- OceanBase 错误码：5205
 - 兼容 MySQL 错误码：1439

## ERROR 1439 (42000) : Display width out of range for column '%.*s' (max = %d)

- OceanBase 错误码：9578
 - 兼容 MySQL 错误码：1439

## ERROR 1440 (XAE08) : The XID already exists

- OceanBase 错误码：6247
 - 兼容 MySQL 错误码：144

## ERROR 1441 (22008) : Datetime overflow

- OceanBase 错误码：4261
 - 兼容 MySQL 错误码：1441

## ERROR 1442 (HY000) : Can't update table \'%s\' in stored function/trigger because it is already used by statement which invoked this stored function/trigger

- OceanBase 错误码：5791
 - 兼容 MySQL 错误码：1442

相关问题案例：

- [DML 语句调用函数报错 table is mutating](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000210009)

## ERROR 1445 (HY000) : Not allowed to set autocommit from a stored function or trigger

- OceanBase 错误码：5591
 - 兼容 MySQL 错误码：1445

## ERROR 1449 (HY000) : User not exist

- OceanBase 错误码：5035
 - 兼容 MySQL 错误码：1449

## ERROR 1451 (23000) : Cannot delete or update a parent row: a foreign key constraint fails

- OceanBase 错误码：5314
 - 兼容 MySQL 错误码：1451

## ERROR 1451 (23000) : Cannot delete or update a parent row: a foreign key constraint fails

- OceanBase 错误码：5618
 - 兼容 MySQL 错误码：1451

## ERROR 1452 (23000) : Cannot add or update a child row: a foreign key constraint fails

- OceanBase 错误码：5315
 - 兼容 MySQL 错误码：1452

相关问题案例：

- [自关联外键场景批量 insert 数据报错 -1452](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000409003)

## ERROR 1456 (HY000) : Recursive limit %ld (as set by the max_sp_recursion_depth variable) was exceeded for routine

- OceanBase 错误码：5567
 - 兼容 MySQL 错误码：1456

## ERROR 1458 (42000) : Incorrect routine name \'%.*s\'

- OceanBase 错误码：5588
 - 兼容 MySQL 错误码：1458

## ERROR 1462 (42S02) : \'%.*s'.'%.*s\' contains view recursion

- OceanBase 错误码：5239
 - 兼容 MySQL 错误码：1462

## ERROR 1466 (HY000) : Leading spaces are removed from name \'%.*s\'

- OceanBase 错误码：5247
 - 兼容 MySQL 错误码：1466

## ERROR 1467 (HY000) : Failed to read auto increment value from storage engine

- OceanBase 错误码：5184
 - 兼容 MySQL 错误码：1467

## ERROR 1470 (HY000) : String '%.*s' is too long for user name (should be no longer than 64）

- OceanBase 错误码：5181
 - 兼容 MySQL 错误码：1470

## ERROR 1471 (HY000) : The target table %.*s of the INSERT is not insertable-into

- OceanBase 错误码：5717
 - 兼容 MySQL 错误码：1471

## ERROR 1474 (HY000) : Name \'%.*s\' has become ''

- OceanBase 错误码：5246
 - 兼容 MySQL 错误码：1474

## ERROR 1475 (42000) : Ambiguous column

- OceanBase 错误码：5015
 - 兼容 MySQL 错误码：1475

## ERROR 1480 (HY000) : Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition

- OceanBase 错误码：5878
 - 兼容 MySQL 错误码：1480
 - 错误原因：只有使用 RANGE PARTITIONING 的分区定义才能使用 VALUES LESS THAN。
 - 解决方法：根据表的分区定义使用正确的分区定义语法。

## ERROR 1486 (HY000) : Constant or random or timezone-dependent expressions in sub)partitioning function are not allowed

- OceanBase 错误码：5230
 - 兼容 MySQL 错误码：1486

## ERROR 1488 (HY000) : Field in list of fields for partition function not found in table

- OceanBase 错误码：5255
 - 兼容 MySQL 错误码：1488

## ERROR 1491 (HY000) : The PARTITION function returns the wrong type

- OceanBase 错误码：5257
 - 兼容 MySQL 错误码：1491

## ERROR 1493 (HY000) : VALUES LESS THAN value must be strictly increasing for each partition%.*s

- OceanBase 错误码：5281
 - 兼容 MySQL 错误码：1493

## ERROR 1493 (HY000) : VALUES LESS THAN value must be strictly increasing for each partition

- OceanBase 错误码：5353
 - 兼容 MySQL 错误码：1493

## ERROR 1495 (HY000) : Multiple definition of same constant in list partitioning

- OceanBase 错误码：5340
 - 兼容 MySQL 错误码：1495

## ERROR 1499 (HY000) : Too many partitions (including subpartitions) were defined

- OceanBase 错误码：5188
 - 兼容 MySQL 错误码：1499

相关问题案例：

- [创建分区表错误，错误代码 1499/ORA-00600](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000000076?back=kb)
 - [创建分区表错误，错误代码 1499](https://www.oceanbase.com/knowledge-base/oceanbase-database-20000010175?back=kb)

## ERROR 1500 (HY000) : It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning

- OceanBase 错误码：4398
 - 兼容 MySQL 错误码：1500
 - 错误原因：在创建分区表时，使用了不兼容的分区方式，例如在子分区中同时使用 RANGE/LIST 分区和 HASH/KEY 分区。
 - 解决方法：
     - 修改分区方式：如果要在子分区中同时使用 RANGE/LIST 分区和 HASH/KEY 分区，可以考虑修改分区方式，使用兼容的分区方式。注意修改分区方式或拆分分区表可能会影响到现有的数据和应用程序，请谨慎操作。
     - 分离分区：如果需要使用不兼容的分区方式，可以考虑将分区表拆分为多个表，每个表使用不同的分区方式。

#### 说明

该错误码从 V4.2.0 版本开始引入。

## ERROR 1503 (HY000) : A %s must include all columns in the table's partitioning function

- OceanBase 错误码：5261
 - 兼容 MySQL 错误码：1503

## ERROR 1503 (HY000) : A PRIMARY KEY must include all columns in the table\'s partitioning function

- OceanBase 错误码：5283
 - 兼容 MySQL 错误码：1503

## ERROR 1504 (HY000) : Number of partitions = 0 is not an allowed value

- OceanBase 错误码：5189
 - 兼容 MySQL 错误码：1504

## ERROR 1505 (HY000) : Partition management on a not partitioned table is not possible

- OceanBase 错误码：5302
 - 兼容 MySQL 错误码：1505

## ERROR 1507 (HY000) : error in list of partitions to DROP

- OceanBase 错误码：5303
 - 兼容 MySQL 错误码：1507

## ERROR 1508 (HY000) : Cannot remove all partitions, use DROP TABLE instead

- OceanBase 错误码：5306
 - 兼容 MySQL 错误码：1508

## ERROR 1512 (HY000) : %s PARTITION can only be used on RANGE/LIST partitions

- OceanBase 错误码：5305
 - 兼容 MySQL 错误码：1512

## ERROR 1517 (HY000) : Duplicate partition name \'%.*s\'

- OceanBase 错误码：5280
 - 兼容 MySQL 错误码：1517

## ERROR 1517 (HY000) : Duplicate partition name %.*s

- OceanBase 错误码：5493
 - 兼容 MySQL 错误码：1517
 - 错误原因：修改某表分区名时，分区名与该表已有分区名重复（由于 MySQL 本身没有二级分区概念，所以一级和二级分区名共用该错误码）分区名称重复。
 - 解决方法：修改分区名或删除分区名重复分区。

## ERROR 1517 (HY000) : Duplicate partition name %.*s

- OceanBase 错误码：5494
 - 兼容 MySQL 错误码：1517
 - 错误原因：分区名称重复。
 - 解决方法：修改分区名或删除重复分区。

## ERROR 1517 (HY000) : missing or invalid WAIT interval

- OceanBase 错误码：5495
 - 兼容 MySQL 错误码：1517
 - 错误原因：在使用 MySQL 的 WAIT 命令时，指定的等待时间参数不合法或缺失。
 - 解决方法：检查使用 WAIT 命令的语法，确保等待时间参数正确。

## ERROR 1520 (HY000) : Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range

- OceanBase 错误码：5566
 - 兼容 MySQL 错误码：1520

## ERROR 1524 (HY000) : Plugin '%.*s' is not loaded

- OceanBase 错误码：11003
 - 兼容 MySQL 错误码：1524
 - 错误原因：

     - 不支持输入的插件类型。
     - 支持输入的插件类型（目前 OceanBase 数据库仅支持 `mysql_native_password` 类型），但是插件未被程序正确的加载。
 - 解决方法：

     - 检查插件类型是否支持。
     - 检查插件的加载语句、加载插件配置文件、插件版本是否正确。
     - 检查是否具有足够的权限加载和安装插件。

## ERROR 1525 (HY000) : Incorrect %s value: '%s'

- OceanBase 错误码：5241
 - 兼容 MySQL 错误码：1525

## ERROR 1525 (HY000) : XML parsing failed

- OceanBase 错误码：9549
 - 兼容 MySQL 错误码：1525
 - 错误原因：尝试解析文档时，XML 解析器返回错误。
 - 解决方法：检查要解析的文档是否有效。

## ERROR 1526 (HY000) : Table has no partition for value

- OceanBase 错误码：5284
 - 兼容 MySQL 错误码：1526

## ERROR 1562 (HY000) : Cannot create temporary table with partitions

- OceanBase 错误码：5310
 - 兼容 MySQL 错误码：1562

## ERROR 1563 (HY000) : Partition constant is out of partition function domain

- OceanBase 错误码：5286
 - 兼容 MySQL 错误码：1563

## ERROR 1564 (HY000) : This partition function is not allowed

- OceanBase 错误码：5262
 - 兼容 MySQL 错误码：1564

## ERROR 1566 (HY000) : Not allowed to use NULL value in VALUES LESS THAN

- OceanBase 错误码：5285
 - 兼容 MySQL 错误码：1566

## ERROR 1567 (HY000) : Incorrect partition name '%.*s'

- OceanBase 错误码：11002
 - 兼容 MySQL 错误码：1567
 - 错误原因：分区名称不正确。
 - 解决方法：请检查分区名称是否正确输入。

## ERROR 1568 (25001) : Transaction characteristics can't be changed while a transaction is in progress

- OceanBase 错误码：5219
 - 兼容 MySQL 错误码：1568

## ERROR 1582 (42000) : Incorrect parameter count in the call to native function '%.*s'

- OceanBase 错误码：5054
 - 兼容 MySQL 错误码：1582

## ERROR 1583（42000） : Incorrect parameters in the call to native function '%.*s'

- OceanBase 错误码：5407
 - 兼容 MySQL 错误码：1583

## ERROR 1613 (XA106) : XA_RBTIMEOUT: Transaction branch was rolled back: took too long

- OceanBase 错误码：6253
 - 兼容 MySQL 错误码：1613

## ERROR 1621 (HY000) : variable is read only", "%.*s variable '%.*s' is read-only. Use SET %.*s to assign the value

- OceanBase 错误码：5102
 - 兼容 MySQL 错误码：1621

## ERROR 1628 (HY000) : Comment for table is too long (max = %ld)

- OceanBase 错误码：4229
 - 兼容 MySQL 错误码：1628

## ERROR 1629 (HY000) : Comment for field is too long (max = %ld)

- OceanBase 错误码：4230
 - 兼容 MySQL 错误码：1629

## ERROR 1642 (01000) : Unhandled user-defined warning condition

- OceanBase 错误码：9701
 - 兼容 MySQL 错误码：1642

## ERROR 1644 (HY000) : Unhandled user-defined exception condition

- OceanBase 错误码：5556
 - 兼容 MySQL 错误码：1644

## ERROR 1645 (0K000) : RESIGNAL when handler not active

- OceanBase 错误码：9702
 - 兼容 MySQL 错误码：1645

## ERROR 1646 (HY000) : SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE

- OceanBase 错误码：5557
 - 兼容 MySQL 错误码：1646

## ERROR 1652 (HY000) : Duplicate partition field name '%.*s'

- OceanBase 错误码：5237
 - 兼容 MySQL 错误码：1652

## ERROR 1653 (HY000) : Inconsistency in usage of column lists for partitioning

- OceanBase 错误码：5276
 - 兼容 MySQL 错误码：1653

## ERROR 1654 (HY000) : Partition column values of incorrect type

- OceanBase 错误码：5275
 - 兼容 MySQL 错误码：1654

## ERROR 1654 (HY000) : Partition column values of incorrect type

- OceanBase 错误码：5349
 - 兼容 MySQL 错误码：1654

## ERROR 1654 (HY000) : Partition column values of incorrect type

- OceanBase 错误码：5355
 - 兼容 MySQL 错误码：1654

## ERROR 1655 (HY000) : Too many fields in \'list of partition fields\'

- OceanBase 错误码：5287
 - 兼容 MySQL 错误码：1655

## ERROR 1657 (HY000) : Cannot have more than one value for this type of RANGE partitioning

- OceanBase 错误码：5277
 - 兼容 MySQL 错误码：1657

## ERROR 1659 (HY000) : Field \'%.*s\' is of a not allowed type for this type of partitioning

- OceanBase 错误码：5178
 - 兼容 MySQL 错误码：1659

## ERROR 1688 (HY000) : Comment for index is too long (max = %ld)

- OceanBase 错误码：4231
 - 兼容 MySQL 错误码：1688

## ERROR 1690 (22003) ：%s value is out of range in '%s'

- OceanBase 错误码：4157
 - 兼容 MySQL 错误码：1690

## ERROR 1697 (HY000) : VALUES value for partition \'%.*s\' must have type INT

- OceanBase 错误码：5274
 - 兼容 MySQL 错误码：1697

## ERROR 1701 (42000) : Cannot truncate a table referenced in a foreign key constraint %.*s

- OceanBase 错误码：5594
 - 兼容 MySQL 错误码：1701

## ERROR 1706 (HY000) : Primary key/index key/partition key update is not allowed since the table is updated both as '%.*s' and '%.*s'

- OceanBase 错误码：5344
 - 兼容 MySQL 错误码：1706

## ERROR 1708 (HY000) : The value of \'%s\' should be no less than the value of \'%s\'

- OceanBase 错误码：5266
 - 兼容 MySQL 错误码：1708

## ERROR 1735 (HY000) : Unkown partition '%.*s' in table '%.*s'

- OceanBase 错误码：5146
 - 兼容 MySQL 错误码：1735

## ERROR 1748 (HY000) : Found a row not matching the given partition set

- OceanBase 错误码：5147
 - 兼容 MySQL 错误码：1748

## ERROR 1758 (35000) : Invalid condition number

- OceanBase 错误码：9696
 - 兼容 MySQL 错误码：1758

## ERROR 1792 (25006) : Cannot execute statement in a READ ONLY transaction

- OceanBase 错误码：5220
 - 兼容 MySQL 错误码：1792

## ERROR 1792 (25006) : Cannot execute statement in a READ ONLY transaction

- OceanBase 错误码：6226
 - 兼容 MySQL 错误码：1792

相关问题案例：

- [执行 SQL 报 -6226 错误](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000209999)

## ERROR 1819 (HY000) : Your password does not satisfy the current policy requirements

- OceanBase 错误码：4365
 - 兼容 MySQL 错误码：1819

## ERROR 1820 (HY000) : You must reset your password using ALTER USER statement before executing this statement

- OceanBase 错误码：4366
 - 兼容 MySQL 错误码：1820

## ERROR 1827 (42000) : The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function

- OceanBase 错误码：5227
 - 兼容 MySQL 错误码：1827

## ERROR 1830 (HY000) : Column '%s' cannot be NOT NULL: needed in a foreign key constraint '%s' SET NULL

- OceanBase 错误码：5512
 - 兼容 MySQL 错误码：1830
 - 错误原因：某列不能设置为 NOT NULL，因为它在一个外键约束中需要被设置为 SET NULL。
 - 解决方式：将该列设置为允许为 NULL，或者修改外键约束以使用其他操作（如 SET DEFAULT）。

## ERROR 1830 (HY000) : Cannot define foreign key with ON DELETE SET NULL clause on a generated column

- OceanBase 错误码：5513
 - 兼容 MySQL 错误码：1830
 - 错误原因：无法在虚拟列上定义具有 ON DELETE SET NULL 子句的外键约束。
 - 解决方式：请不要在虚拟列上定义具有 ON DELETE SET NULL 子句的外键约束。

## ERROR 1869 (HY000) : Auto-increment value in UPDATE conflicts with internally generated values

- OceanBase 错误码：5244
 - 兼容 MySQL 错误码：1869

## ERROR 1882 (HY000) : The initialization vector supplied to aes_encrypt is too short. Must be at least 16 bytes long

- OceanBase 错误码：4336
 - 兼容 MySQL 错误码：1882

## ERROR 3004 (0Z002) : GET STACKED DIAGNOSTICS when handler not active

- OceanBase 错误码：5402
 - 兼容 MySQL 错误码：3004

## ERROR 3011 (HY000) : Referenced trigger '%s' for the given action time and event type does not exist

- OceanBase 错误码：9704
 - 兼容 MySQL 错误码：3011

## ERROR 3020 (2201E) : Invalid argument for logarithm

- OceanBase 错误码：5565
 - 兼容 MySQL 错误码：3020

## ERROR 3028 (HY000) : Expression #%d of ORDER BY contains aggregate function and applies to a UNION

- OceanBase 错误码：5263
 - 兼容 MySQL 错误码：3028

## ERROR 3033 (HY000) : Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical

- OceanBase 错误码：7201
 - 兼容 MySQL 错误码：3033

## ERROR 3034 (HY000) : Calling geometry function %s with unsupported types of arguments

- OceanBase 错误码：7202
 - 兼容 MySQL 错误码：3034

## ERROR 3035 (HY000) : Unknown GIS error occurred in function %s

- OceanBase 错误码：7203
 - 兼容 MySQL 错误码：3035

## ERROR 3036 (HY000) : Unknown exception caught in GIS function %s

- OceanBase 错误码：7204
 - 兼容 MySQL 错误码：3036

## ERROR 3037 (22023) : Invalid GIS data provided to function %s

- OceanBase 错误码：7205
 - 兼容 MySQL 错误码：3037

## ERROR 3038 (HY000) : The geometry has no data in function %s.

- OceanBase 错误码：7206
 - 兼容 MySQL 错误码：3038

## ERROR 3039 (HY000) : Unable to calculate centroid because geometry is empty in function %s.

- OceanBase 错误码：7207
 - 兼容 MySQL 错误码：3039

## ERROR 3040 (HY000) : Geometry overlay calculation error: geometry data is invalid in function %s.

- OceanBase 错误码：7208
 - 兼容 MySQL 错误码：3040

## ERROR 3041 (HY000) : Geometry turn info calculation error: geometry data is invalid in function %s.

- OceanBase 错误码：7209
 - 兼容 MySQL 错误码：3041

## ERROR 3042 (HY000) : Analysis procedures of intersection points interrupted unexpectedly in function %s.

- OceanBase 错误码：7210
 - 兼容 MySQL 错误码：3042

## ERROR 3043 (HY000) : Unknown exception thrown in function %s.

- OceanBase 错误码：7211
 - 兼容 MySQL 错误码：3043

## ERROR 3044 (HY000) : Memory allocation error: %-.256s in function %s.

- OceanBase 错误码：7265
 - 兼容 MySQL 错误码：3044

## ERROR 3045 (HY000) : Domain error", "Domain error: %-.256s in function %s.

- OceanBase 错误码：7266
 - 兼容 MySQL 错误码：3045

## ERROR 3046 (HY000) : Length error: %-.256s in function %s.

- OceanBase 错误码：7267
 - 兼容 MySQL 错误码：3046

## ERROR 3047 (HY000) : Invalid argument error: %-.256s in function %s.

- OceanBase 错误码：7268
 - 兼容 MySQL 错误码：3047

## ERROR 3048 (HY000) : Out of range error: %-.256s in function %s.

- OceanBase 错误码：7269
 - 兼容 MySQL 错误码：3048

## ERROR 3049 (HY000) : Overflow error: %-.256s in function %s.

- OceanBase 错误码：7270
 - 兼容 MySQL 错误码：3049

## ERROR 3050 (HY000) : Range error: %-.256s in function %s.

- OceanBase 错误码：7271
 - 兼容 MySQL 错误码：3050

## ERROR 3051 (HY000) : Underflow error: %-.256s in function %s.

- OceanBase 错误码：7272
 - 兼容 MySQL 错误码：3051

## ERROR 3052 (HY000) : Logic error: %-.256s in function %s.

- OceanBase 错误码：7273
 - 兼容 MySQL 错误码：3052

## ERROR 3053 (HY000) : Runtime error: %-.256s in function %s.

- OceanBase 错误码：7274
 - 兼容 MySQL 错误码：3053

## ERROR 3054 (HY000) : Unknown exception: %-.384s in function %s.

- OceanBase 错误码：7275
 - 兼容 MySQL 错误码：3054

## ERROR 3055 (HY000) : Geometry byte string must be little endian.

- OceanBase 错误码：7212
 - 兼容 MySQL 错误码：3055

## ERROR 3060 (HY000) : Do not support online operation on table with GIS index

- OceanBase 错误码：7213
 - 兼容 MySQL 错误码：3060

## ERROR 3064 (HY000) : invalid type given for an argument

- OceanBase 错误码：5351
 - 兼容 MySQL 错误码：3064

## ERROR 3105 (HY000) : The value specified for generated column '%.*s' in table '%.*s' is not allowed

- OceanBase 错误码：5290
 - 兼容 MySQL 错误码：3105

## ERROR 3106 (HY000) : '%s' is not supported for generated columns

- OceanBase 错误码：5292
 - 兼容 MySQL 错误码：3106

## ERROR 3108 (HY000) : Column '%.*s' has a generated column dependency

- OceanBase 错误码：5293
 - 兼容 MySQL 错误码：3108

## ERROR 3118 (HY000) : User locked

- OceanBase 错误码：5039
 - 兼容 MySQL 错误码：3118

相关问题案例：

- [MySQL 模式下用户被锁，错误代码 ERROR 3118](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217856)
 - [Oracle 模式下用户被锁，错误代码 ERROR 3118](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000217857)

## ERROR 3122 (HY000) : Inconsistent intersection points.

- OceanBase 错误码：7214
 - 兼容 MySQL 错误码：3122

## ERROR 3134 (HY000) : Parameter %s exceeds the maximum number of points in a geometry (%lu) in function %s.

- OceanBase 错误码：7215
 - 兼容 MySQL 错误码：3134

## ERROR 3140 (22032) : Invalid JSON text

- OceanBase 错误码：5411
 - 兼容 MySQL 错误码：3140

## ERROR 3141 (22032) : Invalid JSON text in argument

- OceanBase 错误码：5412
 - 兼容 MySQL 错误码：3141

## ERROR 3142 (42000) : The JSON binary value contains invalid data

- OceanBase 错误码：5413
 - 兼容 MySQL 错误码：3142

## ERROR 3143 (42000) : Invalid JSON path expression

- OceanBase 错误码：5414
 - 兼容 MySQL 错误码：3143

## ERROR 3144 (22032) : Cannot create a JSON value from a string

- OceanBase 错误码：5415
 - 兼容 MySQL 错误码：3144

## ERROR 3145 (22032) : Invalid JSON character data provided to function

- OceanBase 错误码：5416
 - 兼容 MySQL 错误码：3145

## ERROR 3146 (22032) : Invalid data type for JSON data in argument %u to function %s; a JSON string or JSON type is required

- OceanBase 错误码：5417
 - 兼容 MySQL 错误码：3146

## ERROR 3147 (22032) : Cannot CAST value to JSON

- OceanBase 错误码：5418
 - 兼容 MySQL 错误码：3147

## ERROR 3148 (42000) : A path expression must be encoded in the utf8 character set

- OceanBase 错误码：5419
 - 兼容 MySQL 错误码：3148

## ERROR 3149 (42000) : In this situation, path expressions may not contain the * and ** tokens

- OceanBase 错误码：5420
 - 兼容 MySQL 错误码：3149

## ERROR 3150 (22032) : The JSON value is too big to be stored in a JSON column

- OceanBase 错误码：5421
 - 兼容 MySQL 错误码：3150

## ERROR 3151 (22032) : The JSON object contains a key name that is too long

- OceanBase 错误码：5422
 - 兼容 MySQL 错误码：3151

## ERROR 1351 (HY000) : View's SELECT contains a variable or parameter

- OceanBase 错误码：9748
 - 兼容 MySQL 错误码：1351
 - 错误原因：视图的 SELECT 语句包含了变量或参数。
 - 解决方法：可以检查查询语句，确保查询语句中不包含变量或参数。

## ERROR 3153 (42000) : The path expression is not allowed in this context

- OceanBase 错误码：5424
 - 兼容 MySQL 错误码：3153

## ERROR 3154 (42000) : The oneOrAll argument may take these values: \'one\' or \'all\'

- OceanBase 错误码：5425
 - 兼容 MySQL 错误码：3154

## ERROR 3155 (22003) : Out of range JSON value for CAST

- OceanBase 错误码：5426
 - 兼容 MySQL 错误码：3155

## ERROR 3156 (22018) : Invalid JSON value for CAST

- OceanBase 错误码：5427
 - 兼容 MySQL 错误码：3156

## ERROR 3157 (22032) : The JSON document exceeds the maximum depth

- OceanBase 错误码：5428
 - 兼容 MySQL 错误码：3157

## ERROR 3158 (22032) : JSON documents may not contain NULL member names

- OceanBase 错误码：5429
 - 兼容 MySQL 错误码：3158

## ERROR 3165 (42000) : A path expression is not a path to a cell in an array

- OceanBase 错误码：5431
 - 兼容 MySQL 错误码：3165

## ERROR 3504 (HY000) : Too many enumeration valuesfor column %.*s

- OceanBase 错误码：5335
 - 兼容 MySQL 错误码：3504

## ERROR 3505 (HY000) : Too long enumeration/setvalue for column %.*s

- OceanBase 错误码：5333
 - 兼容 MySQL 错误码：3505

## ERROR 3516 (22S01) : %.64s value is a geometry of unexpected type %.64s in %.64s.

- OceanBase 错误码：7216
 - 兼容 MySQL 错误码：3516

## ERROR 3516 (22S01) : Unknown WKB type(%d)! Full WKB type number was (%d).

- OceanBase 错误码：7288
 - 兼容 MySQL 错误码：3516

## ERROR 3517 (SR002) : Can't parse the spatial reference system definition of SRID %u.

- OceanBase 错误码：7217
 - 兼容 MySQL 错误码：3517

## ERROR 3518 (SR003) : The spatial reference system definition for SRID %u does not specify the mandatory %s (EPSG %u) projection parameter.

- OceanBase 错误码：7218
 - 兼容 MySQL 错误码：3518

## ERROR 3519 (01000) : There's no spatial reference system with SRID %u.

- OceanBase 错误码：7219
 - 兼容 MySQL 错误码：3519

## ERROR 3520 (22S00) : Function %s is only defined for Cartesian spatial reference systems, but one of its arguments is in SRID %u, which is not Cartesian.

- OceanBase 错误码：7220
 - 兼容 MySQL 错误码：3520

## ERROR 3521 (SR001) : Function %s is only defined for Cartesian spatial reference systems, but one of its arguments is in SRID %u, which has not been defined.

- OceanBase 错误码：7221
 - 兼容 MySQL 错误码：3521

## ERROR 3548 (SR001) : There's no spatial reference system with SRID %u.

- OceanBase 错误码：7222
 - 兼容 MySQL 错误码：3548

## ERROR 3548 (SR001) : Spatial reference system is empty

- OceanBase 错误码：7285
 - 兼容 MySQL 错误码：3548

相关问题案例：

- [GIS 功能中 GIS 类型字段及相关函数运行报错 ERROR 3548](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000245401)

## ERROR 3558 (22023) : Invalid option key '%.192s' in function %.192s.

- OceanBase 错误码：7286
 - 兼容 MySQL 错误码：3558

## ERROR 3559 (22023) : Invalid value '%.192s' for option '%.192s' in function '%.192s'.

- OceanBase 错误码：7287
 - 兼容 MySQL 错误码：3559

## ERROR 3560 (22023) : The string '%.192s' is not a valid key %c value pair in function %.192s.

- OceanBase 错误码：7283
 - 兼容 MySQL 错误码：3560

## ERROR 3565 (01000) : There's no spatial reference system with SRID %u. The axis order is unknown.

- OceanBase 错误码：7223
 - 兼容 MySQL 错误码：3565

## ERROR 3573 (HY000) ：Recursive Common Table Expression should contain a UNION ALL

- OceanBase 错误码：5742
 - 兼容 MySQL 错误码：3573
 - 错误原因：递归公共表达式（CTE）应该包含一个 UNION ALL 操作。
 - 解决方法：在递归 CTE 中使用 UNION ALL 操作。

#### 说明

该错误码从 V4.2.1 版本开始，报错信息由 `recursive WITH clause must use a UNION ALL operation` 调整为 `Recursive Common Table Expression should contain a UNION ALL`。

## ERROR 3574 (HY000) : Recursive Common Table Expression should have one or more non-recursive query blocks followed by one or more recursive ones: %s

- OceanBase 错误码：5982
 - 兼容 MySQL 错误码：3574

## ERROR 3575 (HY000) ：ORDER BY / LIMIT / SELECT DISTINCT / HAVING / WINDOW FUNCTION / GROUP BY in recursive query block of Common Table Expression not supported

- OceanBase 错误码：5758
 - 兼容 MySQL 错误码：3575
 - 错误原因：在递归查询块的公共表达式中不支持使用 ORDER BY、LIMIT、SELECT DISTINCT、HAVING、WINDOW FUNCTION 或 GROUP BY。
 - 解决方法：在递归查询块的公共表达式中不要使用 ORDER BY、LIMIT、SELECT DISTINCT、HAVING、WINDOW FUNCTION 或 GROUP BY。

#### 说明

该错误码从 V4.2.1 版本开始，报错信息由 `Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block` 调整为 `ORDER BY / LIMIT / SELECT DISTINCT / HAVING / WINDOW FUNCTION / GROUP BY in recursive query block of Common Table Expression not supported`。

## ERROR 3576 (HY000) ：In recursive query block of Recursive Common Table Expression, the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints

- OceanBase 错误码：5759
 - 兼容 MySQL 错误码：3576

## ERROR 3577 (HY000) ：In recursive query block of Recursive Common Table Expression, the recursive table must be referenced only once, and not in any subquery

- OceanBase 错误码：5744
 - 兼容 MySQL 错误码：3577

## ERROR 3581 (HY000) :A window which depends on another cannot define partitioning

- OceanBase 错误码：5438
 - 兼容 MySQL 错误码：3581

## ERROR 3582 (HY000) :Window '%.*s' has a frame definition, so cannot be referenced by another window

- OceanBase 错误码：5439
 - 兼容 MySQL 错误码：3582

## ERROR 3583 (HY000) :Window '%.*s' cannot inherit '%.*s' since both contain an ORDER BY clause

- OceanBase 错误码：5440
 - 兼容 MySQL 错误码：3583

## ERROR 3586 (HY000) : Window '%.*s': frame start or end is negative or NULL or of non-integral type

- OceanBase 错误码：5507
 - 兼容 MySQL 错误码：3586
 - 错误原因：窗口的起始或结束位置为负数、NULL 或非整数类型。
 - 解决方式：修正窗口的起始或结束位置，确保它们为非负数、非 NULL 且为整数类型。

## ERROR 3587 (HY000) : Window '%s' with RANGE N PRECEDING/FOLLOWING frame requires exactly one ORDER BY expression of numeric or temporal type

- OceanBase 错误码：5984
 - 兼容 MySQL 错误码：3587

## ERROR 3588 (HY000) : Window '%.*s' with RANGE frame has ORDER BY expression of datetime type. Only INTERVAL bound value allowed.

- OceanBase 错误码：5508
 - 兼容 MySQL 错误码：3588
 - 错误原因：带有 RANGE frame 的窗口包含基于日期时间类型的 ORDER BY 表达式，只允许使用 INTERVAL 边界值。
 - 解决方式：确保带有 RANGE frame 的窗口的 ORDER BY 表达式只使用 INTERVAL 边界值，并不使用日期时间类型的边界值。

## ERROR 3589 (HY000) : Window '%.*s' with RANGE frame has ORDER BY expression of numeric type. INTERVAL bound value not allowed.

- OceanBase 错误码：5509
 - 兼容 MySQL 错误码：3589
 - 错误原因：带有 RANGE frame 的窗口包含数值类型的 ORDER BY 表达式，不允许使用 INTERVAL 边界值。
 - 解决方式：不要在包含数值类型的 ORDER BY 表达式的窗口中使用 INTERVAL 边界值。

## ERROR 3590 (HY000) : Window '%.*s' has a non-constant frame bound.

- OceanBase 错误码：5510
 - 兼容 MySQL 错误码：3590
 - 错误原因：窗口具有非常量的帧边界。
 - 解决方式：确保窗口的帧边界是常量。

## ERROR 3592 (HY000) : Window '%s': ORDER BY or PARTITION BY uses legacy position indication, which is not supported use expression

- OceanBase 错误码：5985
 - 兼容 MySQL 错误码：3592

## ERROR 3596 (HY000) : Window '%s': INTERVAL can only be used with RANGE frames

- OceanBase 错误码：5983
 - 兼容 MySQL 错误码：3596

## ERROR 3616 (22S02) : Longitude %f is out of range in function %.192s. It must be within (%f, %f].

- OceanBase 错误码：7263
 - 兼容 MySQL 错误码：3616

## ERROR 3617 (22S03) : Latitude %f is out of range in function %.192s. It must be within [%f, %f].

- OceanBase 错误码：7264
 - 兼容 MySQL 错误码：3617

## ERROR 3618 (22S00) : %.192s(%.80s) has not been implemented for geographic spatial reference systems.

- OceanBase 错误码：7224
 - 兼容 MySQL 错误码：3618

## ERROR 3636 （HY000） : Recursive query aborted after %u iterations. Try increasing @@cte_max_recursion_depth to a larger value.

- OceanBase 错误码：5408
 - 兼容 MySQL 错误码：3636

## ERROR 3643 (HY000) : The SRID of the geometry does not match the SRID of the column. The SRID of the geometry is %lu, but the SRID of the column is %lu. Consider changing the SRID of the geometry or the SRID property of the column.

- OceanBase 错误码：7225
 - 兼容 MySQL 错误码：3643

## ERROR 3644 (HY000) : The SRID specification on the column '%.64s' cannot be changed because there is a spatial index on the column. Please remove the spatial index before altering the SRID specification.

- OceanBase 错误码：7226
 - 兼容 MySQL 错误码：3644

## ERROR 3666 (42000) : Can't store an array or an object in the scalar %s column 'jpath'

- OceanBase 错误码：4298
 - 兼容 MySQL 错误码：3666
 - 错误原因：无法将数组或对象存储在标量列中。
 - 解决方式：将数组或对象转换为标量值，或者更改列的数据类型以适应数组或对象的存储。

## ERROR 3667 (42000) : Every table function must have an alias

- OceanBase 错误码：5515
 - 兼容 MySQL 错误码：3667
 - 错误原因：每个表函数必须有一个别名。
 - 解决方式：为表函数提供一个别名。

## ERROR 3674 (HY000) : The spatial index on column '%.64s' will not be used by the query optimizer since the column does not have an SRID attribute. Consider adding an SRID attribute to the column.

- OceanBase 错误码：7227
 - 兼容 MySQL 错误码：3674

## ERROR 3682 (22S00) : Function %.192s is only defined for SRID 0 and SRID 4326.

- OceanBase 错误码：7228
 - 兼容 MySQL 错误码：3682

## ERROR 3704 (22S00) : %.192s(%.80s) has not been implemented for Cartesian spatial reference systems.

- OceanBase 错误码：7229
 - 兼容 MySQL 错误码：3704

## ERROR 3705 (22S00) : %.192s(%.80s) has not been implemented for projected spatial reference systems.

- OceanBase 错误码：7230
 - 兼容 MySQL 错误码：3705

## ERROR 3706 (22023) : Invalid radius provided to function %s: Radius(%lf) must be greater than zero.

- OceanBase 错误码：7284
 - 兼容 MySQL 错误码：3706

## ERROR 3708 (SR006) : Missing mandatory attribute %s.

- OceanBase 错误码：7231
 - 兼容 MySQL 错误码：3708

## ERROR 3709 (SR006) : Multiple definitions of attribute %s.

- OceanBase 错误码：7232
 - 兼容 MySQL 错误码：3709

## ERROR 3710 (SR006) : The spatial reference system name can't be an empty string or start or end with whitespace.

- OceanBase 错误码：7233
 - 兼容 MySQL 错误码：3710

## ERROR 3711 (SR006) : The organization name can't be an empty string or start or end with whitespace.

- OceanBase 错误码：7234
 - 兼容 MySQL 错误码：3711

## ERROR 3712 (SR004) : There is already a spatial reference system with SRID %u.

- OceanBase 错误码：7235
 - 兼容 MySQL 错误码：3712

## ERROR 3713 (01S00) : There is already a spatial reference system with SRID %u.

- OceanBase 错误码：7236
 - 兼容 MySQL 错误码：3713

## ERROR 3714 (SR000) : SRID 0 is not modifiable.

- OceanBase 错误码：7237
 - 兼容 MySQL 错误码：3714

## ERROR 3715 (01S01) : The SRID range [%u, %u] has been reserved for system use. SRSs in this range may be added, modified or removed without warning during upgrade.

- OceanBase 错误码：7238
 - 兼容 MySQL 错误码：3715

## ERROR 3716 (SR005) : Can't modify SRID %u. There is at least one column depending on it.

- OceanBase 错误码：7239
 - 兼容 MySQL 错误码：3716

## ERROR 3717 (SR006) : Invalid character in attribute %s.

- OceanBase 错误码：7240
 - 兼容 MySQL 错误码：3717

## ERROR 3718 (SR006) : Attribute %s is too long. The maximum length is %u characters.

- OceanBase 错误码：7241
 - 兼容 MySQL 错误码：3718

## ERROR 3726 (22S00) : Function %s is only defined for geographic spatial reference systems, but one of its arguments is in SRID %u, which is not geographic.

- OceanBase 错误码：7242
 - 兼容 MySQL 错误码：3726

## ERROR 3727 (22023) : Function %s encountered a polygon that was too large. Polygons must cover less than half the planet.

- OceanBase 错误码：7243
 - 兼容 MySQL 错误码：3727

## ERROR 3728 (HY000) : Spatial indexes can't be primary or unique indexes.

- OceanBase 错误码：7244
 - 兼容 MySQL 错误码：3728

## ERROR 3729 (HY000) : The index type %.20s is not supported for spatial indexes.

- OceanBase 错误码：7245
 - 兼容 MySQL 错误码：3729

## ERROR 3729 (HY000) : The index type %s is not supported for spatial indexes.

- OceanBase 错误码：7281
 - 兼容 MySQL 错误码：3729

## ERROR 3731 (22S02) : A parameter of function %.192s contains a geometry with longitude %f, which is out of range. It must be within (%f, %f].

- OceanBase 错误码：7246
 - 兼容 MySQL 错误码：3731

## ERROR 3732 (22S03) : A parameter of function %.192s contains a geometry with latitude %f, which is out of range. It must be within [%f, %f].

- OceanBase 错误码：7247
 - 兼容 MySQL 错误码：3732

## ERROR 3736 (SR002) : The spatial reference system definition for SRID %u specifies invalid geographic axes '%.20s' and '%.20s'. One axis must be NORTH or SOUTH and the other must be EAST or WEST.

- OceanBase 错误码：7248
 - 兼容 MySQL 错误码：3736

## ERROR 3737 (SR002) : The length of the semi-major axis must be a positive number.

- OceanBase 错误码：7249
 - 兼容 MySQL 错误码：3737

## ERROR 3738 (SR002) : The inverse flattening must be larger than 1.0, or 0.0 if the ellipsoid is a sphere.

- OceanBase 错误码：7250
 - 兼容 MySQL 错误码：3738

## ERROR 3739 (SR002) : The angular unit conversion factor must be a positive number.

- OceanBase 错误码：7251
 - 兼容 MySQL 错误码：3739

## ERROR 3740 (SR002) : The prime meridian must be within (-180, 180] degrees, specified in the SRS angular unit.

- OceanBase 错误码：7252
 - 兼容 MySQL 错误码：3740

## ERROR 3741 (22S00) : Transformation from SRID %u is not supported.

- OceanBase 错误码：7253
 - 兼容 MySQL 错误码：3741

## ERROR 3742 (22S00) : Transformation to SRID %u is not supported.

- OceanBase 错误码：7254
 - 兼容 MySQL 错误码：3742

## ERROR 3743 (22S00) : Transformation from SRID %u is not supported. The spatial reference system has no TOWGS84 clause.

- OceanBase 错误码：7255
 - 兼容 MySQL 错误码：3743

## ERROR 3744 (22S00) : Transformation to SRID %u is not supported. The spatial reference system has no TOWGS84 clause.

- OceanBase 错误码：7256
 - 兼容 MySQL 错误码：3744

## ERROR 3753 (42000) : Cannot create a functional index on a function that returns a JSON or GEOMETRY value.

- OceanBase 错误码：7257
 - 兼容 MySQL 错误码：3753

## ERROR 3754 (HY000) : Functional index '%.*s' cannot refer to an auto-increment column.

- OceanBase 错误码：5496
 - 兼容 MySQL 错误码：3754
 - 错误原因：在创建函数索引时，使用了自增长列作为函数索引的一部分，而自增长列不能作为函数索引的一部分。
 - 解决方法：修改函数索引，将自增长列从函数索引中移除，或者使用其他列代替自增长列作为函数索引的一部分。

## ERROR 3757 (HY000) : Cannot create a functional index on an expression that returns a BLOB or TEXT. Please consider using CAST.

- OceanBase 错误码：5498
 - 兼容 MySQL 错误码：3757
 - 错误原因：在创建函数索引时，使用了返回 BLOB 或 TEXT 类型的表达式，而 BLOB 或 TEXT 类型的表达式不能用于创建函数索引。
 - 解决方法：使用 CAST 函数，可以使用 CAST 函数将 BLOB 或 TEXT 类型的表达式转换为其他类型，然后使用转换后的表达式创建函数索引。

## ERROR 3758 (HY000) : Expression of functional index contains a disallowed function.

- OceanBase 错误码：5905
 - 兼容 MySQL 错误码：3758
 - 错误原因：在创建函数索引时，使用了不支持的函数，索引函数使用 SYSDATE 或用户环境。
 - 解决方法：索引函数必须是纯函数（RNDS 、RNPS 、WNDS 和 WNPS）。

## ERROR 3760 (HY000) : Spatial functional index is not supported.

- OceanBase 错误码：7258
 - 兼容 MySQL 错误码：3760

## ERROR 3762 (HY000) : Functional index on a column is not supported. Consider using a regular index instead.

- OceanBase 错误码：5499
 - 兼容 MySQL 错误码：3762
 - 错误原因：在创建函数索引时，索引函数是单个列。
 - 解决方法：请使用普通索引。

## ERROR 3812 (HY000) : An expression of non-boolean type specified to a check constraint \'%.*s\'

- OceanBase 错误码：5987
 - 兼容 MySQL 错误码：3812

## ERROR 3813 (HY000) : Column check constraint \'%.*s\' references other column

- OceanBase 错误码：5786
 - 兼容 MySQL 错误码：3813

## ERROR 3814 (HY000) : An expression of a check constraint \'%.*s\' contains disallowed function: %.*s

- OceanBase 错误码：5991
 - 兼容 MySQL 错误码：3814

## ERROR 3815 (HY000) : An expression of a check constraint \'%.*s\' contains disallowed function

- OceanBase 错误码：5992
 - 兼容 MySQL 错误码：3815

## ERROR 3816 (HY000) : An expression of a check constraint \'%.*s\' cannot refer to a user or system variable

- OceanBase 错误码：5993
 - 兼容 MySQL 错误码：3816

## ERROR 3818 (HY000) : Check constraint \'%.*s\' cannot refer to an auto-increment column

- OceanBase 错误码：5990
 - 兼容 MySQL 错误码：3818

## ERROR 3819 (HY000) : check constraint violated

- OceanBase 错误码：5693
 - 兼容 MySQL 错误码：3819

## ERROR 3820 (HY000) : Check constraint \'%.*s\' refers to non-existing column \'%.*s\'

- OceanBase 错误码：5994
 - 兼容 MySQL 错误码：3820

## ERROR 3821 (HY000) : Check constraint \'%.*s\' is not found in the table

- OceanBase 错误码：5988
 - 兼容 MySQL 错误码：3821

## ERROR 3822 (HY000) : Duplicate check constraint name \'%.*s\'

- OceanBase 错误码：5678
 - 兼容 MySQL 错误码：3822

## ERROR 3837 (HY000) : Column '%.*s' has a functional index dependency and cannot be dropped or renamed.

- OceanBase 错误码：5497
 - 兼容 MySQL 错误码：3837
 - 错误原因：要删除的列存在函数索引依赖关系，不能直接删除或重命名。
 - 解决方法：
     - 删除函数索引：如果要删除的列是函数索引的一部分，可以先删除函数索引，然后再删除该列。
     - 修改函数索引：如果要删除的列是函数索引的一部分，可以修改函数索引，将该列从函数索引中移除，然后再删除该列。

#### 说明

该错误码从 V4.2.1 版本开始，报错信息由 `Column '%.*s' has a functional index dependency and cannot be dropped.` 调整为 `Column '%.*s' has a functional index dependency and cannot be dropped or renamed.`。

## ERROR 3853 (22032) : Invalid JSON type in argument, should be object.

- OceanBase 错误码：6285
 - 兼容 MySQL 错误码：3853
 - 错误原因：在参数中使用了无效的 JSON 类型，实际为对象类型。
 - 解决方法：请确保参数是一个有效的 JSON 对象类型，或将其转换为正确的 JSON 对象类型。

## ERROR 3855 (HY000) : Column '%.*s' has a partitioning function dependency and cannot be dropped or renamed.

- OceanBase 错误码：5502
 - 兼容 MySQL 错误码：3855
 - 错误原因：列具有分区函数依赖关系，导致无法删除或重命名该列。

## ERROR 3939 (HY000) : Table has multiple constraints with the name \'%.*s\'. Please use constraint specific \'%.*s\' clause

- OceanBase 错误码：5986
 - 兼容 MySQL 错误码：3939

## ERROR 3940 (HY000) : Constraint \'%.*s\' does not exist

- OceanBase 错误码：5692
 - 兼容 MySQL 错误码：3940

相关问题案例：

- [OceanBase 数据库中唯一性约束与普通约束的区别](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000207749)

## ERROR 3941 (HY000) : Altering constraint enforcement is not supported for the constraint \'%.*s\'. Enforcement state alter is not supported for the PRIMARY, UNIQUE and FOREIGN KEY type constraints

- OceanBase 错误码：5989
 - 兼容 MySQL 错误码：3941

## ERROR 3942 (HY000) : Each row of a VALUES clause must have at least one column, unless when used as source in an INSERT statement.

- OceanBase 错误码：11000
 - 兼容 MySQL 错误码：3942
 - 错误原因：在 VALUES 子句中的每一行必须至少有一个列，除非在 INSERT 语句中用作数据源。
 - 解决方法：请确保在 VALUES 子句中的每一行都至少有一个列。

## ERROR 3943 (HY000) : A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement.

- OceanBase 错误码：11001
 - 兼容 MySQL 错误码：3943
 - 错误原因：在 VALUES 子句中不能使用默认值，除非在 INSERT 语句中用作数据源。
 - 解决方法：请不要在 VALUES 子句中使用默认值，除非在 INSERT 语句中用作数据源。

## ERROR 3959 (HY000) : Check constraint \'%.*s\' uses column \'%.*s\', hence column cannot be dropped or renamed

- OceanBase 错误码：5859
 - 兼容 MySQL 错误码：3959

## ERROR 3966 (22035) : No value was found by '%.192s' on the specified path

- OceanBase 错误码：5432
 - 兼容 MySQL 错误码：3966

## ERROR 3967 (22035) : More than one value was found by '%.192s' on the specified path

- OceanBase 错误码：5433
 - 兼容 MySQL 错误码：3967

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
