1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-22 08:22:01 +03:00

Fix for UNION and LEFT JOIN (Bug #386)

Fixed wrong logging of Access denied error (Bug #398)


include/my_global.h:
  Fix for QNX
mysql-test/r/union.result:
  new test case
mysql-test/t/union.test:
  Test of bug in union and left join
mysys/my_seek.c:
  Safety fix to find out when pos gets a wrong value
sql/field.h:
  Fix for UNION and LEFT JOIN
sql/mysql_priv.h:
  Fix for UNION and LEFT JOIN
sql/sql_base.cc:
  Fix for UNION and LEFT JOIN
sql/sql_insert.cc:
  Fix for UNION and LEFT JOIN
sql/sql_parse.cc:
  Fixed wrong logging of Access denied error
sql/sql_union.cc:
  Fix for UNION and LEFT JOIN
sql/sql_update.cc:
  Fix for UNION and LEFT JOIN
This commit is contained in:
unknown
2003-05-13 18:58:26 +03:00
parent 4ccf66df87
commit dc1e55f819
11 changed files with 150 additions and 21 deletions

View File

@ -196,9 +196,17 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
thd->db=0;
thd->db_length=0;
USER_RESOURCES ur;
char tmp_passwd[SCRAMBLE_LENGTH];
if (passwd[0] && strlen(passwd) != SCRAMBLE_LENGTH)
return 1;
/*
Move password to temporary buffer as it may be stored in communication
buffer
*/
strmov(tmp_passwd, passwd);
passwd= tmp_passwd; // Use local copy
if (!(thd->user = my_strdup(user, MYF(0))))
{
send_error(net,ER_OUT_OF_RESOURCES);
@ -264,6 +272,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
}
else
send_ok(net); // Ready to handle questions
thd->password= test(passwd[0]); // Remember for error messages
return 0; // ok
}
@ -617,7 +626,6 @@ check_connections(THD *thd)
net->read_timeout=(uint) thd->variables.net_read_timeout;
if (check_user(thd,COM_CONNECT, user, passwd, db, 1))
return (-1);
thd->password=test(passwd[0]);
return 0;
}
@ -1007,7 +1015,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
decrease_user_connections(save_uc);
x_free((gptr) save_db);
x_free((gptr) save_user);
thd->password=test(passwd[0]);
break;
}