diff -ruN a/configure b/configure --- a/configure 2010-04-06 23:13:20.000000000 +0900 +++ b/configure 2010-04-28 19:12:59.000000000 +0900 @@ -2062,13 +2062,13 @@ === InnoDB Storage Engine === Plugin Name: innobase Description: Transactional Tables using InnoDB - Supports build: static and dynamic + Supports build: dynamic Configurations: max, max-no-ndb === InnoDB Storage Engine === Plugin Name: innodb_plugin Description: Transactional Tables using InnoDB - Supports build: dynamic + Supports build: static and dynamic Configurations: max, max-no-ndb === MyISAM Storage Engine === @@ -42290,7 +42290,8 @@ - mysql_plugin_innobase=yes + { $as_echo "$as_me:$LINENO: WARNING: InnoDB Storage Engine can only be built as a plugin" >&5 +$as_echo "$as_me: WARNING: InnoDB Storage Engine can only be built as a plugin" >&2;} @@ -42302,8 +42303,7 @@ - { $as_echo "$as_me:$LINENO: WARNING: InnoDB Storage Engine can only be built as a plugin" >&5 -$as_echo "$as_me: WARNING: InnoDB Storage Engine can only be built as a plugin" >&2;} + mysql_plugin_innodb_plugin=yes @@ -43718,7 +43718,7 @@ { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } else - + with_plugin_innobase='' if test "X$mysql_plugin_innobase" != Xyes -a \ "X$with_plugin_innobase" != Xyes; then @@ -43744,20 +43744,11 @@ else - - mysql_use_plugin_dir="storage/innobase" - mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/storage/innobase/libinnobase.a" - - - - cat >>confdefs.h <<\_ACEOF -#define WITH_INNOBASE_STORAGE_ENGINE 1 -_ACEOF - - - plugin_innobase_static_target="libinnobase.a" - - plugin_innobase_shared_target="" + { $as_echo "$as_me:$LINENO: result: error" >&5 +$as_echo "error" >&6; } + { { $as_echo "$as_me:$LINENO: error: Plugin innobase does not support static linking" >&5 +$as_echo "$as_me: error: Plugin innobase does not support static linking" >&2;} + { (exit 1); exit 1; }; } mysql_plugin_defs="$mysql_plugin_defs, builtin_innobase_plugin" @@ -43845,7 +43836,7 @@ { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } else - with_plugin_innodb_plugin='' + if test "X$mysql_plugin_innodb_plugin" != Xyes -a \ "X$with_plugin_innodb_plugin" != Xyes; then @@ -43871,11 +43862,20 @@ else - { $as_echo "$as_me:$LINENO: result: error" >&5 -$as_echo "error" >&6; } - { { $as_echo "$as_me:$LINENO: error: Plugin innodb_plugin does not support static linking" >&5 -$as_echo "$as_me: error: Plugin innodb_plugin does not support static linking" >&2;} - { (exit 1); exit 1; }; } + + mysql_use_plugin_dir="storage/innodb_plugin" + mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/storage/innodb_plugin/libinnobase.a" + + + + cat >>confdefs.h <<\_ACEOF +#define WITH_INNODB_PLUGIN_STORAGE_ENGINE 1 +_ACEOF + + + plugin_innodb_plugin_static_target="libinnobase.a" + + plugin_innodb_plugin_shared_target="" mysql_plugin_defs="$mysql_plugin_defs, builtin_innodb_plugin_plugin" diff -ruN a/mysql-test/include/have_innodb_plugin.inc b/mysql-test/include/have_innodb_plugin.inc --- a/mysql-test/include/have_innodb_plugin.inc 2010-05-07 00:59:10.000000000 +0900 +++ b/mysql-test/include/have_innodb_plugin.inc 2010-05-25 18:12:49.000000000 +0900 @@ -1,4 +1,4 @@ disable_query_log; --require r/true.require -SELECT (plugin_library LIKE 'ha_innodb_plugin%') AS `TRUE` FROM information_schema.plugins WHERE LOWER(plugin_name) = 'innodb' AND LOWER(plugin_status) = 'active'; +select (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` from information_schema.engines where engine = 'innodb'; enable_query_log; diff -ruN a/mysql-test/include/read_many_rows.inc b/mysql-test/include/read_many_rows.inc --- a/mysql-test/include/read_many_rows.inc 2010-04-06 23:37:12.000000000 +0900 +++ b/mysql-test/include/read_many_rows.inc 2010-05-18 15:39:02.000000000 +0900 @@ -112,8 +112,12 @@ insert into t1 values(1); connection con2; ---error 1213 +#InnoDB Plugin treats this situation as "timeout" not "deadlock" +#So, we need to rollback +#--error 1213 +--error 1205 reap; +rollback; select @a; # check that the whole transaction was rolled back select * from t2; @@ -134,6 +138,9 @@ connection con2; reap; +#InnoDB Plugin treats this situation as "timeout" not "deadlock" +#So, we need to rollback +rollback; select @a,@b; # check that the whole transaction was rolled back select * from t2; @@ -155,6 +162,9 @@ connection con2; reap; +#InnoDB Plugin treats this situation as "timeout" not "deadlock" +#So, we need to rollback +rollback; # check that the whole transaction was rolled back select * from t2; diff -ruN a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm --- a/mysql-test/lib/mtr_cases.pm 2010-07-09 21:34:53.000000000 +0900 +++ b/mysql-test/lib/mtr_cases.pm 2010-07-26 21:23:05.378120605 +0900 @@ -932,7 +932,7 @@ push(@{$tinfo->{'slave_opt'}}, "--loose-federated"); } - if ( $tinfo->{'innodb_test'} ) + if ( $tinfo->{'innodb_test'} || $tinfo->{'innodb_plugin_test'} ) { # This is a test that needs innodb if ( $::mysqld_variables{'innodb'} eq "OFF" || @@ -944,36 +944,6 @@ return $tinfo; } } - elsif ( $tinfo->{'innodb_plugin_test'} ) - { - # This is a test that needs the innodb plugin - if (!&find_innodb_plugin) - { - # innodb plugin is not supported, skip it - $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "No innodb plugin support"; - return $tinfo; - } - - my $sep= (IS_WINDOWS) ? ';' : ':'; - my $plugin_filename= basename($lib_innodb_plugin); - my $plugin_list= - "innodb=$plugin_filename$sep" . - "innodb_trx=$plugin_filename$sep" . - "innodb_locks=$plugin_filename$sep" . - "innodb_lock_waits=$plugin_filename$sep" . - "innodb_cmp=$plugin_filename$sep" . - "innodb_cmp_reset=$plugin_filename$sep" . - "innodb_cmpmem=$plugin_filename$sep" . - "innodb_cmpmem_reset=$plugin_filename"; - - foreach my $k ('master_opt', 'slave_opt') - { - push(@{$tinfo->{$k}}, '--ignore-builtin-innodb'); - push(@{$tinfo->{$k}}, '--plugin-dir=' . dirname($lib_innodb_plugin)); - push(@{$tinfo->{$k}}, "--plugin-load=$plugin_list"); - } - } else { push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb"); diff -ruN a/mysql-test/r/read_many_rows_innodb.result b/mysql-test/r/read_many_rows_innodb.result --- a/mysql-test/r/read_many_rows_innodb.result 2010-04-06 23:36:58.000000000 +0900 +++ b/mysql-test/r/read_many_rows_innodb.result 2010-05-18 15:39:24.000000000 +0900 @@ -64,7 +64,8 @@ insert into t2 values(123); insert into t1 values(1); insert into t1 values(1); -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +rollback; select @a; @a NULL @@ -77,9 +78,10 @@ insert into t2 values(123); call proc24989(); insert into t1 values(1); +rollback; select @a,@b; @a @b -exception deadlock +exception NULL select * from t2; f2 commit; @@ -90,10 +92,9 @@ call proc24989_2(); insert into t1 values(1); commit; -exception -Outer handler continued continued +rollback; select * from t2; f2 drop procedure proc24989; diff -ruN a/storage/innobase/plug.in b/storage/innobase/plug.in --- a/storage/innobase/plug.in 2010-04-06 23:07:11.000000000 +0900 +++ b/storage/innobase/plug.in 2010-04-28 19:12:59.000000000 +0900 @@ -1,7 +1,6 @@ MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine], [Transactional Tables using InnoDB], [max,max-no-ndb]) MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase]) -MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a]) MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la]) MYSQL_PLUGIN_ACTIONS(innobase, [ AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"]) diff -ruN a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in --- a/storage/innodb_plugin/plug.in 2010-04-06 23:07:14.000000000 +0900 +++ b/storage/innodb_plugin/plug.in 2010-04-28 19:12:59.000000000 +0900 @@ -17,6 +17,7 @@ MYSQL_STORAGE_ENGINE(innodb_plugin,, [InnoDB Storage Engine], [Transactional Tables using InnoDB], [max,max-no-ndb]) MYSQL_PLUGIN_DIRECTORY(innodb_plugin, [storage/innodb_plugin]) +MYSQL_PLUGIN_STATIC(innodb_plugin, [libinnobase.a]) MYSQL_PLUGIN_DYNAMIC(innodb_plugin, [ha_innodb_plugin.la]) MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ AC_CHECK_HEADERS(sched.h)