Commit b60a71c6 authored by unknown's avatar unknown

Fixed a bug in default.c, which caused quoted arguments not

being read correctly from my.cnf.

parent d8fd2ad9
...@@ -387,6 +387,8 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -387,6 +387,8 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
*ptr++= '='; *ptr++= '=';
for ( ; value != value_end; value++) for ( ; value != value_end; value++)
{ {
if (*value == '\"' || *value == '\'')
continue;
if (*value == '\\' && value != value_end-1) if (*value == '\\' && value != value_end-1)
{ {
switch(*++value) { switch(*++value) {
...@@ -405,6 +407,12 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -405,6 +407,12 @@ static int search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
case 's': case 's':
*ptr++= ' '; /* space */ *ptr++= ' '; /* space */
break; break;
case '\"':
*ptr++= '\"';
break;
case '\'':
*ptr++= '\'';
break;
case '\\': case '\\':
*ptr++= '\\'; *ptr++= '\\';
break; 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