DRAFT - GTT created with the InnoDB incorrectly accept FULLTEXT/VECTOR indexes#5318
DRAFT - GTT created with the InnoDB incorrectly accept FULLTEXT/VECTOR indexes#5318pranavktiwari wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates ha_innodb.cc to block FULLTEXT indexes on global temporary tables by checking is_global_temp. However, the review feedback points out that the implementation is incomplete, as it does not block VECTOR indexes on global temporary tables, which was also part of the pull request's objective.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR tightens CREATE TABLE validation to treat GLOBAL TEMPORARY tables like TEMPORARY tables for certain InnoDB restrictions, addressing cases where InnoDB could incorrectly accept unsupported index/option combinations.
Changes:
- Disallow
DATA DIRECTORYand file-per-table-dependent options for GLOBAL TEMPORARY tables in InnoDB create option validation. - Reject FULLTEXT indexes on GLOBAL TEMPORARY tables in InnoDB table-flag derivation.
- Reject VECTOR indexes on GLOBAL TEMPORARY tables during create-table finalization.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| storage/innobase/handler/ha_innodb.cc | Extends InnoDB create-option and FULLTEXT validation to include GLOBAL TEMPORARY tables. |
| sql/sql_table.cc | Extends VECTOR-index temporary-table restriction to also cover GLOBAL TEMPORARY tables. |
Comments suppressed due to low confidence (1)
sql/sql_table.cc:3786
- This change extends the VECTOR-index temporary-table restriction to GLOBAL TEMPORARY tables, but there doesn’t appear to be mysql-test coverage for the GLOBAL TEMPORARY case (e.g., existing
mysql-test/main/vector.testonly coversCREATE TEMPORARY TABLE). Adding a regression test forCREATE GLOBAL TEMPORARY TABLE ... VECTOR INDEX ...would help prevent future regressions.
if (create_info->tmp_table() || create_info->global_tmp_table())
{
my_error(ER_NO_INDEX_ON_TEMPORARY, MYF(0), "VECTOR",
file->table_type());
DBUG_RETURN(TRUE);
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /* Do not use DATA DIRECTORY with TEMPORARY TABLE. */ | ||
| if (m_create_info->tmp_table()) { | ||
| push_warning( | ||
| m_thd, Sql_condition::WARN_LEVEL_WARN, | ||
| ER_ILLEGAL_HA_CREATE_OPTION, | ||
| "InnoDB: DATA DIRECTORY cannot be used" | ||
| " for TEMPORARY tables."); | ||
| if (m_create_info->tmp_table() || m_create_info->global_tmp_table()) { | ||
| push_warning( | ||
| m_thd, Sql_condition::WARN_LEVEL_WARN, | ||
| ER_ILLEGAL_HA_CREATE_OPTION, |
| const bool is_temp = m_create_info->tmp_table(); | ||
| const bool is_global_temp = m_create_info->global_tmp_table(); | ||
| bool zip_allowed = !is_temp; |
| /* Ignore the current innodb-file-per-table setting if we are | ||
| creating a temporary table (session or glo`bal). */ | ||
| m_use_file_per_table = m_allow_file_per_table | ||
| && !m_create_info->tmp_table() | ||
| && !m_create_info->global_tmp_table(); |
No description provided.