Merge mysql.com:/Users/kent/mysql/bk/mysql-5.1-release

into  mysql.com:/Users/kent/mysql/bk/mysql-5.1
parents 4a7cd3a1 87a9d234
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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>
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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"
......
......@@ -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
......
......@@ -24,5 +24,4 @@ base_configs=" \
--prefix=N:/mysql \
--without-mysqlmanager \
--without-man \
--without-csv-storage-engine \
"
......@@ -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"
......
......@@ -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`
......
......@@ -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
......
......@@ -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
......
......@@ -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);
/*
......
......@@ -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,
......
......@@ -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;
......
......@@ -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);
......
......@@ -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>
......
......@@ -701,7 +701,7 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
theNdbCon = NULL;
m_transConnection = NULL;
if (tTransCon)
if (tTransCon && releaseOp)
{
NdbIndexScanOperation* tOp = (NdbIndexScanOperation*)this;
......@@ -716,7 +716,7 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
&tTransCon->m_theLastScanOperation,
tOp);
}
else if (releaseOp)
else
{
ret = tTransCon->releaseScanOperation(&tTransCon->m_firstExecutedScanOp,
0, tOp);
......
......@@ -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*
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment