Below is the list of changes that have just been committed into a local
5.2 repository of emurphy. When emurphy 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, 2006-08-30 14:14:11-04:00, elliot@scared.(none) +5 -0
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into scared.(none):/home/emurphy/src/mysql/mysql-5.2
MERGE: 1.2280.1.7
configure.in@stripped, 2006-08-30 14:14:07-04:00, elliot@scared.(none) +0 -0
Auto merged
MERGE: 1.330.1.48
sql/ha_innodb.cc@stripped, 2006-08-30 14:14:07-04:00, elliot@scared.(none) +0 -0
Auto merged
MERGE: 1.257.2.29
sql/handler.cc@stripped, 2006-08-30 14:14:07-04:00, elliot@scared.(none) +0 -0
Auto merged
MERGE: 1.215.2.47
sql/item.cc@stripped, 2006-08-30 14:14:07-04:00, elliot@scared.(none) +0 -0
Auto merged
MERGE: 1.167.1.38
sql/sql_trigger.cc@stripped, 2006-08-30 14:14:07-04:00, elliot@scared.(none) +0 -0
Auto merged
MERGE: 1.46.1.20
# 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: elliot
# Host: scared.(none)
# Root: /home/emurphy/src/mysql/mysql-5.2/RESYNC
--- 1.352/configure.in 2006-08-30 14:14:17 -04:00
+++ 1.353/configure.in 2006-08-30 14:14:17 -04:00
@@ -2140,65 +2140,15 @@
# Has to be done late, as the plugin may need to check for existence of
# functions tested above
#--------------------------------------------------------------------
-
-MYSQL_STORAGE_ENGINE(blackhole,,[Blackhole Storage Engine],
- [Basic Write-only Read-never tables], [max,max-no-ndb])
-MYSQL_PLUGIN_DIRECTORY(blackhole, [storage/blackhole])
-MYSQL_PLUGIN_STATIC(blackhole, [libblackhole.a])
-MYSQL_PLUGIN_DYNAMIC(blackhole, [ha_blackhole.la])
-
-MYSQL_STORAGE_ENGINE(csv,, [CSV Storage Engine],
- [Stores tables in text CSV format])
-MYSQL_PLUGIN_DIRECTORY(csv, [storage/csv])
-MYSQL_PLUGIN_STATIC(csv, [libcsv.a])
-MYSQL_PLUGIN_MANDATORY(csv) dnl Used for logging
-
-MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine],
- [Connects to tables on remote MySQL servers], [max,max-no-ndb])
-
MYSQL_PLUGIN(ftexample, [Simple Parser],
[Simple full-text parser plugin])
MYSQL_PLUGIN_DIRECTORY(ftexample, [plugin/fulltext])
MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la])
-MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine],
- [Volatile memory based tables])
-MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap])
-MYSQL_PLUGIN_STATIC(heap, [libheap.a])
-MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables
-
-MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine],
- [Transactional Tables using InnoDB], [max,max-no-ndb])
-MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase])
-MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
-MYSQL_PLUGIN_ACTIONS(innobase, [
- AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
- AC_SUBST(innodb_system_libs)
-])
-
-MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine],
- [Traditional non-transactional MySQL tables])
-MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam])
-MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a])
-MYSQL_PLUGIN_MANDATORY(myisam) dnl Default
-
-MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine],
- [Merge multiple MySQL tables into one])
-MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg])
-MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a])
-MYSQL_PLUGIN_MANDATORY(myisammrg)
-
-MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine],
- [High Availability Clustered tables], [max])
-MYSQL_PLUGIN_DIRECTORY(ndbcluster,[storage/ndb])
-MYSQL_PLUGIN_STATIC(ndbcluster, [[\$(ndbcluster_libs) \$(ndbcluster_system_libs) \$(NDB_SCI_LIBS)]])
-MYSQL_PLUGIN_ACTIONS(ndbcluster,[MYSQL_SETUP_NDBCLUSTER])
-
MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support],
[MySQL Partitioning Support], [max,max-no-ndb])
dnl -- ndbcluster requires partition to be enabled
-MYSQL_PLUGIN_DEPENDS(ndbcluster, [partition])
MYSQL_CONFIGURE_PLUGINS([none])
--- 1.226/sql/handler.cc 2006-08-30 14:14:17 -04:00
+++ 1.227/sql/handler.cc 2006-08-30 14:14:17 -04:00
@@ -23,9 +23,6 @@
#include "mysql_priv.h"
#include "rpl_filter.h"
-#include "ha_heap.h"
-#include "ha_myisam.h"
-#include "ha_myisammrg.h"
#include <myisampack.h>
@@ -40,10 +37,6 @@
#include "ha_partition.h"
#endif
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
-#include "ha_innodb.h"
-#endif
-
/*
While we have legacy_db_type, we have this array to
check for dups and to find handlerton from legacy_db_type.
@@ -72,10 +65,10 @@
static const LEX_STRING sys_table_aliases[]=
{
- {(char*)STRING_WITH_LEN("INNOBASE")}, {(char*)STRING_WITH_LEN("INNODB")},
- {(char*)STRING_WITH_LEN("NDB")}, {(char*)STRING_WITH_LEN("NDBCLUSTER")},
- {(char*)STRING_WITH_LEN("HEAP")}, {(char*)STRING_WITH_LEN("MEMORY")},
- {(char*)STRING_WITH_LEN("MERGE")}, {(char*)STRING_WITH_LEN("MRG_MYISAM")},
+ { C_STRING_WITH_LEN("INNOBASE") }, { C_STRING_WITH_LEN("INNODB") },
+ { C_STRING_WITH_LEN("NDB") }, { C_STRING_WITH_LEN("NDBCLUSTER") },
+ { C_STRING_WITH_LEN("HEAP") }, { C_STRING_WITH_LEN("MEMORY") },
+ { C_STRING_WITH_LEN("MERGE") }, { C_STRING_WITH_LEN("MRG_MYISAM") },
{NullS, 0}
};
@@ -437,6 +430,12 @@
savepoint_alloc_size+= tmp;
hton->slot= total_ha++;
hton2plugin[hton->slot]=plugin;
+ /* This is just a temp need until plugin/engine startup is fixed */
+ if (plugin->plugin->status_vars)
+ {
+ add_status_vars(plugin->plugin->status_vars);
+ }
+
if (hton->prepare)
total_ha_2pc++;
break;
@@ -2706,18 +2705,41 @@
>0 : error. frmblob and frmlen may not be set
*/
+typedef struct st_discover_args
+{
+ const char *db;
+ const char *name;
+ const void** frmblob;
+ uint* frmlen;
+};
+
+static my_bool discover_handlerton(THD *thd, st_plugin_int *plugin,
+ void *arg)
+{
+ st_discover_args *vargs= (st_discover_args *)arg;
+ handlerton *hton= (handlerton *)plugin->data;
+ if (hton->state == SHOW_OPTION_YES && hton->discover &&
+ (!(hton->discover(thd, vargs->db, vargs->name, vargs->frmblob, vargs->frmlen))))
+ return TRUE;
+
+ return FALSE;
+}
+
int ha_discover(THD *thd, const char *db, const char *name,
const void **frmblob, uint *frmlen)
{
int error= -1; // Table does not exist in any handler
DBUG_ENTER("ha_discover");
DBUG_PRINT("enter", ("db: %s, name: %s", db, name));
+ st_discover_args args= {db, name, frmblob, frmlen};
+
if (is_prefix(name,tmp_file_prefix)) /* skip temporary tables */
DBUG_RETURN(error);
-#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
- if (have_ndbcluster == SHOW_OPTION_YES)
- error= ndbcluster_discover(thd, db, name, frmblob, frmlen);
-#endif
+
+ if (plugin_foreach(thd, discover_handlerton,
+ MYSQL_STORAGE_ENGINE_PLUGIN, &args))
+ error= 0;
+
if (!error)
statistic_increment(thd->status_var.ha_discover_count,&LOCK_status);
DBUG_RETURN(error);
@@ -3516,7 +3538,7 @@
/* Check that we have called all proper delallocation functions */
DBUG_ASSERT((byte*) table->def_read_set.bitmap +
table->s->column_bitmap_size ==
- (char*) table->def_write_set.bitmap);
+ (byte*) table->def_write_set.bitmap);
DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set));
DBUG_ASSERT(table->key_read == 0);
/* ensure that ha_index_end / ha_rnd_end has been called */
--- 1.181/sql/item.cc 2006-08-30 14:14:17 -04:00
+++ 1.182/sql/item.cc 2006-08-30 14:14:17 -04:00
@@ -1004,7 +1004,7 @@
*****************************************************************************/
Item_case_expr::Item_case_expr(int case_expr_id)
- :Item_sp_variable((char *) STRING_WITH_LEN("case_expr")),
+ :Item_sp_variable( C_STRING_WITH_LEN("case_expr")),
m_case_expr_id(case_expr_id)
{
}
--- 1.57/sql/sql_trigger.cc 2006-08-30 14:14:17 -04:00
+++ 1.58/sql/sql_trigger.cc 2006-08-30 14:14:17 -04:00
@@ -22,7 +22,7 @@
#include "parse_file.h"
static const LEX_STRING triggers_file_type=
- {(char *) STRING_WITH_LEN("TRIGGERS")};
+ { C_STRING_WITH_LEN("TRIGGERS") };
const char * const triggers_file_ext= ".TRG";
@@ -35,17 +35,17 @@
static File_option triggers_file_parameters[]=
{
{
- {(char *) STRING_WITH_LEN("triggers") },
+ { C_STRING_WITH_LEN("triggers") },
offsetof(class Table_triggers_list, definitions_list),
FILE_OPTIONS_STRLIST
},
{
- {(char *) STRING_WITH_LEN("sql_modes") },
+ { C_STRING_WITH_LEN("sql_modes") },
offsetof(class Table_triggers_list, definition_modes_list),
FILE_OPTIONS_ULLLIST
},
{
- {(char *) STRING_WITH_LEN("definers") },
+ { C_STRING_WITH_LEN("definers") },
offsetof(class Table_triggers_list, definers_list),
FILE_OPTIONS_STRLIST
},
@@ -54,7 +54,7 @@
File_option sql_modes_parameters=
{
- {(char*) STRING_WITH_LEN("sql_modes") },
+ { C_STRING_WITH_LEN("sql_modes") },
offsetof(class Table_triggers_list, definition_modes_list),
FILE_OPTIONS_ULLLIST
};
@@ -78,14 +78,14 @@
};
static const LEX_STRING trigname_file_type=
- {(char *) STRING_WITH_LEN("TRIGGERNAME")};
+ { C_STRING_WITH_LEN("TRIGGERNAME") };
const char * const trigname_file_ext= ".TRN";
static File_option trigname_file_parameters[]=
{
{
- {(char *) STRING_WITH_LEN("trigger_table")},
+ { C_STRING_WITH_LEN("trigger_table")},
offsetof(struct st_trigname, trigger_table),
FILE_OPTIONS_ESTRING
},
@@ -95,15 +95,15 @@
const LEX_STRING trg_action_time_type_names[]=
{
- { (char *) STRING_WITH_LEN("BEFORE") },
- { (char *) STRING_WITH_LEN("AFTER") }
+ { C_STRING_WITH_LEN("BEFORE") },
+ { C_STRING_WITH_LEN("AFTER") }
};
const LEX_STRING trg_event_type_names[]=
{
- { (char *) STRING_WITH_LEN("INSERT") },
- { (char *) STRING_WITH_LEN("UPDATE") },
- { (char *) STRING_WITH_LEN("DELETE") }
+ { C_STRING_WITH_LEN("INSERT") },
+ { C_STRING_WITH_LEN("UPDATE") },
+ { C_STRING_WITH_LEN("DELETE") }
};
--- 1.267/sql/ha_innodb.cc 2006-08-30 14:14:17 -04:00
+++ 1.268/sql/ha_innodb.cc 2006-08-30 14:14:17 -04:00
@@ -42,8 +42,6 @@
#define MAX_ULONG_BIT ((ulong) 1 << (sizeof(ulong)*8-1))
-#ifdef WITH_INNOBASE_STORAGE_ENGINE
-
#include "ha_innodb.h"
pthread_mutex_t innobase_share_mutex, /* to protect innobase_open_files */
@@ -311,7 +309,8 @@
(char*) &export_vars.innodb_rows_read, SHOW_LONG},
{"rows_updated",
(char*) &export_vars.innodb_rows_updated, SHOW_LONG},
- {NullS, NullS, SHOW_LONG}};
+ {NullS, NullS, SHOW_LONG}
+};
/* General functions */
@@ -2916,7 +2915,6 @@
CHARSET_INFO* cs;
ulint key_len;
- ulint len;
ulint true_len;
int error=0;
ulint blob_len;
@@ -7599,6 +7597,19 @@
return COMPATIBLE_DATA_YES;
}
+static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff)
+{
+ innodb_export_status();
+ var->type= SHOW_ARRAY;
+ var->value= (char *) &innodb_status_variables;
+ return 0;
+}
+
+SHOW_VAR innodb_status_variables_export[]= {
+ {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
+ {NullS, NullS, SHOW_LONG}
+};
+
struct st_mysql_storage_engine innobase_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, &innobase_hton};
@@ -7612,9 +7623,7 @@
innobase_init, /* Plugin Init */
NULL, /* Plugin Deinit */
0x0100 /* 1.0 */,
- 0
+ innodb_status_variables_export
}
mysql_declare_plugin_end;
-
-#endif
| Thread |
|---|
| • bk commit into 5.2 tree (elliot:1.2282) | Elliot Murphy | 30 Aug |