From e1de33c223eb1c267aeb5797be1e81f705718c47 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Feb 2006 04:05:18 -0600 Subject: [PATCH] bug# 17082 Client hangs when creating tables with partition This bug was only on Windows but we updated the call to create_temporary_file to match what is being done in other areas of MySQL sql/sql_partition.cc: the O_RDWR mode and MY_WME were used in this code before the switch was made to create_temp_file. The parameters are still there so we just plug in the mode and WME so the underlying code will create the temp file with the right mode. This only affected Windows. [This comment was from the first changset that I was unable to bk fix]. This changeset adds O_BINARY | O_TRUNC | O_TEMPORARY --- sql/sql_partition.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index abc3ce0f7f9..3d138b4e3d0 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -2397,8 +2397,9 @@ char *generate_partition_syntax(partition_info *part_info, DBUG_ENTER("generate_partition_syntax"); write_part_state= (part_info->part_state && !part_info->part_state_len); - if (unlikely(((fptr= create_temp_file(path,mysql_tmpdir,"psy", O_RDWR, - MYF(MY_WME)))) < 0)) + if (unlikely(((fptr= create_temp_file(path,mysql_tmpdir,"psy", + O_RDWR | O_BINARY | O_TRUNC | + O_TEMPORARY, MYF(MY_WME)))) < 0)) DBUG_RETURN(NULL); #ifndef __WIN__ unlink(path);