Below is the list of changes that have just been committed into a local
4.0 repository of Sinisa. When Sinisa 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://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.2024 04/12/22 21:31:17 Sinisa@stripped +3 -0
A fix for the bug #7495
sql/item_strfunc.cc
1.81 04/12/22 21:31:13 Sinisa@stripped +2 -2
Changes for LTRIM() and TRIM() functions that aleviate the bug
entirely.
mysql-test/t/func_str.test
1.30 04/12/22 21:31:13 Sinisa@stripped +12 -0
A test case for the bug #7495 involving either LTRIM() or TRIM()
within QUOTE() function.
mysql-test/r/func_str.result
1.30 04/12/22 21:31:12 Sinisa@stripped +12 -0
A result for test case for the bug #7495 involving either LTRIM()
or TRIM() within QUOTE() function.
# 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: Sinisa
# Host: sinisa.nasamreza.org
# Root: /mnt/work/mysql-4.0
--- 1.80/sql/item_strfunc.cc Thu Nov 11 16:07:06 2004
+++ 1.81/sql/item_strfunc.cc Wed Dec 22 21:31:13 2004
@@ -1141,7 +1141,7 @@
}
if (ptr == res->ptr())
return res;
- tmp_value.set(*res,(uint) (ptr - res->ptr()),(uint) (end-ptr));
+ tmp_value.copy(res->ptr() + (ptr - res->ptr()), (uint32) (end - ptr));
return &tmp_value;
}
@@ -1266,7 +1266,7 @@
}
if (ptr == res->ptr() && end == ptr+res->length())
return res;
- tmp_value.set(*res,(uint) (ptr - res->ptr()),(uint) (end-ptr));
+ tmp_value.copy(res->ptr() + (ptr - res->ptr()), (uint32) (end - ptr));
return &tmp_value;
}
--- 1.29/mysql-test/r/func_str.result Thu Nov 11 16:07:06 2004
+++ 1.30/mysql-test/r/func_str.result Wed Dec 22 21:31:12 2004
@@ -291,3 +291,15 @@
select trim(leading 'foo' from 'foo');
trim(leading 'foo' from 'foo')
+create table t1 (a varchar(80), b varchar(80));
+insert into t1 values(NULL,"12345");
+insert into t1 values(NULL,"chm");
+select quote(ltrim(concat(' ',t1.b))) from t1;
+quote(ltrim(concat(' ',t1.b)))
+'12345'
+'chm'
+select quote(trim(concat(' ',t1.b))) from t1;
+quote(trim(concat(' ',t1.b)))
+'12345'
+'chm'
+drop table t1;
--- 1.29/mysql-test/t/func_str.test Thu Nov 11 16:07:06 2004
+++ 1.30/mysql-test/t/func_str.test Wed Dec 22 21:31:13 2004
@@ -185,3 +185,15 @@
select trim(trailing 'foo' from 'foo');
select trim(leading 'foo' from 'foo');
+
+#
+# crashing bug with QUOTE() and LTRIM() or TRIM() fixed
+# Bug #7495
+#
+
+create table t1 (a varchar(80), b varchar(80));
+insert into t1 values(NULL,"12345");
+insert into t1 values(NULL,"chm");
+select quote(ltrim(concat(' ',t1.b))) from t1;
+select quote(trim(concat(' ',t1.b))) from t1;
+drop table t1;
| Thread |
|---|
| • bk commit into 4.0 tree (Sinisa:1.2024) | sinisa | 22 Dec |