Fix for no db in change_user
Fix for no db in change_user
This commit is contained in:
@ -1110,22 +1110,22 @@ int gw_send_change_user_to_backend(
|
|||||||
|
|
||||||
// add the user
|
// add the user
|
||||||
bytes += strlen(user);
|
bytes += strlen(user);
|
||||||
// the NULL
|
// NULL byte for user string
|
||||||
bytes++;
|
bytes++;
|
||||||
|
|
||||||
// next will be + 1 (scramble_len) + 20 (fixed_scramble) + (dbname + NULL term) + 2 bytes charset
|
// next will be + 1 (scramble_len) + 20 (fixed_scramble) + (dbname + NULL term) + 2 bytes charset
|
||||||
|
|
||||||
if (curr_passwd != NULL) {
|
if (curr_passwd != NULL) {
|
||||||
bytes += GW_MYSQL_SCRAMBLE_SIZE;
|
bytes += GW_MYSQL_SCRAMBLE_SIZE;
|
||||||
bytes++;
|
|
||||||
} else {
|
|
||||||
bytes++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (curr_db != NULL) {
|
|
||||||
bytes += strlen(curr_db);
|
|
||||||
bytes++;
|
|
||||||
}
|
}
|
||||||
|
// 1 byte for scramble_len
|
||||||
|
bytes++;
|
||||||
|
|
||||||
|
if (curr_db != NULL) {
|
||||||
|
bytes += strlen(curr_db);
|
||||||
|
}
|
||||||
|
// NULL byte for dbname string
|
||||||
|
bytes++;
|
||||||
|
|
||||||
// the charset
|
// the charset
|
||||||
bytes += 2;
|
bytes += 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user