summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-12 15:56:28 +0200
committerunknown <monty@mysql.com>2004-03-12 15:56:28 +0200
commit6ee55bc32c632216445aa075139897ed7c9ac192 (patch)
treed9e1ef0e0d0db5a3231370d8bc23b268dedd6529
parent9a68815fe709237ede87742009f412fb9a1de070 (diff)
downloadmariadb-git-6ee55bc32c632216445aa075139897ed7c9ac192.tar.gz
Fixes to newly pushed code
-rw-r--r--sql/sql_db.cc4
-rw-r--r--sql/table.cc3
2 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index b5339f0d535..1217a909071 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -381,13 +381,13 @@ bool mysql_change_db(THD *thd,const char *name)
ulong db_access;
DBUG_ENTER("mysql_change_db");
- if (!dbname || !(db_length= strlength(dbname)))
+ if (!dbname || !(db_length= strlen(dbname)))
{
x_free(dbname); /* purecov: inspected */
send_error(&thd->net,ER_NO_DB_ERROR); /* purecov: inspected */
DBUG_RETURN(1); /* purecov: inspected */
}
- if ((db_length > NAME_LEN) || check_db_name(dbname))
+ if (check_db_name(dbname))
{
net_printf(&thd->net,ER_WRONG_DB_NAME, dbname);
x_free(dbname);
diff --git a/sql/table.cc b/sql/table.cc
index d7944e6dd80..01a09426634 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1216,10 +1216,11 @@ bool check_table_name(const char *name, uint length)
#endif
}
+
bool check_column_name(const char *name)
{
const char *start= name;
- bool last_char_is_space= false;
+ bool last_char_is_space= FALSE;
while (*name)
{