Below is the list of changes that have just been committed into a local
5.1 repository of hartmut. When hartmut 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
1.2301 06/04/07 11:23:55 hartmut@stripped +9 -0
Merge mysql.com:/home/hartmut/projects/mysql/dev/5.0
into mysql.com:/home/hartmut/projects/mysql/dev/5.1
sql/opt_sum.cc
1.49 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
sql/item_timefunc.cc
1.109 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
sql/item_sum.cc
1.176 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
mysql-test/t/information_schema.test
1.74 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
mysql-test/t/ctype_ucs.test
1.40 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
mysql-test/r/information_schema.result
1.114 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
mysql-test/r/func_time.result
1.49 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
mysql-test/r/func_gconcat.result
1.55 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
mysql-test/r/ctype_ucs.result
1.44 06/04/07 11:23:48 hartmut@stripped +0 -0
Auto merged
# 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: hartmut
# Host: linux.site
# Root: /home/hartmut/projects/mysql/dev/5.1/RESYNC
--- 1.175/sql/item_sum.cc 2006-04-01 09:38:28 +02:00
+++ 1.176/sql/item_sum.cc 2006-04-07 11:23:48 +02:00
@@ -3249,7 +3249,10 @@
}
if (agg_item_charsets(collation, func_name(),
- args, arg_count, MY_COLL_ALLOW_CONV))
+ args,
+ /* skip charset aggregation for order columns */
+ arg_count - arg_count_order,
+ MY_COLL_ALLOW_CONV))
return 1;
result.set_charset(collation.collation);
--- 1.108/sql/item_timefunc.cc 2006-03-28 19:34:29 +02:00
+++ 1.109/sql/item_timefunc.cc 2006-04-07 11:23:48 +02:00
@@ -2168,7 +2168,7 @@
switch (int_type) {
case INTERVAL_YEAR: return ltime.year;
case INTERVAL_YEAR_MONTH: return ltime.year*100L+ltime.month;
- case INTERVAL_QUARTER: return ltime.month/3 + 1;
+ case INTERVAL_QUARTER: return (ltime.month+2)/3;
case INTERVAL_MONTH: return ltime.month;
case INTERVAL_WEEK:
{
--- 1.48/sql/opt_sum.cc 2006-04-05 23:00:46 +02:00
+++ 1.49/sql/opt_sum.cc 2006-04-07 11:23:48 +02:00
@@ -123,8 +123,11 @@
If the storage manager of 'tl' gives exact row count, compute the total
number of rows. If there are no outer table dependencies, this count
may be used as the real count.
+ Schema tables are filled after this function is invoked, so we can't
+ get row count
*/
- if (tl->table->file->table_flags() & HA_NOT_EXACT_COUNT)
+ if ((tl->table->file->table_flags() & HA_NOT_EXACT_COUNT) ||
+ tl->schema_table)
{
is_exact_count= FALSE;
count= 1; // ensure count != 0
@@ -149,31 +152,15 @@
switch (item_sum->sum_func()) {
case Item_sum::COUNT_FUNC:
/*
- If the expr in count(expr) can never be null we can change this
+ If the expr in COUNT(expr) can never be null we can change this
to the number of rows in the tables if this number is exact and
there are no outer joins.
*/
if (!conds && !((Item_sum_count*) item)->args[0]->maybe_null
&&
!outer_tables && is_exact_count)
{
- longlong count= 1;
- TABLE_LIST *table;
- for (table= tables; table; table= table->next_leaf)
- {
- if (outer_tables || (table->table->file->table_flags() &
- HA_NOT_EXACT_COUNT) || table->schema_table)
- {
- const_result= 0; // Can't optimize left join
- break;
- }
- tables->table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
- count*= table->table->file->records;
- }
- if (!table)
- {
- ((Item_sum_count*) item)->make_const(count);
- recalc_const_item= 1;
- }
+ ((Item_sum_count*) item)->make_const(count);
+ recalc_const_item= 1;
}
else
const_result= 0;
--- 1.43/mysql-test/r/ctype_ucs.result 2006-02-22 10:09:48 +01:00
+++ 1.44/mysql-test/r/ctype_ucs.result 2006-04-07 11:23:48 +02:00
@@ -719,3 +719,11 @@
river
drop table t1;
deallocate prepare stmt;
+create table t1(a blob, b text charset utf8, c text charset ucs2);
+select data_type, character_octet_length, character_maximum_length
+from information_schema.columns where table_name='t1';
+data_type character_octet_length character_maximum_length
+blob 65535 65535
+text 65535 65535
+text 65535 32767
+drop table t1;
--- 1.39/mysql-test/t/ctype_ucs.test 2006-02-06 12:11:26 +01:00
+++ 1.40/mysql-test/t/ctype_ucs.test 2006-04-07 11:23:48 +02:00
@@ -455,3 +455,11 @@
select utext from t1 where utext like '%%';
drop table t1;
deallocate prepare stmt;
+
+#
+# Bug #14290: character_maximum_length for text fields
+#
+create table t1(a blob, b text charset utf8, c text charset ucs2);
+select data_type, character_octet_length, character_maximum_length
+ from information_schema.columns where table_name='t1';
+drop table t1;
--- 1.113/mysql-test/r/information_schema.result 2006-04-05 15:59:51 +02:00
+++ 1.114/mysql-test/r/information_schema.result 2006-04-07 11:23:48 +02:00
@@ -1084,14 +1084,6 @@
1
use test;
drop table t1;
-create table t1(a blob, b text charset utf8, c text charset ucs2);
-select data_type, character_octet_length, character_maximum_length
-from information_schema.columns where table_name='t1';
-data_type character_octet_length character_maximum_length
-blob 65535 65535
-text 65535 65535
-text 65535 32767
-drop table t1;
create table t1 (f1 int(11));
create view v1 as select * from t1;
drop table t1;
--- 1.73/mysql-test/t/information_schema.test 2006-04-05 15:59:51 +02:00
+++ 1.74/mysql-test/t/information_schema.test 2006-04-07 11:23:48 +02:00
@@ -743,15 +743,6 @@
drop table t1;
#
-# Bug #14290: character_maximum_length for text fields
-#
-
-create table t1(a blob, b text charset utf8, c text charset ucs2);
-select data_type, character_octet_length, character_maximum_length
- from information_schema.columns where table_name='t1';
-drop table t1;
-
-#
# Bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value
#
create table t1 (f1 int(11));
--- 1.48/mysql-test/r/func_time.result 2005-12-02 12:01:36 +01:00
+++ 1.49/mysql-test/r/func_time.result 2006-04-07 11:23:48 +02:00
@@ -360,6 +360,42 @@
select extract(MONTH FROM "2001-02-00");
extract(MONTH FROM "2001-02-00")
2
+SELECT EXTRACT(QUARTER FROM '2004-01-15') AS quarter;
+quarter
+1
+SELECT EXTRACT(QUARTER FROM '2004-02-15') AS quarter;
+quarter
+1
+SELECT EXTRACT(QUARTER FROM '2004-03-15') AS quarter;
+quarter
+1
+SELECT EXTRACT(QUARTER FROM '2004-04-15') AS quarter;
+quarter
+2
+SELECT EXTRACT(QUARTER FROM '2004-05-15') AS quarter;
+quarter
+2
+SELECT EXTRACT(QUARTER FROM '2004-06-15') AS quarter;
+quarter
+2
+SELECT EXTRACT(QUARTER FROM '2004-07-15') AS quarter;
+quarter
+3
+SELECT EXTRACT(QUARTER FROM '2004-08-15') AS quarter;
+quarter
+3
+SELECT EXTRACT(QUARTER FROM '2004-09-15') AS quarter;
+quarter
+3
+SELECT EXTRACT(QUARTER FROM '2004-10-15') AS quarter;
+quarter
+4
+SELECT EXTRACT(QUARTER FROM '2004-11-15') AS quarter;
+quarter
+4
+SELECT EXTRACT(QUARTER FROM '2004-12-15') AS quarter;
+quarter
+4
SELECT "1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND;
"1900-01-01 00:00:00" + INTERVAL 2147483648 SECOND
1968-01-20 03:14:08
--- 1.54/mysql-test/r/func_gconcat.result 2006-04-01 09:38:27 +02:00
+++ 1.55/mysql-test/r/func_gconcat.result 2006-04-07 11:23:48 +02:00
@@ -626,3 +626,8 @@
latin1
drop table t1, t2, t3;
set names default;
+create table t1 (c1 varchar(10), c2 int);
+select charset(group_concat(c1 order by c2)) from t1;
+charset(group_concat(c1 order by c2))
+latin1
+drop table t1;
| Thread |
|---|
| • bk commit into 5.1 tree (hartmut:1.2301) | 'Hartmut Holzgraefe' | 7 Apr |