Skip to content

MDEV-39356: Server crashes when executing UPDATE ... FOR PORTION OF with a normal table#4954

Open
raghunandanbhat wants to merge 1 commit into11.8from
11.8-mdev-39356
Open

MDEV-39356: Server crashes when executing UPDATE ... FOR PORTION OF with a normal table#4954
raghunandanbhat wants to merge 1 commit into11.8from
11.8-mdev-39356

Conversation

@raghunandanbhat
Copy link
Copy Markdown
Contributor

fixes MDEV-39356

Problem:

Executing an UPDATE ... FOR PORTION OF statement on a table without a defined period results in assertion failure. The code in SELECT_LEX::period_setup_conds attempts to compare a NULL period name identifier using streq(), which triggers the assertion in strnncoll funtion.

Fix:

Replace streq with streq_safe in SELECT_LEX::period_setup_conds to handle NULL pointers safely via an early-exit.

… with a normal table

Problem:
  Executing an `UPDATE ... FOR PORTION OF` statement on a table without
  a defined period results in assertion failure. The code in
  `SELECT_LEX::period_setup_conds` attempts to compare a NULL
  period name identifier using `streq()`, which triggers the assertion
  in `strnncoll` funtion.

Fix:
  Replace `streq` with `streq_safe` in `SELECT_LEX::period_setup_conds`
  to handle NULL pointers safely via an early-exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant