1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Fixed compiler warnings

Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
Fixed some memory leaks
This commit is contained in:
monty@mysql.com
2006-05-04 19:39:47 +03:00
parent 3ddc1f9956
commit c10f37673c
21 changed files with 142 additions and 134 deletions

View File

@@ -168,8 +168,6 @@ void lex_start(THD *thd, const uchar *buf, uint length)
lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc;
lex->select_lex.group_list.empty();
lex->select_lex.order_list.empty();
lex->current_select= &lex->select_lex;
lex->yacc_yyss=lex->yacc_yyvs=0;
lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE);
lex->sql_command= lex->orig_sql_command= SQLCOM_END;
lex->duplicates= DUP_ERROR;
@@ -197,8 +195,15 @@ void lex_start(THD *thd, const uchar *buf, uint length)
void lex_end(LEX *lex)
{
x_free(lex->yacc_yyss);
x_free(lex->yacc_yyvs);
DBUG_ENTER("lex_end");
if (lex->yacc_yyss)
{
my_free(lex->yacc_yyss, MYF(0));
my_free(lex->yacc_yyvs, MYF(0));
lex->yacc_yyss= 0;
lex->yacc_yyvs= 0;
}
DBUG_VOID_RETURN;
}
@@ -1633,7 +1638,8 @@ void st_select_lex::print_limit(THD *thd, String *str)
*/
st_lex::st_lex()
:result(0), sql_command(SQLCOM_END), query_tables_own_last(0)
:result(0), yacc_yyss(0), yacc_yyvs(0),
sql_command(SQLCOM_END), query_tables_own_last(0)
{
hash_init(&sroutines, system_charset_info, 0, 0, 0, sp_sroutine_key, 0, 0);
sroutines_list.empty();