From: <ta...@us...> - 2015-02-23 15:50:31
|
Revision: 60764 http://sourceforge.net/p/firebird/code/60764 Author: tabloid Date: 2015-02-23 15:50:23 +0000 (Mon, 23 Feb 2015) Log Message: ----------- See added .fbt file(s) Added Paths: ----------- qa/fbt-repository/trunk/tests/bugs/core_3611.fbt qa/fbt-repository/trunk/tests/functional/tabloid/core_3611_aux.fbt Added: qa/fbt-repository/trunk/tests/bugs/core_3611.fbt =================================================================== --- qa/fbt-repository/trunk/tests/bugs/core_3611.fbt (rev 0) +++ qa/fbt-repository/trunk/tests/bugs/core_3611.fbt 2015-02-23 15:50:23 UTC (rev 60764) @@ -0,0 +1,105 @@ +{ +'id': 'bugs.core_3611', +'qmid': None, +'tracker_id': 'CORE-3611', +'title': 'Wrong data while retrieving from CTEs (or derived tables) with same column names', +'description': '', +'min_versions': '2.5.2', +'versions': [ +{ + 'firebird_version': '2.5', + 'platform': 'All', + 'test_type': 'ISQL', + 'init_script': + """ + """, + 'test_script': + """ + recreate table t( + tab_name char(31) character set unicode_fss, + sum1_abc int, + sum1_oth int, + sum2_abc int, + sum2_oth int + ); + commit; + + insert into t(tab_name, sum1_abc, sum1_oth) + with + fields_abc as ( + select rdb$relation_name, count(*) cnt + from rdb$relation_fields + where rdb$field_name<'rdb$d' + group by 1 + ), + fields_other as ( + select rdb$relation_name, count(*) cnt + from rdb$relation_fields + where rdb$field_name>='rdb$d' + group by 1 + ) + ,fields_all as ( + select + substring(r.rdb$relation_name from 1 for 5) tab_name, + sum(f1.cnt) sum_abc, + sum(f2.cnt) sum_other + from rdb$relations r + left join fields_abc f1 on f1.rdb$relation_name=r.rdb$relation_name + left join fields_other f2 on f2.rdb$relation_name=r.rdb$relation_name + where r.rdb$flags is null + group by 1 + ) + select tab_name, sum_abc, sum_other from fields_all + ; + + insert into t(tab_name, sum2_abc, sum2_oth) + with + fields_abc as ( + select rdb$relation_name, count(*) cnt + from rdb$relation_fields + where rdb$field_name<'rdb$d' + group by 1 + ), + fields_other as ( + select rdb$relation_name, count(*) cnt____________ + from rdb$relation_fields + where rdb$field_name>='rdb$d' + group by 1 + ) + ,fields_all as ( + select substring(r.rdb$relation_name from 1 for 5) tab_name, + sum(f1.cnt) sum_abc, + sum(f2.cnt____________) sum_other + from rdb$relations r + left join fields_abc f1 on f1.rdb$relation_name=r.rdb$relation_name + left join fields_other f2 on f2.rdb$relation_name=r.rdb$relation_name + where r.rdb$flags is null + group by 1 + ) + select tab_name, sum_abc, sum_other from fields_all + ; + commit; + + select + tab_name + ,min(sum1_abc) as sum1_abc + ,min(sum2_abc) as sum2_abc + ,min(sum1_oth) as sum1_oth + ,min(sum2_oth) as sum2_oth + from t + group by tab_name + having + min(sum1_abc) is distinct from min(sum2_abc) + or + min(sum1_oth) is distinct from min(sum2_oth) + ; + """, + 'expected_stdout': + """ + """, + 'expected_stderr': + """ + """ +} +] +} Property changes on: qa/fbt-repository/trunk/tests/bugs/core_3611.fbt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: qa/fbt-repository/trunk/tests/functional/tabloid/core_3611_aux.fbt =================================================================== --- qa/fbt-repository/trunk/tests/functional/tabloid/core_3611_aux.fbt (rev 0) +++ qa/fbt-repository/trunk/tests/functional/tabloid/core_3611_aux.fbt 2015-02-23 15:50:23 UTC (rev 60764) @@ -0,0 +1,41 @@ +{ +'id': 'functional.tabloid.core_3611_aux', +'qmid': None, +'tracker_id': 'CORE-3611', +'title': 'Wrong data while retrieving from CTEs (or derived tables) with same column names', +'description': 'See another sample in this ticket (by dimitr, 30/Oct/12 07:13 PM)', +'min_versions': '2.5.2', +'versions': [ +{ + 'firebird_version': '2.5', + 'platform': 'All', + 'test_type': 'ISQL', + 'init_script': + """ + """, + 'test_script': + """ + set planonly; + with tab as + ( + select 1 as p1 + from rdb$relations + ) + select f1.p1, f2.p1 as p2 + from tab f1 cross join tab f2 + group by f1.p1 + ; + """, + 'expected_stdout': + """ + """, + 'expected_stderr': + """ + Statement failed, SQLSTATE = 42000 + Dynamic SQL Error + -SQL error code = -104 + -Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) + """ +} +] +} Property changes on: qa/fbt-repository/trunk/tests/functional/tabloid/core_3611_aux.fbt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |