1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Avoid creating the .frm file twice in some cases

Other things:
- Updated code comments & fixed indentation
- Removed an old QQ (temporary) comment that does not apply anymore
This commit is contained in:
Monty
2021-03-18 12:48:20 +02:00
committed by Sergei Golubchik
parent 4832e54915
commit 249263525f
5 changed files with 34 additions and 22 deletions

View File

@ -5525,9 +5525,9 @@ int handler::calculate_checksum()
@retval
1 error
*/
int ha_create_table(THD *thd, const char *path,
const char *db, const char *table_name,
HA_CREATE_INFO *create_info, LEX_CUSTRING *frm)
int ha_create_table(THD *thd, const char *path, const char *db,
const char *table_name, HA_CREATE_INFO *create_info,
LEX_CUSTRING *frm, bool skip_frm_file)
{
int error= 1;
TABLE table;
@ -5543,8 +5543,8 @@ int ha_create_table(THD *thd, const char *path,
if (frm)
{
bool write_frm_now= !create_info->db_type->discover_table &&
!create_info->tmp_table();
bool write_frm_now= (!create_info->db_type->discover_table &&
!create_info->tmp_table() && !skip_frm_file);
share.frm_image= frm;