Commit b311d870 authored by unknown's avatar unknown
Browse files

Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1

into  moonlight.home:/home/tomash/src/mysql_ab/mysql-5.1-bug9953


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
sql/sql_yacc.yy:
  SCCS merged
parents 1b198eeb 0ea47f3e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -257,3 +257,12 @@ delete from mysql.help_relation where help_keyword_id=@keyword1_id and help_topi
delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topic_id=@topic1_id;
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
End of 4.1 tests.
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (i INT);
LOCK TABLES t1 WRITE;
HELP no_such_topic;
name	is_it_category
UNLOCK TABLES;
DROP TABLE t1;
End of 5.1 tests.
+21 −0
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
delete t2 from t1,t2 where t1.a=t2.a;
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
drop table t1,t2;
End of 4.1 tests.
drop table if exists t1;
create table t1 (a int);
lock table t1 write;
@@ -75,3 +76,23 @@ flush tables with read lock;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
drop table t1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (i INT);
LOCK TABLES mysql.time_zone READ, mysql.proc READ, t1 READ;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone READ, mysql.proc READ, t1 WRITE;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone READ, mysql.proc READ;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone WRITE, mysql.proc WRITE;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone READ, mysql.proc WRITE, t1 READ;
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
LOCK TABLES mysql.time_zone WRITE, mysql.proc WRITE, t1 READ;
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
LOCK TABLES mysql.time_zone WRITE, mysql.proc WRITE, t1 WRITE;
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
LOCK TABLES mysql.time_zone READ, mysql.proc WRITE;
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
DROP TABLE t1;
End of 5.1 tests.
+2 −2
Original line number Diff line number Diff line
@@ -292,9 +292,9 @@ call p()|
unlock tables|
drop procedure p|
lock tables t1 read, mysql.proc write|
ERROR HY000: You can't combine write-locking of system 'mysql.proc' table with other tables
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
lock tables mysql.proc write, mysql.user write|
ERROR HY000: You can't combine write-locking of system 'mysql.proc' table with other tables
ERROR HY000: You can't combine write-locking of system tables with other tables or lock types
lock tables t1 read, mysql.proc read|
unlock tables|
lock tables mysql.proc write|
+11 −0
Original line number Diff line number Diff line
@@ -285,3 +285,14 @@ ldt ldt2
drop table t1;
drop function f1;
SET GLOBAL log_bin_trust_function_creators = 0;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (t TIMESTAMP);
INSERT INTO t1 VALUES (NULL), (NULL);
LOCK TABLES t1 WRITE;
SELECT CONVERT_TZ(NOW(), 'UTC', 'Europe/Moscow') IS NULL;
CONVERT_TZ(NOW(), 'UTC', 'Europe/Moscow') IS NULL
0
UPDATE t1 SET t = CONVERT_TZ(t, 'UTC', 'Europe/Moscow');
UNLOCK TABLES;
DROP TABLE t1;
End of 5.1 tests
+4 −3
Original line number Diff line number Diff line
@@ -900,6 +900,7 @@ drop view v1;
drop table t1;
create table t1 (col1 int);
create table t2 (col1 int);
create table t3 (col1 datetime not null);
create view v1 as select * from t1;
create view v2 as select * from v1;
create view v3 as select v2.col1 from v2,t2 where v2.col1 = t2.col1;
@@ -1004,8 +1005,8 @@ ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 'v3
insert into v3 (col1) values ((select CONVERT_TZ('20050101000000','UTC','MET') from v2));
ERROR HY000: The definition of table 'v2' prevents operation INSERT on table 'v3'.
insert into v3 (col1) values ((select CONVERT_TZ('20050101000000','UTC','MET') from t2));
insert into mysql.time_zone values ('', (select CONVERT_TZ('20050101000000','UTC','MET') from t2));
ERROR 23000: Column 'Use_leap_seconds' cannot be null
insert into t3 values ((select CONVERT_TZ('20050101000000','UTC','MET') from t2));
ERROR 23000: Column 'col1' cannot be null
create algorithm=temptable view v4 as select * from t1;
insert into t1 values (1),(2),(3);
insert into t1 (col1) values ((select max(col1) from v4));
@@ -1017,7 +1018,7 @@ NULL
3
3
drop view v4,v3,v2,v1;
drop table t1,t2;
drop table t1,t2,t3;
create table t1 (s1 int);
create view v1 as select * from t1;
handler v1 open as xx;
Loading