-
Nayuta Yanagisawa authored
MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes The root cause of the bug MDEV-26139 is the lack of NULL checking on the variable `dq`. Comments on if (dq && (!sq || sq > dq)) {...} else {...}: * The if block corresponds to the case where parameters are quoted by double quotes. In that case, a single quote doesn't appear at all or only appears in the middle of double quotes. * The else block corresponds to the case where parameters are quoted by single quotes. In that case, a double quote doesn't appear at all or only appears in the middle of single quotes. * If the program reaches the if-else statement, `sq || dq` holds. Thus, the negation of `dq && (!sq || sq > dq)` is equivalent to `sq && (!dq || sq <= dq)`.
e3814a74