Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.1973 05/11/14 22:10:34 evgen@stripped +3 -0
Fix bug #14816 test_if_order_by_key() expected only Item_fields.
test_if_order_by_key() expected only Item_fields to be in order->item, thus
failing to find available index on view's field, which results in reported
error.
Now test_if_order_by_key() calls order->item->real_item() to get field for
choosing index.
mysql-test/t/view.test
1.123 05/11/14 22:10:02 evgen@stripped +10 -0
Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
mysql-test/r/view.result
1.133 05/11/14 22:09:41 evgen@stripped +8 -0
Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
sql/sql_select.cc
1.375 05/11/14 22:08:56 evgen@stripped +1 -1
Fix bug #14816 test_if_order_by_key() expected only Item_fields.
Make test_if_order_by_key() use real_item() to get field.
# 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: evgen
# Host: moonbone.local
# Root: /work/14816-bug-5.0-mysql
--- 1.374/sql/sql_select.cc 2005-11-03 22:35:16 +03:00
+++ 1.375/sql/sql_select.cc 2005-11-14 22:08:56 +03:00
@@ -10988,7 +10988,7 @@
for (; order ; order=order->next, const_key_parts>>=1)
{
- Field *field=((Item_field*) (*order->item))->field;
+ Field *field=((Item_field*) (*order->item)->real_item())->field;
int flag;
/*
--- 1.132/mysql-test/r/view.result 2005-11-10 22:24:51 +03:00
+++ 1.133/mysql-test/r/view.result 2005-11-14 22:09:41 +03:00
@@ -2385,3 +2385,11 @@
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1`
drop view v1;
+create table t1 (id INT, primary key(id));
+insert into t1 values (1),(2);
+create view v1 as select * from t1;
+explain select id from v1 order by id;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index NULL PRIMARY 4 NULL 2 Using index
+drop view v1;
+drop table t1;
--- 1.122/mysql-test/t/view.test 2005-11-10 22:24:51 +03:00
+++ 1.123/mysql-test/t/view.test 2005-11-14 22:10:02 +03:00
@@ -2253,3 +2253,13 @@
create definer = current_user sql security invoker view v1 as select 1;
show create view v1;
drop view v1;
+
+#
+# Bug #14816 test_if_order_by_key() expected only Item_fields.
+#
+create table t1 (id INT, primary key(id));
+insert into t1 values (1),(2);
+create view v1 as select * from t1;
+explain select id from v1 order by id;
+drop view v1;
+drop table t1;
Thread |
---|
• bk commit into 5.0 tree (evgen:1.1973) BUG#14816 | eugene | 14 Nov |