Commit 94e68832 authored by unknown's avatar unknown
Browse files

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

into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build

parents 5383f487 f61918ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2516,9 +2516,9 @@ linked_client_targets="linked_libmysql_sources"

if test "$THREAD_SAFE_CLIENT" = "no"
then
  sql_client_dirs="strings regex mysys extra libmysql client"
  sql_client_dirs="strings regex mysys dbug extra libmysql client"
else
  sql_client_dirs="strings regex mysys extra libmysql libmysql_r client"
  sql_client_dirs="strings regex mysys dbug extra libmysql libmysql_r client"
  linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
  AC_CONFIG_FILES(libmysql_r/Makefile)
  AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
+1 −1
Original line number Diff line number Diff line
@@ -592,8 +592,8 @@ static uint copy_decode_table(uint16 *to_pos, uint offset,
			      uint16 *decode_table)
{
  uint prev_offset;
  prev_offset= offset;
  DBUG_ENTER("copy_decode_table");
  prev_offset= offset;

  /* Descent on the left side. */
  if (!(*decode_table & IS_CHAR))
+35 −0
Original line number Diff line number Diff line
@@ -87,11 +87,27 @@ x y z
rollback;
commit;
begin;
select * from t1 where y = 'one' or y = 'three' for update;
x	y	z
#	#	#
#	#	#
begin;
select * from t1 where x = 2 for update;
x	y	z
2	two	2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
commit;
begin;
select * from t1 where y = 'one' or y = 'three' order by x for update;
x	y	z
1	one	1
3	three	3
begin;
select * from t1 where x = 2 for update;
x	y	z
2	two	2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
@@ -124,6 +140,22 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
commit;
begin;
select * from t1 where y = 'one' or y = 'three' lock in share mode;
x	y	z
#	#	#
#	#	#
begin;
select * from t1 where y = 'one' lock in share mode;
x	y	z
1	one	1
select * from t1 where x = 2 for update;
x	y	z
2	two	2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
commit;
begin;
select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
x	y	z
1	one	1
@@ -132,6 +164,9 @@ begin;
select * from t1 where y = 'one' lock in share mode;
x	y	z
1	one	1
select * from t1 where x = 2 for update;
x	y	z
2	two	2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
+109 −0
Original line number Diff line number Diff line
@@ -1055,6 +1055,65 @@ EXECUTE stmt USING @a;
0	0
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (i INT);
PREPARE st_19182
FROM "CREATE TABLE t2 (i INT, j INT, KEY (i), KEY(j)) SELECT i FROM t1";
EXECUTE st_19182;
DESC t2;
Field	Type	Null	Key	Default	Extra
j	int(11)	YES	MUL	NULL	
i	int(11)	YES	MUL	NULL	
DROP TABLE t2;
EXECUTE st_19182;
DESC t2;
Field	Type	Null	Key	Default	Extra
j	int(11)	YES	MUL	NULL	
i	int(11)	YES	MUL	NULL	
DEALLOCATE PREPARE st_19182;
DROP TABLE t2, t1;
drop database if exists mysqltest;
drop table if exists t1, t2;
create database mysqltest character set utf8;
prepare stmt1 from "create table mysqltest.t1 (c char(10))";
prepare stmt2 from "create table mysqltest.t2 select 'test'";
execute stmt1;
execute stmt2;
show create table mysqltest.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `c` char(10) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
show create table mysqltest.t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `test` varchar(4) character set latin1 NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table mysqltest.t1;
drop table mysqltest.t2;
alter database mysqltest character set latin1;
execute stmt1;
execute stmt2;
show create table mysqltest.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `c` char(10) character set utf8 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table mysqltest.t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `test` varchar(4) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop database mysqltest;
deallocate prepare stmt1;
deallocate prepare stmt2;
execute stmt;
show create table t1;
drop table t1;
execute stmt;
show create table t1;
drop table t1;
deallocate prepare stmt;
End of 4.1 tests.
create table t1 (a varchar(20));
insert into t1 values ('foo');
@@ -1536,4 +1595,54 @@ a
2
DEALLOCATE PREPARE stmt;
DROP TABLE t1,t2;
drop table if exists t1;
create table t1 (s1 char(20));
prepare stmt from "alter table t1 modify s1 int";
execute stmt;
execute stmt;
drop table t1;
deallocate prepare stmt;
drop table if exists t1;
create table t1 (a int, b int);
prepare s_6895 from "alter table t1 drop column b";
execute s_6895;
show columns from t1;
Field	Type	Null	Key	Default	Extra
a	int(11)	YES		NULL	
drop table t1;
create table t1 (a int, b int);
execute s_6895;
show columns from t1;
Field	Type	Null	Key	Default	Extra
a	int(11)	YES		NULL	
drop table t1;
create table t1 (a int, b int);
execute s_6895;
show columns from t1;
Field	Type	Null	Key	Default	Extra
a	int(11)	YES		NULL	
deallocate prepare s_6895;
drop table t1;
create table t1 (i int primary key auto_increment) comment='comment for table t1';
create table t2 (i int, j int, k int);
prepare stmt from "alter table t1 auto_increment=100";
execute stmt;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `i` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`i`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1'
flush tables;
select * from t2;
i	j	k
execute stmt;
show create table t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `i` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`i`)
) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1'
deallocate prepare stmt;
drop table t1, t2;
End of 5.0 tests.
+6 −0
Original line number Diff line number Diff line
@@ -3611,3 +3611,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1	SIMPLE	t2	range	si,ai	si	5	NULL	2	Using where
1	SIMPLE	t3	eq_ref	PRIMARY,ci	PRIMARY	4	test.t2.a	1	Using where
DROP TABLE t1,t2,t3;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a int);
INSERT into t1 values (1), (2), (3);
SELECT * FROM t1 LIMIT 2, -1;
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 '-1' at line 1
DROP TABLE t1;
Loading