summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Docs/Makefile.am2
-rw-r--r--client/CMakeLists.txt3
-rw-r--r--config/ac-macros/plugins.m432
-rw-r--r--configure.in4
-rw-r--r--include/my_global.h9
-rw-r--r--include/mysql.h6
-rw-r--r--libmysqld/Makefile.am14
-rw-r--r--libmysqld/lib_sql.cc1
-rw-r--r--mysql-test/r/ps.result461
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysql-test/t/ps.test105
-rw-r--r--mysys/thr_alarm.c3
-rw-r--r--mysys/thr_lock.c2
-rwxr-xr-xnetware/BUILD/compile-AUTOTOOLS6
-rwxr-xr-xnetware/BUILD/compile-netware-START1
-rwxr-xr-xnetware/BUILD/mwenv2
-rwxr-xr-xnetware/BUILD/nwbootstrap17
-rw-r--r--scripts/make_binary_distribution.sh10
-rwxr-xr-xscripts/make_win_bin_dist425
-rw-r--r--sql/Makefile.am16
-rw-r--r--sql/log_event.cc4
-rw-r--r--sql/sql_class.cc8
-rw-r--r--sql/sql_yacc.yy1
-rw-r--r--storage/federated/plug.in1
-rw-r--r--storage/heap/plug.in1
-rw-r--r--storage/innobase/plug.in1
-rw-r--r--storage/myisam/plug.in1
-rw-r--r--storage/myisammrg/plug.in1
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp58
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp15
-rw-r--r--storage/ndb/src/kernel/vm/Pool.hpp6
-rw-r--r--support-files/mysql.spec.sh16
-rw-r--r--unittest/mytap/tap.c18
33 files changed, 791 insertions, 460 deletions
diff --git a/Docs/Makefile.am b/Docs/Makefile.am
index 40e987bb254..09291132e73 100644
--- a/Docs/Makefile.am
+++ b/Docs/Makefile.am
@@ -66,7 +66,7 @@ INSTALL-BINARY: mysql.info $(GT)
# It is not in BitKeeper, but is downloaded from intranet by Bootstrap.
dist-hook:
if [ -e $(srcdir)/manual.chm ] ; then \
- cp $(srcdir)/manual.chm $(distdir); \
+ cp -f $(srcdir)/manual.chm $(distdir); \
fi
# Don't update the files from bitkeeper
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 26cc36c7f6f..b2b734a48f4 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -65,6 +65,9 @@ TARGET_LINK_LIBRARIES(mysqldump mysqlclient mysys dbug yassl taocrypt zlib wsock
ADD_EXECUTABLE(mysqlimport mysqlimport.c)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl taocrypt zlib wsock32)
+ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c)
+TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient mysys dbug yassl taocrypt zlib wsock32)
+
ADD_EXECUTABLE(mysqlshow mysqlshow.c)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient mysys dbug yassl taocrypt zlib wsock32)
diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4
index 87f057e696a..b022ab67045 100644
--- a/config/ac-macros/plugins.m4
+++ b/config/ac-macros/plugins.m4
@@ -254,6 +254,29 @@ AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
])
dnl ---------------------------------------------------------------------------
+dnl Macro: MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS
+dnl
+dnl SYNOPSIS
+dnl MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS([name],[file name])
+dnl
+dnl DESCRIPTION
+dnl Some modules in plugins keep dependance on structures
+dnl declared in sql/ (THD class usually)
+dnl That has to be fixed in the future, but until then
+dnl we have to recompile these modules when we want to
+dnl to compile server parts with the different #defines
+dnl Normally it happens when we compile the embedded server
+dnl Thus one should mark such files in his handler using this macro
+dnl (currently only one such a file per plugin is supported)
+dnl
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS],[
+ MYSQL_REQUIRE_PLUGIN([$1])
+ m4_define([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]), [$2])
+])
+
+dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CONFIGURE_PLUGINS
dnl
dnl SYNOPSIS
@@ -282,6 +305,9 @@ AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[
AC_SUBST([mysql_pg_dirs])
AC_SUBST([mysql_se_unittest_dirs])
AC_SUBST([mysql_pg_unittest_dirs])
+ AC_SUBST([condition_dependent_plugin_modules])
+ AC_SUBST([condition_dependent_plugin_links])
+ AC_SUBST([condition_dependent_plugin_includes])
])
])
])
@@ -307,6 +333,7 @@ AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
+ [MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]),
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
)
])
@@ -402,6 +429,11 @@ dnl Although this is "pretty", it breaks libmysqld build
mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
[with_plugin_]$2=yes
AC_MSG_RESULT([yes])
+ m4_ifdef([$11],[
+ condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp($11, [[^/]+$], [\&])"
+ condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11"
+ condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp($11, [^.+[/$]], [\&])"
+ ])
fi
m4_ifdef([$6],[
if test -n "$mysql_use_plugin_dir" ; then
diff --git a/configure.in b/configure.in
index 22de4f2ff17..61eb8a9d259 100644
--- a/configure.in
+++ b/configure.in
@@ -1441,9 +1441,9 @@ fi
# dlopen, dlerror
case "$with_mysqld_ldflags " in
- *"-static "*)
+ *"-all-static "*)
# No need to check for dlopen when mysqld is linked with
- # -all-static or -static as it won't be able to load any functions.
+ # -all-static as it won't be able to load any functions.
# NOTE! It would be better if it was possible to test if dlopen
# can be used, but a good way to test it couldn't be found
diff --git a/include/my_global.h b/include/my_global.h
index 39947735f3c..a7ec41068b3 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -614,12 +614,17 @@ C_MODE_END
#define _STATIC_VARARGS(X) X
#define _PC(X) X
+/* The DBUG_ON flag always takes precedence over default DBUG_OFF */
#if defined(DBUG_ON) && defined(DBUG_OFF)
#undef DBUG_OFF
#endif
-#if defined(_lint) && !defined(DBUG_OFF)
-#define DBUG_OFF
+/* We might be forced to turn debug off, if not turned off already */
+#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
+# define DBUG_OFF
+# ifdef DBUG_ON
+# undef DBUG_ON
+# endif
#endif
#include <my_dbug.h>
diff --git a/include/mysql.h b/include/mysql.h
index ae4a8222c5b..8ef3f1273ec 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -293,12 +293,6 @@ typedef struct st_mysql
/* needed for embedded server - no net buffer to store the 'info' */
char *info_buffer;
#endif
- /*
- In embedded server it points to the statement that is processed
- in the current query. We store some results directly in statement
- fields then.
- */
- struct st_mysql_stmt *current_stmt;
} MYSQL;
typedef struct st_mysql_res {
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index fe19e08328d..0de37db63e2 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -32,7 +32,8 @@ INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \
-I$(top_srcdir)/regex \
- $(openssl_includes) @ZLIB_INCLUDES@
+ $(openssl_includes) @ZLIB_INCLUDES@ \
+ @condition_dependent_plugin_includes@
noinst_LIBRARIES = libmysqld_int.a
pkglib_LIBRARIES = libmysqld.a
@@ -77,6 +78,8 @@ libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
libmysqld_a_SOURCES=
sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES)
+storagesources = @condition_dependent_plugin_modules@
+storagesourceslinks = @condition_dependent_plugin_links@
# automake misses these
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
@@ -170,12 +173,19 @@ link_sources:
@LN_CP_F@ `find $(srcdir)/../sql -name "$$f"` "$$f"; \
done; \
fi; \
+ if test -n "$(storagesources)" ; \
+ then \
+ rm -f $(storagesources); \
+ for f in $(storagesourceslinks); do \
+ @LN_CP_F@ $(top_srcdir)/$$f . ; \
+ done; \
+ fi; \
rm -f client_settings.h; \
@LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h client_settings.h
clean-local:
- rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) | sed "s;\.lo;.c;g"` \
+ rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"` \
$(top_srcdir)/linked_libmysqld_sources; \
rm -f client_settings.h
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 5ac2c163c4e..b5efd4a82af 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -100,7 +100,6 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
mysql->affected_rows= ~(my_ulonglong) 0;
mysql->field_count= 0;
net->last_errno= 0;
- mysql->current_stmt= stmt;
thd->store_globals(); // Fix if more than one connect
/*
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index b7dae03bf47..f7a9f0440a3 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -499,54 +499,6 @@ create temporary table if not exists t1 (a1 int);
execute stmt;
drop temporary table t1;
deallocate prepare stmt;
-CREATE TABLE t1(
-ID int(10) unsigned NOT NULL auto_increment,
-Member_ID varchar(15) NOT NULL default '',
-Action varchar(12) NOT NULL,
-Action_Date datetime NOT NULL,
-Track varchar(15) default NULL,
-User varchar(12) default NULL,
-Date_Updated timestamp NOT NULL default CURRENT_TIMESTAMP on update
-CURRENT_TIMESTAMP,
-PRIMARY KEY (ID),
-KEY Action (Action),
-KEY Action_Date (Action_Date)
-);
-INSERT INTO t1(Member_ID, Action, Action_Date, Track) VALUES
-('111111', 'Disenrolled', '2006-03-01', 'CAD' ),
-('111111', 'Enrolled', '2006-03-01', 'CAD' ),
-('111111', 'Disenrolled', '2006-07-03', 'CAD' ),
-('222222', 'Enrolled', '2006-03-07', 'CAD' ),
-('222222', 'Enrolled', '2006-03-07', 'CHF' ),
-('222222', 'Disenrolled', '2006-08-02', 'CHF' ),
-('333333', 'Enrolled', '2006-03-01', 'CAD' ),
-('333333', 'Disenrolled', '2006-03-01', 'CAD' ),
-('444444', 'Enrolled', '2006-03-01', 'CAD' ),
-('555555', 'Disenrolled', '2006-03-01', 'CAD' ),
-('555555', 'Enrolled', '2006-07-21', 'CAD' ),
-('555555', 'Disenrolled', '2006-03-01', 'CHF' ),
-('666666', 'Enrolled', '2006-02-09', 'CAD' ),
-('666666', 'Enrolled', '2006-05-12', 'CHF' ),
-('666666', 'Disenrolled', '2006-06-01', 'CAD' );
-PREPARE STMT FROM
-"SELECT GROUP_CONCAT(Track SEPARATOR ', ') FROM t1
- WHERE Member_ID=? AND Action='Enrolled' AND
- (Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t1
- WHERE Member_ID=?
- GROUP BY Track
- HAVING Track>='CAD' AND
- MAX(Action_Date)>'2006-03-01')";
-SET @id='111111';
-EXECUTE STMT USING @id,@id;
-GROUP_CONCAT(Track SEPARATOR ', ')
-NULL
-SET @id='222222';
-EXECUTE STMT USING @id,@id;
-GROUP_CONCAT(Track SEPARATOR ', ')
-CAD
-DEALLOCATE PREPARE STMT;
-DROP TABLE t1;
-End of 4.1 tests
create table t1 (a varchar(20));
insert into t1 values ('foo');
prepare stmt FROM 'SELECT char_length (a) FROM t1';
@@ -564,77 +516,6 @@ SELECT FOUND_ROWS();
FOUND_ROWS()
2
deallocate prepare stmt;
-create table t1 (a char(3) not null, b char(3) not null,
-c char(3) not null, primary key (a, b, c));
-create table t2 like t1;
-prepare stmt from
-"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
- where t1.a=1";
-execute stmt;
-a
-execute stmt;
-a
-execute stmt;
-a
-prepare stmt from
-"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from
-(t1 left outer join t2 on t2.a=? and t1.b=t2.b)
-left outer join t2 t3 on t3.a=? where t1.a=?";
-set @a:=1, @b:=1, @c:=1;
-execute stmt using @a, @b, @c;
-a b c a b c
-execute stmt using @a, @b, @c;
-a b c a b c
-execute stmt using @a, @b, @c;
-a b c a b c
-deallocate prepare stmt;
-drop table t1,t2;
-SET @aux= "SELECT COUNT(*)
- FROM INFORMATION_SCHEMA.COLUMNS A,
- INFORMATION_SCHEMA.COLUMNS B
- WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
- AND A.TABLE_NAME = B.TABLE_NAME
- AND A.COLUMN_NAME = B.COLUMN_NAME AND
- A.TABLE_NAME = 'user'";
-prepare my_stmt from @aux;
-execute my_stmt;
-COUNT(*)
-39
-execute my_stmt;
-COUNT(*)
-39
-execute my_stmt;
-COUNT(*)
-39
-deallocate prepare my_stmt;
-drop procedure if exists p1|
-drop table if exists t1|
-create table t1 (id int)|
-insert into t1 values(1)|
-create procedure p1(a int, b int)
-begin
-declare c int;
-select max(id)+1 into c from t1;
-insert into t1 select a+b;
-insert into t1 select a-b;
-insert into t1 select a-c;
-end|
-set @a= 3, @b= 4|
-prepare stmt from "call p1(?, ?)"|
-execute stmt using @a, @b|
-execute stmt using @a, @b|
-select * from t1|
-id
-1
-7
--1
-1
-7
--1
--5
-deallocate prepare stmt|
-drop procedure p1|
-drop table t1|
drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
@@ -698,47 +579,6 @@ id
3
deallocate prepare stmt;
drop table t1, t2;
-create table t1 (a int);
-insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
-prepare stmt from "select * from t1 limit ?, ?";
-set @offset=0, @limit=1;
-execute stmt using @offset, @limit;
-a
-1
-select * from t1 limit 0, 1;
-a
-1
-set @offset=3, @limit=2;
-execute stmt using @offset, @limit;
-a
-4
-5
-select * from t1 limit 3, 2;
-a
-4
-5
-prepare stmt from "select * from t1 limit ?";
-execute stmt using @limit;
-a
-1
-2
-prepare stmt from "select * from t1 where a in (select a from t1 limit ?)";
-ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
-prepare stmt from "select * from t1 union all select * from t1 limit ?, ?";
-set @offset=9;
-set @limit=2;
-execute stmt using @offset, @limit;
-a
-10
-1
-prepare stmt from "(select * from t1 limit ?, ?) union all
- (select * from t1 limit ?, ?) order by a limit ?";
-execute stmt using @offset, @limit, @offset, @limit, @limit;
-a
-10
-10
-drop table t1;
-deallocate prepare stmt;
create table t1 (id int);
prepare stmt from "insert into t1 (id) select id from t1 union select id from t1";
execute stmt;
@@ -839,15 +679,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
select ? from t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? from t1' at line 1
drop table t1;
-CREATE TABLE b12651_T1(a int) ENGINE=MYISAM;
-CREATE TABLE b12651_T2(b int) ENGINE=MYISAM;
-CREATE VIEW b12651_V1 as SELECT b FROM b12651_T2;
-PREPARE b12651 FROM 'SELECT 1 FROM b12651_T1 WHERE a IN (SELECT b FROM b12651_V1)';
-EXECUTE b12651;
-1
-DROP VIEW b12651_V1;
-DROP TABLE b12651_T1, b12651_T2;
-DEALLOCATE PREPARE b12651;
prepare stmt from "select @@time_zone";
execute stmt;
@@time_zone
@@ -1064,6 +895,194 @@ select @@max_prepared_stmt_count, @@prepared_stmt_count;
@@max_prepared_stmt_count @@prepared_stmt_count
3 0
set global max_prepared_stmt_count= @old_max_prepared_stmt_count;
+drop table if exists t1;
+create temporary table if not exists t1 (a1 int);
+prepare stmt from "delete t1 from t1 where (cast(a1/3 as unsigned) * 3) = a1";
+drop temporary table t1;
+create temporary table if not exists t1 (a1 int);
+execute stmt;
+drop temporary table t1;
+create temporary table if not exists t1 (a1 int);
+execute stmt;
+drop temporary table t1;
+create temporary table if not exists t1 (a1 int);
+execute stmt;
+drop temporary table t1;
+deallocate prepare stmt;
+CREATE TABLE t1(
+ID int(10) unsigned NOT NULL auto_increment,
+Member_ID varchar(15) NOT NULL default '',
+Action varchar(12) NOT NULL,
+Action_Date datetime NOT NULL,
+Track varchar(15) default NULL,
+User varchar(12) default NULL,
+Date_Updated timestamp NOT NULL default CURRENT_TIMESTAMP on update
+CURRENT_TIMESTAMP,
+PRIMARY KEY (ID),
+KEY Action (Action),
+KEY Action_Date (Action_Date)
+);
+INSERT INTO t1(Member_ID, Action, Action_Date, Track) VALUES
+('111111', 'Disenrolled', '2006-03-01', 'CAD' ),
+('111111', 'Enrolled', '2006-03-01', 'CAD' ),
+('111111', 'Disenrolled', '2006-07-03', 'CAD' ),
+('222222', 'Enrolled', '2006-03-07', 'CAD' ),
+('222222', 'Enrolled', '2006-03-07', 'CHF' ),
+('222222', 'Disenrolled', '2006-08-02', 'CHF' ),
+('333333', 'Enrolled', '2006-03-01', 'CAD' ),
+('333333', 'Disenrolled', '2006-03-01', 'CAD' ),
+('444444', 'Enrolled', '2006-03-01', 'CAD' ),
+('555555', 'Disenrolled', '2006-03-01', 'CAD' ),
+('555555', 'Enrolled', '2006-07-21', 'CAD' ),
+('555555', 'Disenrolled', '2006-03-01', 'CHF' ),
+('666666', 'Enrolled', '2006-02-09', 'CAD' ),
+('666666', 'Enrolled', '2006-05-12', 'CHF' ),
+('666666', 'Disenrolled', '2006-06-01', 'CAD' );
+PREPARE STMT FROM
+"SELECT GROUP_CONCAT(Track SEPARATOR ', ') FROM t1
+ WHERE Member_ID=? AND Action='Enrolled' AND
+ (Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t1
+ WHERE Member_ID=?
+ GROUP BY Track
+ HAVING Track>='CAD' AND
+ MAX(Action_Date)>'2006-03-01')";
+SET @id='111111';
+EXECUTE STMT USING @id,@id;
+GROUP_CONCAT(Track SEPARATOR ', ')
+NULL
+SET @id='222222';
+EXECUTE STMT USING @id,@id;
+GROUP_CONCAT(Track SEPARATOR ', ')
+CAD
+DEALLOCATE PREPARE STMT;
+DROP TABLE t1;
+End of 4.1 tests
+create table t1 (a varchar(20));
+insert into t1 values ('foo');
+prepare stmt FROM 'SELECT char_length (a) FROM t1';
+ERROR 42000: FUNCTION test.char_length does not exist
+drop table t1;
+create table t1 (a char(3) not null, b char(3) not null,
+c char(3) not null, primary key (a, b, c));
+create table t2 like t1;
+prepare stmt from
+"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
+ where t1.a=1";
+execute stmt;
+a
+execute stmt;
+a
+execute stmt;
+a
+prepare stmt from
+"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from
+(t1 left outer join t2 on t2.a=? and t1.b=t2.b)
+left outer join t2 t3 on t3.a=? where t1.a=?";
+set @a:=1, @b:=1, @c:=1;
+execute stmt using @a, @b, @c;
+a b c a b c
+execute stmt using @a, @b, @c;
+a b c a b c
+execute stmt using @a, @b, @c;
+a b c a b c
+deallocate prepare stmt;
+drop table t1,t2;
+SET @aux= "SELECT COUNT(*)
+ FROM INFORMATION_SCHEMA.COLUMNS A,
+ INFORMATION_SCHEMA.COLUMNS B
+ WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
+ AND A.TABLE_NAME = B.TABLE_NAME
+ AND A.COLUMN_NAME = B.COLUMN_NAME AND
+ A.TABLE_NAME = 'user'";
+prepare my_stmt from @aux;
+execute my_stmt;
+COUNT(*)
+39
+execute my_stmt;
+COUNT(*)
+39
+execute my_stmt;
+COUNT(*)
+39
+deallocate prepare my_stmt;
+drop procedure if exists p1|
+drop table if exists t1|
+create table t1 (id int)|
+insert into t1 values(1)|
+create procedure p1(a int, b int)
+begin
+declare c int;
+select max(id)+1 into c from t1;
+insert into t1 select a+b;
+insert into t1 select a-b;
+insert into t1 select a-c;
+end|
+set @a= 3, @b= 4|
+prepare stmt from "call p1(?, ?)"|
+execute stmt using @a, @b|
+execute stmt using @a, @b|
+select * from t1|
+id
+1
+7
+-1
+1
+7
+-1
+-5
+deallocate prepare stmt|
+drop procedure p1|
+drop table t1|
+create table t1 (a int);
+insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+prepare stmt from "select * from t1 limit ?, ?";
+set @offset=0, @limit=1;
+execute stmt using @offset, @limit;
+a
+1
+select * from t1 limit 0, 1;
+a
+1
+set @offset=3, @limit=2;
+execute stmt using @offset, @limit;
+a
+4
+5
+select * from t1 limit 3, 2;
+a
+4
+5
+prepare stmt from "select * from t1 limit ?";
+execute stmt using @limit;
+a
+1
+2
+prepare stmt from "select * from t1 where a in (select a from t1 limit ?)";
+ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
+prepare stmt from "select * from t1 union all select * from t1 limit ?, ?";
+set @offset=9;
+set @limit=2;
+execute stmt using @offset, @limit;
+a
+10
+1
+prepare stmt from "(select * from t1 limit ?, ?) union all
+ (select * from t1 limit ?, ?) order by a limit ?";
+execute stmt using @offset, @limit, @offset, @limit, @limit;
+a
+10
+10
+drop table t1;
+deallocate prepare stmt;
+CREATE TABLE b12651_T1(a int) ENGINE=MYISAM;
+CREATE TABLE b12651_T2(b int) ENGINE=MYISAM;
+CREATE VIEW b12651_V1 as SELECT b FROM b12651_T2;
+PREPARE b12651 FROM 'SELECT 1 FROM b12651_T1 WHERE a IN (SELECT b FROM b12651_V1)';
+EXECUTE b12651;
+1
+DROP VIEW b12651_V1;
+DROP TABLE b12651_T1, b12651_T2;
+DEALLOCATE PREPARE b12651;
create table t1 (id int);
prepare ins_call from "insert into t1 (id) values (1)";
execute ins_call;
@@ -1365,22 +1384,26 @@ create procedure proc_1() reset query cache;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin reset query cache; return 1; end|
+ERROR 0A000: RESET is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 0A000: FLUSH is not allowed in stored function or trigger
+ERROR 0A000: RESET is not allowed in stored function or trigger
drop function func_1;
+drop procedure proc_1;
prepare abc from "reset query cache";
execute abc;
execute abc;
execute abc;
deallocate prepare abc;
create procedure proc_1() reset master;
-drop procedure proc_1;
create function func_1() returns int begin reset master; return 1; end|
+ERROR 0A000: RESET is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 0A000: FLUSH is not allowed in stored function or trigger
+ERROR 0A000: RESET is not allowed in stored function or trigger
drop function func_1;
+drop procedure proc_1;
prepare abc from "reset master";
execute abc;
execute abc;
@@ -1390,11 +1413,13 @@ create procedure proc_1() reset slave;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin reset slave; return 1; end|
+ERROR 0A000: RESET is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 0A000: FLUSH is not allowed in stored function or trigger
+ERROR 0A000: RESET is not allowed in stored function or trigger
drop function func_1;
+drop procedure proc_1;
prepare abc from "reset slave";
execute abc;
execute abc;
@@ -1429,13 +1454,13 @@ call proc_1();
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush hosts; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush hosts";
execute abc;
execute abc;
@@ -1445,13 +1470,13 @@ create procedure proc_1() flush privileges;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush privileges; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush privileges";
deallocate prepare abc;
create procedure proc_1() flush tables with read lock;
@@ -1461,9 +1486,13 @@ call proc_1();
unlock tables;
call proc_1();
unlock tables;
-drop procedure proc_1;
create function func_1() returns int begin flush tables with read lock; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
+select func_1(), func_1(), func_1() from dual;
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
+drop function func_1;
+drop procedure proc_1;
prepare abc from "flush tables with read lock";
execute abc;
execute abc;
@@ -1474,13 +1503,13 @@ create procedure proc_1() flush tables;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush tables; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush tables";
execute abc;
execute abc;
@@ -1540,13 +1569,13 @@ mysql user 0 0
mysql general_log 1 0
mysql host 0 0
flush tables;
-drop procedure proc_1;
create function func_1() returns int begin flush tables; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
flush tables;
select Host, User from mysql.user limit 0;
Host User
@@ -1603,13 +1632,13 @@ create procedure proc_1() flush logs;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush logs; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush logs";
execute abc;
execute abc;
@@ -1619,13 +1648,13 @@ create procedure proc_1() flush status;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush status; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush status";
execute abc;
execute abc;
@@ -1635,39 +1664,39 @@ create procedure proc_1() flush slave;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush slave; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush slave";
execute abc;
execute abc;
execute abc;
deallocate prepare abc;
create procedure proc_1() flush master;
-drop procedure proc_1;
create function func_1() returns int begin flush master; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush master";
deallocate prepare abc;
create procedure proc_1() flush des_key_file;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush des_key_file; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush des_key_file";
execute abc;
execute abc;
@@ -1677,13 +1706,13 @@ create procedure proc_1() flush user_resources;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
create function func_1() returns int begin flush user_resources; return 1; end|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
+create function func_1() returns int begin call proc_1(); return 1; end|
select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
+ERROR 0A000: FLUSH is not allowed in stored function or trigger
drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
+drop procedure proc_1;
prepare abc from "flush user_resources";
execute abc;
execute abc;
@@ -1763,18 +1792,6 @@ Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute abc;
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
deallocate prepare abc;
-create procedure proc_1() show scheduler status;
-drop procedure proc_1;
-create function func_1() returns int begin show scheduler status; return 1; end|
-ERROR 0A000: Not allowed to return a result set from a function
-select func_1(), func_1(), func_1() from dual;
-ERROR 42000: FUNCTION test.func_1 does not exist
-drop function func_1;
-ERROR 42000: FUNCTION test.func_1 does not exist
-prepare abc from "show scheduler status";
-ERROR HY000: This command is not supported in the prepared statement protocol yet
-deallocate prepare abc;
-ERROR HY000: Unknown prepared statement handler (abc) given to DEALLOCATE PREPARE
drop procedure if exists a;
create procedure a() select 42;
create procedure proc_1(a char(2)) show create procedure a;
@@ -1952,11 +1969,11 @@ ERROR HY000: No paths allowed for shared library
drop procedure proc_1;
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
call proc_1();
-ERROR HY000: Can't open shared library '/work/mysql-5.1-runtime/mysql-test/lib/mysql/some_plugin.so' (errno: 0 cannot open shared object file: No such file or directory)
+ERROR HY000: Can't open shared library
call proc_1();
-ERROR HY000: Can't open shared library '/work/mysql-5.1-runtime/mysql-test/lib/mysql/some_plugin.so' (errno: 22 cannot open shared object file: No such file or directory)
+ERROR HY000: Can't open shared library
call proc_1();
-ERROR HY000: Can't open shared library '/work/mysql-5.1-runtime/mysql-test/lib/mysql/some_plugin.so' (errno: 22 cannot open shared object file: No such file or directory)
+ERROR HY000: Can't open shared library
drop procedure proc_1;
create function func_1() returns int begin install plugin my_plug soname '/tmp/plugin'; return 1; end|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
@@ -2086,7 +2103,7 @@ drop user pstest_xyz@localhost;
deallocate prepare abc;
drop event if exists xyz;
create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end|
-ERROR 0A000: Not allowed to return a result set from a function
+ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present
select func_1(), func_1(), func_1() from dual;
ERROR 42000: FUNCTION test.func_1 does not exist
drop function func_1;
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 8c4a76c78a9..1dd1778d68e 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -23,7 +23,6 @@ ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t
#ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warning
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
-ps : BUG#21524 2006-08-08 pgalbraith 'ps' test fails in --ps-protocol test AMD64 bit
ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
rpl_ndb_2myisam : BUG#19227 Seems to pass currently
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index ac79dbc3434..902d8fcd9d8 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -354,14 +354,14 @@ create table t1 (a int, b int);
insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2);
prepare stmt from
"explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?";
---replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
set @v=5;
-execute stmt using @v;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
-set @v=0;
execute stmt using @v;
+set @v=0;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
+execute stmt using @v;
set @v=5;
+--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
execute stmt using @v;
drop table t1;
deallocate prepare stmt;
@@ -1447,13 +1447,15 @@ create procedure proc_1() reset query cache;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin reset query cache; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
drop function func_1;
+drop procedure proc_1;
prepare abc from "reset query cache";
execute abc;
execute abc;
@@ -1462,13 +1464,15 @@ deallocate prepare abc;
create procedure proc_1() reset master;
-drop procedure proc_1;
delimiter |;
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin reset master; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
drop function func_1;
+drop procedure proc_1;
prepare abc from "reset master";
execute abc;
execute abc;
@@ -1480,13 +1484,15 @@ create procedure proc_1() reset slave;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin reset slave; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
drop function func_1;
+drop procedure proc_1;
prepare abc from "reset slave";
execute abc;
execute abc;
@@ -1527,15 +1533,15 @@ call proc_1();
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush hosts; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush hosts";
execute abc;
execute abc;
@@ -1547,15 +1553,15 @@ create procedure proc_1() flush privileges;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush privileges; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush privileges";
deallocate prepare abc;
@@ -1567,11 +1573,15 @@ call proc_1();
unlock tables;
call proc_1();
unlock tables;
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush tables with read lock; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
+select func_1(), func_1(), func_1() from dual;
+drop function func_1;
+drop procedure proc_1;
prepare abc from "flush tables with read lock";
execute abc;
execute abc;
@@ -1584,15 +1594,15 @@ create procedure proc_1() flush tables;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush tables; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush tables";
execute abc;
execute abc;
@@ -1622,15 +1632,15 @@ select Host, User from mysql.user limit 0;
select Host, Db from mysql.host limit 0;
show open tables from mysql;
flush tables;
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush tables; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
flush tables;
select Host, User from mysql.user limit 0;
select Host, Db from mysql.host limit 0;
@@ -1659,15 +1669,15 @@ create procedure proc_1() flush logs;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush logs; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush logs";
execute abc;
execute abc;
@@ -1679,15 +1689,15 @@ create procedure proc_1() flush status;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush status; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush status";
execute abc;
execute abc;
@@ -1699,15 +1709,15 @@ create procedure proc_1() flush slave;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush slave; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush slave";
execute abc;
execute abc;
@@ -1716,15 +1726,15 @@ deallocate prepare abc;
create procedure proc_1() flush master;
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush master; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush master";
deallocate prepare abc;
@@ -1733,15 +1743,15 @@ create procedure proc_1() flush des_key_file;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush des_key_file; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush des_key_file";
execute abc;
execute abc;
@@ -1753,15 +1763,15 @@ create procedure proc_1() flush user_resources;
call proc_1();
call proc_1();
call proc_1();
-drop procedure proc_1;
delimiter |;
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin flush user_resources; return 1; end|
+create function func_1() returns int begin call proc_1(); return 1; end|
delimiter ;|
---error ER_SP_DOES_NOT_EXIST
+--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
drop function func_1;
+drop procedure proc_1;
prepare abc from "flush user_resources";
execute abc;
execute abc;
@@ -1865,22 +1875,6 @@ execute abc;
deallocate prepare abc;
-create procedure proc_1() show scheduler status;
-drop procedure proc_1;
-delimiter |;
---error ER_SP_NO_RETSET
-create function func_1() returns int begin show scheduler status; return 1; end|
-delimiter ;|
---error ER_SP_DOES_NOT_EXIST
-select func_1(), func_1(), func_1() from dual;
---error ER_SP_DOES_NOT_EXIST
-drop function func_1;
---error ER_UNSUPPORTED_PS
-prepare abc from "show scheduler status";
---error ER_UNKNOWN_STMT_HANDLER
-deallocate prepare abc;
-
-
--disable_warnings
drop procedure if exists a;
--enable_warnings
@@ -1997,10 +1991,13 @@ call proc_1();
call proc_1();
drop procedure proc_1;
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
+--replace_regex /(Can\'t open shared library).*$/\1/
--error ER_CANT_OPEN_LIBRARY
call proc_1();
+--replace_regex /(Can\'t open shared library).*$/\1/
--error ER_CANT_OPEN_LIBRARY
call proc_1();
+--replace_regex /(Can\'t open shared library).*$/\1/
--error ER_CANT_OPEN_LIBRARY
call proc_1();
drop procedure proc_1;
@@ -2150,7 +2147,7 @@ drop event if exists xyz;
#drop event xyz;
#drop procedure proc_1;
delimiter |;
---error ER_SP_NO_RETSET
+--error ER_EVENT_RECURSIVITY_FORBIDDEN
create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end|
delimiter ;|
--error ER_SP_DOES_NOT_EXIST
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index dcb41837d96..c55cc32b47d 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -15,8 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* To avoid problems with alarms in debug code, we disable DBUG here */
-#undef DBUG_OFF
-#define DBUG_OFF
+#define FORCE_DBUG_OFF
#include <my_global.h>
#if defined(THREAD) && !defined(DONT_USE_THR_ALARM)
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 36cb83ae754..a2c42ee326c 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -72,7 +72,7 @@ multiple read locks.
*/
#if !defined(MAIN) && !defined(DBUG_OFF) && !defined(EXTRA_DEBUG)
-#define DBUG_OFF
+#define FORCE_DBUG_OFF
#endif
#include "mysys_priv.h"
diff --git a/netware/BUILD/compile-AUTOTOOLS b/netware/BUILD/compile-AUTOTOOLS
index 20e506aa683..c93fb1b1b28 100755
--- a/netware/BUILD/compile-AUTOTOOLS
+++ b/netware/BUILD/compile-AUTOTOOLS
@@ -5,8 +5,11 @@
# stop on errors
set -e
+sed -e "s/^DIST_COMMON/#DIST_COMMON/g" storage/ndb/Makefile.am > storage/ndb/Makefile.am.$$
+mv storage/ndb/Makefile.am.$$ storage/ndb/Makefile.am
-for package in . ./storage/innobase
+# for package in . ./storage/innobase
+for package in .
do
(cd $package
rm -rf config.cache autom4te.cache
@@ -14,6 +17,7 @@ do
autoheader
libtoolize --force
aclocal
+# automake --verbose --add-missing --force-missing
automake --add-missing --force-missing
autoconf)
done
diff --git a/netware/BUILD/compile-netware-START b/netware/BUILD/compile-netware-START
index 95b222994d3..8f828f34bd1 100755
--- a/netware/BUILD/compile-netware-START
+++ b/netware/BUILD/compile-netware-START
@@ -24,5 +24,4 @@ base_configs=" \
--prefix=N:/mysql \
--without-mysqlmanager \
--without-man \
- --without-csv-storage-engine \
"
diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv
index d8d53293b2c..f43092492bb 100755
--- a/netware/BUILD/mwenv
+++ b/netware/BUILD/mwenv
@@ -8,7 +8,7 @@ fi
# The base path(in wineformat) where compilers, includes and
# libraries are installed
-if test -z $MYDEV
+if test -z "$MYDEV"
then
# the default is "F:/mydev"
export MYDEV="F:/mydev"
diff --git a/netware/BUILD/nwbootstrap b/netware/BUILD/nwbootstrap
index 22e1569e7ca..563d316ea56 100755
--- a/netware/BUILD/nwbootstrap
+++ b/netware/BUILD/nwbootstrap
@@ -151,17 +151,18 @@ echo "making files writable..."
cd $target_dir
chmod -R u+rw,g+rw .
-# edit the mvenv file
-echo "updating the mwenv environment file..."
+## # edit the mvenv file
+## echo "updating the mwenv environment file..."
mwenv="./netware/BUILD/mwenv"
-mv -f $mwenv $mwenv.org
-sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
- -e "s;BUILD_DIR;$build_dir;g" \
- -e "s;VERSION;$version;g" $mwenv.org > $mwenv
-chmod +rwx $mwenv
+## mv -f $mwenv $mwenv.org
+## sed -e "s;WINE_BUILD_DIR;$wine_build_dir;g" \
+## -e "s;BUILD_DIR;$build_dir;g" \
+## -e "s;VERSION;$version;g" $mwenv.org > $mwenv
+## chmod +rwx $mwenv
PWD=`pwd`
-SRC_DIR=`grep "^export MYDEV=" $mwenv | cut -d'=' -f2 | \
+# This line will catch the default value only, let's hope it is correct
+SRC_DIR=`grep "^ *export MYDEV=" $mwenv | cut -d'=' -f2 | \
sed -e 's;";;g' -e "s;^;echo ;g" -e "s;$;/\`basename $PWD\`;g" | /bin/sh`
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index c254a77e805..9302745ceee 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -253,8 +253,8 @@ $CP mysql-test/t/*.test $BASE/mysql-test/t
$CP mysql-test/t/*.imtest mysql-test/t/*.disabled $BASE/mysql-test/t
$CP mysql-test/t/*.opt mysql-test/t/*.slave-mi $BASE/mysql-test/t
$CP mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
-$CP mysql-test/r/*.result mysql-test/r/*.require \
- $BASE/mysql-test/r
+$CP mysql-test/r/*.result $BASE/mysql-test/r
+$CP mysql-test/r/*.require $BASE/mysql-test/r
$CP mysql-test/extra/binlog_tests/*.test $BASE/mysql-test/extra/binlog_tests
$CP mysql-test/extra/rpl_tests/*.test $BASE/mysql-test/extra/rpl_tests
@@ -326,14 +326,16 @@ fi
# NDB Cluster
if [ x$NDBCLUSTER = x1 ]; then
- ( cd storage/ndb ; @MAKE@ DESTDIR=$BASE/ndb-stage install )
- ( cd mysql-test/ndb ; @MAKE@ DESTDIR=$BASE/ndb-stage install )
+ ( cd storage/ndb ; @MAKE@ DESTDIR=$BASE/ndb-stage install )
+ ( cd mysql-test ; @MAKE@ DESTDIR=$BASE/ndb-stage install )
$CP $BASE/ndb-stage@bindir@/* $BASE/bin/.
$CP $BASE/ndb-stage@libexecdir@/* $BASE/bin/.
$CP $BASE/ndb-stage@pkglibdir@/* $BASE/lib/.
test -d $BASE/include/storage || mkdir $BASE/include/storage
$CP -r $BASE/ndb-stage@pkgincludedir@/storage/ndb $BASE/include/storage/
$CP -r $BASE/ndb-stage@prefix@/mysql-test/ndb $BASE/mysql-test/. || exit 1
+ $CP -r $BASE/ndb-stage@prefix@/mysql-test/std_data/ndb_backup50 $BASE/mysql-test/std_data/. || exit 1
+ $CP -r $BASE/ndb-stage@prefix@/mysql-test/std_data/ndb_backup51 $BASE/mysql-test/std_data/. || exit 1
rm -rf $BASE/ndb-stage
fi
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index cebcccb56f4..b200e5428be 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -1,41 +1,227 @@
-#! /bin/sh
-
-NOINST_NAME=$1
-
-mkdir $NOINST_NAME
-mkdir $NOINST_NAME/bin
-cp client/release/*.exe $NOINST_NAME/bin/
-cp extra/release/*.exe $NOINST_NAME/bin/
-mv $NOINST_NAME/bin/comp_err.exe $NOINST_NAME/bin/comp-err.exe
-cp storage/myisam/release/*.exe $NOINST_NAME/bin/
-cp server-tools/instance-manager/release/*.exe $NOINST_NAME/bin/
-cp tests/release/*.exe $NOINST_NAME/bin/
-cp libmysql/release/*.exe $NOINST_NAME/bin/
-cp libmysql/release/libmysql.dll $NOINST_NAME/bin/
-
-cp sql/release/mysqld.exe $NOINST_NAME/bin/mysqld.exe
-cp sql/debug/mysqld.exe $NOINST_NAME/bin/mysqld-debug.exe
-# For Pro/Classic builds, do this instead:
-# cp sql/release/mysqld.exe $NOINST_NAME/bin/mysqld-nt.exe
-# cp sql/debug/mysqld.exe $NOINST_NAME/bin/mysqld-debug.exe
-
-cp COPYING EXCEPTIONS-CLIENT $NOINST_NAME/
-cp -dpR win/data $NOINST_NAME/data
-mkdir $NOINST_NAME/Docs
-cp Docs/INSTALL-BINARY Docs/manual.chm ChangeLog COPYING $NOINST_NAME/Docs/
-
-# These will be filled in when we enable embedded.
-mkdir -p $NOINST_NAME/Embedded/DLL/debug $NOINST_NAME/Embedded/DLL/release $NOINST_NAME/Embedded/static/release
-
-mkdir -p $NOINST_NAME/examples/libmysqltest/debug $NOINST_NAME/examples/libmysqltest/release
-cp libmysql/mytest.c libmysql/myTest.vcproj libmysql/release/myTest.exe $NOINST_NAME/examples/libmysqltest/
-cp libmysql/debug/myTest.exe $NOINST_NAME/examples/libmysqltest/debug/
-cp libmysql/release/myTest.exe $NOINST_NAME/examples/libmysqltest/release/
-
-mkdir -p $NOINST_NAME/examples/tests
-cp tests/*.res tests/*.tst tests/*.pl tests/*.c $NOINST_NAME/examples/tests/
-
-mkdir -p $NOINST_NAME/include
+#!/bin/sh
+
+# Exit if failing to copy, we want exact specifications, not
+# just "what happen to be built".
+set -e
+
+# ----------------------------------------------------------------------
+# Read first argument that is the base name of the resulting TAR file.
+# See usage() function below for a description on the arguments.
+#
+# NOTE: We will read the rest of the command line later on.
+# NOTE: Pattern matching with "{..,..}" can't be used, not portable.
+# ----------------------------------------------------------------------
+
+# FIXME FIXME "debug", own build or handled here?
+# FIXME FIXME add way to copy from other builds executables
+
+usage()
+{
+ echo <<EOF
+Usage: make_win_bin_dist [ options ] package-base-name [ copy-defs... ]
+
+This is a script to run from the top of a source tree built on Windows.
+The "package-base-name" argument should be something like
+
+ mysql-noinstall-5.0.25-win32 (or winx64)
+
+and will be the name of the directory of the unpacked ZIP (stripping
+away the "noinstall" part of the ZIP file name if any) and the base
+for the resulting package name.
+
+Options are
+
+ --embedded Pack the embedded server and give error if not built.
+ The default is to pack it if it is built.
+
+ --no-embedded Don't pack the embedded server even if built
+
+ --debug Pack the debug binaries and give error if not built.
+
+ --no-debug Don't pack the debug binaries even if built
+
+ --only-debug The target for this build was "Debug", and we just
+ want to replace the normal binaries with debug
+ versions, i.e. no separate "debug" directories.
+
+ --exe-suffix=SUF Add a suffix to the "mysqld" binary.
+
+As you might want to include files of directories from other builds
+(like a "mysqld-max.exe" server), you can instruct this script do copy
+them in for you. This is the "copy-def" arguments, and they are of the
+form
+
+ relative-dest-name=source-name .....
+
+i.e. can be something like
+
+ bin/mysqld-max.exe=../my-max-build/sql/release/mysqld.exe
+
+If you specify a directory the whole directory will be copied.
+
+EOF
+ exit 1
+}
+
+# ----------------------------------------------------------------------
+# We need to be at the top of a source tree, check that we are
+# ----------------------------------------------------------------------
+
+if [ ! -d "sql" ] ; then
+ echo "You need to run this script from inside the source tree"
+ usage
+fi
+
+# ----------------------------------------------------------------------
+# Actual argument processing, first part
+# ----------------------------------------------------------------------
+
+NOINST_NAME=""
+TARGET="release"
+PACK_EMBEDDED="" # Could be "no", "yes" or empty
+PACK_DEBUG="" # Could be "no", "yes" or empty
+EXE_SUFFIX=""
+
+for arg do
+ shift
+ case "$arg" in
+ --embedded) PACK_EMBEDDED="yes" ;;
+ --no-embedded) PACK_EMBEDDED="no" ;;
+ --debug) PACK_DEBUG="yes" ;;
+ --no-debug) PACK_DEBUG="no" ;;
+ --only-debug) TARGET="debug" ; PACK_DEBUG="no" ;;
+ --exe-suffix=*) EXE_SUFFIX=`echo "$arg" | sed -e "s,--exe-suffix=,,"` ;;
+ -*)
+ echo "Unknown argument '$arg'"
+ usage
+ ;;
+ *)
+ NOINST_NAME="$arg"
+ break
+ esac
+done
+
+if [ x"$NOINST_NAME" = x"" ] ; then
+ echo "No base package name given"
+ usage
+fi
+DESTDIR=`echo $NOINST_NAME | sed 's/-noinstall-/-/'`
+
+if [ -e $DESTDIR ] ; then
+ echo "Please remove the old $DESTDIR before running this script"
+ usage
+fi
+
+# ----------------------------------------------------------------------
+# Copy executables, and client DLL (FIXME why?)
+# ----------------------------------------------------------------------
+
+trap 'echo "Clearning up and exiting..." ; rm -fr $DESTDIR; exit 1' ERR
+
+mkdir $DESTDIR
+mkdir $DESTDIR/bin
+cp client/$TARGET/*.exe $DESTDIR/bin/
+cp extra/$TARGET/*.exe $DESTDIR/bin/
+cp storage/myisam/$TARGET/*.exe $DESTDIR/bin/
+cp server-tools/instance-manager/$TARGET/*.exe $DESTDIR/bin/
+cp tests/$TARGET/*.exe $DESTDIR/bin/
+cp libmysql/$TARGET/*.exe $DESTDIR/bin/
+cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
+
+# FIXME really needed?!
+mv $DESTDIR/bin/comp_err.exe $DESTDIR/bin/comp-err.exe
+
+cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe
+
+if [ x"$PACK_DEBUG" = "" -a -f "sql/debug/mysqld.exe" -o \
+ x"$PACK_DEBUG" = "yes" ] ; then
+ cp sql/debug/mysqld.exe $DESTDIR/bin/mysqld-debug.exe
+ cp sql/debug/mysqld.pdb $DESTDIR/bin/mysqld-debug.pdb
+ cp sql/debug/mysqld.map $DESTDIR/bin/mysqld-debug.map
+fi
+
+# ----------------------------------------------------------------------
+# Copy data directory, readme files etc
+# ----------------------------------------------------------------------
+
+# FIXME is there ever a data directory to copy?
+if [ -d win/data ] ; then
+ cp -pR win/data $DESTDIR/data
+fi
+
+# FIXME maybe a flag to define "release build", or do the
+# check from the calling script that all these are there,
+# and with the correct content.
+
+mkdir $DESTDIR/Docs
+cp Docs/INSTALL-BINARY $DESTDIR/Docs/
+cp Docs/manual.chm $DESTDIR/Docs/ || /bin/true
+cp ChangeLog $DESTDIR/Docs/ || /bin/true
+cp support-files/my-*.ini $DESTDIR/
+
+if [ -f COPYING ] ; then
+ cp COPYING EXCEPTIONS-CLIENT $DESTDIR/
+ cp COPYING $DESTDIR/Docs/
+fi
+
+# ----------------------------------------------------------------------
+# These will be filled in when we enable embedded. Note that if no
+# argument is given, it is copied if exists, else a check is done.
+# ----------------------------------------------------------------------
+
+copy_embedded()
+{
+ mkdir -p $DESTDIR/Embedded/DLL/release \
+ $DESTDIR/Embedded/static/release \
+ $DESTDIR/include
+ cp libmysqld/libmysqld.def $DESTDIR/include/
+ cp libmysqld/$TARGET/mysqlserver.lib $DESTDIR/Embedded/static/release/
+ cp libmysqld/$TARGET/libmysqld.dll $DESTDIR/Embedded/DLL/release/
+ cp libmysqld/$TARGET/libmysqld.exp $DESTDIR/Embedded/DLL/release/
+ cp libmysqld/$TARGET/libmysqld.lib $DESTDIR/Embedded/DLL/release/
+
+ if [ x"$PACK_DEBUG" = "" -a -f "libmysqld/debug/libmysqld.lib" -o \
+ x"$PACK_DEBUG" = "yes" ] ; then
+ mkdir -p $DESTDIR/Embedded/DLL/debug
+ cp libmysqld/debug/libmysqld.dll $DESTDIR/Embedded/DLL/debug/
+ cp libmysqld/debug/libmysqld.exp $DESTDIR/Embedded/DLL/debug/
+ cp libmysqld/debug/libmysqld.lib $DESTDIR/Embedded/DLL/debug/
+ fi
+}
+
+if [ x"$PACK_EMBEDDED" = "" -a \
+ -f "libmysqld/$TARGET/mysqlserver.lib" -a \
+ -f "libmysqld/$TARGET/libmysqld.lib" -o \
+ x"$PACK_EMBEDDED" = "yes" ] ; then
+ copy_embedded
+fi
+
+# ----------------------------------------------------------------------
+# FIXME test stuff that is useless garbage?
+# ----------------------------------------------------------------------
+
+mkdir -p $DESTDIR/examples/libmysqltest/release
+cp libmysql/mytest.c libmysql/myTest.vcproj libmysql/$TARGET/myTest.exe \
+ $DESTDIR/examples/libmysqltest/
+cp libmysql/$TARGET/myTest.exe $DESTDIR/examples/libmysqltest/release/
+
+if [ x"$PACK_DEBUG" = "" -a -f "libmysql/debug/myTest.exe" -o \
+ x"$PACK_DEBUG" = "yes" ] ; then
+ mkdir -p $DESTDIR/examples/libmysqltest/debug
+ cp libmysql/debug/myTest.exe $DESTDIR/examples/libmysqltest/debug/
+fi
+
+mkdir -p $DESTDIR/examples/tests
+cp tests/*.res tests/*.tst tests/*.pl tests/*.c $DESTDIR/examples/tests/
+
+mkdir -p $DESTDIR/examples/udf_example
+cp sql/udf_example.def sql/udf_example.vcproj sql/udf_example.c $DESTDIR/examples/udf_example/
+
+# ----------------------------------------------------------------------
+# FIXME why not copy it all in "include"?!
+# ----------------------------------------------------------------------
+
+mkdir -p $DESTDIR/include
cp include/conf*.h \
include/mysql*.h \
include/errmsg.h \
@@ -48,69 +234,122 @@ cp include/conf*.h \
include/m_string.h \
include/m_ctype.h \
include/my_global.h \
- include/typelib.h $NOINST_NAME/include/
-cp libmysql/libmysql.def $NOINST_NAME/include/
-cp libmysqld/libmysqld.def $NOINST_NAME/include/
-
-mkdir -p $NOINST_NAME/lib/debug $NOINST_NAME/lib/opt
-cp libmysql/debug/libmysql.dll \
- libmysql/debug/libmysql.lib \
- client/debug/mysqlclient.lib \
- mysys/debug/mysys.lib \
- regex/debug/regex.lib \
- strings/debug/strings.lib \
- zlib/debug/zlib.lib $NOINST_NAME/lib/debug/
-cp libmysql/release/libmysql.dll \
- libmysql/release/libmysql.lib \
- client/release/mysqlclient.lib \
- regex/release/regex.lib \
- strings/release/strings.lib \
- zlib/release/zlib.lib $NOINST_NAME/lib/opt/
-cp mysys/release/mysys.lib $NOINST_NAME/lib/opt/mysys_tls.lib
-
-cp support-files/my-*.ini $NOINST_NAME/
-
-mkdir -p $NOINST_NAME/mysql-test/include $NOINST_NAME/mysql-test/lib \
- $NOINST_NAME/mysql-test/r $NOINST_NAME/mysql-test/std_data \
- $NOINST_NAME/mysql-test/t $NOINST_NAME/mysql-test/extra
-cp mysql-test/mysql-test-run.pl $NOINST_NAME/mysql-test/
-cp mysql-test/README $NOINST_NAME/mysql-test/
-cp mysql-test/install_test_db.sh $NOINST_NAME/mysql-test/install_test_db
-cp mysql-test/include/*.inc $NOINST_NAME/mysql-test/include/
-cp mysql-test/lib/*.pl $NOINST_NAME/mysql-test/lib/
-cp mysql-test/lib/*.sql $NOINST_NAME/mysql-test/lib/
-cp mysql-test/r/*.require $NOINST_NAME/mysql-test/r/
+ include/typelib.h $DESTDIR/include/
+cp libmysql/libmysql.def $DESTDIR/include/
+
+# ----------------------------------------------------------------------
+# Client libraries, and other libraries
+# FIXME why "libmysql.dll" installed both in "bin" and "lib/opt"?
+# ----------------------------------------------------------------------
+
+mkdir -p $DESTDIR/lib/opt
+cp libmysql/$TARGET/libmysql.dll \
+ libmysql/$TARGET/libmysql.lib \
+ client/$TARGET/mysqlclient.lib \
+ regex/$TARGET/regex.lib \
+ strings/$TARGET/strings.lib \
+ zlib/$TARGET/zlib.lib $DESTDIR/lib/opt/
+
+if [ x"$PACK_DEBUG" = "" -a -f "libmysql/debug/libmysql.lib" -o \
+ x"$PACK_DEBUG" = "yes" ] ; then
+ mkdir -p $DESTDIR/lib/debug
+ cp libmysql/debug/libmysql.dll \
+ libmysql/debug/libmysql.lib \
+ client/debug/mysqlclient.lib \
+ mysys/debug/mysys.lib \
+ regex/debug/regex.lib \
+ strings/debug/strings.lib \
+ zlib/debug/zlib.lib $DESTDIR/lib/debug/
+fi
+
+# FIXME sort this out...
+cp mysys/$TARGET/mysys.lib $DESTDIR/lib/opt/mysys_tls.lib
+
+# ----------------------------------------------------------------------
+# Copy the test directory
+# ----------------------------------------------------------------------
+
+mkdir -p $DESTDIR/mysql-test/include $DESTDIR/mysql-test/lib \
+ $DESTDIR/mysql-test/r $DESTDIR/mysql-test/std_data \
+ $DESTDIR/mysql-test/t
+cp mysql-test/mysql-test-run.pl $DESTDIR/mysql-test/
+cp mysql-test/README $DESTDIR/mysql-test/
+cp mysql-test/install_test_db.sh $DESTDIR/mysql-test/install_test_db
+cp mysql-test/include/*.inc $DESTDIR/mysql-test/include/
+cp mysql-test/lib/*.pl $DESTDIR/mysql-test/lib/
+cp mysql-test/lib/*.sql $DESTDIR/mysql-test/lib/
+cp mysql-test/r/*.require $DESTDIR/mysql-test/r/
# Need this trick, or we get "argument list too long".
-ABS_DST=`pwd`/$NOINST_NAME
+ABS_DST=`pwd`/$DESTDIR
(cd mysql-test/r/ && cp *.result $ABS_DST/mysql-test/r/)
-cp mysql-test/std_data/* $NOINST_NAME/mysql-test/std_data/
-cp mysql-test/t/*.disabled $NOINST_NAME/mysql-test/t/
-cp mysql-test/t/*.opt $NOINST_NAME/mysql-test/t/
-cp mysql-test/t/*.sh $NOINST_NAME/mysql-test/t/
-cp mysql-test/t/*.slave-mi $NOINST_NAME/mysql-test/t/
-cp mysql-test/t/*.sql $NOINST_NAME/mysql-test/t/
-cp mysql-test/t/*.def $NOINST_NAME/mysql-test/t/
+cp mysql-test/std_data/Moscow_leap $DESTDIR/mysql-test/std_data/
+cp mysql-test/std_data/des_key_file $DESTDIR/mysql-test/std_data/
+cp mysql-test/std_data/*.000001 $DESTDIR/mysql-test/std_data/
+cp mysql-test/std_data/*.cnf $DESTDIR/mysql-test/std_data/
+cp mysql-test/std_data/*.dat $DESTDIR/mysql-test/std_data/
+cp mysql-test/std_data/*.frm $DESTDIR/mysql-test/std_data/
+cp mysql-test/std_data/*.pem $DESTDIR/mysql-test/std_data/
+cp mysql-test/t/*.opt $DESTDIR/mysql-test/t/
+cp mysql-test/t/*.sh $DESTDIR/mysql-test/t/
+cp mysql-test/t/*.slave-mi $DESTDIR/mysql-test/t/
+cp mysql-test/t/*.sql $DESTDIR/mysql-test/t/
+cp mysql-test/t/*.def $DESTDIR/mysql-test/t/
(cd mysql-test/t/ && cp *.test $ABS_DST/mysql-test/t/)
-cp -dpR mysql-test/extra/* $NOINST_NAME/mysql-test/extra/
-# This copies in the unsubstituted scripts (containing @VAR@), but that seems
-# rather better than substituting random Unix paths and architecture names
-# from the Unix bootstrap host. Not sure what the point is of including these
-# shell scripts in the Windows packaging in any case.
-mkdir -p $NOINST_NAME/scripts
+# Note that this will not copy "extra" if a soft link
+if [ -d mysql-test/extra ] ; then
+ mkdir -p $DESTDIR/mysql-test/extra
+ cp -pR mysql-test/extra/* $DESTDIR/mysql-test/extra/
+fi
+
+# ----------------------------------------------------------------------
+# Copy what could be usable in the "scripts" directory. Currently
+# only SQL files, others are bourne shell scripts or Perl scripts
+# not really usable on Windows.
+#
+# But to be nice to the few Cygwin users we might have in 5.0 we
+# continue to copy the stuff, but don't include it include it in
+# the WiX install.
+# ----------------------------------------------------------------------
+
+mkdir -p $DESTDIR/scripts
+
+# Uncomment and remove the for loop in 5.1
+#cp scripts/*.sql $DESTDIR/scripts/
+
for i in `cd scripts && ls`; do \
if echo $i | grep -q '\.sh'; then \
- cp scripts/$i $NOINST_NAME/scripts/`echo $i | sed -e 's/\.sh$//'`; \
- else if [ $i = Makefile.am -o $i = Makefile.in -o -e scripts/$i.sh ] ; then \
+ cp scripts/$i $DESTDIR/scripts/`echo $i | sed -e 's/\.sh$//'`; \
+ elif [ $i = Makefile.am -o $i = Makefile.in -o -e scripts/$i.sh ] ; then \
: ; \
else \
- cp scripts/$i $NOINST_NAME/scripts/$i; \
- fi; fi; \
+ cp scripts/$i $DESTDIR/scripts/$i; \
+ fi; \
+done
+
+cp -pR sql/share $DESTDIR/
+
+# ----------------------------------------------------------------------
+# Copy other files specified on command line DEST=SOURCE
+# ----------------------------------------------------------------------
+
+for arg do
+ dst=`echo $arg | sed 's/=.*$//'`
+ src=`echo $arg | sed 's/^.*=//'`
+
+ if [ x"$dst" = x"" -o x"$src" = x"" ] ; then
+ echo "Invalid specification of what to copy"
+ usage
+ fi
+
+ mkdir -p `dirname $DESTDIR/$dst`
+ cp -pR "$src" $DESTDIR/$dst
done
-cp -dpR sql/share $NOINST_NAME/
-cp -dpR sql-bench $NOINST_NAME/
-rm -f $NOINST_NAME/sql-bench/*.sh $NOINST_NAME/sql-bench/Makefile*
+# ----------------------------------------------------------------------
+# Finally creat the ZIP archive
+# ----------------------------------------------------------------------
-zip -r $NOINST_NAME.zip $NOINST_NAME
-rm -Rf $NOINST_NAME
+rm -f $NOINST_NAME.zip
+zip -r $NOINST_NAME.zip $DESTDIR
+rm -Rf $DESTDIR
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 38a99aaef88..97e00471a6e 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -27,7 +27,7 @@ INCLUDES = @ZLIB_INCLUDES@ \
WRAPLIBS= @WRAPLIBS@
SUBDIRS = share
libexec_PROGRAMS = mysqld
-EXTRA_PROGRAMS = gen_lex_hash
+noinst_PROGRAMS = gen_lex_hash
bin_PROGRAMS = mysql_tzinfo_to_sql
gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@
LDADD = $(top_builddir)/vio/libvio.a \
@@ -120,8 +120,9 @@ DEFS = -DMYSQL_SERVER \
-DLIBDIR="\"$(MYSQLLIBdir)\"" \
@DEFS@
-BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h
-EXTRA_DIST = udf_example.c udf_example.def $(BUILT_SOURCES) \
+BUILT_DIST_SRC = sql_yacc.cc sql_yacc.h
+BUILT_SOURCES = $(BUILT_DIST_SRC) lex_hash.h
+EXTRA_DIST = udf_example.c udf_example.def $(BUILT_DIST_SRC) \
nt_servc.cc nt_servc.h message.mc CMakeLists.txt \
udf_example.c udf_example.def
CLEANFILES = lex_hash.h sql_yacc.cc sql_yacc.h sql_yacc.output
@@ -157,11 +158,10 @@ sql_yacc.o: sql_yacc.cc sql_yacc.h $(HEADERS)
@echo "If it fails, re-run configure with --with-low-memory"
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
-# This generates lex_hash.h
-# NOTE Built sources should depend on their sources not the tool
-# this avoid the rebuild of the built files in a source dist
-lex_hash.h: gen_lex_hash.cc lex.h
- $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
+# FIXME seems like now "lex_hash.h" differs depending on configure
+# flags, so can't pregenerate and include in source TAR. Revert to
+# dist pregenerated if this changes, so the file doesn't differ.
+lex_hash.h: gen_lex_hash$(EXEEXT)
./gen_lex_hash$(EXEEXT) > $@
# the following three should eventually be moved out of this directory
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 4a6346bf57c..d99fb9da8f8 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -7129,8 +7129,8 @@ int Update_rows_log_event::do_prepare_row(THD *thd, RELAY_LOG_INFO *rli,
row_start, &m_cols, row_end, &m_master_reclength,
table->write_set, UPDATE_ROWS_EVENT);
- DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
- DBUG_DUMP("m_after_image", m_after_image, table->s->reclength);
+ DBUG_DUMP("record[0]", (const char *)table->record[0], table->s->reclength);
+ DBUG_DUMP("m_after_image", (const char *)m_after_image, table->s->reclength);
/*
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 3fd0e621422..5da8d27a887 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2632,10 +2632,10 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
my_size_t const after_size= pack_row(table, cols, after_row,
after_record);
- DBUG_DUMP("before_record", before_record, table->s->reclength);
- DBUG_DUMP("after_record", after_record, table->s->reclength);
- DBUG_DUMP("before_row", before_row, before_size);
- DBUG_DUMP("after_row", after_row, after_size);
+ DBUG_DUMP("before_record", (const char *)before_record, table->s->reclength);
+ DBUG_DUMP("after_record", (const char *)after_record, table->s->reclength);
+ DBUG_DUMP("before_row", (const char *)before_row, before_size);
+ DBUG_DUMP("after_row", (const char *)after_row, after_size);
Rows_log_event* const ev=
binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 26dea00029a..a5a9430504e 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1421,6 +1421,7 @@ opt_ev_comment: /* empty */ { $$= 0; }
| COMMENT_SYM TEXT_STRING_sys
{
Lex->comment= Lex->event_parse_data->comment= $2;
+ $$= 1;
}
;
diff --git a/storage/federated/plug.in b/storage/federated/plug.in
index 81c56cb672f..23b607d699b 100644
--- a/storage/federated/plug.in
+++ b/storage/federated/plug.in
@@ -2,3 +2,4 @@ MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine],
[Connects to tables on remote MySQL servers], [max,max-no-ndb])
MYSQL_PLUGIN_STATIC(federated, [libfederated.a])
MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la])
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc])
diff --git a/storage/heap/plug.in b/storage/heap/plug.in
index 9e744b6ac0d..50f31c60f2b 100644
--- a/storage/heap/plug.in
+++ b/storage/heap/plug.in
@@ -3,4 +3,5 @@ MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine],
MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap])
MYSQL_PLUGIN_STATIC(heap, [libheap.a])
MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(heap, [ha_heap.cc])
diff --git a/storage/innobase/plug.in b/storage/innobase/plug.in
index 028937882b2..9c21a491d9f 100644
--- a/storage/innobase/plug.in
+++ b/storage/innobase/plug.in
@@ -68,4 +68,5 @@ MYSQL_PLUGIN_ACTIONS(innobase, [
storage/innobase/handler/Makefile
storage/innobase/usr/Makefile)
])
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(innobase, [handler/ha_innodb.cc])
diff --git a/storage/myisam/plug.in b/storage/myisam/plug.in
index 3160752182d..051ec2d54aa 100644
--- a/storage/myisam/plug.in
+++ b/storage/myisam/plug.in
@@ -3,4 +3,5 @@ MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine],
MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam])
MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a])
MYSQL_PLUGIN_MANDATORY(myisam) dnl Default
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisam, [ha_myisam.cc])
diff --git a/storage/myisammrg/plug.in b/storage/myisammrg/plug.in
index b4b2af8d984..1f94e07d881 100644
--- a/storage/myisammrg/plug.in
+++ b/storage/myisammrg/plug.in
@@ -3,3 +3,4 @@ MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine],
MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg])
MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a])
MYSQL_PLUGIN_MANDATORY(myisammrg)
+MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisammrg, [ha_myisammrg.cc])
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
index 56f7fb1dd1e..a055b18888b 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
@@ -75,7 +75,7 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc_info & alloc)
for(Uint32 i = 0; i<MAX_FREE_LIST; i++)
{
printf(" %d : ", i);
- Ptr<Page> ptr;
+ PagePtr ptr;
ArrayPool<Page> *pool= (ArrayPool<Page>*)&m_global_page_pool;
LocalDLList<Page> list(*pool, alloc.m_dirty_pages[i]);
for(list.first(ptr); !ptr.isNull(); list.next(ptr))
@@ -262,7 +262,7 @@ Dbtup::update_extent_pos(Disk_alloc_info& alloc,
}
void
-Dbtup::restart_setup_page(Disk_alloc_info& alloc, Ptr<Page> pagePtr)
+Dbtup::restart_setup_page(Disk_alloc_info& alloc, PagePtr pagePtr)
{
/**
* Link to extent, clear uncommitted_used_space
@@ -344,12 +344,15 @@ Dbtup::disk_page_prealloc(Signal* signal,
if (!alloc.m_dirty_pages[i].isEmpty())
{
ptrI= alloc.m_dirty_pages[i].firstItem;
- Ptr<GlobalPage> page;
- m_global_page_pool.getPtr(page, ptrI);
+ Ptr<GlobalPage> gpage;
+ m_global_page_pool.getPtr(gpage, ptrI);
- disk_page_prealloc_dirty_page(alloc, *(PagePtr*)&page, i, sz);
- key->m_page_no= ((Page*)page.p)->m_page_no;
- key->m_file_no= ((Page*)page.p)->m_file_no;
+ PagePtr tmp;
+ tmp.i = gpage.i;
+ tmp.p = reinterpret_cast<Page*>(gpage.p);
+ disk_page_prealloc_dirty_page(alloc, tmp, i, sz);
+ key->m_page_no= tmp.p->m_page_no;
+ key->m_file_no= tmp.p->m_file_no;
if (DBG_DISK)
ndbout << " found dirty page " << *key << endl;
return 0; // Page in memory
@@ -547,7 +550,7 @@ Dbtup::disk_page_prealloc(Signal* signal,
void
Dbtup::disk_page_prealloc_dirty_page(Disk_alloc_info & alloc,
- Ptr<Page> pagePtr,
+ PagePtr pagePtr,
Uint32 old_idx, Uint32 sz)
{
ddassert(pagePtr.p->list_index == old_idx);
@@ -638,7 +641,9 @@ Dbtup::disk_page_prealloc_callback(Signal* signal,
fragPtr.i= req.p->m_frag_ptr_i;
ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord);
- Ptr<Page> pagePtr = *(Ptr<Page>*)&gpage;
+ PagePtr pagePtr;
+ pagePtr.i = gpage.i;
+ pagePtr.p = reinterpret_cast<Page*>(gpage.p);
if (unlikely(pagePtr.p->m_restart_seq != globalData.m_restart_seq))
{
@@ -666,7 +671,9 @@ Dbtup::disk_page_prealloc_initial_callback(Signal*signal,
Ptr<GlobalPage> gpage;
m_global_page_pool.getPtr(gpage, page_id);
- Ptr<Page> pagePtr = *(Ptr<Page>*)&gpage;
+ PagePtr pagePtr;
+ pagePtr.i = gpage.i;
+ pagePtr.p = reinterpret_cast<Page*>(gpage.p);
Ptr<Fragrecord> fragPtr;
fragPtr.i= req.p->m_frag_ptr_i;
@@ -705,7 +712,7 @@ void
Dbtup::disk_page_prealloc_callback_common(Signal* signal,
Ptr<Page_request> req,
Ptr<Fragrecord> fragPtr,
- Ptr<Page> pagePtr)
+ PagePtr pagePtr)
{
/**
* 1) remove page request from Disk_alloc_info.m_page_requests
@@ -736,7 +743,7 @@ Dbtup::disk_page_prealloc_callback_common(Signal* signal,
*/
ArrayPool<Page> *cheat_pool= (ArrayPool<Page>*)&m_global_page_pool;
LocalDLList<Page> list(* cheat_pool, alloc.m_dirty_pages[new_idx]);
- list.add(*(Ptr<Page>*)&pagePtr);
+ list.add(pagePtr);
pagePtr.p->uncommitted_used_space = real_used;
pagePtr.p->list_index = new_idx;
@@ -765,7 +772,7 @@ Dbtup::disk_page_prealloc_callback_common(Signal* signal,
}
void
-Dbtup::disk_page_set_dirty(Ptr<Page> pagePtr)
+Dbtup::disk_page_set_dirty(PagePtr pagePtr)
{
Uint32 idx = pagePtr.p->list_index;
if ((idx & 0x8000) == 0)
@@ -833,7 +840,9 @@ Dbtup::disk_page_unmap_callback(Uint32 page_id, Uint32 dirty_count)
{
Ptr<GlobalPage> gpage;
m_global_page_pool.getPtr(gpage, page_id);
- PagePtr pagePtr= *(PagePtr*)&gpage;
+ PagePtr pagePtr;
+ pagePtr.i = gpage.i;
+ pagePtr.p = reinterpret_cast<Page*>(gpage.p);
Uint32 type = pagePtr.p->m_page_header.m_page_type;
if (unlikely((type != File_formats::PT_Tup_fixsize_page &&
@@ -1028,10 +1037,13 @@ Dbtup::disk_page_abort_prealloc(Signal *signal, Fragrecord* fragPtrP,
case -1:
break;
default:
- Ptr<GlobalPage> page;
- m_global_page_pool.getPtr(page, (Uint32)res);
- disk_page_abort_prealloc_callback_1(signal, fragPtrP, *(PagePtr*)&page,
- sz);
+ Ptr<GlobalPage> gpage;
+ m_global_page_pool.getPtr(gpage, (Uint32)res);
+ PagePtr pagePtr;
+ pagePtr.i = gpage.i;
+ pagePtr.p = reinterpret_cast<Page*>(gpage.p);
+
+ disk_page_abort_prealloc_callback_1(signal, fragPtrP, pagePtr, sz);
}
}
@@ -1044,8 +1056,10 @@ Dbtup::disk_page_abort_prealloc_callback(Signal* signal,
Ptr<GlobalPage> gpage;
m_global_page_pool.getPtr(gpage, page_id);
- PagePtr pagePtr= *(PagePtr*)&gpage;
-
+ PagePtr pagePtr;
+ pagePtr.i = gpage.i;
+ pagePtr.p = reinterpret_cast<Page*>(gpage.p);
+
Ptr<Tablerec> tabPtr;
tabPtr.i= pagePtr.p->m_table_id;
ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
@@ -1308,7 +1322,9 @@ Dbtup::disk_restart_undo_callback(Signal* signal,
jamEntry();
Ptr<GlobalPage> gpage;
m_global_page_pool.getPtr(gpage, page_id);
- Ptr<Page> pagePtr = *(Ptr<Page>*)&gpage;
+ PagePtr pagePtr;
+ pagePtr.i = gpage.i;
+ pagePtr.p = reinterpret_cast<Page*>(gpage.p);
Apply_undo* undo = &f_undo;
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index 3118164badd..d9710cc2549 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -1039,22 +1039,19 @@ int Dbtup::handleUpdateReq(Signal* signal,
tup_version= (tup_version + 1) & ZTUP_VERSION_MASK;
operPtrP->tupVersion= tup_version;
- int retValue;
if (!req_struct->interpreted_exec) {
jam();
- retValue= updateAttributes(req_struct,
- &cinBuffer[0],
- req_struct->attrinfo_len);
+ int retValue = updateAttributes(req_struct,
+ &cinBuffer[0],
+ req_struct->attrinfo_len);
+ if (unlikely(retValue == -1))
+ goto error;
} else {
jam();
if (unlikely(interpreterStartLab(signal, req_struct) == -1))
return -1;
}
- if (retValue == -1) {
- goto error;
- }
-
if (regTabPtr->need_shrink())
{
shrink_tuple(req_struct, sizes+2, regTabPtr, disk);
@@ -1073,7 +1070,7 @@ int Dbtup::handleUpdateReq(Signal* signal,
jam();
setChecksum(req_struct->m_tuple_ptr, regTabPtr);
}
- return retValue;
+ return 0;
error:
tupkeyErrorLab(signal);
diff --git a/storage/ndb/src/kernel/vm/Pool.hpp b/storage/ndb/src/kernel/vm/Pool.hpp
index 70fcdf8b56a..fe3a50e127b 100644
--- a/storage/ndb/src/kernel/vm/Pool.hpp
+++ b/storage/ndb/src/kernel/vm/Pool.hpp
@@ -305,7 +305,11 @@ inline
bool
RecordPool<T, P>::seize(Ptr<T> & ptr)
{
- return m_pool.seize(*(Ptr<void>*)&ptr);
+ Ptr<void> tmp;
+ bool ret = m_pool.seize(tmp);
+ ptr.i = tmp.i;
+ ptr.p = static_cast<T*>(tmp.p);
+ return ret;
}
template <typename T, typename P>
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 29b19d86e89..60548210b7d 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -327,7 +327,7 @@ then
cp -fp mysql-debug-%{mysql_version}/config.log "$MYSQL_DEBUGCONFLOG_DEST"
fi
-(cd mysql-debug-%{mysql_version} ; \
+(cd mysql-debug-%{mysql_version}/mysql-test ; \
./mysql-test-run.pl --comment=debug --skip-rpl --skip-ndbcluster --force ; \
true)
@@ -357,12 +357,13 @@ then
cp -fp mysql-release-%{mysql_version}/config.log "$MYSQL_CONFLOG_DEST"
fi
-(cd mysql-release-%{mysql_version} ; \
- ./mysql-test-run.pl --comment=normal --force ; \
- ./mysql-test-run.pl --comment=ps --ps-protocol --force ; \
- ./mysql-test-run.pl --comment=normal+rowrepl --mysqld=--binlog-format=row --force ; \
- ./mysql-test-run.pl --comment=ps+rowrepl --ps-protocol --mysqld=--binlog-format=row --force ; \
- true)
+cd mysql-release-%{mysql_version}/mysql-test
+./mysql-test-run.pl --comment=normal --force --skip-ndbcluster --timer || true
+./mysql-test-run.pl --comment=ps --ps-protocol --force --skip-ndbcluster --timer || true
+./mysql-test-run.pl --comment=normal+rowrepl --mysqld=--binlog-format=row --force --skip-ndbcluster --timer || true
+./mysql-test-run.pl --comment=ps+rowrepl+NDB --ps-protocol --mysqld=--binlog-format=row --force --timer || true
+./mysql-test-run.pl --comment=NDB --with-ndbcluster-only --force --timer || true
+cd ../..
##############################################################################
@@ -522,7 +523,6 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisampack.1*
-%doc %attr(644, root, man) %{_mandir}/man1/mysql_explain_log.1*
%doc %attr(644, root, man) %{_mandir}/man8/mysqld.8*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1*
diff --git a/unittest/mytap/tap.c b/unittest/mytap/tap.c
index 17ec51863d9..54292f3b828 100644
--- a/unittest/mytap/tap.c
+++ b/unittest/mytap/tap.c
@@ -140,11 +140,19 @@ static signal_entry install_signal[]= {
{ SIGABRT, handle_core_signal },
{ SIGFPE, handle_core_signal },
{ SIGSEGV, handle_core_signal },
- { SIGBUS, handle_core_signal },
- { SIGXCPU, handle_core_signal },
- { SIGXFSZ, handle_core_signal },
- { SIGSYS, handle_core_signal },
- { SIGTRAP, handle_core_signal }
+ { SIGBUS, handle_core_signal }
+#ifdef SIGXCPU
+ , { SIGXCPU, handle_core_signal }
+#endif
+#ifdef SIGXCPU
+ , { SIGXFSZ, handle_core_signal }
+#endif
+#ifdef SIGXCPU
+ , { SIGSYS, handle_core_signal }
+#endif
+#ifdef SIGXCPU
+ , { SIGTRAP, handle_core_signal }
+#endif
};
void