summaryrefslogtreecommitdiff
path: root/sql/parse_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/parse_file.cc')
-rw-r--r--sql/parse_file.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index 1cd294c1c7a..b091259d273 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -136,7 +136,7 @@ static ulonglong view_algo_from_frm(ulonglong val)
static my_bool
-write_parameter(IO_CACHE *file, uchar* base, File_option *parameter)
+write_parameter(IO_CACHE *file, const uchar* base, File_option *parameter)
{
char num_buf[20]; // buffer for numeric operations
// string for numeric operations
@@ -248,8 +248,9 @@ write_parameter(IO_CACHE *file, uchar* base, File_option *parameter)
my_bool
-sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name,
- const LEX_STRING *type,
+sql_create_definition_file(const LEX_CSTRING *dir,
+ const LEX_CSTRING *file_name,
+ const LEX_CSTRING *type,
uchar* base, File_option *parameters)
{
File handler;
@@ -399,7 +400,7 @@ my_bool rename_in_schema_file(THD *thd,
*/
File_parser *
-sql_parse_prepare(const LEX_STRING *file_name, MEM_ROOT *mem_root,
+sql_parse_prepare(const LEX_CSTRING *file_name, MEM_ROOT *mem_root,
bool bad_format_errors)
{
MY_STAT stat_info;
@@ -598,13 +599,13 @@ read_escaped_string(const char *ptr, const char *eol, LEX_STRING *str)
const char *
parse_escaped_string(const char *ptr, const char *end, MEM_ROOT *mem_root,
- LEX_STRING *str)
+ LEX_CSTRING *str)
{
const char *eol= strchr(ptr, '\n');
if (eol == 0 || eol >= end ||
!(str->str= (char*) alloc_root(mem_root, (eol - ptr) + 1)) ||
- read_escaped_string(ptr, eol, str))
+ read_escaped_string(ptr, eol, (LEX_STRING*) str))
return 0;
return eol+1;
@@ -802,7 +803,7 @@ File_parser::parse(uchar* base, MEM_ROOT *mem_root,
case FILE_OPTIONS_ESTRING:
{
if (!(ptr= parse_escaped_string(ptr, end, mem_root,
- (LEX_STRING *)
+ (LEX_CSTRING *)
(base + parameter->offset))))
{
my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0),