Below is the list of changes that have just been committed into a local
5.1 repository of cmiller. When cmiller 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-28 07:35:04-04:00, cmiller@stripped +12 -0
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
MERGE: 1.1810.1697.164
client/mysql.cc@stripped, 2006-09-28 07:34:59-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.199.1.20
mysql-test/r/ctype_utf8.result@stripped, 2006-09-28 07:34:59-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.85.1.13
mysql-test/r/func_time.result@stripped, 2006-09-28 07:34:59-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.47.1.23
mysql-test/t/ctype_utf8.test@stripped, 2006-09-28 07:34:59-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.84.1.7
mysql-test/t/func_time.test@stripped, 2006-09-28 07:34:59-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.41.1.17
sql/item_cmpfunc.cc@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.187.1.34
sql/item_cmpfunc.h@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.122.2.8
sql/item_func.h@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.136.2.17
sql/item_strfunc.cc@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.261.1.25
sql/mysqld.cc@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.439.1.135
sql/sql_class.h@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.230.1.70
sql/sql_string.cc@stripped, 2006-09-28 07:35:00-04:00, cmiller@stripped +0 -0
Auto merged
MERGE: 1.91.1.2
# 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: cmiller
# Host: zippy.cornsilk.net
# Root: /home/cmiller/work/mysql/mysql-5.1-maint/RESYNC
--- 1.231/client/mysql.cc 2006-09-28 07:35:11 -04:00
+++ 1.232/client/mysql.cc 2006-09-28 07:35:11 -04:00
@@ -2896,7 +2896,7 @@ com_connect(String *buffer, char *line)
bzero(buff, sizeof(buff));
if (buffer)
{
- strmake(buff, line, sizeof(buff));
+ strmake(buff, line, sizeof(buff) - 1);
tmp= get_arg(buff, 0);
if (tmp && *tmp)
{
@@ -3011,7 +3011,7 @@ com_use(String *buffer __attribute__((un
int select_db;
bzero(buff, sizeof(buff));
- strmov(buff, line);
+ strmake(buff, line, sizeof(buff) - 1);
tmp= get_arg(buff, 0);
if (!tmp || !*tmp)
{
--- 1.293/sql/item_strfunc.cc 2006-09-28 07:35:11 -04:00
+++ 1.294/sql/item_strfunc.cc 2006-09-28 07:35:11 -04:00
@@ -1149,12 +1149,13 @@ void Item_func_substr::fix_length_and_de
}
if (arg_count == 3 && args[2]->const_item())
{
- int32 length= (int32) args[2]->val_int() * collation.collation->mbmaxlen;
+ int32 length= (int32) args[2]->val_int();
if (length <= 0)
max_length=0; /* purecov: inspected */
else
set_if_smaller(max_length,(uint) length);
}
+ max_length*= collation.collation->mbmaxlen;
}
--- 1.101/mysql-test/r/ctype_utf8.result 2006-09-28 07:35:11 -04:00
+++ 1.102/mysql-test/r/ctype_utf8.result 2006-09-28 07:35:11 -04:00
@@ -1353,6 +1353,18 @@ database()
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
use test;
+create table t1(a char(10)) default charset utf8;
+insert into t1 values ('123'), ('456');
+explain
+select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
+select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+substr(Z.a,-1) a
+3 123
+6 456
+drop table t1;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
--- 1.92/mysql-test/t/ctype_utf8.test 2006-09-28 07:35:11 -04:00
+++ 1.93/mysql-test/t/ctype_utf8.test 2006-09-28 07:35:11 -04:00
@@ -1086,6 +1086,17 @@ select database();
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
use test;
+#
+# Bug #20204: "order by" changes the results returned
+#
+
+create table t1(a char(10)) default charset utf8;
+insert into t1 values ('123'), ('456');
+explain
+ select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
+drop table t1;
+
# End of 4.1 tests
#
--- 1.77/mysql-test/r/func_time.result 2006-09-28 07:35:11 -04:00
+++ 1.78/mysql-test/r/func_time.result 2006-09-28 07:35:11 -04:00
@@ -890,6 +890,18 @@ t1 CREATE TABLE `t1` (
`from_unixtime(1) + 0` double(23,6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+SET NAMES latin1;
+SET character_set_results = NULL;
+SHOW VARIABLES LIKE 'character_set_results';
+Variable_name Value
+character_set_results
+CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
+INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
+SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
+fmtddate field2
+Sep-4 12:00AM abcd
+DROP TABLE testBug8868;
+SET NAMES DEFAULT;
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
--- 1.62/mysql-test/t/func_time.test 2006-09-28 07:35:11 -04:00
+++ 1.63/mysql-test/t/func_time.test 2006-09-28 07:35:11 -04:00
@@ -447,6 +447,25 @@ show create table t1;
drop table t1;
#
+# 21913: DATE_FORMAT() Crashes mysql server if I use it through
+# mysql-connector-j driver.
+#
+
+SET NAMES latin1;
+SET character_set_results = NULL;
+SHOW VARIABLES LIKE 'character_set_results';
+
+CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
+INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
+
+SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
+
+DROP TABLE testBug8868;
+
+SET NAMES DEFAULT;
+
+
+#
# Bug #19844 time_format in Union truncates values
#
| Thread |
|---|
| • bk commit into 5.1 tree (cmiller:1.2336) | Chad MILLER | 28 Sep |