Commit 7749b8d1 authored by evgen@moonbone.local's avatar evgen@moonbone.local

Merge

parents 13ae8d8d 35f7b50b
...@@ -2385,6 +2385,14 @@ show create view v1; ...@@ -2385,6 +2385,14 @@ show create view v1;
View Create View View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1`
drop view v1; 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;
create table t1(f1 int, f2 int); create table t1(f1 int, f2 int);
insert into t1 values (null, 10), (null,2); insert into t1 values (null, 10), (null,2);
create view v1 as select * from t1; create view v1 as select * from t1;
......
...@@ -2254,6 +2254,16 @@ create definer = current_user sql security invoker view v1 as select 1; ...@@ -2254,6 +2254,16 @@ create definer = current_user sql security invoker view v1 as select 1;
show create view v1; show create view v1;
drop 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;
# #
# Bug #14850 Item_ref's values wasn't updated # Bug #14850 Item_ref's values wasn't updated
# #
......
...@@ -10988,7 +10988,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, ...@@ -10988,7 +10988,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
for (; order ; order=order->next, const_key_parts>>=1) 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; int flag;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment