You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Fix for conc-77: Backslash escaped quotes (', "") are not parsed correctly
This commit is contained in:
@@ -351,6 +351,12 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
|
||||
case 's':
|
||||
*ptr++= ' '; /* space */
|
||||
break;
|
||||
case '\"':
|
||||
*ptr++= '\"';
|
||||
break;
|
||||
case '\'':
|
||||
*ptr++= '\'';
|
||||
break;
|
||||
case '\\':
|
||||
*ptr++= '\\';
|
||||
break;
|
||||
|
@@ -38,7 +38,7 @@ static int test_conc66(MYSQL *my)
|
||||
|
||||
fprintf(fp, "[conc-66]\n");
|
||||
fprintf(fp, "user=conc66\n");
|
||||
fprintf(fp, "password='test;#test'\n");
|
||||
fprintf(fp, "password='test\\\";#test'\n");
|
||||
|
||||
fclose(fp);
|
||||
|
||||
@@ -47,7 +47,7 @@ static int test_conc66(MYSQL *my)
|
||||
rc= mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, "./my.cnf");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_query(my, "GRANT ALL ON test.* TO 'conc66'@'localhost' IDENTIFIED BY 'test;#test'");
|
||||
rc= mysql_query(my, "GRANT ALL ON test.* TO 'conc66'@'localhost' IDENTIFIED BY 'test\";#test'");
|
||||
check_mysql_rc(rc, my);
|
||||
rc= mysql_query(my, "FLUSH PRIVILEGES");
|
||||
check_mysql_rc(rc, my);
|
||||
|
@@ -1,3 +0,0 @@
|
||||
[conc-66]
|
||||
user=conc66
|
||||
password='test;#test'
|
Reference in New Issue
Block a user