Michael Widenius
b6fe4713fe
Fix for LP#612894 Some aggregate functions (such as MIN MAX) work incorrectly in subqueries after getting NULL value
...
mysql-test/r/group_by.result:
Added test that showed problems that no_rows_in_results() didn't work for expressions
mysql-test/r/subselect4.result:
Test case for LP#612894
mysql-test/t/group_by.test:
Added test that showed problems that no_rows_in_results() didn't work for expressions
mysql-test/t/subselect4.test:
Test case for LP#612894
sql/item.h:
Added restore_to_before_no_rows_in_result()
Added function processor for no_rows_in_results() and restore_to_before_no_rows_in_results() to ensure it works with functions
Fix that above functions are handled by Item_ref()
sql/item_func.h:
Ensure that no_rows_in_results() and restore_to_before_no_rows_in_result() are called for all function arguments
sql/item_sum.cc:
Added restore_to_before_no_rows_in_result() to restore settings after Item_sum_hybrid::no_rows_in_result() was called.
This is needed to handle the case where we have made 'make_const()' on the item in opt_sum(), but the item will be reused again in a sub query.
Ignore multiple calls to no_rows_in_result() as Item_ref is calling it twice.
sql/item_sum.h:
Added restore_to_before_no_rows_in_result();
sql/sql_select.cc:
Added reset of no_rows_in_result() for JOIN::reinit()
sql/sql_select.h:
Added marker if no_rows_in_result() is called.
2010-08-23 12:46:25 +03:00
..
2009-08-25 15:56:50 +02:00
2010-05-24 21:54:08 +08:00
2010-03-04 09:03:07 +01:00
2009-10-30 11:40:44 +02:00
2010-03-25 23:57:06 +04:00
2009-08-20 14:30:59 +02:00
2010-02-09 11:30:50 +01:00
2010-02-25 23:13:11 +04:00
2010-05-28 00:07:40 +04:00
2010-02-02 14:17:21 +02:00
2010-04-22 15:52:00 +02:00
2009-09-18 16:01:18 +03:00
2010-01-15 17:27:55 +02:00
2009-10-27 12:09:19 +04:00
2009-05-21 13:06:43 +05:00
2009-08-27 00:13:03 +01:00
2010-03-09 07:36:26 -03:00
2009-05-15 12:15:56 +02:00
2009-05-15 12:15:56 +02:00
2009-05-11 20:54:00 -03:00
2009-12-22 13:52:23 +04:00
2010-05-24 21:54:08 +08:00
2009-12-27 15:54:41 +02:00
2010-03-04 09:03:07 +01:00
2010-02-17 16:13:42 +04:00
2009-05-31 13:44:41 +08:00
2010-05-24 21:54:08 +08:00
2009-07-24 11:27:23 +05:00
2009-09-30 08:35:31 +02:00
2010-03-22 16:27:59 +04:00
2009-08-10 15:46:20 -03:00
2009-05-05 11:55:22 +05:00
2009-11-30 14:42:24 +02:00
2010-05-26 21:55:40 +03:00
2010-03-04 09:03:07 +01:00
2009-05-15 12:15:56 +02:00
2009-05-15 12:15:56 +02:00
2009-09-29 17:38:40 +02:00
2010-02-17 16:13:42 +04:00
2010-01-15 17:27:55 +02:00
2010-05-14 15:36:27 +04:00
2009-07-11 23:44:29 +05:00
2009-09-06 00:42:17 +04:00
2010-06-24 15:21:23 +02:00
2010-05-19 11:18:59 +02:00
2009-08-03 22:09:53 +02:00
2010-05-29 22:16:45 +04:00
2010-05-24 21:54:08 +08:00
2010-03-10 15:39:02 +02:00
2009-12-22 17:52:15 +02:00
2010-04-28 14:52:24 +02:00
2009-06-19 11:27:19 +02:00
2010-04-03 00:30:22 +04:00
2009-06-01 16:00:38 +04:00
2010-03-31 17:00:56 +04:00
2009-11-24 18:26:13 +03:00
2010-06-22 22:53:08 +04:00
2010-06-08 10:22:40 +04:00
2010-06-20 02:02:58 +04:00
2009-07-21 19:56:35 +02:00
2010-01-11 14:15:28 +01:00
2009-06-16 16:36:15 +02:00
2010-03-26 09:49:35 +04:00
2010-04-28 14:52:24 +02:00
2010-04-28 14:52:24 +02:00
2009-12-11 16:02:47 +02:00
2009-10-29 22:06:10 -07:00
2009-10-20 11:47:57 +05:30
2009-05-15 12:15:56 +02:00
2009-05-15 12:15:56 +02:00
2009-10-27 12:09:19 +04:00
2010-05-09 21:30:06 +02:00
2010-08-23 12:46:25 +03:00
2010-06-11 09:38:29 +02:00
2010-06-09 14:45:04 +04:00
2009-05-05 17:03:23 -04:00
2009-09-29 17:38:40 +02:00
2009-10-05 15:22:23 +02:00
2010-05-25 23:14:18 -07:00
2009-05-06 15:00:14 +05:30
2009-11-14 02:15:03 +01:00
2010-05-13 14:00:53 +03:00
2010-08-04 10:39:53 +02:00
2009-11-16 21:49:51 +01:00
2010-08-02 12:01:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-01-15 16:58:25 +01:00
2009-06-09 15:19:13 +02:00
2009-06-09 15:19:13 +02:00
2009-06-09 15:19:13 +02:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-01-15 16:58:25 +01:00
2010-06-10 11:11:52 +02:00
2009-06-09 15:19:13 +02:00
2010-05-28 00:07:40 +04:00
2010-04-12 14:56:24 +03:00
2009-12-27 15:54:41 +02:00
2009-06-09 15:19:13 +02:00
2010-01-15 16:58:25 +01:00
2009-06-09 15:19:13 +02:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-04-12 14:56:24 +03:00
2010-01-18 13:56:10 +01:00
2010-01-15 16:58:25 +01:00
2010-08-04 10:39:53 +02:00
2009-11-16 21:49:51 +01:00
2009-04-28 20:12:18 +02:00
2009-09-08 00:50:10 +04:00
2010-06-01 11:54:06 +04:00
2010-04-27 00:46:52 +04:00
2009-06-07 13:05:19 +03:00
2010-06-09 11:29:27 +03:00
2009-10-19 13:44:44 +05:00
2009-08-28 18:49:16 -03:00
2009-08-28 18:49:16 -03:00
2010-05-28 00:07:40 +04:00
2009-09-03 17:05:38 +03:00
2010-05-12 13:19:12 +02:00
2009-06-15 20:27:27 -03:00
2010-02-26 09:22:48 -03:00
2009-10-27 12:09:19 +04:00
2009-09-09 14:38:50 +05:00
2009-08-28 16:13:27 +02:00
2009-10-03 21:12:24 +02:00
2010-04-28 14:52:24 +02:00
2010-03-12 10:33:16 +04:00
2010-05-24 21:54:08 +08:00
2009-10-14 16:26:16 +05:00
2009-10-28 09:52:34 +02:00
2010-05-02 08:47:28 +02:00
2009-12-04 14:00:20 -02:00
2009-06-25 02:44:14 +04:00
2009-06-10 11:24:47 +04:00
2009-12-17 12:06:36 -08:00
2009-10-04 01:20:51 +02:00
2010-03-22 13:10:18 +01:00
2009-08-27 10:32:27 +01:00
2009-09-30 08:35:31 +02:00
2010-03-28 19:57:33 +08:00
2009-05-20 18:31:10 -07:00
2009-10-02 14:09:01 +03:00
2009-05-22 10:38:17 -04:00
2010-08-02 12:01:24 +03:00
2010-06-03 10:31:26 +02:00
2010-06-03 10:31:26 +02:00
2009-09-25 16:38:02 +02:00
2009-10-09 10:09:24 +02:00
2010-04-28 14:52:24 +02:00
2010-02-05 17:51:55 +00:00
2009-04-30 12:26:11 +02:00
2009-06-05 18:36:14 +03:00
2009-09-25 11:26:49 +02:00
2009-11-06 17:54:19 +03:00
2010-06-14 01:13:32 +03:00
2009-12-10 17:38:01 +02:00
2010-05-07 00:41:37 +04:00
2009-06-19 11:27:19 +02:00
2009-05-20 17:04:44 -07:00
2009-12-13 23:29:50 +03:00
2009-09-03 08:38:06 +02:00
2010-02-01 16:07:00 +01:00
2010-05-25 15:41:00 +02:00
2009-09-25 11:26:49 +02:00
2009-09-25 11:26:49 +02:00
2010-03-12 11:52:38 +01:00
2009-07-27 16:50:43 +05:30
2009-10-08 15:36:43 +02:00
2010-03-12 11:52:38 +01:00
2010-03-04 12:09:09 +01:00
2009-07-27 16:50:43 +05:30
2010-03-22 16:30:27 +04:00
2010-03-13 18:32:42 -03:00
2009-09-08 00:50:10 +04:00
2009-06-30 00:03:30 +03:00
2009-06-30 00:03:30 +03:00
2009-06-30 00:03:30 +03:00
2009-06-30 00:03:30 +03:00
2009-06-10 01:11:33 +04:00
2010-01-16 15:44:24 +08:00
2009-10-27 14:09:36 +04:00
2010-04-30 15:27:17 +04:00
2009-06-17 16:28:11 +02:00
2010-01-11 14:15:28 +01:00
2010-03-24 17:37:41 +01:00
2010-01-11 14:15:28 +01:00
2010-08-02 19:39:45 +03:00
2009-10-11 11:06:55 +02:00
2010-05-21 22:47:32 +04:00
2009-06-09 17:08:46 +02:00
2009-06-09 17:08:46 +02:00
2010-04-16 16:42:34 +05:00
2010-06-26 19:36:00 +02:00
2010-08-02 12:01:24 +03:00
2010-04-28 14:52:24 +02:00
2010-03-31 16:12:37 +03:00
2010-04-28 14:52:24 +02:00
2010-01-12 15:16:26 +01:00
2010-05-24 21:54:08 +08:00
2010-02-09 11:30:50 +01:00
2010-02-13 08:35:14 -02:00
2010-02-10 21:06:24 +02:00
2010-02-09 11:30:50 +01:00
2009-07-03 10:19:32 +02:00
2009-11-27 18:10:28 +02:00
2009-12-02 15:17:08 +04:00
2010-02-09 11:30:50 +01:00
2009-06-12 18:11:19 -03:00
2009-06-10 11:58:36 +03:00
2010-04-28 14:52:24 +02:00
2010-08-23 12:46:25 +03:00
2010-08-02 12:01:24 +03:00
2010-04-01 18:49:02 +04:00
2009-10-27 14:09:36 +04:00
2009-10-29 20:50:33 +03:00
2010-04-28 14:52:24 +02:00
2010-01-12 09:19:48 +01:00
2010-05-26 21:55:40 +03:00
2010-02-16 13:13:49 +04:00
2010-02-09 11:30:50 +01:00
2010-03-16 10:20:07 +01:00
2010-03-09 07:36:26 -03:00
2009-11-20 12:10:47 +02:00
2010-05-31 13:25:11 +04:00
2010-02-09 11:30:50 +01:00
2010-03-22 12:33:25 +04:00
2010-01-11 14:15:28 +01:00
2010-03-18 11:26:27 +01:00
2010-04-28 14:52:24 +02:00
2010-03-10 17:10:05 +01:00
2010-05-21 22:47:32 +04:00
2009-12-22 14:38:33 +04:00
2009-04-28 20:12:18 +02:00
2010-02-11 14:26:58 +01:00
2009-10-03 22:56:54 +04:00
2010-05-20 10:31:03 +04:00
2009-10-04 01:20:51 +02:00
2010-08-02 12:01:24 +03:00
2010-03-09 07:36:26 -03:00
2010-02-12 00:54:14 -02:00
2010-05-26 21:55:40 +03:00
2010-04-28 14:52:24 +02:00
2009-09-22 08:22:07 -03:00
2010-03-10 19:31:22 +04:00