Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-04-08 23:23:33+04:00, kostja@dipika.(none) +2 -0
A fix for Bug#34895 "'show procedure status' or 'show function status' +
'flush tables' crashes"
Don't add mysql.proc to the list of query tables to open when
executing SHOW PROCEDURE STATUS/SHOW FUNCTION STATUS. It will be opened
by I_S mechanisms anyway.
No test case since the bug is repeatable in a concurrent environment as well.
QQ: couldn't a similar double-open test case be constructed with
sub-statements?
QQ: Is there a way perhaps to add a test case?
sql/sql_yacc.yy@stripped, 2008-04-08 23:23:29+04:00, kostja@dipika.(none) +0 -4
A fix for Bug#34895: don't add mysql.proc to the list of query tables,
since it will be opened using I_S mechanisms. Double addition led
to the table being opened twice in the same connection.
storage/myisam/mi_dbug.c@stripped, 2008-04-08 23:23:30+04:00, kostja@dipika.(none) +4 -0
Use a myisam lock to protect iteration over all MyISAM shares.
diff -Nrup a/sql/sql_yacc.yy b/sql/sql_yacc.yy
--- a/sql/sql_yacc.yy 2008-03-26 12:13:08 +03:00
+++ b/sql/sql_yacc.yy 2008-04-08 23:23:29 +04:00
@@ -9344,8 +9344,6 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
- if (!sp_add_to_query_tables(YYTHD, lex, "mysql", "proc", TL_READ))
- MYSQL_YYABORT;
if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES))
MYSQL_YYABORT;
}
@@ -9353,8 +9351,6 @@ show_param:
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
- if (!sp_add_to_query_tables(YYTHD, lex, "mysql", "proc", TL_READ))
- MYSQL_YYABORT;
if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES))
MYSQL_YYABORT;
}
diff -Nrup a/storage/myisam/mi_dbug.c b/storage/myisam/mi_dbug.c
--- a/storage/myisam/mi_dbug.c 2006-12-31 03:06:39 +03:00
+++ b/storage/myisam/mi_dbug.c 2008-04-08 23:23:30 +04:00
@@ -172,6 +172,8 @@ my_bool check_table_is_closed(const char
LIST *pos;
DBUG_ENTER("check_table_is_closed");
+ pthread_mutex_lock(&THR_LOCK_myisam);
+
(void) fn_format(filename,name,"",MI_NAME_IEXT,4+16+32);
for (pos=myisam_open_list ; pos ; pos=pos->next)
{
@@ -183,10 +185,12 @@ my_bool check_table_is_closed(const char
{
fprintf(stderr,"Warning: Table: %s is open on %s\n", name,where);
DBUG_PRINT("warning",("Table: %s is open on %s", name,where));
+ pthread_mutex_unlock(&THR_LOCK_myisam);
DBUG_RETURN(1);
}
}
}
+ pthread_mutex_unlock(&THR_LOCK_myisam);
DBUG_RETURN(0);
}
#endif /* EXTRA_DEBUG */
| Thread |
|---|
| • bk commit into 5.1 tree (kostja:1.2591) BUG#34895 | konstantin | 8 Apr 2008 |