From d3644be080222abd73d830751d1580b481d3f2eb Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Sat, 7 Apr 2018 07:42:59 +0200 Subject: [PATCH] CONC-314: Support for expired passwords (MySQL Server) Added option MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS for mysql_options/mysql_optionsv. If this option is set, client indicates that he will be able to handle expired passwords by setting the CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS capability flag. If password expired and CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS is set, the server will not return an error when connecting, but put the connection in sandbox mode, where all commands will return error 1820 (ER_MUST_CHANGE_PASSWORD) unless a new password was set. Since we frequently update mysqld_error.h error codes from 10.2-server, the ma_error_server.h include file now includes mysqld_error.h (and is just a stub) --- include/ma_server_error.h | 774 +------------------------------ include/mariadb_com.h | 1 + libmariadb/mariadb_lib.c | 9 + unittest/libmariadb/connection.c | 61 +++ 4 files changed, 73 insertions(+), 772 deletions(-) diff --git a/include/ma_server_error.h b/include/ma_server_error.h index b63f6196..6e776630 100644 --- a/include/ma_server_error.h +++ b/include/ma_server_error.h @@ -1,772 +1,2 @@ -/* This file was automatically generated from errmsg.sys. - Todo: Several error messages are no longer in use - */ - -#define ER_HASHCHK 1000 /* no longer in use ?! */ -#define ER_NISAMCHK 1001 /* no longer in use ? */ -#define ER_NO 1002 -#define ER_YES 1003 -#define ER_CANT_CREATE_FILE 1004 -#define ER_CANT_CREATE_TABLE 1005 -#define ER_CANT_CREATE_DB 1006 -#define ER_DB_CREATE_EXISTS 1007 -#define ER_DB_DROP_EXISTS 1008 -#define ER_DB_DROP_DELETE 1009 /* no longer in use ?! */ -#define ER_DB_DROP_RMDIR 1010 -#define ER_CANT_DELETE_FILE 1011 -#define ER_CANT_FIND_SYSTEM_REC 1012 -#define ER_CANT_GET_STAT 1013 -#define ER_CANT_GET_WD 1014 -#define ER_CANT_LOCK 1015 -#define ER_CANT_OPEN_FILE 1016 -#define ER_FILE_NOT_FOUND 1017 -#define ER_CANT_READ_DIR 1018 -#define ER_CANT_SET_WD 1019 -#define ER_CHECKREAD 1020 -#define ER_DISK_FULL 1021 -#define ER_DUP_KEY 1022 -#define ER_ERROR_ON_CLOSE 1023 -#define ER_ERROR_ON_READ 1024 -#define ER_ERROR_ON_RENAME 1025 -#define ER_ERROR_ON_WRITE 1026 -#define ER_FILE_USED 1027 -#define ER_FILSORT_ABORT 1028 -#define ER_FORM_NOT_FOUND 1029 /* no longer in use ?! */ -#define ER_GET_ERRNO 1030 -#define ER_ILLEGAL_HA 1031 -#define ER_KEY_NOT_FOUND 1032 -#define ER_NOT_FORM_FILE 1033 -#define ER_NOT_KEYFILE 1034 -#define ER_OLD_KEYFILE 1035 -#define ER_OPEN_AS_READONLY 1036 -#define ER_OUTOFMEMORY 1037 -#define ER_OUT_OF_SORTMEMORY 1038 -#define ER_UNEXPECTED_EOF 1039 -#define ER_CON_COUNT_ERROR 1040 -#define ER_OUT_OF_RESOURCES 1041 -#define ER_BAD_HOST_ERROR 1042 -#define ER_HANDSHAKE_ERROR 1043 -#define ER_DBACCESS_DENIED_ERROR 1044 -#define ER_ACCESS_DENIED_ERROR 1045 -#define ER_NO_DB_ERROR 1046 -#define ER_UNKNOWN_COM_ERROR 1047 -#define ER_BAD_NULL_ERROR 1048 -#define ER_BAD_DB_ERROR 1049 -#define ER_TABLE_EXISTS_ERROR 1050 -#define ER_BAD_TABLE_ERROR 1051 -#define ER_NON_UNIQ_ERROR 1052 -#define ER_SERVER_SHUTDOWN 1053 -#define ER_BAD_FIELD_ERROR 1054 -#define ER_WRONG_FIELD_WITH_GROUP 1055 -#define ER_WRONG_GROUP_FIELD 1056 -#define ER_WRONG_SUM_SELECT 1057 -#define ER_WRONG_VALUE_COUNT 1058 -#define ER_TOO_LONG_IDENT 1059 -#define ER_DUP_FIELDNAME 1060 -#define ER_DUP_KEYNAME 1061 -#define ER_DUP_ENTRY 1062 -#define ER_WRONG_FIELD_SPEC 1063 -#define ER_PARSE_ERROR 1064 -#define ER_EMPTY_QUERY 1065 -#define ER_NONUNIQ_TABLE 1066 -#define ER_INVALID_DEFAULT 1067 -#define ER_MULTIPLE_PRI_KEY 1068 -#define ER_TOO_MANY_KEYS 1069 -#define ER_TOO_MANY_KEY_PARTS 1070 -#define ER_TOO_LONG_KEY 1071 -#define ER_KEY_COLUMN_DOES_NOT_EXITS 1072 -#define ER_BLOB_USED_AS_KEY 1073 -#define ER_TOO_BIG_FIELDLENGTH 1074 -#define ER_WRONG_AUTO_KEY 1075 -#define ER_READY 1076 /* no longer in use !? */ -#define ER_NORMAL_SHUTDOWN 1077 -#define ER_GOT_SIGNAL 1078 -#define ER_SHUTDOWN_COMPLETE 1079 -#define ER_FORCING_CLOSE 1080 -#define ER_IPSOCK_ERROR 1081 -#define ER_NO_SUCH_INDEX 1082 -#define ER_WRONG_FIELD_TERMINATORS 1083 -#define ER_BLOBS_AND_NO_TERMINATED 1084 -#define ER_TEXTFILE_NOT_READABLE 1085 -#define ER_FILE_EXISTS_ERROR 1086 -#define ER_LOAD_INFO 1087 -#define ER_ALTER_INFO 1088 /* no longer in use !? */ -#define ER_WRONG_SUB_KEY 1089 -#define ER_CANT_REMOVE_ALL_FIELDS 1090 -#define ER_CANT_DROP_FIELD_OR_KEY 1091 -#define ER_INSERT_INFO 1092 -#define ER_INSERT_TABLE_USED 1093 /* no longer in use !? */ -#define ER_NO_SUCH_THREAD 1094 -#define ER_KILL_DENIED_ERROR 1095 -#define ER_NO_TABLES_USED 1096 -#define ER_TOO_BIG_SET 1097 -#define ER_NO_UNIQUE_LOGFILE 1098 -#define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099 -#define ER_TABLE_NOT_LOCKED 1100 -#define ER_BLOB_CANT_HAVE_DEFAULT 1101 -#define ER_WRONG_DB_NAME 1102 -#define ER_WRONG_TABLE_NAME 1103 -#define ER_TOO_BIG_SELECT 1104 -#define ER_UNKNOWN_ERROR 1105 -#define ER_UNKNOWN_PROCEDURE 1106 -#define ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107 -#define ER_WRONG_PARAMETERS_TO_PROCEDURE 1108 -#define ER_UNKNOWN_TABLE 1109 -#define ER_FIELD_SPECIFIED_TWICE 1110 -#define ER_INVALID_GROUP_FUNC_USE 1111 -#define ER_UNSUPPORTED_EXTENSION 1112 -#define ER_TABLE_MUST_HAVE_COLUMNS 1113 -#define ER_RECORD_FILE_FULL 1114 -#define ER_UNKNOWN_CHARACTER_SET 1115 -#define ER_TOO_MANY_TABLES 1116 -#define ER_TOO_MANY_FIELDS 1117 -#define ER_TOO_BIG_ROWSIZE 1118 -#define ER_STACK_OVERRUN 1119 -#define ER_WRONG_OUTER_JOIN 1120 -#define ER_NULL_COLUMN_IN_INDEX 1121 -#define ER_CANT_FIND_UDF 1122 -#define ER_CANT_INITIALIZE_UDF 1123 -#define ER_UDF_NO_PATHS 1124 -#define ER_UDF_EXISTS 1125 -#define ER_CANT_OPEN_LIBRARY 1126 -#define ER_CANT_FIND_DL_ENTRY 1127 -#define ER_FUNCTION_NOT_DEFINED 1128 -#define ER_HOST_IS_BLOCKED 1129 -#define ER_HOST_NOT_PRIVILEGED 1130 -#define ER_PASSWORD_ANONYMOUS_USER 1131 -#define ER_PASSWORD_NOT_ALLOWED 1132 /* no longer in use !? */ -#define ER_PASSWORD_NO_MATCH 1133 -#define ER_UPDATE_INFO 1134 -#define ER_CANT_CREATE_THREAD 1135 -#define ER_WRONG_VALUE_COUNT_ON_ROW 1136 -#define ER_CANT_REOPEN_TABLE 1137 -#define ER_INVALID_USE_OF_NULL 1138 /* no longer in use !? */ -#define ER_REGEXP_ERROR 1139 -#define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140 -#define ER_NONEXISTING_GRANT 1141 -#define ER_TABLEACCESS_DENIED_ERROR 1142 -#define ER_COLUMNACCESS_DENIED_ERROR 1143 -#define ER_ILLEGAL_GRANT_FOR_TABLE 1144 -#define ER_GRANT_WRONG_HOST_OR_USER 1145 /* no longer in use !? */ -#define ER_NO_SUCH_TABLE 1146 -#define ER_NONEXISTING_TABLE_GRANT 1147 -#define ER_NOT_ALLOWED_COMMAND 1148 -#define ER_SYNTAX_ERROR 1149 -#define ER_DELAYED_CANT_CHANGE_LOCK 1150 -#define ER_TOO_MANY_DELAYED_THREADS 1151 /* no longer in use !? */ -#define ER_ABORTING_CONNECTION 1152 /* no longer in use !? */ -#define ER_NET_PACKET_TOO_LARGE 1153 -#define ER_NET_READ_ERROR_FROM_PIPE 1154 /* no longer in use !? */ -#define ER_NET_FCNTL_ERROR 1155 -#define ER_NET_PACKETS_OUT_OF_ORDER 1156 -#define ER_NET_UNCOMPRESS_ERROR 1157 -#define ER_NET_READ_ERROR 1158 -#define ER_NET_READ_INTERRUPTED 1159 -#define ER_NET_ERROR_ON_WRITE 1160 -#define ER_NET_WRITE_INTERRUPTED 1161 -#define ER_TOO_LONG_STRING 1162 /* no longer in use !? */ -#define ER_TABLE_CANT_HANDLE_BLOB 1163 -#define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164 -#define ER_DELAYED_INSERT_TABLE_LOCKED 1165 -#define ER_WRONG_COLUMN_NAME 1166 -#define ER_WRONG_KEY_COLUMN 1167 -#define ER_WRONG_MRG_TABLE 1168 -#define ER_DUP_UNIQUE 1169 -#define ER_BLOB_KEY_WITHOUT_LENGTH 1170 -#define ER_PRIMARY_CANT_HAVE_NULL 1171 -#define ER_TOO_MANY_ROWS 1172 -#define ER_REQUIRES_PRIMARY_KEY 1173 -#define ER_NO_RAID_COMPILED 1174 /* no longer in use !? */ -#define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175 -#define ER_KEY_DOES_NOT_EXITS 1176 -#define ER_CHECK_NO_SUCH_TABLE 1177 -#define ER_CHECK_NOT_IMPLEMENTED 1178 -#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179 /* no longer in use !? */ -#define ER_ERROR_DURING_COMMIT 1180 -#define ER_ERROR_DURING_ROLLBACK 1181 -#define ER_ERROR_DURING_FLUSH_LOGS 1182 -#define ER_ERROR_DURING_CHECKPOINT 1183 /* no longer in use !? */ -#define ER_NEW_ABORTING_CONNECTION 1184 -#define ER_DUMP_NOT_IMPLEMENTED 1185 /* no longer in use !? */ -#define ER_FLUSH_MASTER_BINLOG_CLOSED 1186 -#define ER_INDEX_REBUILD 1187 /* no longer in use !? */ -#define ER_MASTER 1188 -#define ER_MASTER_NET_READ 1189 /* no longer in use !? */ -#define ER_MASTER_NET_WRITE 1190 /* no longer in use !? */ -#define ER_FT_MATCHING_KEY_NOT_FOUND 1191 -#define ER_LOCK_OR_ACTIVE_TRANSACTION 1192 -#define ER_UNKNOWN_SYSTEM_VARIABLE 1193 -#define ER_CRASHED_ON_USAGE 1194 -#define ER_CRASHED_ON_REPAIR 1195 -#define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196 -#define ER_TRANS_CACHE_FULL 1197 -#define ER_SLAVE_MUST_STOP 1198 -#define ER_SLAVE_NOT_RUNNING 1199 -#define ER_BAD_SLAVE 1200 -#define ER_MASTER_INFO 1201 -#define ER_SLAVE_THREAD 1202 -#define ER_TOO_MANY_USER_CONNECTIONS 1203 -#define ER_SET_CONSTANTS_ONLY 1204 -#define ER_LOCK_WAIT_TIMEOUT 1205 -#define ER_LOCK_TABLE_FULL 1206 -#define ER_READ_ONLY_TRANSACTION 1207 -#define ER_DROP_DB_WITH_READ_LOCK 1208 /* no longer in use !? */ -#define ER_CREATE_DB_WITH_READ_LOCK 1209 /* no longer in use !? */ -#define ER_WRONG_ARGUMENTS 1210 -#define ER_NO_PERMISSION_TO_CREATE_USER 1211 /* no longer in use !? */ -#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212 /* no longer in use !? */ -#define ER_LOCK_DEADLOCK 1213 -#define ER_TABLE_CANT_HANDLE_FULLTEXT 1214 /* no longer in use !? */ -#define ER_CANNOT_ADD_FOREIGN 1215 -#define ER_NO_REFERENCED_ROW 1216 -#define ER_ROW_IS_REFERENCED 1217 - -/* new server messages (added after 3.23.49) */ -#define ER_CONNECT_TO_MASTER 1218 /* no longer in use !? */ -#define ER_QUERY_ON_MASTER 1219 /* no longer in use !? */ -#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220 -#define ER_WRONG_USAGE 1221 -#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222 -#define ER_CANT_UPDATE_WITH_READLOCK 1223 /* no longer in use !? */ -#define ER_MIXING_NOT_ALLOWED 1224 /* no longer in use !? */ -#define ER_DUP_ARGUMENT 1225 -#define ER_USER_LIMIT_REACHED 1226 -#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227 -#define ER_LOCAL_VARIABLE 1228 -#define ER_GLOBAL_VARIABLE 1229 -#define ER_NO_DEFAULT 1230 -#define ER_WRONG_VALUE_FOR_VAR 1231 -#define ER_WRONG_TYPE_FOR_VAR 1232 -#define ER_VAR_CANT_BE_READ 1233 -#define ER_CANT_USE_OPTION_HERE 1234 -#define ER_NOT_SUPPORTED_YET 1235 -#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236 -#define ER_SLAVE_IGNORED_TABLE 1237 -#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238 -#define ER_WRONG_FK_DEF 1239 -#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240 -#define ER_OPERAND_COLUMNS 1241 -#define ER_SUBQUERY_NO_1_ROW 1242 -#define ER_UNKNOWN_STMT_HANDLER 1243 -#define ER_CORRUPT_HELP_DB 1244 -#define ER_CYCLIC_REFERENCE 1245 /* no longer in use ?! */ -#define ER_AUTO_CONVERT 1246 -#define ER_ILLEGAL_REFERENCE 1247 -#define ER_DERIVED_MUST_HAVE_ALIAS 1248 -#define ER_SELECT_REDUCED 1249 -#define ER_TABLENAME_NOT_ALLOWED_HERE 1250 -#define ER_NOT_SUPPORTED_AUTH_MODE 1251 -#define ER_SPATIAL_CANT_HAVE_NULL 1252 -#define ER_COLLATION_CHARSET_MISMATCH 1253 -#define ER_SLAVE_WAS_RUNNING 1254 -#define ER_SLAVE_WAS_NOT_RUNNING 1255 -#define ER_TOO_BIG_FOR_UNCOMPRESS 1256 -#define ER_ZLIB_Z_MEM_ERROR 1257 -#define ER_ZLIB_Z_BUF_ERROR 1258 -#define ER_ZLIB_Z_DATA_ERROR 1259 -#define ER_CUT_VALUE_GROUP_CONCAT 1260 -#define ER_WARN_TOO_FEW_RECORDS 1261 -#define ER_WARN_TOO_MANY_RECORDS 1262 -#define ER_WARN_NULL_TO_NOTNULL 1263 -#define ER_WARN_DATA_OUT_OF_RANGE 1264 -#define WARN_DATA_TRUNCATED 1265 -#define ER_WARN_USING_OTHER_HANDLER 1266 -#define ER_CANT_AGGREGATE_2COLLATIONS 1267 -#define ER_DROP_USER 1268 /* no longer in use ?! */ -#define ER_REVOKE_GRANTS 1269 -#define ER_CANT_AGGREGATE_3COLLATIONS 1270 -#define ER_CANT_AGGREGATE_NCOLLATIONS 1271 -#define ER_VARIABLE_IS_NOT_STRUCT 1272 -#define ER_UNKNOWN_COLLATION 1273 -#define ER_SLAVE_IGNORED_SSL_PARAMS 1274 -#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275 -#define ER_WARN_FIELD_RESOLVED 1276 -#define ER_BAD_SLAVE_UNTIL_COND 1277 -#define ER_MISSING_SKIP_SLAVE 1278 -#define ER_UNTIL_COND_IGNORED 1279 -#define ER_WRONG_NAME_FOR_INDEX 1280 -#define ER_WRONG_NAME_FOR_CATALOG 1281 /* no longer in use ?! */ -#define ER_WARN_QC_RESIZE 1282 -#define ER_BAD_FT_COLUMN 1283 -#define ER_UNKNOWN_KEY_CACHE 1284 -#define ER_WARN_HOSTNAME_WONT_WORK 1285 -#define ER_UNKNOWN_STORAGE_ENGINE 1286 -#define ER_WARN_DEPRECATED_SYNTAX 1287 -#define ER_NON_UPDATABLE_TABLE 1288 -#define ER_FEATURE_DISABLED 1289 -#define ER_OPTION_PREVENTS_STATEMENT 1290 -#define ER_DUPLICATED_VALUE_IN_TYPE 1291 -#define ER_TRUNCATED_WRONG_VALUE 1292 -#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293 -#define ER_INVALID_ON_UPDATE 1294 -#define ER_UNSUPPORTED_PS 1295 -#define ER_GET_ERRMSG 1296 -#define ER_GET_TEMPORARY_ERRMSG 1297 -#define ER_UNKNOWN_TIME_ZONE 1298 -#define ER_WARN_INVALID_TIMESTAMP 1299 -#define ER_INVALID_CHARACTER_STRING 1300 -#define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301 -#define ER_CONFLICTING_DECLARATIONS 1302 -#define ER_SP_NO_RECURSIVE_CREATE 1303 -#define ER_SP_ALREADY_EXISTS 1304 -#define ER_SP_DOES_NOT_EXIST 1305 -#define ER_SP_DROP_FAILED 1306 -#define ER_SP_STORE_FAILED 1307 -#define ER_SP_LILABEL_MISMATCH 1308 -#define ER_SP_LABEL_REDEFINE 1309 -#define ER_SP_LABEL_MISMATCH 1310 -#define ER_SP_UNINIT_VAR 1311 /* no longer in use ?! */ -#define ER_SP_BADSELECT 1312 -#define ER_SP_BADRETURN 1313 -#define ER_SP_BADSTATEMENT 1314 -#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1315 /* no longer in use ?! */ -#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1316 /* no longer in use ?! */ -#define ER_QUERY_INTERRUPTED 1317 -#define ER_SP_WRONG_NO_OF_ARGS 1318 -#define ER_SP_COND_MISMATCH 1319 -#define ER_SP_NORETURN 1320 -#define ER_SP_NORETURNEND 1321 -#define ER_SP_BAD_CURSOR_QUERY 1322 -#define ER_SP_BAD_CURSOR_SELECT 1323 -#define ER_SP_CURSOR_MISMATCH 1324 -#define ER_SP_CURSOR_ALREADY_OPEN 1325 -#define ER_SP_CURSOR_NOT_OPEN 1326 -#define ER_SP_UNDECLARED_VAR 1327 -#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1328 -#define ER_SP_FETCH_NO_DATA 1329 -#define ER_SP_DUP_PARAM 1330 -#define ER_SP_DUP_VAR 1331 -#define ER_SP_DUP_COND 1332 -#define ER_SP_DUP_CURS 1333 -#define ER_SP_CANT_ALTER 1334 -#define ER_SP_SUBSELECT_NYI 1335 /* no longer in use ?! */ -#define ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 1336 /* no longer in use ?! */ -#define ER_SP_VARCOND_AFTER_CURSHNDLR 1337 -#define ER_SP_CURSOR_AFTER_HANDLER 1338 -#define ER_SP_CASE_NOT_FOUND 1339 -#define ER_FPARSER_TOO_BIG_FILE 1340 -#define ER_FPARSER_BAD_HEADER 1341 -#define ER_FPARSER_EOF_IN_COMMENT 1342 -#define ER_FPARSER_ERROR_IN_PARAMETER 1343 -#define ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER 1344 -#define ER_VIEW_NO_EXPLAIN 1345 -#define ER_FRM_UNKNOWN_TYPE 1346 -#define ER_WRONG_OBJECT 1347 -#define ER_NONUPDATEABLE_COLUMN 1348 -#define ER_VIEW_SELECT_DERIVED 1349 -#define ER_VIEW_SELECT_CLAUSE 1350 -#define ER_VIEW_SELECT_VARIABLE 1351 -#define ER_VIEW_SELECT_TMPTABLE 1352 -#define ER_VIEW_WRONG_LIST 1353 -#define ER_WARN_VIEW_MERGE 1354 -#define ER_WARN_VIEW_WITHOUT_KEY 1355 -#define ER_VIEW_INVALID 1356 -#define ER_SP_NO_DROP_SP 1357 -#define ER_SP_GOTO_IN_HNDLR 1358 /* no longer in use ?! */ -#define ER_TRG_ALREADY_EXISTS 1359 -#define ER_TRG_DOES_NOT_EXIST 1360 -#define ER_TRG_ON_VIEW_OR_TEMP_TABLE 1361 -#define ER_TRG_CANT_CHANGE_ROW 1362 -#define ER_TRG_NO_SUCH_ROW_IN_TRG 1363 -#define ER_NO_DEFAULT_FOR_FIELD 1364 -#define ER_DIVISION_BY_ZERO 1365 -#define ER_TRUNCATED_WRONG_VALUE_FOR_FIELD 1366 -#define ER_ILLEGAL_VALUE_FOR_TYPE 1367 -#define ER_VIEW_NONUPD_CHECK 1368 -#define ER_VIEW_CHECK_FAILED 1369 -#define ER_PROCACCESS_DENIED_ERROR 1370 -#define ER_RELAY_LOG_FAIL 1371 -#define ER_PASSWD_LENGTH 1372 -#define ER_UNKNOWN_TARGET_BINLOG 1373 -#define ER_IO_ERR_LOG_INDEX_READ 1374 -#define ER_BINLOG_PURGE_PROHIBITED 1375 -#define ER_FSEEK_FAIL 1376 -#define ER_BINLOG_PURGE_FATAL_ERR 1377 -#define ER_LOG_IN_USE 1378 -#define ER_LOG_PURGE_UNKNOWN_ERR 1379 -#define ER_RELAY_LOG_INIT 1380 -#define ER_NO_BINARY_LOGGING 1381 -#define ER_RESERVED_SYNTAX 1382 -#define ER_WSAS_FAILED 1383 /* no longer in use ?! */ -#define ER_DIFF_GROUPS_PROC 1384 -#define ER_NO_GROUP_FOR_PROC 1385 /* no longer in use ?! */ -#define ER_ORDER_WITH_PROC 1386 -#define ER_LOGGING_PROHIBIT_CHANGING_OF 1387 /* no longer in use ?! */ -#define ER_NO_FILE_MAPPING 1388 /* no longer in use ?! */ -#define ER_WRONG_MAGIC 1389 /* no longer in use ?! */ -#define ER_PS_MANY_PARAM 1390 -#define ER_KEY_PART_0 1391 -#define ER_VIEW_CHECKSUM 1392 -#define ER_VIEW_MULTIUPDATE 1393 -#define ER_VIEW_NO_INSERT_FIELD_LIST 1394 -#define ER_VIEW_DELETE_MERGE_VIEW 1395 -#define ER_CANNOT_USER 1396 -#define ER_XAER_NOTA 1397 -#define ER_XAER_INVAL 1398 -#define ER_XAER_RMFAIL 1399 -#define ER_XAER_OUTSIDE 1400 -#define ER_XAER_RMERR 1401 -#define ER_XA_RBROLLBACK 1402 -#define ER_NONEXISTING_PROC_GRANT 1403 -#define ER_PROC_AUTO_GRANT_FAIL 1404 -#define ER_PROC_AUTO_REVOKE_FAIL 1405 -#define ER_DATA_TOO_LONG 1406 -#define ER_SP_BAD_SQLSTATE 1407 -#define ER_STARTUP 1408 -#define ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR 1409 -#define ER_CANT_CREATE_USER_WITH_GRANT 1410 -#define ER_WRONG_VALUE_FOR_TYPE 1411 -#define ER_TABLE_DEF_CHANGED 1412 -#define ER_SP_DUP_HANDLER 1413 -#define ER_SP_NOT_VAR_ARG 1414 -#define ER_SP_NO_RETSET 1415 /* no longer in use ?! */ -#define ER_CANT_CREATE_GEOMETRY_OBJECT 1416 -#define ER_FAILED_ROUTINE_BREAK_BINLOG 1417 /* no longer in use ?! */ -#define ER_BINLOG_UNSAFE_ROUTINE 1418 -#define ER_BINLOG_CREATE_ROUTINE_NEED_SUPER 1419 -#define ER_EXEC_STMT_WITH_OPEN_CURSOR 1420 /* no longer in use ?! */ -#define ER_STMT_HAS_NO_OPEN_CURSOR 1421 -#define ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG 1422 -#define ER_NO_DEFAULT_FOR_VIEW_FIELD 1423 -#define ER_SP_NO_RECURSION 1424 -#define ER_TOO_BIG_SCALE 1425 -#define ER_TOO_BIG_PRECISION 1426 -#define ER_M_BIGGER_THAN_D 1427 -#define ER_WRONG_LOCK_OF_SYSTEM_TABLE 1428 -#define ER_CONNECT_TO_FOREIGN_DATA_SOURCE 1429 -#define ER_QUERY_ON_FOREIGN_DATA_SOURCE 1430 -#define ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST 1431 -#define ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE 1432 -#define ER_FOREIGN_DATA_STRING_INVALID 1433 -#define ER_CANT_CREATE_FEDERATED_TABLE 1434 -#define ER_TRG_IN_WRONG_SCHEMA 1435 -#define ER_STACK_OVERRUN_NEED_MORE 1436 -#define ER_TOO_LONG_BODY 1437 -#define ER_WARN_CANT_DROP_DEFAULT_KEYCACHE 1438 /* no longer in use ?! */ -#define ER_TOO_BIG_DISPLAYWIDTH 1439 -#define ER_XAER_DUPID 1440 -#define ER_DATETIME_FUNCTION_OVERFLOW 1441 -#define ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG 1442 -#define ER_VIEW_PREVENT_UPDATE 1443 -#define ER_PS_NO_RECURSION 1444 -#define ER_SP_CANT_SET_AUTOCOMMIT 1445 /* no longer in use ?! */ -#define ER_MALFORMED_DEFINER 1446 /* no longer in use ?! */ -#define ER_VIEW_FRM_NO_USER 1447 -#define ER_VIEW_OTHER_USER 1448 /* no longer in use ?! */ -#define ER_NO_SUCH_USER 1449 -#define ER_FORBID_SCHEMA_CHANGE 1450 -#define ER_ROW_IS_REFERENCED_2 1451 -#define ER_NO_REFERENCED_ROW_2 1452 -#define ER_SP_BAD_VAR_SHADOW 1453 -#define ER_TRG_NO_DEFINER 1454 -#define ER_OLD_FILE_FORMAT 1455 -#define ER_SP_RECURSION_LIMIT 1456 -#define ER_SP_PROC_TABLE_CORRUPT 1457 -#define ER_SP_WRONG_NAME 1458 -#define ER_TABLE_NEEDS_UPGRADE 1459 -#define ER_SP_NO_AGGREGATE 1460 /* no longer in use ?! */ -#define ER_MAX_PREPARED_STMT_COUNT_REACHED 1461 -#define ER_VIEW_RECURSIVE 1462 -#define ER_NON_GROUPING_FIELD_USED 1463 -#define ER_TABLE_CANT_HANDLE_SPKEYS 1464 -#define ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA 1465 -#define ER_REMOVED_SPACES 1466 -#define ER_AUTOINC_READ_FAILED 1467 -#define ER_USERNAME 1468 -#define ER_HOSTNAME 1469 -#define ER_WRONG_STRING_LENGTH 1470 -#define ER_NON_INSERTABLE_TABLE 1471 -#define ER_ADMIN_WRONG_MRG_TABLE 1472 -#define ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT 1473 -#define ER_NAME_BECOMES_EMPTY 1474 -#define ER_AMBIGUOUS_FIELD_TERM 1475 -#define ER_FOREIGN_SERVER_EXISTS 1476 -#define ER_FOREIGN_SERVER_DOESNT_EXIST 1477 -#define ER_ILLEGAL_HA_CREATE_OPTION 1478 -#define ER_PARTITION_REQUIRES_VALUES_ERROR 1479 -#define ER_PARTITION_WRONG_VALUES_ERROR 1480 -#define ER_PARTITION_MAXVALUE_ERROR 1481 -#define ER_PARTITION_SUBPARTITION_ERROR 1482 /* no longer in use ?! */ -#define ER_PARTITION_SUBPART_MIX_ERROR 1483 /* no longer in use ?! */ -#define ER_PARTITION_WRONG_NO_PART_ERROR 1484 -#define ER_PARTITION_WRONG_NO_SUBPART_ERROR 1485 -#define ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR 1486 -#define ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR 1487 /* no longer in use ?! */ -#define ER_FIELD_NOT_FOUND_PART_ERROR 1488 -#define ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR 1489 /* no longer in use ?! */ -#define ER_INCONSISTENT_PARTITION_INFO_ERROR 1490 -#define ER_PARTITION_FUNC_NOT_ALLOWED_ERROR 1491 -#define ER_PARTITIONS_MUST_BE_DEFINED_ERROR 1492 -#define ER_RANGE_NOT_INCREASING_ERROR 1493 -#define ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR 1494 /* no longer in use ?! */ -#define ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR 1495 -#define ER_PARTITION_ENTRY_ERROR 1496 -#define ER_MIX_HANDLER_ERROR 1497 -#define ER_PARTITION_NOT_DEFINED_ERROR 1498 -#define ER_TOO_MANY_PARTITIONS_ERROR 1499 -#define ER_SUBPARTITION_ERROR 1500 -#define ER_CANT_CREATE_HANDLER_FILE 1501 -#define ER_BLOB_FIELD_IN_PART_FUNC_ERROR 1502 -#define ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF 1503 -#define ER_NO_PARTS_ERROR 1504 -#define ER_PARTITION_MGMT_ON_NONPARTITIONED 1505 -#define ER_FOREIGN_KEY_ON_PARTITIONED 1506 -#define ER_DROP_PARTITION_NON_EXISTENT 1507 -#define ER_DROP_LAST_PARTITION 1508 -#define ER_COALESCE_ONLY_ON_HASH_PARTITION 1509 -#define ER_REORG_HASH_ONLY_ON_SAME_NO 1510 -#define ER_REORG_NO_PARAM_ERROR 1511 -#define ER_ONLY_ON_RANGE_LIST_PARTITION 1512 -#define ER_ADD_PARTITION_SUBPART_ERROR 1513 -#define ER_ADD_PARTITION_NO_NEW_PARTITION 1514 -#define ER_COALESCE_PARTITION_NO_PARTITION 1515 -#define ER_REORG_PARTITION_NOT_EXIST 1516 -#define ER_SAME_NAME_PARTITION 1517 -#define ER_NO_BINLOG_ERROR 1518 -#define ER_CONSECUTIVE_REORG_PARTITIONS 1519 -#define ER_REORG_OUTSIDE_RANGE 1520 -#define ER_PARTITION_FUNCTION_FAILURE 1521 -#define ER_PART_STATE_ERROR 1522 /* no longer in use ?! */ -#define ER_LIMITED_PART_RANGE 1523 -#define ER_PLUGIN_IS_NOT_LOADED 1524 -#define ER_WRONG_VALUE 1525 -#define ER_NO_PARTITION_FOR_GIVEN_VALUE 1526 -#define ER_FILEGROUP_OPTION_ONLY_ONCE 1527 -#define ER_CREATE_FILEGROUP_FAILED 1528 -#define ER_DROP_FILEGROUP_FAILED 1529 -#define ER_TABLESPACE_AUTO_EXTEND_ERROR 1530 -#define ER_WRONG_SIZE_NUMBER 1531 -#define ER_SIZE_OVERFLOW_ERROR 1532 -#define ER_ALTER_FILEGROUP_FAILED 1533 -#define ER_BINLOG_ROW_LOGGING_FAILED 1534 -#define ER_BINLOG_ROW_WRONG_TABLE_DEF 1535 /* no longer in use ?! */ -#define ER_BINLOG_ROW_RBR_TO_SBR 1536 /* no longer in use ?! */ -#define ER_EVENT_ALREADY_EXISTS 1537 -#define ER_EVENT_STORE_FAILED 1538 -#define ER_EVENT_DOES_NOT_EXIST 1539 -#define ER_EVENT_CANT_ALTER 1540 /* no longer in use ?! */ -#define ER_EVENT_DROP_FAILED 1541 /* no longer in use ?! */ -#define ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG 1542 -#define ER_EVENT_ENDS_BEFORE_STARTS 1543 -#define ER_EVENT_EXEC_TIME_IN_THE_PAST 1544 -#define ER_EVENT_OPEN_TABLE_FAILED 1545 -#define ER_EVENT_NEITHER_M_EXPR_NOR_M_AT 1546 /* no longer in use ?! */ -#define ER_COL_COUNT_DOESNT_MATCH_CORRUPTED 1547 -#define ER_CANNOT_LOAD_FROM_TABLE 1548 -#define ER_EVENT_CANNOT_DELETE 1549 /* no longer in use ?! */ -#define ER_EVENT_COMPILE_ERROR 1550 /* no longer in use ?! */ -#define ER_EVENT_SAME_NAME 1551 -#define ER_EVENT_DATA_TOO_LONG 1552 -#define ER_DROP_INDEX_FK 1553 -#define ER_WARN_DEPRECATED_SYNTAX_WITH_VER 1554 /* no longer in use ?! */ -#define ER_CANT_WRITE_LOCK_LOG_TABLE 1555 /* no longer in use ?! */ -#define ER_CANT_LOCK_LOG_TABLE 1556 -#define ER_FOREIGN_DUPLICATE_KEY 1557 -#define ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE 1558 -#define ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR 1559 -#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT 1560 -#define ER_NDB_CANT_SWITCH_BINLOG_FORMAT 1561 /* no longer in use ?! */ -#define ER_PARTITION_NO_TEMPORARY 1562 -#define ER_PARTITION_CONST_DOMAIN_ERROR 1563 -#define ER_PARTITION_FUNCTION_IS_NOT_ALLOWED 1564 -#define ER_DDL_LOG_ERROR 1565 -#define ER_NULL_IN_VALUES_LESS_THAN 1566 -#define ER_WRONG_PARTITION_NAME 1567 -#define ER_CANT_CHANGE_TX_ISOLATION 1568 /* no longer in use ?! */ -#define ER_DUP_ENTRY_AUTOINCREMENT_CASE 1569 -#define ER_EVENT_MODIFY_QUEUE_ERROR 1570 /* no longer in use ?! */ -#define ER_EVENT_SET_VAR_ERROR 1571 -#define ER_PARTITION_MERGE_ERROR 1572 -#define ER_CANT_ACTIVATE_LOG 1573 /* no longer in use ?! */ -#define ER_RBR_NOT_AVAILABLE 1574 /* no longer in use ?! */ -#define ER_BASE64_DECODE_ERROR 1575 -#define ER_EVENT_RECURSION_FORBIDDEN 1576 -#define ER_EVENTS_DB_ERROR 1577 -#define ER_ONLY_INTEGERS_ALLOWED 1578 -#define ER_UNSUPORTED_LOG_ENGINE 1579 -#define ER_BAD_LOG_STATEMENT 1580 -#define ER_CANT_RENAME_LOG_TABLE 1581 -#define ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 1582 -#define ER_WRONG_PARAMETERS_TO_NATIVE_FCT 1583 -#define ER_WRONG_PARAMETERS_TO_STORED_FCT 1584 -#define ER_NATIVE_FCT_NAME_COLLISION 1585 -#define ER_DUP_ENTRY_WITH_KEY_NAME 1586 -#define ER_BINLOG_PURGE_EMFILE 1587 -#define ER_EVENT_CANNOT_CREATE_IN_THE_PAST 1588 -#define ER_EVENT_CANNOT_ALTER_IN_THE_PAST 1589 -#define ER_SLAVE_INCIDENT 1590 -#define ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT 1591 -#define ER_BINLOG_UNSAFE_STATEMENT 1592 -#define ER_SLAVE_FATAL_ERROR 1593 -#define ER_SLAVE_RELAY_LOG_READ_FAILURE 1594 -#define ER_SLAVE_RELAY_LOG_WRITE_FAILURE 1595 -#define ER_SLAVE_CREATE_EVENT_FAILURE 1596 -#define ER_SLAVE_MASTER_COM_FAILURE 1597 -#define ER_BINLOG_LOGGING_IMPOSSIBLE 1598 -#define ER_VIEW_NO_CREATION_CTX 1599 -#define ER_VIEW_INVALID_CREATION_CTX 1600 -#define ER_SR_INVALID_CREATION_CTX 1601 -#define ER_TRG_CORRUPTED_FILE 1602 -#define ER_TRG_NO_CREATION_CTX 1603 -#define ER_TRG_INVALID_CREATION_CTX 1604 -#define ER_EVENT_INVALID_CREATION_CTX 1605 -#define ER_TRG_CANT_OPEN_TABLE 1606 -#define ER_CANT_CREATE_SROUTINE 1607 -#define ER_NEVER_USED 1608 /* no longer in use ?! */ -#define ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT 1609 -#define ER_SLAVE_CORRUPT_EVENT 1610 -#define ER_LOAD_DATA_INVALID_COLUMN 1611 -#define ER_LOG_PURGE_NO_FILE 1612 -#define ER_XA_RBTIMEOUT 1613 -#define ER_XA_RBDEADLOCK 1614 -#define ER_NEED_REPREPARE 1615 -#define ER_DELAYED_NOT_SUPPORTED 1616 -#define WARN_NO_MASTER_INFO 1617 -#define WARN_OPTION_IGNORED 1618 -#define WARN_PLUGIN_DELETE_BUILTIN 1619 -#define WARN_PLUGIN_BUSY 1620 -#define ER_VARIABLE_IS_READONLY 1621 -#define ER_WARN_ENGINE_TRANSACTION_ROLLBACK 1622 /* no longer in use ?! */ -#define ER_SLAVE_HEARTBEAT_FAILURE 1623 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE 1624 -#define ER_NDB_REPLICATION_SCHEMA_ERROR 1625 /* no longer in use ?! */ -#define ER_CONFLICT_FN_PARSE_ERROR 1626 /* no longer in use ?! */ -#define ER_EXCEPTIONS_WRITE_ERROR 1627 /* no longer in use ?! */ -#define ER_TOO_LONG_TABLE_COMMENT 1628 -#define ER_TOO_LONG_FIELD_COMMENT 1629 -#define ER_FUNC_INEXISTENT_NAME_COLLISION 1630 -#define ER_DATABASE_NAME 1631 -#define ER_TABLE_NAME 1632 -#define ER_PARTITION_NAME 1633 -#define ER_SUBPARTITION_NAME 1634 -#define ER_TEMPORARY_NAME 1635 -#define ER_RENAMED_NAME 1636 -#define ER_TOO_MANY_CONCURRENT_TRXS 1637 -#define WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED 1638 -#define ER_DEBUG_SYNC_TIMEOUT 1639 -#define ER_DEBUG_SYNC_HIT_LIMIT 1640 -#define ER_DUP_SIGNAL_SET 1641 -#define ER_SIGNAL_WARN 1642 -#define ER_SIGNAL_NOT_FOUND 1643 -#define ER_SIGNAL_EXCEPTION 1644 -#define ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER 1645 -#define ER_SIGNAL_BAD_CONDITION_TYPE 1646 -#define WARN_COND_ITEM_TRUNCATED 1647 -#define ER_COND_ITEM_TOO_LONG 1648 -#define ER_UNKNOWN_LOCALE 1649 -#define ER_SLAVE_IGNORE_SERVER_IDS 1650 -#define ER_QUERY_CACHE_DISABLED 1651 -#define ER_SAME_NAME_PARTITION_FIELD 1652 -#define ER_PARTITION_COLUMN_LIST_ERROR 1653 -#define ER_WRONG_TYPE_COLUMN_VALUE_ERROR 1654 -#define ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR 1655 -#define ER_MAXVALUE_IN_VALUES_IN 1656 -#define ER_TOO_MANY_VALUES_ERROR 1657 -#define ER_ROW_SINGLE_PARTITION_FIELD_ERROR 1658 -#define ER_FIELD_TYPE_NOT_ALLOWED_AS_PARTITION_FIELD 1659 -#define ER_PARTITION_FIELDS_TOO_LONG 1660 -#define ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE 1661 -#define ER_BINLOG_ROW_MODE_AND_STMT_ENGINE 1662 -#define ER_BINLOG_UNSAFE_AND_STMT_ENGINE 1663 -#define ER_BINLOG_ROW_INJECTION_AND_STMT_ENGINE 1664 -#define ER_BINLOG_STMT_MODE_AND_ROW_ENGINE 1665 -#define ER_BINLOG_ROW_INJECTION_AND_STMT_MODE 1666 -#define ER_BINLOG_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1667 -#define ER_BINLOG_UNSAFE_LIMIT 1668 -#define ER_BINLOG_UNSAFE_INSERT_DELAYED 1669 -#define ER_BINLOG_UNSAFE_SYSTEM_TABLE 1670 -#define ER_BINLOG_UNSAFE_AUTOINC_COLUMNS 1671 -#define ER_BINLOG_UNSAFE_UDF 1672 -#define ER_BINLOG_UNSAFE_SYSTEM_VARIABLE 1673 -#define ER_BINLOG_UNSAFE_SYSTEM_FUNCTION 1674 -#define ER_BINLOG_UNSAFE_NONTRANS_AFTER_TRANS 1675 -#define ER_MESSAGE_AND_STATEMENT 1676 -#define ER_SLAVE_CONVERSION_FAILED 1677 -#define ER_SLAVE_CANT_CREATE_CONVERSION 1678 -#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT 1679 -#define ER_PATH_LENGTH 1680 -#define ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT 1681 -#define ER_WRONG_NATIVE_TABLE_STRUCTURE 1682 -#define ER_WRONG_PERFSCHEMA_USAGE 1683 -#define ER_WARN_I_S_SKIPPED_TABLE 1684 -#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_DIRECT 1685 -#define ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_DIRECT 1686 -#define ER_SPATIAL_MUST_HAVE_GEOM_COL 1687 /* no longer in use ?! */ -#define ER_TOO_LONG_INDEX_COMMENT 1688 -#define ER_LOCK_ABORTED 1689 -#define ER_DATA_OUT_OF_RANGE 1690 /* no longer in use ?! */ -#define ER_WRONG_SPVAR_TYPE_IN_LIMIT 1691 -#define ER_BINLOG_UNSAFE_MULTIPLE_ENGINES_AND_SELF_LOGGING_ENGINE 1692 -#define ER_BINLOG_UNSAFE_MIXED_STATEMENT 1693 -#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SQL_LOG_BIN 1694 -#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SQL_LOG_BIN 1695 -#define ER_FAILED_READ_FROM_PAR_FILE 1696 -#define ER_VALUES_IS_NOT_INT_TYPE_ERROR 1697 -#define ER_ACCESS_DENIED_NO_PASSWORD_ERROR 1698 -#define ER_SET_PASSWORD_AUTH_PLUGIN 1699 -#define ER_GRANT_PLUGIN_USER_EXISTS 1700 -#define ER_TRUNCATE_ILLEGAL_FK 1701 -#define ER_PLUGIN_IS_PERMANENT 1702 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN 1703 -#define ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX 1704 -#define ER_STMT_CACHE_FULL 1705 -#define ER_MULTI_UPDATE_KEY_CONFLICT 1706 -#define ER_TABLE_NEEDS_REBUILD 1707 -#define WARN_OPTION_BELOW_LIMIT 1708 -#define ER_INDEX_COLUMN_TOO_LONG 1709 -#define ER_ERROR_IN_TRIGGER_BODY 1710 -#define ER_ERROR_IN_UNKNOWN_TRIGGER_BODY 1711 -#define ER_INDEX_CORRUPT 1712 -#define ER_UNDO_RECORD_TOO_BIG 1713 -#define ER_BINLOG_UNSAFE_INSERT_IGNORE_SELECT 1714 -#define ER_BINLOG_UNSAFE_INSERT_SELECT_UPDATE 1715 -#define ER_BINLOG_UNSAFE_REPLACE_SELECT 1716 -#define ER_BINLOG_UNSAFE_CREATE_IGNORE_SELECT 1717 -#define ER_BINLOG_UNSAFE_CREATE_REPLACE_SELECT 1718 -#define ER_BINLOG_UNSAFE_UPDATE_IGNORE 1719 -#define ER_PLUGIN_NO_UNINSTALL 1720 /* no longer in use ?! */ -#define ER_PLUGIN_NO_INSTALL 1721 /* no longer in use ?! */ -#define ER_BINLOG_UNSAFE_WRITE_AUTOINC_SELECT 1722 -#define ER_BINLOG_UNSAFE_CREATE_SELECT_AUTOINC 1723 -#define ER_BINLOG_UNSAFE_INSERT_TWO_KEYS 1724 -#define ER_TABLE_IN_FK_CHECK 1725 -#define ER_UNUSED_1 1726 /* not in use ?! */ -#define ER_BINLOG_UNSAFE_AUTOINC_NOT_FIRST 1727 -#define ER_LAST_MYSQL_ERROR_MESSAGE 1728 - -/* MariaDB only errors */ -#define ER_VCOL_BASED_ON_VCOL 1900 -#define ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED 1901 -#define ER_DATA_CONVERSION_ERROR_FOR_VIRTUAL_COLUMN 1902 -#define ER_PRIMARY_KEY_BASED_ON_VIRTUAL_COLUMN 1903 -#define ER_KEY_BASED_ON_GENERATED_VIRTUAL_COLUMN 1904 -#define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN 1905 -#define ER_WARNING_NON_DEFAULT_VALUE_FOR_VIRTUAL_COLUMN 1906 -#define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN 1907 -#define ER_CONST_EXPR_IN_VCOL 1908 -#define ER_ROW_EXPR_FOR_VCOL 1909 -#define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS 1910 -#define ER_UNKNOWN_OPTION 1911 -#define ER_BAD_OPTION_VALUE 1912 -#define ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE 1913 -#define ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE 1914 -#define ER_CANT_DO_ONLINE 1915 -#define ER_DATA_OVERFLOW 1916 -#define ER_DATA_TRUNCATED 1917 -#define ER_BAD_DATA 1918 -#define ER_DYN_COL_WRONG_FORMAT 1919 -#define ER_DYN_COL_IMPLEMENTATION_LIMIT 1920 -#define ER_DYN_COL_DATA 1921 -#define ER_DYN_COL_WRONG_CHARSET 1922 -#define ER_ILLEGAL_SUBQUERY_OPTIMIZER_SWITCHES 1923 -#define ER_QUERY_CACHE_IS_DISABLED 1924 -#define ER_QUERY_CACHE_IS_GLOBALY_DISABLED 1925 -#define ER_VIEW_ORDERBY_IGNORED 1926 -#define ER_CONNECTION_KILLED 1927 -#define ER_INTERNAL_ERROR 1928 -#define ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SKIP_REPLICATION 1929 -#define ER_STORED_FUNCTION_PREVENTS_SWITCH_SKIP_REPLICATION 1930 -#define ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT 1931 -#define ER_NO_SUCH_TABLE_IN_ENGINE 1932 -#define ER_GEOMETRY_SRID_MISMATCH 1933 -#define ER_NO_SUCH_SPATIAL_REF_ID 1934 +/* This file exists for compatibility only */ +#include "mysqld_error.h" diff --git a/include/mariadb_com.h b/include/mariadb_com.h index 727c66bf..b557232d 100644 --- a/include/mariadb_com.h +++ b/include/mariadb_com.h @@ -158,6 +158,7 @@ enum enum_server_command #define CLIENT_PS_MULTI_RESULTS (1UL << 18) #define CLIENT_PLUGIN_AUTH (1UL << 19) #define CLIENT_CONNECT_ATTRS (1UL << 20) +#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22) #define CLIENT_SESSION_TRACKING (1UL << 23) #define CLIENT_PROGRESS (1UL << 29) /* client supports progress indicator */ #define CLIENT_PROGRESS_OBSOLETE CLIENT_PROGRESS diff --git a/libmariadb/mariadb_lib.c b/libmariadb/mariadb_lib.c index b4f20b0b..874e3050 100644 --- a/libmariadb/mariadb_lib.c +++ b/libmariadb/mariadb_lib.c @@ -2747,6 +2747,9 @@ mysql_optionsv(MYSQL *mysql,enum mysql_option option, ...) case MYSQL_OPT_NET_BUFFER_LENGTH: net_buffer_length= (unsigned long)(*(size_t *)arg1); break; + case MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS: + *((my_bool *)arg1)= test(mysql->options.client_flag & CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS); + break; case MYSQL_OPT_SSL_ENFORCE: mysql->options.use_ssl= (*(my_bool *)arg1); break; @@ -3074,6 +3077,12 @@ mysql_get_optionv(MYSQL *mysql, enum mysql_option option, void *arg, ...) case MYSQL_OPT_NONBLOCK: *((my_bool *)arg)= test(mysql->options.extension && mysql->options.extension->async_context); break; + case MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS: + if (*(my_bool *)arg) + mysql->options.client_flag |= CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS; + else + mysql->options.client_flag &= ~CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS; + break; case MYSQL_OPT_SSL_ENFORCE: *((my_bool *)arg)= mysql->options.use_ssl; break; diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index 603a897e..65e37e88 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -1298,7 +1298,68 @@ static int test_conc276(MYSQL *unused __attribute__((unused))) return OK; } +static int test_expired_pw(MYSQL *my) +{ + MYSQL *mysql; + int rc; + char query[512]; + unsigned char expire= 1; + + if (mariadb_connection(my) || + !(my->server_capabilities & CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS)) + { + diag("Server doesn't support password expiration"); + return SKIP; + } + sprintf(query, "DROP USER 'foo'@'%s'", this_host); + rc= mysql_query(my, query); + + sprintf(query, "CREATE USER 'foo'@'%s' IDENTIFIED BY 'foo'", this_host); + rc= mysql_query(my, query); + check_mysql_rc(rc, my); + + sprintf(query, "GRANT ALL ON *.* TO 'foo'@'%s'", this_host); + rc= mysql_query(my, query); + check_mysql_rc(rc, my); + + sprintf(query, "ALTER USER 'foo'@'%s' PASSWORD EXPIRE", this_host); + rc= mysql_query(my, query); + check_mysql_rc(rc, my); + + mysql= mysql_init(NULL); + + my_test_connect(mysql, hostname, "foo", "foo", schema, + port, socketname, 0); + + FAIL_IF(!mysql_errno(mysql), "Error expected"); + mysql_close(mysql); + + mysql= mysql_init(NULL); + mysql_optionsv(mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, &expire); + + my_test_connect(mysql, hostname, "foo", "foo", schema, + port, socketname, 0); + + rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int)"); + + diag("error: %d %s", mysql_errno(mysql), mysql_error(mysql)); + FAIL_IF(mysql_errno(mysql) != ER_MUST_CHANGE_PASSWORD, "Error 1820 expected"); + + rc= mysql_query(mysql, "SET PASSWORD=PASSWORD('foobar')"); + check_mysql_rc(rc, mysql); + rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int)"); + check_mysql_rc(rc, mysql); + + sprintf(query, "DROP USER 'foo'@'%s'", this_host); + rc= mysql_query(my, query); + check_mysql_rc(rc, my); + + mysql_close(mysql); + return OK; +} + struct my_tests_st my_tests[] = { + {"test_expired_pw", test_expired_pw, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_conc276", test_conc276, TEST_CONNECTION_NONE, 0, NULL, NULL}, {"test_mdev13100", test_mdev13100, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_auth256", test_auth256, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},