Commit 3023ee94 authored by gluh@eagle.(none)'s avatar gluh@eagle.(none)

Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt

into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
parents 1566f370 a5e7b726
...@@ -2701,19 +2701,18 @@ CREATE TABLE t1( ...@@ -2701,19 +2701,18 @@ CREATE TABLE t1(
fName varchar(25) NOT NULL, fName varchar(25) NOT NULL,
lName varchar(25) NOT NULL, lName varchar(25) NOT NULL,
DOB date NOT NULL, DOB date NOT NULL,
test_date date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY); uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES INSERT INTO t1(fName, lName, DOB, test_date) VALUES
('Hank', 'Hill', '1964-09-29'), ('Hank', 'Hill', '1964-09-29', '2007-01-01'),
('Tom', 'Adams', '1908-02-14'), ('Tom', 'Adams', '1908-02-14', '2007-01-01'),
('Homer', 'Simpson', '1968-03-05'); ('Homer', 'Simpson', '1968-03-05', '2007-01-01');
CREATE VIEW v1 AS CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age SELECT (year(test_date)-year(DOB)) AS Age
FROM t1 HAVING Age < 75; FROM t1 HAVING Age < 75;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(`t1`.`test_date`) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) latin1 latin1_swedish_ci SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
set timestamp=1136066400;
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
Age Age
42 42
38 38
......
...@@ -4,6 +4,13 @@ reset master; ...@@ -4,6 +4,13 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
show variables like 'relay_log%';
Variable_name Value
relay_log MYSQLTEST_VARDIR/master-data/relay-log
relay_log_index
relay_log_info_file relay-log.info
relay_log_purge ON
relay_log_space_limit 0
stop slave; stop slave;
change master to master_host='127.0.0.1',master_user='root', change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT; master_password='',master_port=MASTER_PORT;
......
...@@ -2,12 +2,9 @@ ...@@ -2,12 +2,9 @@
# in case of bi-directional replication # in case of bi-directional replication
-- source include/master-slave.inc -- source include/master-slave.inc
# --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
# Start replication master -> slave show variables like 'relay_log%';
#
# We have to sync with master, to ensure slave had time to start properly
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
sync_slave_with_master;
connection slave; connection slave;
--disable_warnings --disable_warnings
stop slave; stop slave;
......
...@@ -2549,21 +2549,20 @@ CREATE TABLE t1( ...@@ -2549,21 +2549,20 @@ CREATE TABLE t1(
fName varchar(25) NOT NULL, fName varchar(25) NOT NULL,
lName varchar(25) NOT NULL, lName varchar(25) NOT NULL,
DOB date NOT NULL, DOB date NOT NULL,
test_date date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY); uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES INSERT INTO t1(fName, lName, DOB, test_date) VALUES
('Hank', 'Hill', '1964-09-29'), ('Hank', 'Hill', '1964-09-29', '2007-01-01'),
('Tom', 'Adams', '1908-02-14'), ('Tom', 'Adams', '1908-02-14', '2007-01-01'),
('Homer', 'Simpson', '1968-03-05'); ('Homer', 'Simpson', '1968-03-05', '2007-01-01');
CREATE VIEW v1 AS CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age SELECT (year(test_date)-year(DOB)) AS Age
FROM t1 HAVING Age < 75; FROM t1 HAVING Age < 75;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
set timestamp=1136066400; SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75;
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
set timestamp=1136066400;
SELECT * FROM v1; SELECT * FROM v1;
DROP VIEW v1; DROP VIEW v1;
......
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