-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDEV-40167 - GTT created with the InnoDB incorrectly accept FULLTEXT/VECTOR indexes #5318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bb-main-global-tmp
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -877,9 +877,11 @@ create global temporary table t (t text); | |
| set max_session_mem_used= 8192; | ||
| --error ER_OPTION_PREVENTS_STATEMENT | ||
| insert t values (0); | ||
| --error ER_OPTION_PREVENTS_STATEMENT | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test was about to check ALTER TABLE under locked table. Now the table won't be locked. Maybe raise the memory limit? |
||
| lock table t write; | ||
| --error ER_OPTION_PREVENTS_STATEMENT | ||
| alter table t add z int; | ||
| --error 0, ER_OPTION_PREVENTS_STATEMENT | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why it's sometimes 0, and sometimes ER_OPTION_PREVENTS_STATEMENT?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why it's sometimes 0, and sometimes ER_OPTION_PREVENTS_STATEMENT? |
||
| set max_session_mem_used= default; | ||
| drop table t; | ||
| unlock tables; | ||
|
|
@@ -1234,3 +1236,16 @@ drop table mysql.help_topic; | |
| rename table mysql.help_topic1 to mysql.help_topic; | ||
|
|
||
| --disconnect con1 | ||
|
|
||
| --echo # MDEV-40167 - GTT created with the InnoDB incorrectly accept FULLTEXT/VECTOR indexes | ||
|
|
||
| --error ER_NO_INDEX_ON_TEMPORARY | ||
| CREATE GLOBAL TEMPORARY TABLE gtt (id INT PRIMARY KEY, body TEXT, FULLTEXT (body)) | ||
| ENGINE=InnoDB ON COMMIT PRESERVE ROWS; | ||
|
|
||
| --error ER_NO_INDEX_ON_TEMPORARY | ||
| CREATE GLOBAL TEMPORARY TABLE gtt_v (id INT PRIMARY KEY, v VECTOR (4) NOT NULL, VECTOR INDEX (v)) | ||
| ENGINE=InnoDB ON COMMIT PRESERVE ROWS; | ||
|
|
||
| --error ER_UNSUPPORTED_COMPRESSED_TABLE | ||
| CREATE GLOBAL TEMPORARY TABLE gtt (id INT ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ON COMMIT PRESERVE ROWS; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6748,7 +6748,7 @@ int ha_create_table(THD *thd, const char *path, const char *db, | |
| // open an frm file | ||
| share.db_plugin= ha_lock_engine(thd, create_info->db_type); | ||
|
|
||
| if (open_table_def(thd, &share)) | ||
| if (open_table_def(thd, &share) || thd->killed) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please explain, how thd->killed could be set here, while open_table_def returns 0? I guess it's set by memory overflow, right?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please explain, how thd->killed could be set here, while open_table_def returns 0? I guess it's set by memory overflow, right? |
||
| goto err; | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2672,7 +2672,7 @@ Locked_tables_list::init_locked_tables(THD *thd) | |
| &db.str, (size_t) db.length + 1, | ||
| &table_name.str, (size_t) table_name.length + 1, | ||
| &alias.str, (size_t) alias.length + 1, | ||
| NullS)) | ||
| NullS) || thd->killed) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same. This definitely needs explanation. Does it mean that every alloc_root needs thd->killed check
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same. This definitely needs explanation. Does it mean that every alloc_root needs thd->killed check? |
||
| { | ||
| reset(); | ||
| return TRUE; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test was about to check ALTER TABLE under locked table. Now the table won't be locked. Maybe raise the memory?