summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-15 18:41:36 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-15 18:41:36 +0300
commitdc2b6e456fb16685a4191537bf83e1161cb28d93 (patch)
tree5e1353fbc40fec5669ada6707abc2aa491ec80aa /sql
parent68f972b5d470eed86347f0948fbf672d52ee1a5d (diff)
downloadmariadb-git-dc2b6e456fb16685a4191537bf83e1161cb28d93.tar.gz
Fixed some things to make MySQL to compile again.
libmysqld/lib_sql.cc: Fix to make the embedded server compile with the new USER_REOSURCEs. sql/sql_acl.cc: Fixed wrong test in password checking. sql/sql_cache.cc: Fixed wrong cast sql/sql_parse.cc: Cleanup
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_acl.cc9
-rw-r--r--sql/sql_cache.cc2
-rw-r--r--sql/sql_parse.cc4
3 files changed, 7 insertions, 8 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 97cd02e5032..9c2eb9feb69 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1180,20 +1180,17 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
char *password,empty_string[1];
DBUG_ENTER("replace_user_table");
+ password=empty_string;
+ empty_string[0]=0;
if (combo.password.str && combo.password.str[0])
{
- if (combo.password.length <= HASH_PASSWORD_LENGTH)
+ if (combo.password.length != HASH_PASSWORD_LENGTH)
{
send_error(&thd->net, ER_PASSWORD_NO_MATCH);
DBUG_RETURN(1);
}
password=combo.password.str;
}
- else
- {
- password=empty_string;
- empty_string[0]=0;
- }
table->field[0]->store(combo.host.str,combo.host.length);
table->field[1]->store(combo.user.str,combo.user.length);
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 69b0f6bb3a5..87ca7003b7b 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1071,7 +1071,7 @@ void Query_cache::invalidate(CHANGED_TABLE_LIST *tables_used)
DUMP(this);
for ( ; tables_used; tables_used=tables_used->next)
{
- invalidate_table((uchar *) tables_used->key, tables_used->key_length);
+ invalidate_table((byte*) tables_used->key, tables_used->key_length);
DBUG_PRINT("qcache", (" db %s, table %s", tables_used->key,
tables_used->table_name));
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index af68c1bb9f3..315c4b85a1c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -242,7 +242,8 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
db ? db : (char*) "");
thd->db_access=0;
/* Don't allow user to connect if he has done too many queries */
- if ((ur.questions || ur.updates || ur.connections) && get_or_create_user_conn(thd,user,thd->host_or_ip,&ur))
+ if ((ur.questions || ur.updates || ur.connections) &&
+ get_or_create_user_conn(thd,user,thd->host_or_ip,&ur))
return -1;
if (thd->user_connect && thd->user_connect->user_resources.connections &&
check_for_max_user_connections(thd->user_connect))
@@ -259,6 +260,7 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
return 0; // ok
}
+
/*
Check for maximum allowable user connections, if the mysqld server is
started with corresponding variable that is greater then 0.