developers
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2009
- 20 participants
- 156 discussions
[Maria-developers] Rev 2734: Maria WL#61 in file:///Users/bell/maria/bzr/work-maria-5.2-engine/
by sanja@askmonty.org 22 Feb '10
by sanja@askmonty.org 22 Feb '10
22 Feb '10
At file:///Users/bell/maria/bzr/work-maria-5.2-engine/
------------------------------------------------------------
revno: 2734
revision-id: sanja(a)askmonty.org-20091204114937-cfkvax0g36d3nq3j
parent: psergey(a)askmonty.org-20091202142609-18bp41q8mejxl47t
committer: sanja(a)askmonty.org
branch nick: work-maria-5.2-engine
timestamp: Fri 2009-12-04 13:49:37 +0200
message:
Maria WL#61
Interface for maria extensions.
Additional information about plugins (maturity and string version) interface for maria extensions.
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt 2009-10-03 19:24:13 +0000
+++ b/CMakeLists.txt 2009-12-04 11:49:37 +0000
@@ -251,6 +251,7 @@
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_${PLUGIN_NAME}_plugin")
+ SET (mariaext_plugin_defs "${mariaext_plugin_defs},bltnmext_${PLUGIN_NAME}_plugin")
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${PLUGIN_NAME})
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
@@ -269,6 +270,7 @@
IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_partition_plugin")
+ SET (mariaext_plugin_defs "${mariaext_plugin_defs},bltnmext_partition_plugin")
ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
# Special handling for tmp tables with the maria engine
=== modified file 'config/ac-macros/plugins.m4'
--- a/config/ac-macros/plugins.m4 2009-04-25 10:05:32 +0000
+++ b/config/ac-macros/plugins.m4 2009-12-04 11:49:37 +0000
@@ -461,6 +461,7 @@
])
])
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
+ mariaext_plugin_defs="$mariaext_plugin_defs, [bltnmext_]$2[_plugin]"
[with_plugin_]$2=yes
AC_MSG_RESULT([yes])
m4_ifdef([$11],[
=== modified file 'configure.in'
--- a/configure.in 2009-11-12 04:31:28 +0000
+++ b/configure.in 2009-12-04 11:49:37 +0000
@@ -2842,6 +2842,7 @@
AC_SUBST(mysql_plugin_dirs)
AC_SUBST(mysql_plugin_libs)
AC_SUBST(mysql_plugin_defs)
+AC_SUBST(mariaext_plugin_defs)
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h 2009-09-07 20:50:10 +0000
+++ b/include/mysql/plugin.h 2009-12-04 11:49:37 +0000
@@ -65,7 +65,10 @@
Plugin API. Common for all plugin types.
*/
+/* MySQL plugin interface version */
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
+/* MariaDB extentsion interface version */
+#define MARIAEXT_PLUGIN_INTERFACE_VERSION 0x0100
/*
The allowable types of plugins
@@ -86,6 +89,21 @@
#define PLUGIN_LICENSE_GPL_STRING "GPL"
#define PLUGIN_LICENSE_BSD_STRING "BSD"
+/* definitions of code maturity for plugins */
+#define PLUGIN_MATURITY_UNKNOWN 0
+#define PLUGIN_MATURITY_TEST 1
+#define PLUGIN_MATURITY_ALPHA 2
+#define PLUGIN_MATURITY_BETA 3
+#define PLUGIN_MATURITY_GAMMA 4
+#define PLUGIN_MATURITY_RELEASE 5
+
+#define PLUGIN_MATURITY_UNKNOWN_STR "Unknown"
+#define PLUGIN_MATURITY_TEST_STR "Test"
+#define PLUGIN_MATURITY_ALPHA_STR "Alpha"
+#define PLUGIN_MATURITY_BETA_STR "Beta"
+#define PLUGIN_MATURITY_GAMMA_STR "Gamma"
+#define PLUGIN_MATURITY_RELEASE_STR "Release"
+
/*
Macros for beginning and ending plugin declarations. Between
mysql_declare_plugin and mysql_declare_plugin_end there should
@@ -94,15 +112,29 @@
#ifndef MYSQL_DYNAMIC_PLUGIN
+
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
int PSIZE= sizeof(struct st_mysql_plugin); \
struct st_mysql_plugin DECLS[]= {
+
+#define __MARIAEXT_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+int VERSION= MARIAEXT_PLUGIN_INTERFACE_VERSION; \
+int PSIZE= sizeof(struct st_mariaext_plugin); \
+struct st_mariaext_plugin DECLS[]= {
+
#else
+
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \
MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= {
+
+#define __MARIAEXT_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+MYSQL_PLUGIN_EXPORT int _mariaext_plugin_interface_version_= MARIAEXT_PLUGIN_INTERFACE_VERSION; \
+MYSQL_PLUGIN_EXPORT int _mariaext_sizeof_struct_st_plugin_= sizeof(struct st_mariaext_plugin); \
+MYSQL_PLUGIN_EXPORT struct st_mariaext_plugin _mariaext_plugin_declarations_[]= {
+
#endif
#define mysql_declare_plugin(NAME) \
@@ -111,7 +143,14 @@
builtin_ ## NAME ## _sizeof_struct_st_plugin, \
builtin_ ## NAME ## _plugin)
+#define mariaext_declare_plugin(NAME) \
+__MARIAEXT_DECLARE_PLUGIN(NAME, \
+ bltnmext_ ## NAME ## _plugin_interface_version, \
+ bltnmext_ ## NAME ## _sizeof_struct_st_plugin, \
+ bltnmext_ ## NAME ## _plugin)
+
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
+#define mariaext_declare_plugin_end ,{0,0}}
/*
declarations for SHOW STATUS support in plugins
@@ -407,6 +446,16 @@
void * __reserved1; /* reserved for dependency checking */
};
+/*
+ MariaDB extension for plugins declaration structure.
+*/
+
+struct st_mariaext_plugin
+{
+ const char *sversion; /* plugin version string */
+ int maturity; /* HA_PLUGIN_MATURITY_XXX */
+};
+
/*************************************************************************
API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
*/
=== modified file 'include/mysql/plugin.h.pp'
--- a/include/mysql/plugin.h.pp 2008-10-10 15:28:41 +0000
+++ b/include/mysql/plugin.h.pp 2009-12-04 11:49:37 +0000
@@ -46,6 +46,11 @@
struct st_mysql_sys_var **system_vars;
void * __reserved1;
};
+struct st_mariaext_plugin
+{
+ const char *sversion;
+ int maturity;
+};
enum enum_ftparser_mode
{
MYSQL_FTPARSER_SIMPLE_MODE= 0,
=== modified file 'plugin/daemon_example/daemon_example.cc'
--- a/plugin/daemon_example/daemon_example.cc 2007-06-27 14:49:12 +0000
+++ b/plugin/daemon_example/daemon_example.cc 2009-12-04 11:49:37 +0000
@@ -200,3 +200,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(daemon_example)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_TEST /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'plugin/fulltext/plugin_example.c'
--- a/plugin/fulltext/plugin_example.c 2007-04-26 19:26:04 +0000
+++ b/plugin/fulltext/plugin_example.c 2009-12-04 11:49:37 +0000
@@ -270,4 +270,10 @@
NULL
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(ftexample)
+{
+ "0.01", /* string version */
+ PLUGIN_MATURITY_TEST /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2009-09-07 20:50:10 +0000
+++ b/sql/ha_ndbcluster.cc 2009-12-04 11:49:37 +0000
@@ -10561,5 +10561,11 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(ndbcluster)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_BETA /* maturity */
+}
+mariaext_declare_plugin_end;
#endif
=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc 2009-11-12 04:31:28 +0000
+++ b/sql/ha_partition.cc 2009-12-04 11:49:37 +0000
@@ -6510,5 +6510,11 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(partition)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
#endif
=== modified file 'sql/log.cc'
--- a/sql/log.cc 2009-11-12 04:31:28 +0000
+++ b/sql/log.cc 2009-12-04 11:49:37 +0000
@@ -5795,3 +5795,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(binlog)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'sql/sql_builtin.cc.in'
--- a/sql/sql_builtin.cc.in 2006-12-31 01:29:11 +0000
+++ b/sql/sql_builtin.cc.in 2009-12-04 11:49:37 +0000
@@ -16,6 +16,7 @@
#include <mysql/plugin.h>
typedef struct st_mysql_plugin builtin_plugin[];
+typedef struct st_mariaext_plugin bltnmext_plugin[];
extern builtin_plugin
builtin_binlog_plugin@mysql_plugin_defs@;
@@ -25,3 +26,10 @@
builtin_binlog_plugin@mysql_plugin_defs@,(struct st_mysql_plugin *)0
};
+extern bltnmext_plugin
+ bltnmext_binlog_plugin@mariaext_plugin_defs@;
+
+struct st_mariaext_plugin *mysqld_bltnmexts[]=
+{
+ bltnmext_binlog_plugin@mariaext_plugin_defs@,(struct st_mariaext_plugin *)0
+};
=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc 2009-11-12 04:31:28 +0000
+++ b/sql/sql_plugin.cc 2009-12-04 11:49:37 +0000
@@ -28,6 +28,9 @@
#endif
extern struct st_mysql_plugin *mysqld_builtins[];
+extern struct st_mariaext_plugin *mysqld_bltnmexts[];
+static st_mariaext_plugin no_mariaext[2]= {{"Unknown", 0}, {0, 0}};
+static st_mariaext_plugin *empty_mariaext= no_mariaext;
/**
@note The order of the enumeration is critical.
@@ -82,6 +85,14 @@
"_mysql_sizeof_struct_st_plugin_";
static const char *plugin_declarations_sym= "_mysql_plugin_declarations_";
static int min_plugin_interface_version= MYSQL_PLUGIN_INTERFACE_VERSION & ~0xFF;
+static const char *mariaext_plugin_interface_version_sym=
+ "_mariaext_plugin_interface_version_";
+static const char *mariaext_sizeof_st_plugin_sym=
+ "_mariaext_sizeof_struct_st_plugin_";
+static const char *mariaext_plugin_declarations_sym=
+ "_mariaext_plugin_declarations_";
+static int min_mariaext_plugin_interface_version=
+ MARIAEXT_PLUGIN_INTERFACE_VERSION & ~0xFF;
#endif
/* Note that 'int version' must be the first field of every plugin
@@ -352,6 +363,7 @@
char dlpath[FN_REFLEN];
uint plugin_dir_len, dummy_errors, dlpathlen;
struct st_plugin_dl *tmp, plugin_dl;
+ struct st_mariaext_plugin *mariaext= no_mariaext;
void *sym;
DBUG_ENTER("plugin_dl_add");
plugin_dir_len= strlen(opt_plugin_dir);
@@ -507,6 +519,15 @@
files_charset_info, dl->str, dl->length, system_charset_info,
&dummy_errors);
plugin_dl.dl.str[plugin_dl.dl.length]= 0;
+
+ if ((sym= dlsym(plugin_dl.handle, mariaext_plugin_interface_version_sym)) &&
+ (*(int *)sym == MARIAEXT_PLUGIN_INTERFACE_VERSION) &&
+ (sym= dlsym(plugin_dl.handle, mariaext_plugin_declarations_sym)))
+ {
+ mariaext= (struct st_mariaext_plugin *) sym;
+ }
+ plugin_dl.mariaext= mariaext;
+
/* Add this dll to array */
if (! (tmp= plugin_dl_insert_or_reuse(&plugin_dl)))
{
@@ -719,6 +740,7 @@
{
struct st_plugin_int tmp;
struct st_mysql_plugin *plugin;
+ struct st_mariaext_plugin *ext, *mariaext;
DBUG_ENTER("plugin_add");
if (plugin_find_internal(name, MYSQL_ANY_PLUGIN))
{
@@ -732,9 +754,18 @@
bzero((char*) &tmp, sizeof(tmp));
if (! (tmp.plugin_dl= plugin_dl_add(dl, report)))
DBUG_RETURN(TRUE);
+
/* Find plugin by name */
- for (plugin= tmp.plugin_dl->plugins; plugin->info; plugin++)
+ for (plugin= tmp.plugin_dl->plugins, ext= tmp.plugin_dl->mariaext;
+ plugin->info;
+ plugin++, ext++)
{
+ mariaext= ext;
+ if (!ext->sversion)
+ {
+ mariaext= empty_mariaext;
+ ext--;
+ }
uint name_len= strlen(plugin->name);
if (plugin->type >= 0 && plugin->type < MYSQL_MAX_PLUGIN_TYPE_NUM &&
! my_strnncoll(system_charset_info,
@@ -759,6 +790,7 @@
goto err;
}
tmp.plugin= plugin;
+ tmp.mariaext= mariaext;
tmp.name.str= (char *)plugin->name;
tmp.name.length= name_len;
tmp.ref_count= 0;
@@ -1121,7 +1153,9 @@
uint i;
bool is_myisam;
struct st_mysql_plugin **builtins;
+ struct st_mariaext_plugin **bltnmexts;
struct st_mysql_plugin *plugin;
+ struct st_mariaext_plugin *ext, *mariaext;
struct st_plugin_int tmp, *plugin_ptr, **reap;
MEM_ROOT tmp_root;
bool reaped_mandatory_plugin= FALSE;
@@ -1160,10 +1194,25 @@
/*
First we register builtin plugins
*/
- for (builtins= mysqld_builtins; *builtins; builtins++)
+ for (builtins= mysqld_builtins, bltnmexts= mysqld_bltnmexts;
+ *builtins;
+ builtins++, bltnmexts++)
{
- for (plugin= *builtins; plugin->info; plugin++)
+ /* extensions should be the same numbers as static plugins) */
+ DBUG_ASSERT(*bltnmexts);
+ for (plugin= *builtins, ext= *bltnmexts;
+ plugin->info;
+ plugin++, ext++)
{
+
+ /* in case if plugin describe less extensions then plugins */
+ mariaext= ext;
+ if (!ext->sversion)
+ {
+ mariaext= empty_mariaext;
+ ext--;
+ }
+
if (opt_ignore_builtin_innodb &&
!my_strnncoll(&my_charset_latin1, (const uchar*) plugin->name,
6, (const uchar*) "InnoDB", 6))
@@ -1186,6 +1235,7 @@
#endif
bzero(&tmp, sizeof(tmp));
tmp.plugin= plugin;
+ tmp.mariaext= mariaext;
tmp.name.str= (char *)plugin->name;
tmp.name.length= strlen(plugin->name);
tmp.state= 0;
=== modified file 'sql/sql_plugin.h'
--- a/sql/sql_plugin.h 2009-05-14 12:03:33 +0000
+++ b/sql/sql_plugin.h 2009-12-04 11:49:37 +0000
@@ -63,6 +63,7 @@
LEX_STRING dl;
void *handle;
struct st_mysql_plugin *plugins;
+ struct st_mariaext_plugin *mariaext;
int version;
uint ref_count; /* number of plugins loaded from the library */
};
@@ -74,6 +75,7 @@
LEX_STRING name;
struct st_mysql_plugin *plugin;
struct st_plugin_dl *plugin_dl;
+ struct st_mariaext_plugin *mariaext;
uint state;
uint ref_count; /* number of threads using the plugin */
void *data; /* plugin type specific, e.g. handlerton */
@@ -95,6 +97,7 @@
#define plugin_name(pi) (&((pi)->name))
#define plugin_state(pi) ((pi)->state)
#define plugin_equals(p1,p2) ((p1) == (p2))
+#define plugin_ext(pi) ((pi)->mariaext)
#else
typedef struct st_plugin_int **plugin_ref;
#define plugin_decl(pi) ((pi)[0]->plugin)
@@ -103,6 +106,8 @@
#define plugin_name(pi) (&((pi)[0]->name))
#define plugin_state(pi) ((pi)[0]->state)
#define plugin_equals(p1,p2) ((p1) && (p2) && (p1)[0] == (p2)[0])
+#define plugin_ext(pi) ((pi)[0]->mariaext)
+
#endif
typedef int (*plugin_type_init)(struct st_plugin_int *);
=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc 2009-11-12 04:31:28 +0000
+++ b/sql/sql_show.cc 2009-12-04 11:49:37 +0000
@@ -100,6 +100,7 @@
TABLE *table= (TABLE*) arg;
struct st_mysql_plugin *plug= plugin_decl(plugin);
struct st_plugin_dl *plugin_dl= plugin_dlib(plugin);
+ struct st_mariaext_plugin *mariaext= plugin_ext(plugin);
CHARSET_INFO *cs= system_charset_info;
char version_buf[20];
@@ -186,6 +187,48 @@
}
table->field[9]->set_notnull();
+
+ switch (mariaext->maturity) {
+ case PLUGIN_MATURITY_UNKNOWN:
+ table->field[10]->store(PLUGIN_MATURITY_UNKNOWN_STR,
+ sizeof(PLUGIN_MATURITY_UNKNOWN_STR) - 1, cs);
+ break;
+ case PLUGIN_MATURITY_TEST:
+ table->field[10]->store(PLUGIN_MATURITY_TEST_STR,
+ sizeof(PLUGIN_MATURITY_TEST_STR) - 1, cs);
+ break;
+ case PLUGIN_MATURITY_ALPHA:
+ table->field[10]->store(PLUGIN_MATURITY_ALPHA_STR,
+ sizeof(PLUGIN_MATURITY_ALPHA_STR) - 1, cs);
+ break;
+ case PLUGIN_MATURITY_BETA:
+ table->field[10]->store(PLUGIN_MATURITY_BETA_STR,
+ sizeof(PLUGIN_MATURITY_BETA_STR) - 1, cs);
+ break;
+ case PLUGIN_MATURITY_GAMMA:
+ table->field[10]->store(PLUGIN_MATURITY_GAMMA_STR,
+ sizeof(PLUGIN_MATURITY_GAMMA_STR) - 1, cs);
+ break;
+ case PLUGIN_MATURITY_RELEASE:
+ table->field[10]->store(PLUGIN_MATURITY_RELEASE_STR,
+ sizeof(PLUGIN_MATURITY_RELEASE_STR) - 1, cs);
+ break;
+ default:
+ DBUG_ASSERT(0);
+ table->field[10]->store("Unknown", 7, cs);
+ break;
+ }
+ table->field[10]->set_notnull();
+
+ if (mariaext->sversion)
+ {
+ table->field[11]->store(mariaext->sversion,
+ strlen(mariaext->sversion), cs);
+ table->field[11]->set_notnull();
+ }
+ else
+ table->field[11]->set_null();
+
return schema_table_store_record(thd, table);
}
@@ -6990,6 +7033,8 @@
{"PLUGIN_AUTHOR", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
{"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
{"PLUGIN_LICENSE", 80, MYSQL_TYPE_STRING, 0, 1, "License", SKIP_OPEN_TABLE},
+ {"PLUGIN_MATURITY", 7, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
+ {"PLUGIN_AUTH_VERSION", 80, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
};
=== modified file 'storage/archive/ha_archive.cc'
--- a/storage/archive/ha_archive.cc 2009-09-07 20:50:10 +0000
+++ b/storage/archive/ha_archive.cc 2009-12-04 11:49:37 +0000
@@ -1642,4 +1642,10 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(archive)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/blackhole/ha_blackhole.cc'
--- a/storage/blackhole/ha_blackhole.cc 2008-11-10 20:21:49 +0000
+++ b/storage/blackhole/ha_blackhole.cc 2009-12-04 11:49:37 +0000
@@ -369,3 +369,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(blackhole)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/csv/ha_tina.cc'
--- a/storage/csv/ha_tina.cc 2009-04-25 10:05:32 +0000
+++ b/storage/csv/ha_tina.cc 2009-12-04 11:49:37 +0000
@@ -1636,4 +1636,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
-
+mariaext_declare_plugin(csv)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/example/ha_example.cc'
--- a/storage/example/ha_example.cc 2008-02-24 13:12:17 +0000
+++ b/storage/example/ha_example.cc 2009-12-04 11:49:37 +0000
@@ -906,3 +906,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(example)
+{
+ "0.1", /* string version */
+ PLUGIN_MATURITY_TEST /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/federated/ha_federated.cc'
--- a/storage/federated/ha_federated.cc 2009-09-07 20:50:10 +0000
+++ b/storage/federated/ha_federated.cc 2009-12-04 11:49:37 +0000
@@ -3379,3 +3379,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(federated)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_BETA /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/federatedx/ha_federatedx.cc'
--- a/storage/federatedx/ha_federatedx.cc 2009-11-03 11:08:09 +0000
+++ b/storage/federatedx/ha_federatedx.cc 2009-12-04 11:49:37 +0000
@@ -3491,3 +3491,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(federated)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_UNKNOWN /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/heap/ha_heap.cc'
--- a/storage/heap/ha_heap.cc 2009-09-07 20:50:10 +0000
+++ b/storage/heap/ha_heap.cc 2009-12-04 11:49:37 +0000
@@ -767,3 +767,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(heap)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/ibmdb2i/ha_ibmdb2i.cc'
--- a/storage/ibmdb2i/ha_ibmdb2i.cc 2009-07-08 09:10:01 +0000
+++ b/storage/ibmdb2i/ha_ibmdb2i.cc 2009-12-04 11:49:37 +0000
@@ -3357,3 +3357,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(ibmdb2i)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_UNKNOWN /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc 2009-10-16 22:57:48 +0000
+++ b/storage/innobase/handler/ha_innodb.cc 2009-12-04 11:49:37 +0000
@@ -8684,6 +8684,12 @@
NULL /* reserved */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(innobase)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
/** @brief Initialize the default value of innodb_commit_concurrency.
=== modified file 'storage/innodb_plugin/handler/ha_innodb.cc'
--- a/storage/innodb_plugin/handler/ha_innodb.cc 2009-08-04 08:02:48 +0000
+++ b/storage/innodb_plugin/handler/ha_innodb.cc 2009-12-04 11:49:37 +0000
@@ -10032,6 +10032,12 @@
i_s_innodb_cmpmem,
i_s_innodb_cmpmem_reset
mysql_declare_plugin_end;
+mariaext_declare_plugin(innodb_plugin)
+{
+ INNODB_VERSION_STR, /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
/** @brief Initialize the default value of innodb_commit_concurrency.
=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc 2009-10-26 11:35:42 +0000
+++ b/storage/maria/ha_maria.cc 2009-12-04 11:49:37 +0000
@@ -3352,3 +3352,9 @@
NULL
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(maria)
+{
+ "1.5", /* string version */
+ PLUGIN_MATURITY_GAMMA /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/myisam/ha_myisam.cc'
--- a/storage/myisam/ha_myisam.cc 2009-10-17 19:12:28 +0000
+++ b/storage/myisam/ha_myisam.cc 2009-12-04 11:49:37 +0000
@@ -2183,6 +2183,12 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(myisam)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
#ifdef HAVE_QUERY_CACHE
=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc 2009-10-15 21:38:29 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc 2009-12-04 11:49:37 +0000
@@ -1289,3 +1289,9 @@
NULL /* config options */
}
mysql_declare_plugin_end;
+mariaext_declare_plugin(myisammrg)
+{
+ "1.0", /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+}
+mariaext_declare_plugin_end;
=== modified file 'storage/pbxt/src/ha_pbxt.cc'
--- a/storage/pbxt/src/ha_pbxt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/ha_pbxt.cc 2009-12-04 11:49:37 +0000
@@ -5507,6 +5507,18 @@
drizzle_declare_plugin_end;
#else
mysql_declare_plugin_end;
+#ifdef MARIADB_BASE_VERSION
+mariaext_declare_plugin(pbxt)
+{ /* PBXT */
+ "1.0", /* string version */
+ PLUGIN_MATURITY_UNKNOWN /* maturity */
+},
+{ /* PBXT_STATISTICS */
+ "1.0", /* string version */
+ PLUGIN_MATURITY_UNKNOWN /* maturity */
+}
+mariaext_declare_plugin_end;
+#endif
#endif
#if defined(XT_WIN) && defined(XT_COREDUMP)
=== modified file 'storage/xtradb/handler/ha_innodb.cc'
--- a/storage/xtradb/handler/ha_innodb.cc 2009-10-16 22:57:48 +0000
+++ b/storage/xtradb/handler/ha_innodb.cc 2009-12-04 11:49:37 +0000
@@ -10540,6 +10540,69 @@
i_s_innodb_index_stats,
i_s_innodb_patches
mysql_declare_plugin_end;
+mariaext_declare_plugin(innobase)
+{ /* InnoDB */
+ INNODB_VERSION_STR, /* string version */
+ PLUGIN_MATURITY_RELEASE /* maturity */
+},
+{ /* INNODB_RSEG */
+ "1.0",
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_BUFFER_POOL_PAGES */
+ "1.0",
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_BUFFER_POOL_PAGES_INDEX */
+ "1.0",
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_BUFFER_POOL_PAGES_BLOB */
+ "1.0",
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_TRX */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_LOCKS */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_LOCK_WAITS */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_CMP */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_CMP_RESET */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_CMPMEM */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_CMPMEM_RESET */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_TABLE_STATS */
+ "1.0",
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* INNODB_INDEX_STATS */
+ "1.0",
+ PLUGIN_MATURITY_RELEASE
+},
+{ /* XTRADB_ENHANCEMENTS */
+ INNODB_VERSION_STR,
+ PLUGIN_MATURITY_RELEASE
+}
+mariaext_declare_plugin_end;
+
/** @brief Initialize the default value of innodb_commit_concurrency.
3
7
[Maria-developers] Rev 2769: Added create options for table^ fields and keys (MWL#43). in file:///Users/bell/maria/bzr/work-maria-5.1-create-options/
by sanja@askmonty.org 19 Jan '10
by sanja@askmonty.org 19 Jan '10
19 Jan '10
At file:///Users/bell/maria/bzr/work-maria-5.1-create-options/
------------------------------------------------------------
revno: 2769
revision-id: sanja(a)askmonty.org-20091201120747-cvp0uni2rd4iy5xi
parent: bo.thorsen(a)canonical.com-20091126153249-0xfszhcynbym2lvr
committer: sanja(a)askmonty.org
branch nick: work-maria-5.1-create-options
timestamp: Tue 2009-12-01 14:07:47 +0200
message:
Added create options for table^ fields and keys (MWL#43).
Diff too large for email (1985 lines, the limit is 1000).
3
6
[Maria-developers] Rev 4: Added wrapper scripts for automated runs of sql-bench. in file:///Users/hakan/work/monty_program/mariadb-tools/
by Hakan Kuecuekyilmaz 30 Dec '09
by Hakan Kuecuekyilmaz 30 Dec '09
30 Dec '09
At file:///Users/hakan/work/monty_program/mariadb-tools/
------------------------------------------------------------
revno: 4
revision-id: hakan(a)askmonty.org-20091229134253-zdbgd0ym9m7cokii
parent: knielsen(a)knielsen-hq.org-20091218103524-nof6wfpuku60r9rn
committer: Hakan Kuecuekyilmaz <hakan(a)askmonty.org>
branch nick: mariadb-tools
timestamp: Tue 2009-12-29 14:42:53 +0100
message:
Added wrapper scripts for automated runs of sql-bench.
=== added directory 'sql-bench'
=== added file 'sql-bench/run-sql-bench.sh'
--- a/sql-bench/run-sql-bench.sh 1970-01-01 00:00:00 +0000
+++ b/sql-bench/run-sql-bench.sh 2009-12-29 13:42:53 +0000
@@ -0,0 +1,236 @@
+#!/bin/bash
+#
+# Run sql-bench for every given configuration file
+# we find in the directory $SQL_BENCH_CONFIGS.
+#
+# Note: Do not run this script with root privileges.
+# We use killall -9, which can cause severe side effects!
+#
+# Hakan Kuecuekyilmaz <hakan at askmonty dot org> 2009-12-05.
+#
+
+if [ $# != 2 ]; then
+ echo '[ERROR]: Please provide exactly two options.'
+ echo " Example: $0 [/path/to/bzr/repository] [name_without_spaces]"
+ echo ' [name_without_spaces] is used as identifier in the result file.'
+
+ exit 1
+else
+ REPOSITORY="$1"
+ REPOSITORY_NAME="$2"
+fi
+
+#
+# Directories.
+#
+SQL_BENCH_CONFIGS='/home/hakan/sql-bench-configurations'
+SQL_BENCH_RESULTS='/home/hakan/sql-bench-results'
+WORK_DIR='/tmp'
+
+#
+# Variables.
+#
+# We need at least 1 GB disk space in our $WORK_DIR.
+SPACE_LIMIT=1000000
+MYSQLADMIN_OPTIONS='--no-defaults'
+MACHINE=$(hostname -s)
+RUN_DATE=$(date +%Y-%m-%d)
+
+# Timeout in seconds for waiting for mysqld to start.
+TIMEOUT=100
+
+#
+# Binaries.
+#
+BZR='/usr/local/bin/bzr'
+MYSQLADMIN='client/mysqladmin'
+
+#
+# Check system.
+#
+# We should at least have $SPACE_LIMIT in $WORKDIR.
+AVAILABLE=$(df $WORK_DIR | grep -v Filesystem | awk '{ print $4 }')
+
+if [ $AVAILABLE -lt $SPACE_LIMIT ]; then
+ echo "[ERROR]: We need at least $ONE_GB space in $WORK_DIR."
+ echo 'Exiting.'
+
+ exit 1
+fi
+
+#
+# Run sql-bench.
+#
+for i in ${SQL_BENCH_CONFIGS}/*.inc
+ do
+ # Set configuration and check that all required parameters are set.
+ source $i
+
+ if [ x"$MARIADB_CONFIG" == x"" ]; then
+ echo '[ERROR]: $MARIADB_CONFIG is not set.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ if [ x"$SQLBENCH_OPTIONS" == x"" ]; then
+ echo '[ERROR]: $SQLBENCH_OPTIONS is not set.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ if [ x"$MARIADB_OPTIONS" == x"" ]; then
+ echo '[ERROR]: $MARIADB_OPTIONS is not set.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ # Check out and compile.
+ REVISION_ID=$($BZR version-info $REPOSITORY | grep revision-id)
+ if [ $? != 0 ]; then
+ echo '[ERROR]: bzr version-info failed. Please provide'
+ echo ' a working bzr repository'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ cd $WORK_DIR
+ # Clean up of previous runs
+ killall -9 mysqld
+
+ TEMP_DIR=$(mktemp --directory)
+ if [ $? != 0 ]; then
+ echo "[ERROR]: mktemp in $WORK_DIR failed."
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ # bzr export refuses to export to an existing directory,
+ # therefore we use a build directory.
+ echo "Branching from $REPOSITORY to ${TEMP_DIR}/build"
+
+ $BZR export --format=dir ${TEMP_DIR}/build $REPOSITORY
+ if [ $? != 0 ]; then
+ echo '[ERROR]: bzr export failed.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ cd ${TEMP_DIR}/build
+ BUILD/autorun.sh
+ if [ $? != 0 ]; then
+ echo '[ERROR]: BUILD/autorun.sh failed.'
+ echo ' Please check your development environment.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ ./configure $MARIADB_CONFIG
+ if [ $? != 0 ]; then
+ echo "[ERROR]: ./configure $MARIADB_CONFIG failed."
+ echo " Please check your MARIADB_CONFIG in $i."
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ make -j4
+ if [ $? != 0 ]; then
+ echo '[ERROR]: make failed.'
+ echo ' Please check your build logs.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ # Start mysqld.
+ MARIADB_SOCKET="${TEMP_DIR}/mysql.sock"
+ MARIADB_OPTIONS="$MARIADB_OPTIONS \
+ --datadir=$TEMP_DIR \
+ --tmpdir=$TEMP_DIR \
+ --socket=$MARIADB_SOCKET"
+
+ MYSQLADMIN_OPTIONS="$MYSQLADMIN_OPTIONS \
+ --socket=$MARIADB_SOCKET"
+
+ sql/mysqld $MARIADB_OPTIONS &
+
+ j=0
+ STARTED=-1
+ while [ $j -le $TIMEOUT ]
+ do
+ $MYSQLADMIN $MYSQLADMIN_OPTIONS -uroot ping > /dev/null 2>&1
+ if [ $? = 0 ]; then
+ STARTED=0
+
+ break
+ fi
+
+ sleep 1
+ j=$(($j + 1))
+ done
+
+ if [ $STARTED != 0 ]; then
+ echo '[ERROR]: Start of mysqld failed.'
+ echo ' Please check your error log.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ $MYSQLADMIN $MYSQLADMIN_OPTIONS create test
+ if [ $? != 0 ]; then
+ echo '[ERROR]: Create schema test failed.'
+ echo ' Please check your mysqld error log.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ # Run sql-bench.
+ cd sql-bench
+ COMMENTS="Revision used: $REVISION_ID \
+ Configure: $MARIADB_CONFIG \
+ Server options: $MARIADB_OPTIONS"
+
+ # TODO: Adding --comments="$COMMENTS" does not work
+ SQLBENCH_OPTIONS="$SQLBENCH_OPTIONS \
+ --socket=$MARIADB_SOCKET"
+
+ ./run-all-tests $SQLBENCH_OPTIONS
+ if [ $? != 0 ]; then
+ echo '[ERROR]: run-all-tests produced errors.'
+ echo ' Please check your sql-bench error logs.'
+ echo 'Exiting.'
+
+ exit 1
+ fi
+
+ # Save result file for later usage and comparison.
+ RESULT_FILE=$(ls output/RUN-*)
+ if [ x"$RESULT_FILE" != x"" ]; then
+ NEW_FILE_NAME="RUN-${REPOSITORY_NAME}-$(basename $RESULT_FILE | awk -F 'RUN-' '{ print $2 }')"
+
+ CONFIGURATION=$(basename "$i" | awk -F . '{ print $1 }')
+ ARCHIVE_DIR="${SQL_BENCH_RESULTS}/${MACHINE}/${RUN_DATE}/${CONFIGURATION}"
+ mkdir -p $ARCHIVE_DIR
+
+ # Add comment to result file.
+ sed -e "s%Comments:%Comments: ${COMMENTS}%" $RESULT_FILE > foo.tmp
+ mv foo.tmp $RESULT_FILE
+ # TODO: check for failures and copy the logs in question.
+ cp $RESULT_FILE ${ARCHIVE_DIR}/$NEW_FILE_NAME
+
+ # Clean up for next round.
+ rm -rf $TEMP_DIR
+ else
+ echo '[ERROR]: Cannot find result file after sql-bench run!'
+ fi
+
+done
=== added directory 'sql-bench/sql-bench-configurations'
=== added file 'sql-bench/sql-bench-configurations/sql-bench-default-config.inc'
--- a/sql-bench/sql-bench-configurations/sql-bench-default-config.inc 1970-01-01 00:00:00 +0000
+++ b/sql-bench/sql-bench-configurations/sql-bench-default-config.inc 2009-12-29 13:42:53 +0000
@@ -0,0 +1,34 @@
+# Template configuration file for running sqlbench.
+#
+# We are using this configuration file for the wrapper
+# script run-sql-bench.sh. For every copy of this file we
+# are starting a sqlbench run.
+#
+# Hakan Kuecuekyilmaz <hakan at askmonty dot org> 2009-12-05.
+#
+
+#
+# Configure line for compiling MariaDB.
+#
+export MARIADB_CONFIG="--enable-thread-safe-client \
+ --enable-local-infile"
+
+#
+# Options for starting mysqld.
+#
+# Attention: Do not set --datadir, --tmpdir, and --socket.
+#
+export MARIADB_OPTIONS="--no-defaults \
+ --skip-grant-tables \
+ --language=./sql/share/english"
+
+#
+# Options for sql-bench.
+#
+# Attention: Do not set --socket.
+#
+export SQLBENCH_OPTIONS="--log \
+ --fast \
+ --server=mysql \
+ --small-test \
+ --user=root"
3
3
30 Dec '09
InnoDB fixed group commit in the InnoDB plugin. This performs as
expected when the binlog is disabled. This does not perform as I
expect when the binlog is enabled.
Is this a problem for PBXT?
The problems for InnoDB are:
1) commit is serialized on the binlog write/fsync
2) row locks are not released until the commit step of XA prepare/commit
3) per-table auto inc locks not released until the commit step of XA
I think that 2) and 3) can be fixed without significant changes. They
cause a lot of convoys today for high-throughput OLTP -- too many
connections needlessly wait on row locks and the per-table auto-inc
lock. Doing the binlog fsync one connection at a time also causes a
lot of convoys. This makes MySQL much slower than it should be for
some workloads even with battery backed RAID write caches.
Problem 1) occurs because:
* there is no group commit for the binlog fsync
* InnoDB locks prepare_commit_mutex in the prepare step
Even if there were group commit for the binlog fsync, it would be
useless for InnoDB because prepare_commit_mutex is locked in the
prepare step and not unlocked until the commit step and the binlog
write/fsync is done between these two steps.
There is a MySQL worklog for this (4007) that:
* doesn't intend to add group commit for the binlog fsync
* doesn't mention the problem of prepare_commit_mutex
I have started to work on this, but don't have any code to share yet.
Pseudo-code for commit with the InnoDB plugin when the binlog is enabled:
ha_commit_trans()
* ht->prepare() == innobase_xa_prepare()
o trx_prepare_for_mysql(trx)
+ force to disk the trx log buffer for all changes from this trx
+ fsync done here, group prepare may amortize that
o lock prepare_commit_mutex
* tc_log->log_xid(thd, xid)
o writes SQL to binlog, XID to binlog, optionally fsync binlog
* ha_commit_one_phase()
o ht->commit() == innobase_commit()
+ innobase_commit_low(()
# write commit record to trx log buffer, release
locks from this trx
# for auto-commit statements, the per-table
auto-inc lock is released here
+ unlock prepare_commit_mutex
+ trx_commit_complete_for_mysql()
# force to disk the trx log buffer including
commit record for this trx
# fsync done here, group commit may amortize that
--
Mark Callaghan
mdcallag(a)gmail.com
3
8
Hi Hakan, all
With PBXT and the latest merge, this should now technically be enabled
(again).
That is, a transaction should be consistent between InnoDB+PBXT
+binlog, that is either all or none should commit.
But as I understand, when this was last tried with Falcon it went
kaboom in MySQL, so likely there are some bugs.
I think it would be good to at least create/enable some tests for
this, then we can see what the exact code status is, and hopefully get
it all working as well.
Right now I don't think anybody really expects something like this to
work, but in theory it should work so presumptions *may* be made (I
know this sentence appears kinda contradictory, hope it makes sense
anyhow ;-).
Thus it's important for us to know what happens, so that we can tell
people "don't do this now, please track bug #", or "please try this".
Thanks
Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.
Follow our blog at http://openquery.com/blog/
OurDelta: packages for MySQL and MariaDB @ http://ourdelta.org
4
4
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (monty:2786)
by Michael Widenius 29 Dec '09
by Michael Widenius 29 Dec '09
29 Dec '09
#At lp:maria based on revid:knielsen@knielsen-hq.org-20091221162636-z5ycgu2uunkw8hvh
2786 Michael Widenius 2009-12-27
Fix test suite so that it works when doing configure --without-uca
Simplify testing of needed characterset
Remove ndb from --with-plugins=max build
mysqlbug now sends email to maria-developers(a)lists.launchpad.net
removed:
mysql-test/r/have_big5.require
mysql-test/r/have_cp1250_ch.require
mysql-test/r/have_cp1251.require
mysql-test/r/have_cp866.require
mysql-test/r/have_cp932.require
mysql-test/r/have_eucjpms.require
mysql-test/r/have_euckr.require
mysql-test/r/have_gb2312.require
mysql-test/r/have_gbk.require
mysql-test/r/have_koi8r.require
mysql-test/r/have_latin2_ch.require
mysql-test/r/have_sjis.require
mysql-test/r/have_tis620.require
mysql-test/r/have_ucs2.require
mysql-test/r/have_ujis.require
mysql-test/r/have_utf8.require
added:
mysql-test/include/have_collation.inc
mysql-test/r/create-uca.result
mysql-test/r/innodb_utf8.result
mysql-test/t/create-uca.test
mysql-test/t/innodb_utf8.test
modified:
client/mysqltest.cc
mysql-test/include/have_big5.inc
mysql-test/include/have_cp1250_ch.inc
mysql-test/include/have_cp1251.inc
mysql-test/include/have_cp866.inc
mysql-test/include/have_cp932.inc
mysql-test/include/have_eucjpms.inc
mysql-test/include/have_euckr.inc
mysql-test/include/have_gb2312.inc
mysql-test/include/have_gbk.inc
mysql-test/include/have_koi8r.inc
mysql-test/include/have_latin2_ch.inc
mysql-test/include/have_sjis.inc
mysql-test/include/have_tis620.inc
mysql-test/include/have_ucs2.inc
mysql-test/include/have_ujis.inc
mysql-test/include/have_utf8.inc
mysql-test/r/create.result
mysql-test/r/innodb.result
mysql-test/suite/rpl/t/rpl_ignore_table.test
mysql-test/t/create.test
mysql-test/t/ctype_utf8.test
mysql-test/t/ddl_i18n_koi8r.test
mysql-test/t/ddl_i18n_utf8.test
mysql-test/t/fulltext.test
mysql-test/t/fulltext2.test
mysql-test/t/innodb.test
mysql-test/t/query_cache_ps_no_prot.test
mysql-test/t/query_cache_ps_ps_prot.test
scripts/mysqlbug.sh
storage/ndb/plug.in
per-file messages:
client/mysqltest.cc
SKIP now expands variables (for better error messages)
mysql-test/include/have_big5.inc
Simplify by using have_collation.inc
mysql-test/include/have_collation.inc
Test if '$collation' is supported
mysql-test/include/have_cp1250_ch.inc
Simplify by using have_collation.inc
mysql-test/include/have_cp1251.inc
Simplify by using have_collation.inc
mysql-test/include/have_cp866.inc
Simplify by using have_collation.inc
mysql-test/include/have_cp932.inc
Simplify by using have_collation.inc
mysql-test/include/have_eucjpms.inc
Simplify by using have_collation.inc
mysql-test/include/have_euckr.inc
Simplify by using have_collation.inc
mysql-test/include/have_gb2312.inc
Simplify by using have_collation.inc
mysql-test/include/have_gbk.inc
Simplify by using have_collation.inc
mysql-test/include/have_koi8r.inc
Simplify by using have_collation.inc
mysql-test/include/have_latin2_ch.inc
Simplify by using have_collation.inc
mysql-test/include/have_sjis.inc
Simplify by using have_collation.inc
mysql-test/include/have_tis620.inc
Simplify by using have_collation.inc
mysql-test/include/have_ucs2.inc
Simplify by using have_collation.inc
mysql-test/include/have_ujis.inc
Simplify by using have_collation.inc
mysql-test/include/have_utf8.inc
Simplify by using have_collation.inc
mysql-test/r/create-uca.result
Create tests that uses unicode
mysql-test/r/create.result
Move test with unicode to create-uca.test
mysql-test/r/have_big5.require
Not needed anymore
mysql-test/r/have_cp1250_ch.require
Not needed anymore
mysql-test/r/have_cp1251.require
Not needed anymore
mysql-test/r/have_cp866.require
Not needed anymore
mysql-test/r/have_cp932.require
Not needed anymore
mysql-test/r/have_eucjpms.require
Not needed anymore
mysql-test/r/have_euckr.require
Not needed anymore
mysql-test/r/have_gb2312.require
Not needed anymore
mysql-test/r/have_gbk.require
Not needed anymore
mysql-test/r/have_koi8r.require
Not needed anymore
mysql-test/r/have_latin2_ch.require
Not needed anymore
mysql-test/r/have_sjis.require
Not needed anymore
mysql-test/r/have_tis620.require
Not needed anymore
mysql-test/r/have_ucs2.require
Not needed anymore
mysql-test/r/have_ujis.require
Not needed anymore
mysql-test/r/have_utf8.require
Not needed anymore
mysql-test/r/innodb.result
Move tests that depends on unicode to innodb_utf8.test
mysql-test/r/innodb_utf8.result
Test moved from innodb.test
mysql-test/suite/rpl/t/rpl_ignore_table.test
Test for required collations
mysql-test/t/create-uca.test
Create tests that uses unicode
mysql-test/t/create.test
Move test with unicode to create-uca.test
mysql-test/t/ctype_utf8.test
Test that require unicode
mysql-test/t/ddl_i18n_koi8r.test
Test for required collations
mysql-test/t/ddl_i18n_utf8.test
Test for required collations
mysql-test/t/fulltext.test
Test for required collations
mysql-test/t/fulltext2.test
Test for required collations
mysql-test/t/innodb.test
Move tests that depends on unicode to innodb_utf8.test
mysql-test/t/innodb_utf8.test
Tests that uses unicode
mysql-test/t/query_cache_ps_no_prot.test
Test for required collations
mysql-test/t/query_cache_ps_ps_prot.test
Test for required collations
scripts/mysqlbug.sh
Send emails to maria-developers(a)lists.launchpad.net
storage/ndb/plug.in
Don't include ndb in 'max' builds
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2009-12-03 11:19:05 +0000
+++ b/client/mysqltest.cc 2009-12-27 13:54:41 +0000
@@ -1267,6 +1267,7 @@ void abort_not_supported_test(const char
DBUG_ENTER("abort_not_supported_test");
/* Print include filestack */
+ fflush(stdout);
fprintf(stderr, "The test '%s' is not supported by this installation\n",
file_stack->file_name);
fprintf(stderr, "Detected in file %s at line %d\n",
@@ -8098,7 +8099,10 @@ int main(int argc, char **argv)
abort_flag= 1;
break;
case Q_SKIP:
- abort_not_supported_test("%s", command->first_argument);
+ /* Eval the query, thus replacing all environment variables */
+ dynstr_set(&ds_res, 0);
+ do_eval(&ds_res, command->first_argument, command->end, FALSE);
+ abort_not_supported_test("%s",ds_res.str);
break;
case Q_RESULT:
=== modified file 'mysql-test/include/have_big5.inc'
--- a/mysql-test/include/have_big5.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_big5.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_big5.require
-disable_query_log;
-show collation like 'big5_chinese_ci';
-enable_query_log;
+let collation=big5_chinese_ci;
+--source include/have_collation.inc
=== added file 'mysql-test/include/have_collation.inc'
--- a/mysql-test/include/have_collation.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/have_collation.inc 2009-12-27 13:54:41 +0000
@@ -0,0 +1,3 @@
+if (!`SELECT count(*) AS 'true' FROM information_schema.collations WHERE collation_name LIKE '$collation'`) {
+ skip Test needs character set '$collation';
+}
=== modified file 'mysql-test/include/have_cp1250_ch.inc'
--- a/mysql-test/include/have_cp1250_ch.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_cp1250_ch.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_cp1250_ch.require
-disable_query_log;
-show collation like 'cp1250_czech_cs';
-enable_query_log;
+let collation=cp1250_czech_cs;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp1251.inc'
--- a/mysql-test/include/have_cp1251.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_cp1251.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_cp1251.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'cp1251_general_ci';
-
---enable_query_log
+let collation=cp1251_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp866.inc'
--- a/mysql-test/include/have_cp866.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_cp866.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_cp866.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'cp866_general_ci';
-
---enable_query_log
+let collation=cp866_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_cp932.inc'
--- a/mysql-test/include/have_cp932.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_cp932.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_cp932.require
-disable_query_log;
-show collation like 'cp932_japanese_ci';
-enable_query_log;
+let collation=cp932_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_eucjpms.inc'
--- a/mysql-test/include/have_eucjpms.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_eucjpms.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_eucjpms.require
-disable_query_log;
-show collation like 'eucjpms_japanese_ci';
-enable_query_log;
+let collation=eucjpms_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_euckr.inc'
--- a/mysql-test/include/have_euckr.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_euckr.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_euckr.require
-disable_query_log;
-show collation like 'euckr_korean_ci';
-enable_query_log;
+let collation=euckr_korean_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_gb2312.inc'
--- a/mysql-test/include/have_gb2312.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_gb2312.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_gb2312.require
-disable_query_log;
-show collation like 'gb2312_chinese_ci';
-enable_query_log;
+let collation=gb2312_chinese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_gbk.inc'
--- a/mysql-test/include/have_gbk.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_gbk.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_gbk.require
-disable_query_log;
-show collation like 'gbk_chinese_ci';
-enable_query_log;
+let collation=gbk_chinese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_koi8r.inc'
--- a/mysql-test/include/have_koi8r.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_koi8r.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_koi8r.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'koi8r_general_ci';
-
---enable_query_log
+let collation=koi8r_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_latin2_ch.inc'
--- a/mysql-test/include/have_latin2_ch.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_latin2_ch.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_latin2_ch.require
-disable_query_log;
-show collation like 'latin2_czech_cs';
-enable_query_log;
+let collation=latin2_czech_cs;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_sjis.inc'
--- a/mysql-test/include/have_sjis.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_sjis.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_sjis.require
-disable_query_log;
-show collation like 'sjis_japanese_ci';
-enable_query_log;
+let collation=sjis_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_tis620.inc'
--- a/mysql-test/include/have_tis620.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_tis620.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_tis620.require
-disable_query_log;
-show collation like 'tis620_thai_ci';
-enable_query_log;
+let collation=tis620_thai_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_ucs2.inc'
--- a/mysql-test/include/have_ucs2.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_ucs2.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_ucs2.require
-disable_query_log;
-show collation like 'ucs2_general_ci';
-enable_query_log;
+let collation=ucs2_general_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_ujis.inc'
--- a/mysql-test/include/have_ujis.inc 2008-07-04 16:41:27 +0000
+++ b/mysql-test/include/have_ujis.inc 2009-12-27 13:54:41 +0000
@@ -1,4 +1,2 @@
--- require r/have_ujis.require
-disable_query_log;
-show collation like 'ujis_japanese_ci';
-enable_query_log;
+let collation=ujis_japanese_ci;
+--source include/have_collation.inc
=== modified file 'mysql-test/include/have_utf8.inc'
--- a/mysql-test/include/have_utf8.inc 2007-06-28 17:34:54 +0000
+++ b/mysql-test/include/have_utf8.inc 2009-12-27 13:54:41 +0000
@@ -1,7 +1,2 @@
---require r/have_utf8.require
-
---disable_query_log
-
-SHOW COLLATION LIKE 'utf8_general_ci';
-
---enable_query_log
+let collation=utf8_general_ci;
+--source include/have_collation.inc
=== added file 'mysql-test/r/create-uca.result'
--- a/mysql-test/r/create-uca.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/create-uca.result 2009-12-27 13:54:41 +0000
@@ -0,0 +1,31 @@
+drop table if exists t1,t2;
+CREATE TABLE t1(
+c1 INT DEFAULT 12 COMMENT 'column1',
+c2 INT NULL COMMENT 'column2',
+c3 INT NOT NULL COMMENT 'column3',
+c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+c6 VARCHAR(255))
+COLLATE latin1_bin;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c2` int(11) DEFAULT NULL COMMENT 'column2',
+ `c3` int(11) NOT NULL COMMENT 'column3',
+ `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
+ `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
+CREATE TABLE t2 AS SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c2` int(11) DEFAULT NULL COMMENT 'column2',
+ `c3` int(11) NOT NULL COMMENT 'column3',
+ `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
+ `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result 2009-12-03 11:19:05 +0000
+++ b/mysql-test/r/create.result 2009-12-27 13:54:41 +0000
@@ -1793,52 +1793,6 @@ t1 CREATE TABLE `t1` (
drop table t1;
# --
-# -- Bug#21380: DEFAULT definition not always transfered by CREATE
-# -- TABLE/SELECT to the new table.
-# --
-
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-
-CREATE TABLE t1(
-c1 INT DEFAULT 12 COMMENT 'column1',
-c2 INT NULL COMMENT 'column2',
-c3 INT NOT NULL COMMENT 'column3',
-c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
-c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
-c6 VARCHAR(255))
-COLLATE latin1_bin;
-
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
- `c2` int(11) DEFAULT NULL COMMENT 'column2',
- `c3` int(11) NOT NULL COMMENT 'column3',
- `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
- `c6` varchar(255) COLLATE latin1_bin DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
- `c2` int(11) DEFAULT NULL COMMENT 'column2',
- `c3` int(11) NOT NULL COMMENT 'column3',
- `c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- `c5` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'b',
- `c6` varchar(255) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-
-DROP TABLE t2;
-DROP TABLE t1;
-
-# -- End of test case for Bug#21380.
-
-# --
# -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
# --
=== removed file 'mysql-test/r/have_big5.require'
--- a/mysql-test/r/have_big5.require 2003-12-24 12:59:48 +0000
+++ b/mysql-test/r/have_big5.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-big5_chinese_ci big5 1 Yes Yes 1
=== removed file 'mysql-test/r/have_cp1250_ch.require'
--- a/mysql-test/r/have_cp1250_ch.require 2005-03-03 10:15:37 +0000
+++ b/mysql-test/r/have_cp1250_ch.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp1250_czech_cs cp1250 34 Yes 2
=== removed file 'mysql-test/r/have_cp1251.require'
--- a/mysql-test/r/have_cp1251.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_cp1251.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp1251_general_ci cp1251 51 Yes 0
=== removed file 'mysql-test/r/have_cp866.require'
--- a/mysql-test/r/have_cp866.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_cp866.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp866_general_ci cp866 36 Yes 0
=== removed file 'mysql-test/r/have_cp932.require'
--- a/mysql-test/r/have_cp932.require 2005-02-01 10:37:51 +0000
+++ b/mysql-test/r/have_cp932.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-cp932_japanese_ci cp932 95 Yes Yes 1
=== removed file 'mysql-test/r/have_eucjpms.require'
--- a/mysql-test/r/have_eucjpms.require 2005-02-01 10:37:51 +0000
+++ b/mysql-test/r/have_eucjpms.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-eucjpms_japanese_ci eucjpms 97 Yes Yes 1
=== removed file 'mysql-test/r/have_euckr.require'
--- a/mysql-test/r/have_euckr.require 2005-12-09 12:37:58 +0000
+++ b/mysql-test/r/have_euckr.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-euckr_korean_ci euckr 19 Yes Yes 1
=== removed file 'mysql-test/r/have_gb2312.require'
--- a/mysql-test/r/have_gb2312.require 2005-12-09 12:37:58 +0000
+++ b/mysql-test/r/have_gb2312.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-gb2312_chinese_ci gb2312 24 Yes Yes 1
=== removed file 'mysql-test/r/have_gbk.require'
--- a/mysql-test/r/have_gbk.require 2005-07-22 16:06:02 +0000
+++ b/mysql-test/r/have_gbk.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-gbk_chinese_ci gbk 28 Yes Yes 1
=== removed file 'mysql-test/r/have_koi8r.require'
--- a/mysql-test/r/have_koi8r.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_koi8r.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-koi8r_general_ci koi8r 7 Yes 0
=== removed file 'mysql-test/r/have_latin2_ch.require'
--- a/mysql-test/r/have_latin2_ch.require 2006-03-20 12:28:25 +0000
+++ b/mysql-test/r/have_latin2_ch.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-latin2_czech_cs latin2 2 Yes 4
=== removed file 'mysql-test/r/have_sjis.require'
--- a/mysql-test/r/have_sjis.require 2004-03-25 10:29:56 +0000
+++ b/mysql-test/r/have_sjis.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-sjis_japanese_ci sjis 13 Yes Yes 1
=== removed file 'mysql-test/r/have_tis620.require'
--- a/mysql-test/r/have_tis620.require 2003-12-25 16:11:01 +0000
+++ b/mysql-test/r/have_tis620.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-tis620_thai_ci tis620 18 Yes Yes 4
=== removed file 'mysql-test/r/have_ucs2.require'
--- a/mysql-test/r/have_ucs2.require 2003-06-02 12:19:06 +0000
+++ b/mysql-test/r/have_ucs2.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-ucs2_general_ci ucs2 35 Yes Yes 1
=== removed file 'mysql-test/r/have_ujis.require'
--- a/mysql-test/r/have_ujis.require 2003-09-19 10:18:19 +0000
+++ b/mysql-test/r/have_ujis.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-ujis_japanese_ci ujis 12 Yes Yes 1
=== removed file 'mysql-test/r/have_utf8.require'
--- a/mysql-test/r/have_utf8.require 2007-06-28 17:34:54 +0000
+++ b/mysql-test/r/have_utf8.require 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-Collation Charset Id Default Compiled Sortlen
-utf8_general_ci utf8 33 Yes Yes 1
=== modified file 'mysql-test/r/innodb.result'
--- a/mysql-test/r/innodb.result 2009-11-13 21:26:08 +0000
+++ b/mysql-test/r/innodb.result 2009-12-27 13:54:41 +0000
@@ -3160,15 +3160,6 @@ ALTER TABLE t2 MODIFY a INT NOT NULL;
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
DELETE FROM t1;
DROP TABLE t2,t1;
-CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
-ENGINE=InnoDB;
-INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
-DELETE FROM t1;
-INSERT INTO t1 VALUES ('DDD');
-SELECT * FROM t1;
-a
-DDD
-DROP TABLE t1;
CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
AUTO_INCREMENT=42;
INSERT INTO t1 VALUES (0),(347),(0);
=== added file 'mysql-test/r/innodb_utf8.result'
--- a/mysql-test/r/innodb_utf8.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/innodb_utf8.result 2009-12-27 13:54:41 +0000
@@ -0,0 +1,10 @@
+drop table if exists t1;
+CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
+DELETE FROM t1;
+INSERT INTO t1 VALUES ('DDD');
+SELECT * FROM t1;
+a
+DDD
+DROP TABLE t1;
=== modified file 'mysql-test/suite/rpl/t/rpl_ignore_table.test'
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test 2008-11-13 19:19:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test 2009-12-27 13:54:41 +0000
@@ -1,4 +1,6 @@
source include/master-slave.inc;
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
#
# BUG#16487
=== added file 'mysql-test/t/create-uca.test'
--- a/mysql-test/t/create-uca.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/create-uca.test 2009-12-27 13:54:41 +0000
@@ -0,0 +1,26 @@
+# Prerequisites
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+# Initial cleanup
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+#
+# Bug#21380: DEFAULT definition not always transfered by CREATE
+# TABLE/SELECT to the new table.
+#
+
+CREATE TABLE t1(
+ c1 INT DEFAULT 12 COMMENT 'column1',
+ c2 INT NULL COMMENT 'column2',
+ c3 INT NOT NULL COMMENT 'column3',
+ c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+ c6 VARCHAR(255))
+ COLLATE latin1_bin;
+SHOW CREATE TABLE t1;
+CREATE TABLE t2 AS SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
=== modified file 'mysql-test/t/create.test'
--- a/mysql-test/t/create.test 2009-12-03 11:19:05 +0000
+++ b/mysql-test/t/create.test 2009-12-27 13:54:41 +0000
@@ -1400,52 +1400,6 @@ drop table t1;
--echo
--echo # --
---echo # -- Bug#21380: DEFAULT definition not always transfered by CREATE
---echo # -- TABLE/SELECT to the new table.
---echo # --
---echo
-
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
---enable_warnings
-
---echo
-
-CREATE TABLE t1(
- c1 INT DEFAULT 12 COMMENT 'column1',
- c2 INT NULL COMMENT 'column2',
- c3 INT NOT NULL COMMENT 'column3',
- c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
- c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
- c6 VARCHAR(255))
- COLLATE latin1_bin;
-
---echo
-
-SHOW CREATE TABLE t1;
-
---echo
-
-CREATE TABLE t2 AS SELECT * FROM t1;
-
---echo
-
-SHOW CREATE TABLE t2;
-
---echo
-
-DROP TABLE t2;
-DROP TABLE t1;
-
---echo
---echo # -- End of test case for Bug#21380.
-
-###########################################################################
-
---echo
---echo # --
--echo # -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields
--echo # --
--echo
=== modified file 'mysql-test/t/ctype_utf8.test'
--- a/mysql-test/t/ctype_utf8.test 2009-01-26 21:19:13 +0000
+++ b/mysql-test/t/ctype_utf8.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,15 @@
# Tests with the utf8 character set
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+--disable_warnings
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
+--enable_warnings
+
+
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
=== modified file 'mysql-test/t/ddl_i18n_koi8r.test'
--- a/mysql-test/t/ddl_i18n_koi8r.test 2009-05-15 10:15:56 +0000
+++ b/mysql-test/t/ddl_i18n_koi8r.test 2009-12-27 13:54:41 +0000
@@ -36,6 +36,8 @@
--source include/have_cp866.inc
--source include/have_cp1251.inc
--source include/have_koi8r.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
###########################################################################
=== modified file 'mysql-test/t/ddl_i18n_utf8.test'
--- a/mysql-test/t/ddl_i18n_utf8.test 2009-05-15 10:15:56 +0000
+++ b/mysql-test/t/ddl_i18n_utf8.test 2009-12-27 13:54:41 +0000
@@ -36,6 +36,8 @@
--source include/have_cp866.inc
--source include/have_cp1251.inc
--source include/have_koi8r.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
###########################################################################
=== modified file 'mysql-test/t/fulltext.test'
--- a/mysql-test/t/fulltext.test 2009-09-07 20:50:10 +0000
+++ b/mysql-test/t/fulltext.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,9 @@
# Test of fulltext index
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
=== modified file 'mysql-test/t/fulltext2.test'
--- a/mysql-test/t/fulltext2.test 2009-10-28 07:52:34 +0000
+++ b/mysql-test/t/fulltext2.test 2009-12-27 13:54:41 +0000
@@ -2,6 +2,9 @@
# test of new fulltext search features
#
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
#
# two-level tree
#
=== modified file 'mysql-test/t/innodb.test'
--- a/mysql-test/t/innodb.test 2009-11-13 21:26:08 +0000
+++ b/mysql-test/t/innodb.test 2009-12-27 13:54:41 +0000
@@ -2353,18 +2353,6 @@ DELETE FROM t1;
DROP TABLE t2,t1;
#
-# Bug #26835: table corruption after delete+insert
-#
-
-CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
-ENGINE=InnoDB;
-INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
-DELETE FROM t1;
-INSERT INTO t1 VALUES ('DDD');
-SELECT * FROM t1;
-DROP TABLE t1;
-
-#
# Bug #23313 (AUTO_INCREMENT=# not reported back for InnoDB tables)
# Bug #21404 (AUTO_INCREMENT value reset when Adding FKEY (or ALTER?))
#
=== added file 'mysql-test/t/innodb_utf8.test'
--- a/mysql-test/t/innodb_utf8.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/innodb_utf8.test 2009-12-27 13:54:41 +0000
@@ -0,0 +1,24 @@
+#
+# Tests for innodb that requires not default character sets
+#
+
+--source include/have_innodb.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
+
+# Setup
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+#
+# Bug #26835: table corruption after delete+insert
+#
+
+CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
+DELETE FROM t1;
+INSERT INTO t1 VALUES ('DDD');
+SELECT * FROM t1;
+DROP TABLE t1;
=== modified file 'mysql-test/t/query_cache_ps_no_prot.test'
--- a/mysql-test/t/query_cache_ps_no_prot.test 2007-05-24 20:13:49 +0000
+++ b/mysql-test/t/query_cache_ps_no_prot.test 2009-12-27 13:54:41 +0000
@@ -11,8 +11,9 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
-
--source include/have_query_cache.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
# The file with expected results fits only to a run without
# ps-protocol/sp-protocol/cursor-protocol/view-protocol.
=== modified file 'mysql-test/t/query_cache_ps_ps_prot.test'
--- a/mysql-test/t/query_cache_ps_ps_prot.test 2007-05-24 20:13:49 +0000
+++ b/mysql-test/t/query_cache_ps_ps_prot.test 2009-12-27 13:54:41 +0000
@@ -11,8 +11,9 @@
# We cannot run on embedded server because we use multiple sessions.
--source include/not_embedded.inc
-
--source include/have_query_cache.inc
+let collation=utf8_unicode_ci;
+--source include/have_collation.inc
# The file with expected results fits only to a run with "--ps-protocol".
if (`SELECT $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0
=== modified file 'scripts/mysqlbug.sh'
--- a/scripts/mysqlbug.sh 2007-10-19 17:06:30 +0000
+++ b/scripts/mysqlbug.sh 2009-12-27 13:54:41 +0000
@@ -21,7 +21,7 @@ echo "Finding system information for a M
VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@"
COMPILATION_COMMENT="@COMPILATION_COMMENT@"
-BUGmysql="mysql(a)lists.mysql.com"
+BUGmysql="maria-developers(a)lists.launchpad.net"
# This is set by configure
COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
=== modified file 'storage/ndb/plug.in'
--- a/storage/ndb/plug.in 2006-08-19 04:19:19 +0000
+++ b/storage/ndb/plug.in 2009-12-27 13:54:41 +0000
@@ -1,5 +1,5 @@
MYSQL_STORAGE_ENGINE(ndbcluster, ndbcluster, [Cluster Storage Engine],
- [High Availability Clustered tables], [max])
+ [High Availability Clustered tables],)
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])
2
1
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2783)
by knielsen@knielsen-hq.org 29 Dec '09
by knielsen@knielsen-hq.org 29 Dec '09
29 Dec '09
#At lp:maria
2783 knielsen(a)knielsen-hq.org 2009-12-29 [merge]
Merge PBXT fix from Paul.
modified:
storage/pbxt/ChangeLog
storage/pbxt/src/discover_xt.cc
storage/pbxt/src/ha_pbxt.cc
storage/pbxt/src/strutil_xt.cc
=== modified file 'storage/pbxt/ChangeLog'
--- a/storage/pbxt/ChangeLog 2009-12-01 09:50:46 +0000
+++ b/storage/pbxt/ChangeLog 2009-12-21 13:13:15 +0000
@@ -1,6 +1,10 @@
PBXT Release Notes
==================
+------- 1.0.09g RC3 - 2009-12-16
+
+RN292: Fixed a bug that resulted in 2-phase commit not being used between PBXT and the binlog. This bug was a result of a hack which as added to solve a problem in an pre-release version of MySQL 5.1. The hack was removed.
+
------- 1.0.09f RC3 - 2009-11-30
RN291: Fixed bug #489088: On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown.
=== modified file 'storage/pbxt/src/discover_xt.cc'
--- a/storage/pbxt/src/discover_xt.cc 2009-12-16 08:13:18 +0000
+++ b/storage/pbxt/src/discover_xt.cc 2009-12-21 13:13:15 +0000
@@ -355,10 +355,10 @@ static int sort_keys(KEY *a, KEY *b)
{
if (!(b_flags & HA_NOSAME))
return -1;
- if ((a_flags ^ b_flags) & (HA_NULL_PART_KEY | HA_END_SPACE_KEY))
+ if ((a_flags ^ b_flags) & HA_NULL_PART_KEY)
{
/* Sort NOT NULL keys before other keys */
- return (a_flags & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) ? 1 : -1;
+ return (a_flags & HA_NULL_PART_KEY) ? 1 : -1;
}
if (a->name == primary_key_name)
return -1;
=== modified file 'storage/pbxt/src/ha_pbxt.cc'
--- a/storage/pbxt/src/ha_pbxt.cc 2009-12-22 11:52:44 +0000
+++ b/storage/pbxt/src/ha_pbxt.cc 2009-12-29 11:34:44 +0000
@@ -1447,7 +1447,7 @@ static int pbxt_commit(handlerton *hton,
XTThreadPtr self;
if ((self = (XTThreadPtr) *thd_ha_data(thd, hton))) {
- XT_PRINT1(self, "pbxt_commit all=%d\n", all);
+ XT_PRINT2(self, "%s pbxt_commit all=%d\n", all ? "END CONN XACT" : "END STAT", all);
if (self->st_xact_data) {
/* There are no table locks, commit immediately in all cases
@@ -1479,7 +1479,7 @@ static int pbxt_rollback(handlerton *hto
XTThreadPtr self;
if ((self = (XTThreadPtr) *thd_ha_data(thd, hton))) {
- XT_PRINT1(self, "pbxt_rollback all=%d in pbxt_commit\n", all);
+ XT_PRINT2(self, "%s pbxt_rollback all=%d\n", all ? "CONN END XACT" : "STAT END", all);
if (self->st_xact_data) {
/* There are no table locks, rollback immediately in all cases
@@ -1543,7 +1543,7 @@ static int pbxt_prepare(handlerton *hton
* except when this is a statement commit with an explicit
* transaction (!all && !self->st_auto_commit).
*/
- if (all) {
+ if (all || self->st_auto_commit) {
XID xid;
XT_PRINT0(self, "xt_xn_prepare in pbxt_prepare\n");
@@ -2625,26 +2625,7 @@ int ha_pbxt::write_row(byte *buf)
}
#endif
- /* GOTCHA: I have a huge problem with the transaction statement.
- * It is not ALWAYS committed (I mean ha_commit_trans() is
- * not always called - for example in SELECT).
- *
- * If I call trans_register_ha() but ha_commit_trans() is not called
- * then MySQL thinks a transaction is still running (while
- * I have committed the auto-transaction in ha_pbxt::external_lock()).
- *
- * This causes all kinds of problems, like transactions
- * are killed when they should not be.
- *
- * To prevent this, I only inform MySQL that a transaction
- * has beens started when an update is performed. I have determined that
- * ha_commit_trans() is only guarenteed to be called if an update is done.
- */
- if (!pb_open_tab->ot_thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(pb_open_tab->ot_thread, "ha_pbxt::write_row trans_register_ha all=FALSE\n");
- pb_open_tab->ot_thread->st_stat_trans = TRUE;
- }
+ /* {START-STAT-HACK} previously position of start statement hack. */
xt_xlog_check_long_writer(pb_open_tab->ot_thread);
@@ -2735,11 +2716,7 @@ int ha_pbxt::update_row(const byte * old
XT_DISABLED_TRACE(("UPDATE tx=%d val=%d\n", (int) self->st_xact_data->xd_start_xn_id, (int) XT_GET_DISK_4(&new_data[1])));
//statistic_increment(ha_update_count,&LOCK_status);
- if (!self->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(self, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
- self->st_stat_trans = TRUE;
- }
+ /* {START-STAT-HACK} previously position of start statement hack. */
xt_xlog_check_long_writer(self);
@@ -2826,11 +2803,7 @@ int ha_pbxt::delete_row(const byte * buf
}
#endif
- if (!pb_open_tab->ot_thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(pb_open_tab->ot_thread, "ha_pbxt::delete_row trans_register_ha all=FALSE\n");
- pb_open_tab->ot_thread->st_stat_trans = TRUE;
- }
+ /* {START-STAT-HACK} previously position of start statement hack. */
xt_xlog_check_long_writer(pb_open_tab->ot_thread);
@@ -3160,15 +3133,12 @@ int ha_pbxt::index_init(uint idx, bool X
printf("index_init %s index %d cols req=%d/%d read_bits=%X write_bits=%X index_bits=%X\n", pb_open_tab->ot_table->tab_name->ps_path, (int) idx, pb_open_tab->ot_cols_req, pb_open_tab->ot_cols_req, (int) *table->read_set->bitmap, (int) *table->write_set->bitmap, (int) *ind->mi_col_map.bitmap);
#endif
+ /* {START-STAT-HACK} previously position of start statement hack,
+ * previous comment to code below: */
/* Start a statement based transaction as soon
* as a read is done for a modify type statement!
* Previously, this was done too late!
*/
- if (!thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(thread, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
- thread->st_stat_trans = TRUE;
- }
}
else {
pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
@@ -3617,15 +3587,12 @@ int ha_pbxt::rnd_init(bool scan)
/* The number of columns required: */
if (pb_open_tab->ot_is_modify) {
pb_open_tab->ot_cols_req = table->read_set->MX_BIT_SIZE();
+ /* {START-STAT-HACK} previously position of start statement hack,
+ * previous comment to code below: */
/* Start a statement based transaction as soon
* as a read is done for a modify type statement!
* Previously, this was done too late!
*/
- if (!thread->st_stat_trans) {
- trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
- XT_PRINT0(thread, "ha_pbxt::update_row trans_register_ha all=FALSE\n");
- thread->st_stat_trans = TRUE;
- }
}
else {
pb_open_tab->ot_cols_req = ha_get_max_bit(table->read_set);
@@ -4636,7 +4603,7 @@ xtPublic int ha_pbxt::external_lock(THD
cont_(b);
}
- /* See (***) */
+ /* See {IS-UPDATE-STAT} */
self->st_is_update = FALSE;
/* Auto begin a transaction (if one is not already running): */
@@ -4665,7 +4632,7 @@ xtPublic int ha_pbxt::external_lock(THD
}
/*
- * (**) GOTCHA: trans_register_ha() is not mentioned in the documentation.
+ * {START-TRANS} GOTCHA: trans_register_ha() is not mentioned in the documentation.
* It must be called to inform MySQL that we have a transaction (see start_stmt).
*
* Here are some tests that confirm whether things are done correctly:
@@ -4703,10 +4670,46 @@ xtPublic int ha_pbxt::external_lock(THD
*/
if (!self->st_auto_commit) {
trans_register_ha(thd, TRUE, pbxt_hton);
- XT_PRINT0(self, "ha_pbxt::external_lock trans_register_ha all=TRUE\n");
+ XT_PRINT0(self, "CONN START XACT - ha_pbxt::external_lock --> trans_register_ha\n");
}
}
+ /* Start a statment transaction: */
+ /* {START-STAT-HACK} The problem that ha_commit_trans() is not
+ * called by MySQL seems to be fixed (tests confirm this).
+ * Here is the previous comment when this code was execute
+ * here {START-STAT-HACK}
+ *
+ * GOTCHA: I have a huge problem with the transaction statement.
+ * It is not ALWAYS committed (I mean ha_commit_trans() is
+ * not always called - for example in SELECT).
+ *
+ * If I call trans_register_ha() but ha_commit_trans() is not called
+ * then MySQL thinks a transaction is still running (while
+ * I have committed the auto-transaction in ha_pbxt::external_lock()).
+ *
+ * This causes all kinds of problems, like transactions
+ * are killed when they should not be.
+ *
+ * To prevent this, I only inform MySQL that a transaction
+ * has beens started when an update is performed. I have determined that
+ * ha_commit_trans() is only guarenteed to be called if an update is done.
+ * --------
+ *
+ * So, this is the correct place to start a statement transaction.
+ *
+ * Note: if trans_register_ha() is not called before ha_write_row(), then
+ * PBXT is not registered correctly as a modification transaction.
+ * (mark_trx_read_write call in ha_write_row).
+ * This leads to 2-phase commit not being called as it should when
+ * binary logging is enabled.
+ */
+ if (!pb_open_tab->ot_thread->st_stat_trans) {
+ trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
+ XT_PRINT0(pb_open_tab->ot_thread, "STAT START - ha_pbxt::external_lock --> trans_register_ha\n");
+ pb_open_tab->ot_thread->st_stat_trans = TRUE;
+ }
+
if (lock_type == F_WRLCK || self->st_xact_mode < XT_XACT_REPEATABLE_READ)
self->st_visible_time = self->st_database->db_xn_end_time;
@@ -4831,7 +4834,7 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
}
}
- /* (***) This is required at this level!
+ /* {IS-UPDATE-STAT} This is required at this level!
* No matter how often it is called, it is still the start of a
* statement. We need to make sure statements that are NOT mistaken
* for different type of statement.
@@ -4846,7 +4849,7 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
*/
self->st_is_update = FALSE;
- /* See comment (**) */
+ /* See comment {START-TRANS} */
if (!self->st_xact_data) {
self->st_xact_mode = thd_tx_isolation(thd) <= ISO_READ_COMMITTED ? XT_XACT_COMMITTED_READ : XT_XACT_REPEATABLE_READ;
self->st_ignore_fkeys = (thd_test_options(thd, OPTION_NO_FOREIGN_KEY_CHECKS)) != 0;
@@ -4863,10 +4866,17 @@ int ha_pbxt::start_stmt(THD *thd, thr_lo
}
if (!self->st_auto_commit) {
trans_register_ha(thd, TRUE, pbxt_hton);
- XT_PRINT0(self, "ha_pbxt::start_stmt trans_register_ha all=TRUE\n");
+ XT_PRINT0(self, "START CONN XACT - ha_pbxt::start_stmt --> trans_register_ha\n");
}
}
+ /* Start a statment (see {START-STAT-HACK}): */
+ if (!pb_open_tab->ot_thread->st_stat_trans) {
+ trans_register_ha(pb_mysql_thd, FALSE, pbxt_hton);
+ XT_PRINT0(pb_open_tab->ot_thread, "START STAT - ha_pbxt::start_stmt --> trans_register_ha\n");
+ pb_open_tab->ot_thread->st_stat_trans = TRUE;
+ }
+
if (pb_open_tab->ot_for_update || self->st_xact_mode < XT_XACT_REPEATABLE_READ)
self->st_visible_time = self->st_database->db_xn_end_time;
=== modified file 'storage/pbxt/src/strutil_xt.cc'
--- a/storage/pbxt/src/strutil_xt.cc 2009-11-24 10:55:06 +0000
+++ b/storage/pbxt/src/strutil_xt.cc 2009-12-21 13:13:15 +0000
@@ -380,7 +380,7 @@ xtPublic void xt_int8_to_byte_size(xtInt
/* Version number must also be set in configure.in! */
xtPublic c_char *xt_get_version(void)
{
- return "1.0.09f RC";
+ return "1.0.09g RC";
}
/* Copy and URL decode! */
1
0
[Maria-developers] bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2782)
by knielsen@knielsen-hq.org 29 Dec '09
by knielsen@knielsen-hq.org 29 Dec '09
29 Dec '09
#At lp:maria
2782 knielsen(a)knielsen-hq.org 2009-12-29 [merge]
Merge Sergey's fix for pbxt.join_nested.
modified:
mysql-test/suite/pbxt/r/join_nested.result
mysql-test/suite/pbxt/t/join_nested.test
=== modified file 'mysql-test/suite/pbxt/r/join_nested.result'
--- a/mysql-test/suite/pbxt/r/join_nested.result 2009-11-24 10:19:08 +0000
+++ b/mysql-test/suite/pbxt/r/join_nested.result 2009-12-27 16:48:27 +0000
@@ -968,7 +968,7 @@ id select_type table type possible_keys
Warnings:
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
CREATE INDEX idx_b ON t8(b);
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -1003,22 +1003,23 @@ t0.b=t1.b AND
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00 Using where
-1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
-Warnings:
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join buffer
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2
+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1
+1 SIMPLE t5 ALL idx_b NULL NULL NULL 3
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using join buffer
+ATTENTION: the above EXPLAIN has several competing QEPs with identical
+. costs. To combat the plan change it uses --sorted_result and
+. and --replace tricks
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -1053,19 +1054,20 @@ t0.b=t1.b AND
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00 Using where
-1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
-Warnings:
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ref idx_a idx_a 5 const 1
+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2
+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1
+1 SIMPLE t5 ALL idx_b NULL NULL NULL 3
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using join buffer
+ATTENTION: the above EXPLAIN has several competing QEPs with identical
+. costs. To combat the plan change it uses --sorted_result
+. and --replace tricks
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
=== modified file 'mysql-test/suite/pbxt/t/join_nested.test'
--- a/mysql-test/suite/pbxt/t/join_nested.test 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/t/join_nested.test 2009-12-27 16:48:27 +0000
@@ -546,8 +546,9 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.
CREATE INDEX idx_b ON t8(b);
+--replace_regex /Using where; // /Using where//
--sorted_result
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -582,12 +583,16 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
+--echo ATTENTION: the above EXPLAIN has several competing QEPs with identical
+--echo . costs. To combat the plan change it uses --sorted_result and
+--echo . and --replace tricks
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
+--replace_regex /Using where; // /Using where//
--sorted_result
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -622,6 +627,9 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
+--echo ATTENTION: the above EXPLAIN has several competing QEPs with identical
+--echo . costs. To combat the plan change it uses --sorted_result
+--echo . and --replace tricks
--sorted_result
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1
0
[Maria-developers] Rev 2743: DS-MRR backport: fix buildbot valgrind failures: in file:///home/psergey/dev/maria-5.2-dsmrr-r3/
by Sergey Petrunya 27 Dec '09
by Sergey Petrunya 27 Dec '09
27 Dec '09
At file:///home/psergey/dev/maria-5.2-dsmrr-r3/
------------------------------------------------------------
revno: 2743
revision-id: psergey(a)askmonty.org-20091227202422-fs9fgo8x2wk9ry15
parent: igor(a)askmonty.org-20091222151849-rqp41x6x9r14liz6
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: maria-5.2-dsmrr-r3
timestamp: Sun 2009-12-27 23:24:22 +0300
message:
DS-MRR backport: fix buildbot valgrind failures:
- Do call update_used_tables() for new conditions obtained when adding
outer join's triggered conditions. Correct values of used_tables() are
now needed for condition pushdown.
- Update test results
=== modified file 'mysql-test/suite/pbxt/r/join_outer.result'
--- a/mysql-test/suite/pbxt/r/join_outer.result 2009-12-16 09:28:51 +0000
+++ b/mysql-test/suite/pbxt/r/join_outer.result 2009-12-27 20:24:22 +0000
@@ -886,7 +886,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 const PRIMARY PRIMARY 4 const 1 Using index
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
-1 SIMPLE t2 ALL NULL NULL NULL NULL 2
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE t3 ALL NULL NULL NULL NULL 2
drop table t1,t2;
create table t1 (a int, b int);
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2009-12-21 02:26:15 +0000
+++ b/sql/sql_select.cc 2009-12-27 20:24:22 +0000
@@ -6201,6 +6201,7 @@
cond_tab->set_select_cond(new_cond, __LINE__);
if (!cond_tab->select_cond)
DBUG_RETURN(1);
+ cond_tab->select_cond->update_used_tables();
cond_tab->select_cond->quick_fix_field();
}
}
@@ -6482,6 +6483,7 @@
if (!cond_tab->select_cond)
DBUG_RETURN(1);
cond_tab->select_cond->quick_fix_field();
+ cond_tab->select_cond->update_used_tables();
if (cond_tab->select)
cond_tab->select->cond= cond_tab->select_cond;
}
@@ -6537,6 +6539,7 @@
(ulong)cond_tab->select_cond));
if (!cond_tab->select_cond)
DBUG_RETURN(1);
+ cond_tab->select_cond->update_used_tables();
cond_tab->select_cond->quick_fix_field();
if (cond_tab->select)
cond_tab->select->cond= cond_tab->select_cond;
1
0
[Maria-developers] Rev 2777: Make pbxt.join_nested test pass in file:///home/psergey/dev/5.1-merge-look/
by Sergey Petrunya 27 Dec '09
by Sergey Petrunya 27 Dec '09
27 Dec '09
At file:///home/psergey/dev/5.1-merge-look/
------------------------------------------------------------
revno: 2777
revision-id: psergey(a)askmonty.org-20091227164827-038uergwe82hyd1m
parent: knielsen(a)knielsen-hq.org-20091214083138-axta6hzovkyt65wg
committer: Sergey Petrunya <psergey(a)askmonty.org>
branch nick: 5.1-merge-look
timestamp: Sun 2009-12-27 19:48:27 +0300
message:
Make pbxt.join_nested test pass
- The reason the test failed was competition between 3+ QEPs with identical
costs. Before, two plans were competing, and that was addressed by using
--sorted_result on the EXPLAIN output because they were different only in
join order.
Now we've got a 3rd plan which differs with "Using where" and that doesn't
work anymore.
- This patch fixes it by removing 'Using where' from EXPLAIN output. Test coverage
is somewhat reduced but probably still ok as PBXT and nested outer join processing
have no interaction and we don't expect any bugs here.
=== modified file 'mysql-test/suite/pbxt/r/join_nested.result'
--- a/mysql-test/suite/pbxt/r/join_nested.result 2009-11-24 10:19:08 +0000
+++ b/mysql-test/suite/pbxt/r/join_nested.result 2009-12-27 16:48:27 +0000
@@ -968,7 +968,7 @@
Warnings:
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`
.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
CREATE INDEX idx_b ON t8(b);
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -1003,22 +1003,23 @@
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00 Using where
-1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`
.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
-Warnings:
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using join buffer
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2
+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1
+1 SIMPLE t5 ALL idx_b NULL NULL NULL 3
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using join buffer
+ATTENTION: the above EXPLAIN has several competing QEPs with identical
+. costs. To combat the plan change it uses --sorted_result and
+. and --replace tricks
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -1053,19 +1054,20 @@
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
-id select_type table type possible_keys key key_len ref rows filtered Extra
-1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00 Using where
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00 Using where
-1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
-1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
-Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`
.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
-Warnings:
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ref idx_a idx_a 5 const 1
+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3
+1 SIMPLE t3 ALL NULL NULL NULL NULL 2
+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1
+1 SIMPLE t5 ALL idx_b NULL NULL NULL 3
+1 SIMPLE t6 ALL NULL NULL NULL NULL 3
+1 SIMPLE t7 ALL NULL NULL NULL NULL 2
+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1
+1 SIMPLE t9 ALL NULL NULL NULL NULL 3 Using join buffer
+ATTENTION: the above EXPLAIN has several competing QEPs with identical
+. costs. To combat the plan change it uses --sorted_result
+. and --replace tricks
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
=== modified file 'mysql-test/suite/pbxt/t/join_nested.test'
--- a/mysql-test/suite/pbxt/t/join_nested.test 2009-08-17 15:57:58 +0000
+++ b/mysql-test/suite/pbxt/t/join_nested.test 2009-12-27 16:48:27 +0000
@@ -546,8 +546,9 @@
CREATE INDEX idx_b ON t8(b);
+--replace_regex /Using where; // /Using where//
--sorted_result
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -582,12 +583,16 @@
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
+--echo ATTENTION: the above EXPLAIN has several competing QEPs with identical
+--echo . costs. To combat the plan change it uses --sorted_result and
+--echo . and --replace tricks
CREATE INDEX idx_b ON t1(b);
CREATE INDEX idx_a ON t0(a);
+--replace_regex /Using where; // /Using where//
--sorted_result
-EXPLAIN EXTENDED
+EXPLAIN
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
FROM t0,t1
@@ -622,6 +627,9 @@
(t8.a < 1 OR t8.c IS NULL) AND
(t8.b=t9.b OR t8.c IS NULL) AND
(t9.a=1);
+--echo ATTENTION: the above EXPLAIN has several competing QEPs with identical
+--echo . costs. To combat the plan change it uses --sorted_result
+--echo . and --replace tricks
--sorted_result
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1
1