Commit dc1365d6 authored by Aditya A's avatar Aditya A

Bug#16287752 INNODB_DATA_FILE_PATH MINIMUM SIZE

                IN DOCUMENTATION
Problem 
-------
The documentation says that we support 'K' prefix 
while specifiying size for innodb datafile in the
server variable for innodb_data_file_path ,but the
function srv_parse_megabytes() only handles only 
'M' (megabytes) and 'G' (gigabytes) .

Fix
---
Modify srv_parse_megabytes() to handle Kilobytes. 

Add in documentation that while specifying size 
in KB it should be mentioned in multiples of 1024
other wise they will be rounded off to nearest
MB (megabyte) boundry .(eg if size mentioned
as 2313KB will be considered as 2 MB ).

[ Approved by Marko #rb 2387 ]
parent 634bb833
......@@ -2343,7 +2343,8 @@ innobase_init(
internal_innobase_data_file_path);
if (ret == FALSE) {
sql_print_error(
"InnoDB: syntax error in innodb_data_file_path");
"InnoDB: syntax error in innodb_data_file_path"
" or size specified is less than 1 megabyte");
mem_free_and_error:
srv_free_paths_and_sizes();
my_free(internal_innobase_data_file_path);
......
......@@ -147,7 +147,7 @@ UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key;
#endif /* UNIV_PFS_THREAD */
/*********************************************************************//**
Convert a numeric string that optionally ends in G or M, to a number
Convert a numeric string that optionally ends in G or M or K, to a number
containing megabytes.
@return next character in string */
static
......@@ -171,6 +171,10 @@ srv_parse_megabytes(
case 'M': case 'm':
str++;
break;
case 'K': case 'k':
size /= 1024;
str++;
break;
default:
size /= 1024 * 1024;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment