Commit be63bf61 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb

parents f0005562 2860a772
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -206,11 +206,13 @@ void __CDECL hfree(void *ptr);
#endif
#endif /* MSDOS */

#ifndef errno				/* did we already get it? */
#ifdef HAVE_ERRNO_AS_DEFINE
#include <errno.h>			/* errno is a define */
#else
extern int errno;			/* declare errno */
#endif
#endif					/* #ifndef errno */
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir;			/* Home directory for user */
extern char *my_progname;		/* program-name (printed in errors) */
+0 −1
Original line number Diff line number Diff line
@@ -18,5 +18,4 @@ master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table
master-bin.000001	#	Query	1	#	use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001	#	Query	1	#	use `drop-temp+table-test`; create temporary table shortn2 (a int)
master-bin.000001	#	Query	1	#	use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1`
master-bin.000001	#	Query	1	#	use `drop-temp+table-test`; DO RELEASE_LOCK("a")
drop database `drop-temp+table-test`;
+0 −1
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ master-bin.000001 96 Query 1 # use `test`; BEGIN
master-bin.000001	165	Query	1	#	use `test`; insert into t1 values(8)
master-bin.000001	253	Query	1	#	use `test`; insert into t2 select * from t1
master-bin.000001	348	Query	1	#	use `test`; ROLLBACK
master-bin.000001	420	Query	1	#	use `test`; DO RELEASE_LOCK("a")
delete from t1;
delete from t2;
reset master;
+37 −0
Original line number Diff line number Diff line
@@ -487,3 +487,40 @@ 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;
prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0";
execute stmt;
foo
SELECT FOUND_ROWS();
FOUND_ROWS()
2
execute stmt;
foo
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;
+2 −17
Original line number Diff line number Diff line
@@ -33,27 +33,12 @@ select sum(length(word)) from t1;
sum(length(word))
1022
drop table t1,t3;
create table t1 (n int) engine=myisam;
reset master;
stop slave;
reset slave;
create table t1(n int);
select get_lock("hold_slave",10);
get_lock("hold_slave",10)
1
explain extended select get_lock("hold_slave",10);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
Warnings:
Note	1003	select sql_no_cache get_lock(_latin1'hold_slave',10) AS `get_lock("hold_slave",10)`
lock tables t1 read;
start slave;
select release_lock("hold_slave");
release_lock("hold_slave")
1
explain extended select release_lock("hold_slave");
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
Warnings:
Note	1003	select sql_no_cache release_lock(_latin1'hold_slave') AS `release_lock("hold_slave")`
unlock tables;
create table t2(id int);
insert into t2 values(connection_id());
Loading