List:Commits« Previous MessageNext Message »
From:antony Date:December 21 2005 8:50pm
Subject:bk commit into 5.1 tree (acurtis:1.1976)
View as plain text  
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
  1.1976 05/12/21 12:50:50 acurtis@stripped +6 -0
  plugin version changes

  storage/example/ha_example.cc
    1.26 05/12/21 12:50:44 acurtis@stripped +2 -2
    rearrange version

  storage/csv/ha_tina.cc
    1.27 05/12/21 12:50:44 acurtis@stripped +2 -2
    rearrange version

  sql/sql_show.cc
    1.287 05/12/21 12:50:44 acurtis@stripped +35 -37
    version is a short, rearrange and show all

  sql/handler.h
    1.172 05/12/21 12:50:44 acurtis@stripped +1 -1
    version is kinda short

  sql/handler.cc
    1.198 05/12/21 12:50:44 acurtis@stripped +0 -17
    no version checks here

  include/plugin.h
    1.3 05/12/21 12:50:44 acurtis@stripped +2 -2
    relocate version

# 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:	acurtis
# Host:	ltantony.(none)
# Root:	/home/antony/work3/mysql-5.1-plugable-2

--- 1.197/sql/handler.cc	2005-12-21 10:24:56 -08:00
+++ 1.198/sql/handler.cc	2005-12-21 12:50:44 -08:00
@@ -401,23 +401,6 @@
   if (hton == NULL)
     DBUG_RETURN(1);
 
-  /* check major version */
-  if ((hton->interface_version>>24) != (MYSQL_HANDLERTON_INTERFACE_VERSION>>24))
-  {
-    sql_print_error("handlerton major version incompatible");
-    DBUG_PRINT("warning", ("handlerton major version incompatible"));
-    DBUG_RETURN(1);
-  }
-
-  /* check minor version */
-  if ((hton->interface_version>>16)&0xff < 
-        (MYSQL_HANDLERTON_INTERFACE_VERSION>>16)&0xff)
-  {
-    sql_print_error("handlerton minor version incompatible");
-    DBUG_PRINT("warning", ("handlerton minor version incompatible"));
-    DBUG_RETURN(1);
-  }
-
   switch (hton->state)
   {
   case SHOW_OPTION_NO:

--- 1.171/sql/handler.h	2005-12-21 10:24:57 -08:00
+++ 1.172/sql/handler.h	2005-12-21 12:50:44 -08:00
@@ -337,7 +337,7 @@
     handlerton structure version
    */
   const int interface_version;
-#define MYSQL_HANDLERTON_INTERFACE_VERSION 0x00000000
+#define MYSQL_HANDLERTON_INTERFACE_VERSION 0x0000
 
 
   /*

--- 1.286/sql/sql_show.cc	2005-12-21 10:24:59 -08:00
+++ 1.287/sql/sql_show.cc	2005-12-21 12:50:44 -08:00
@@ -101,8 +101,7 @@
 
 static int make_version_string(char *buf, int buf_length, uint version)
 {
-  return my_snprintf(buf, buf_length, "%d.%d.%d",
-                     (version>>24)&0xff, (version>>16)&0xff,version&0xffff);
+  return my_snprintf(buf, buf_length, "%d.%d", version>>8,version&0xff);
 }
 
 static my_bool show_plugins(THD *thd, st_plugin_int *plugin,
@@ -117,18 +116,23 @@
   restore_record(table, s->default_values);
 
   table->field[0]->store(plugin->name.str, plugin->name.length, cs);
+
+  table->field[1]->store(version_buf,
+        make_version_string(version_buf, sizeof(version_buf), plug->version),
+        cs);
+
     
   switch (plugin->state)
   {
   /* case PLUGIN_IS_FREED: does not happen */
   case PLUGIN_IS_DELETED:
-    table->field[1]->store(STRING_WITH_LEN("DELETED"), cs);
+    table->field[2]->store(STRING_WITH_LEN("DELETED"), cs);
     break;
   case PLUGIN_IS_UNINITIALIZED:
-    table->field[1]->store(STRING_WITH_LEN("INACTIVE"), cs);
+    table->field[2]->store(STRING_WITH_LEN("INACTIVE"), cs);
     break;
   case PLUGIN_IS_READY:
-    table->field[1]->store(STRING_WITH_LEN("ACTIVE"), cs);
+    table->field[2]->store(STRING_WITH_LEN("ACTIVE"), cs);
     break;
   default:
     DBUG_ASSERT(0);
@@ -137,63 +141,56 @@
   switch (plug->type)
   {
   case MYSQL_UDF_PLUGIN:
-    table->field[2]->store(STRING_WITH_LEN("UDF"), cs);
+    table->field[3]->store(STRING_WITH_LEN("UDF"), cs);
     break;
   case MYSQL_STORAGE_ENGINE_PLUGIN:
-    table->field[2]->store(STRING_WITH_LEN("STORAGE"), cs);
+    table->field[3]->store(STRING_WITH_LEN("STORAGE"), cs);
     break;
   case MYSQL_FTPARSER_PLUGIN:
-    table->field[2]->store(STRING_WITH_LEN("FTPARSER"), cs);
+    table->field[3]->store(STRING_WITH_LEN("FTPARSER"), cs);
     break;
   default:
-    table->field[2]->store(STRING_WITH_LEN("UNKNOWN"), cs);
+    table->field[3]->store(STRING_WITH_LEN("UNKNOWN"), cs);
     break;
   }
 
-  if (plug->version)
-  {
-    table->field[3]->store(version_buf,
-          make_version_string(version_buf, sizeof(version_buf), plug->version),
-          cs);
-    table->field[3]->set_notnull();
-  }
-  else
-    table->field[3]->set_null();
-
-  if (plug->info)
-  {
-    table->field[4]->store(version_buf,
-          make_version_string(version_buf, sizeof(version_buf), 
-                              *(uint *)plug->info), cs);
-    table->field[4]->set_notnull();
-  }
-  else
-    table->field[4]->set_null();
+  table->field[4]->store(version_buf,
+        make_version_string(version_buf, sizeof(version_buf), 
+                            *(uint *)plug->info), cs);
 
   if (plugin->plugin_dl)
   {
     table->field[5]->store(plugin->plugin_dl->dl.str, 
                            plugin->plugin_dl->dl.length, cs);
     table->field[5]->set_notnull();
+    table->field[6]->store(version_buf,
+          make_version_string(version_buf, sizeof(version_buf), 
+                              plugin->plugin_dl->version),
+          cs);
+    table->field[6]->set_notnull();
   }
   else
+  {
     table->field[5]->set_null();
-  
+    table->field[6]->set_null();
+  }
+
+
   if (plug->author)
   {
-    table->field[6]->store(plug->author, strlen(plug->author), cs);
-    table->field[6]->set_notnull();
+    table->field[7]->store(plug->author, strlen(plug->author), cs);
+    table->field[7]->set_notnull();
   }
   else
-    table->field[6]->set_null();
+    table->field[7]->set_null();
 
   if (plug->descr)
   {
-    table->field[7]->store(plug->descr, strlen(plug->descr), cs);
-    table->field[7]->set_notnull();
+    table->field[8]->store(plug->descr, strlen(plug->descr), cs);
+    table->field[8]->set_notnull();
   }
   else
-    table->field[7]->set_null();
+    table->field[8]->set_null();
 
   return schema_table_store_record(thd, table);
 }
@@ -4293,11 +4290,12 @@
 ST_FIELD_INFO plugin_fields_info[]=
 {
   {"PLUGIN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"},
+  {"PLUGIN_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0},
   {"PLUGIN_STATUS", 10, MYSQL_TYPE_STRING, 0, 0, "Status"},
   {"PLUGIN_TYPE", 10, MYSQL_TYPE_STRING, 0, 0, "Type"},
-  {"PLUGIN_VERSION", 20, MYSQL_TYPE_STRING, 0, 1, 0},
-  {"PLUGIN_TYPE_VERSION", 20, MYSQL_TYPE_STRING, 0, 1, 0},
+  {"PLUGIN_TYPE_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0},
   {"PLUGIN_LIBRARY", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Library"},
+  {"PLUGIN_LIBRARY_VERSION", 20, MYSQL_TYPE_STRING, 0, 1, 0},
   {"PLUGIN_AUTHOR", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
   {"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}

--- 1.26/storage/csv/ha_tina.cc	2005-12-21 10:18:30 -08:00
+++ 1.27/storage/csv/ha_tina.cc	2005-12-21 12:50:44 -08:00
@@ -949,11 +949,11 @@
   MYSQL_STORAGE_ENGINE_PLUGIN,
   &tina_hton,
   tina_hton.name,
-  0x00010000 /* 0.1.0 */,
   "Brian Aker, MySQL AB",
   "CSV Storage Engine",
   tina_init_func, /* Plugin Init */
-  tina_done_func  /* Plugin Deinit */
+  tina_done_func, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
 }
 mysql_declare_plugin_end;
 

--- 1.25/storage/example/ha_example.cc	2005-12-21 10:18:30 -08:00
+++ 1.26/storage/example/ha_example.cc	2005-12-21 12:50:44 -08:00
@@ -730,11 +730,11 @@
   MYSQL_STORAGE_ENGINE_PLUGIN,
   &example_hton,
   example_hton.name,
-  0x01000000 /* 1.0.0 */,
   "Brian Aker, MySQL AB",
   "Example Storage Engine",
   tina_init_func, /* Plugin Init */
-  tina_done_func  /* Plugin Deinit */
+  tina_done_func, /* Plugin Deinit */
+  0x0001 /* 0.1 */,
 }
 mysql_declare_plugin_end;
 

--- 1.2/include/plugin.h	2005-12-21 10:18:27 -08:00
+++ 1.3/include/plugin.h	2005-12-21 12:50:44 -08:00
@@ -21,7 +21,7 @@
   Plugin API. Common for all plugin types.
 */
 
-#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0000
+#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0001
 
 /*
   The allowable types of plugins
@@ -51,11 +51,11 @@
   int type;             /* the plugin type (a MYSQL_XXX_PLUGIN value)   */
   void *info;           /* pointer to type-specific plugin descriptor   */
   const char *name;     /* plugin name                                  */
-  uint version;         /* plugin version                               */
   const char *author;   /* plugin author (for SHOW PLUGINS)             */
   const char *descr;    /* general descriptive text (for SHOW PLUGINS ) */
   int (*init)(void);    /* the function to invoke when plugin is loaded */
   int (*deinit)(void);  /* the function to invoke when plugin is unloaded */
+  uint version;         /* plugin version (for SHOW PLUGINS)            */
 };
 
 /*************************************************************************
Thread
bk commit into 5.1 tree (acurtis:1.1976)antony21 Dec