Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
10.4.8
-
Windows 10 64bits (xammp)
Description
If I execute this function 2 or 3 times (manually), the server CRASH.
the idea of the function is to search if a columns exists in 2 different tables
CREATE FUNCTION if_column_exists_normal_and_backup(tableNameToSearch TINYTEXT, |
columnNameToSearch TINYTEXT)
|
RETURNS BOOLEAN |
LANGUAGE SQL
|
BEGIN
|
SET @original = tableNameToSearch; |
SET @backup = CONCAT(tableNameToSearch, '_backup'); |
 |
RETURN ( |
exists(SELECT COLUMN_NAME |
FROM INFORMATION_SCHEMA.COLUMNS |
WHERE TABLE_NAME = @original |
AND COLUMN_NAME = `columnnametosearch` |
)
|
AND |
exists(SELECT COLUMN_NAME |
FROM INFORMATION_SCHEMA.COLUMNS |
WHERE TABLE_NAME = @backup |
AND COLUMN_NAME = `columnnametosearch` |
)
|
);
|
END |
Attachments
Issue Links
- relates to
-
MDEV-20290 Server crash in st_select_lex::cleanup or Assertion `sl->join == 0' failed in reinit_stmt_before_use
- Closed
-
MDEV-20803 IF NOT EXISTS AND NOT EXISTS crash DB server
- Closed
-
MDEV-21199 Segfault
- Closed