Skip to content

Commit

Permalink
Fixed check constraint cannot use CONTAINS text predicate (fixes #1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitko Iliev authored and pkleef committed Nov 20, 2023
1 parent a248b34 commit fe7d706
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libsrc/Wi/ddlrun.c
Expand Up @@ -3631,9 +3631,17 @@ ddl_table_check_constraints_define_triggers (query_instance_t * qi, caddr_t tb_n
{
ST *st = NULL;
ST *cmpd;
int dummy = 0;
query_t *qr;
local_cursor_t *lc = NULL;

if (ST_P (check_cond, BOP_NOT) && NULL != sqlc_contains_args (check_cond->_.bin_exp.left, &dummy))
{
if (qi)
QI_POISON_TRX (qi);
sqlr_new_error ("42000", "SR362", "Check constraint cannot use CONTAINS/XCONTAINS predicates");
}


if (qi)
{
Expand Down

0 comments on commit fe7d706

Please sign in to comment.