Below is the list of changes that have just been committed into a local
5.1 repository of antony. When antony 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, 2007-06-12 19:28:05-07:00, antony@stripped +1 -0
Bug#25800
"Embedded server requires mysql.plugin"
Embedded builds should not print any error when the mysql.plugin
table does not exist. This is achieved by checking for the existance
of the mysql.plugin table before attempting to open it and proceed
silently if it does not exist.
sql/sql_plugin.cc@stripped, 2007-06-12 19:28:00-07:00, antony@stripped +22 -0
bug25800
Embedded builds should not print any error when the mysql.plugin
table does not exist. This is achieved by checking for the existance
of the mysql.plugin table before attempting to open it and proceed
silently if it does not exist.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: antony
# Host: ppcg5.local
# Root: /Users/antony/Work/p2-bug25800.6
--- 1.67/sql/sql_plugin.cc 2007-06-12 19:28:14 -07:00
+++ 1.68/sql/sql_plugin.cc 2007-06-12 19:28:14 -07:00
@@ -210,6 +210,11 @@ static void reap_plugins(void);
/* declared in set_var.cc */
extern sys_var *intern_find_sys_var(const char *str, uint length, bool no_error);
+#ifdef EMBEDDED_LIBRARY
+/* declared in sql_base.cc */
+extern bool check_if_table_exists(THD *thd, TABLE_LIST *table, bool *exists);
+#endif /* EMBEDDED_LIBRARY */
+
/****************************************************************************
Value type thunks, allows the C world to play in the C++ world
@@ -1299,6 +1304,9 @@ static void plugin_load(MEM_ROOT *tmp_ro
READ_RECORD read_record_info;
int error;
THD *new_thd;
+#ifdef EMBEDDED_LIBRARY
+ bool table_exists;
+#endif /* EMBEDDED_LIBRARY */
DBUG_ENTER("plugin_load");
if (!(new_thd= new THD))
@@ -1315,6 +1323,20 @@ static void plugin_load(MEM_ROOT *tmp_ro
tables.alias= tables.table_name= (char*)"plugin";
tables.lock_type= TL_READ;
tables.db= new_thd->db;
+
+#ifdef EMBEDDED_LIBRARY
+ /*
+ When building an embedded library, if the mysql.plugin table
+ does not exist, we silently ignore the missing table
+ */
+ pthread_mutex_lock(&LOCK_open);
+ if (check_if_table_exists(new_thd, &tables, &table_exists))
+ table_exists= FALSE;
+ pthread_mutex_unlock(&LOCK_open);
+ if (!table_exists)
+ goto end;
+#endif /* EMBEDDED_LIBRARY */
+
if (simple_open_n_lock_tables(new_thd, &tables))
{
DBUG_PRINT("error",("Can't open plugin table"));
| Thread |
|---|
| • bk commit into 5.1 tree (antony:1.2547) BUG#25800 | antony | 13 Jun |