Below is the list of changes that have just been committed into a local
5.0 repository of igor. When igor does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-09-19 12:18:24-07:00, igor@stripped +2 -0
Post-merge corrections.
mysql-test/r/ps.result@stripped, 2006-09-19 12:18:21-07:00, igor@stripped +49 -49
Post-merge corrections.
mysql-test/t/ps.test@stripped, 2006-09-19 12:18:21-07:00, igor@stripped +54 -54
Post-merge corrections.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: igor
# Host: rurik.mysql.com
# Root: /home/igor/mysql-5.0-opt
--- 1.73/mysql-test/r/ps.result 2006-09-19 12:18:31 -07:00
+++ 1.74/mysql-test/r/ps.result 2006-09-19 12:18:31 -07:00
@@ -253,10 +253,10 @@
1234
1234
set names latin1;
-execute `ü`;
+execute `ü`;
1234
1234
-deallocate prepare `ü`;
+deallocate prepare `ü`;
set names default;
create table t1 (a varchar(10)) charset=utf8;
insert into t1 (a) values ('yahoo');
@@ -820,53 +820,6 @@
set local max_prepared_stmt_count=1;
ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set
with SET GLOBAL
set local prepared_stmt_count=0;
-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;
ERROR HY000: Variable 'prepared_stmt_count' is a read only variable
set @@prepared_stmt_count=0;
ERROR HY000: Variable 'prepared_stmt_count' is a read only variable
@@ -956,6 +909,53 @@
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');
--- 1.70/mysql-test/t/ps.test 2006-09-19 12:18:31 -07:00
+++ 1.71/mysql-test/t/ps.test 2006-09-19 12:18:31 -07:00
@@ -259,8 +259,8 @@
prepare `ü` from 'select 1234';
execute `ü` ;
set names latin1;
-execute `ü`;
-deallocate prepare `ü`;
+execute `ü`;
+deallocate prepare `ü`;
set names default;
@@ -563,58 +563,6 @@
# this query did not return all matching rows
execute stmt using @a, @b;
deallocate prepare stmt;
-#
-# BUG#22085: Crash on the execution of a prepared statement that
-# uses an IN subquery with aggregate functions in HAVING
-#
-
-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;
-SET @id='222222';
-EXECUTE STMT USING @id,@id;
-
-DEALLOCATE PREPARE STMT;
-DROP TABLE t1;
-
drop table t1;
@@ -1039,6 +987,58 @@
execute stmt;
drop temporary table t1;
deallocate prepare stmt;
+
+#
+# BUG#22085: Crash on the execution of a prepared statement that
+# uses an IN subquery with aggregate functions in HAVING
+#
+
+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;
+SET @id='222222';
+EXECUTE STMT USING @id,@id;
+
+DEALLOCATE PREPARE STMT;
+DROP TABLE t1;
--echo End of 4.1 tests
############################# 5.0 tests start ################################
| Thread |
|---|
| • bk commit into 5.0 tree (igor:1.2274) | igor | 19 Sep |