Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
  2. index 7f8777e..aa7d68c 100644
  3. --- a/mysql-test/r/win.result
  4. +++ b/mysql-test/r/win.result
  5. @@ -2762,10 +2762,8 @@ CREATE TABLE t1 (i INT);
  6. INSERT INTO t1 VALUES (3), (1), (2);
  7. SELECT i, ROW_NUMBER() OVER () FROM t1 WHERE 1 = 2;
  8. i ROW_NUMBER() OVER ()
  9. -NULL 1
  10. SELECT i, COUNT(*) OVER () FROM t1 WHERE 1 = 2;
  11. i COUNT(*) OVER ()
  12. -NULL 1
  13. DROP TABLE t1;
  14. #
  15. # MDEV-12051: window function in query with implicit grouping
  16. diff --git a/mysql-test/r/win_insert_select.result b/mysql-test/r/win_insert_select.result
  17. index c86576d..93545e6 100644
  18. --- a/mysql-test/r/win_insert_select.result
  19. +++ b/mysql-test/r/win_insert_select.result
  20. @@ -11,10 +11,6 @@ c1 c2
  21. 4 manual_insert_2
  22. 11 should repeat 4 times [11-14]
  23. 12 should repeat 4 times [11-14]
  24. -13 should repeat 4 times [11-14]
  25. -14 should repeat 4 times [11-14]
  26. -0 should_have_0
  27. -2 should_have_2
  28. DELETE FROM t1;
  29. EXECUTE populate_table;
  30. INSERT INTO t1
  31. diff --git a/sql/sql_select.cc b/sql/sql_select.cc
  32. index e8e3998..e5805c4 100644
  33. --- a/sql/sql_select.cc
  34. +++ b/sql/sql_select.cc
  35. @@ -3398,7 +3398,7 @@ void JOIN::exec_inner()
  36.  
  37. if (zero_result_cause)
  38. {
  39. - if (select_lex->have_window_funcs())
  40. + if (select_lex->have_window_funcs() && send_row_on_empty_set())
  41. {
  42. const_tables= table_count;
  43. first_select= sub_select_postjoin_aggr;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement