1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

ADD CONSTRAINT IF NOT EXISTS didn't work in SP

"if not exists" must be stored in a separate read-only property
This commit is contained in:
Sergei Golubchik
2022-11-03 19:17:25 +01:00
parent a5eff044cb
commit cce76fef38
5 changed files with 54 additions and 5 deletions

View File

@ -558,7 +558,6 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
#define VCOL_AUTO_INC 16
#define VCOL_IMPOSSIBLE 32
#define VCOL_NEXTVAL 64 /* NEXTVAL is not implemented for vcols */
#define VCOL_CHECK_CONSTRAINT_IF_NOT_EXISTS 128
#define VCOL_NOT_STRICTLY_DETERMINISTIC \
(VCOL_NON_DETERMINISTIC | VCOL_TIME_FUNC | VCOL_SESSION_FUNC)
@ -590,6 +589,7 @@ public:
bool stored_in_db;
bool utf8; /* Already in utf8 */
bool automatic_name;
bool if_not_exists;
Item *expr;
Lex_ident name; /* Name of constraint */
/* see VCOL_* (VCOL_FIELD_REF, ...) */