mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed bug of lack of fix_fields call (after merge bugfix (SCRUM))
fixed bug in Item_sum fixed bug in dependence remover after merge fix mysql-test/r/subselect.result: after merge fix mysql-test/r/union.result: new test mysql-test/t/subselect.test: after merge fix mysql-test/t/union.test: new test sql/item.cc: fixed returned value sql/item.h: fixed flag dropper (I was not able to find Item whicj need more to be fix_fielded twice) sql/item_subselect.h: fixed initialisation sql/item_sum.cc: fixed absence of walk method of Item_sum sql/item_sum.h: fixed absence of walk method of Item_sum sql/mysql_priv.h: setup_fields reverter sql/sql_base.cc: setup_fields reverter sql/sql_derived.cc: fixed bug of lack of fix_fields call sql/sql_union.cc: fixed bug of lack of fix_fields call
This commit is contained in:
@ -384,3 +384,17 @@ is_in_group user_name group_name id
|
||||
0 Tester Group A NULL
|
||||
0 Tester Group B NULL
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (mat_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, matintnum CHAR(6) NOT NULL, test MEDIUMINT UNSIGNED NULL);
|
||||
create table t2 (mat_id MEDIUMINT UNSIGNED NOT NULL, pla_id MEDIUMINT UNSIGNED NOT NULL);
|
||||
insert into t1 values (NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd', 4), (NULL, 'e', 5), (NULL, 'f', 6), (NULL, 'g', 7), (NULL, 'h', 8), (NULL, 'i', 9);
|
||||
insert into t2 values (1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), (3, 101), (3, 102), (3, 105);
|
||||
SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id union SELECT 0, 0;
|
||||
pla_id matintnum
|
||||
100 a
|
||||
101 a
|
||||
102 a
|
||||
103 b
|
||||
104 b
|
||||
105 c
|
||||
0 0
|
||||
drop table t1, t2;
|
||||
|
Reference in New Issue
Block a user