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

Fixed memory reference errors found by valgrind

This commit is contained in:
monty@mysql.com
2005-01-12 03:38:53 +02:00
parent 10f41d7cc4
commit 314cf993c6
15 changed files with 90 additions and 39 deletions

View File

@@ -1911,7 +1911,7 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
{
DBUG_ENTER("prepare_schema_table");
SELECT_LEX *sel= 0;
switch(schema_table_idx) {
switch (schema_table_idx) {
case SCH_SCHEMATA:
#if defined(DONT_ALLOW_SHOW_COMMANDS)
my_message(ER_NOT_ALLOWED_COMMAND,
@@ -1953,7 +1953,11 @@ int prepare_schema_table(THD *thd, LEX *lex, Table_ident *table_ident,
thd->priv_user, thd->priv_host, db);
DBUG_RETURN(1);
}
lex->select_lex.db= db;
/*
We need to do a copy to make this prepared statement safe if this
was thd->db
*/
lex->select_lex.db= thd->strdup(db);
break;
}
#endif