mariadb/sql
unknown 308da65162 Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is
present.

A view created with CREATE VIEW ... ORDER BY ... cannot be resolved with
the MERGE algorithm, even when no other part of the CREATE VIEW statement
would require the view to be resolved using the TEMPTABLE algorithm.

The check for presence of the ORDER BY clause in the underlying select is 
removed from the st_lex::can_be_merged() function.
The ORDER BY list of the underlying select is appended to the ORDER BY list 


mysql-test/t/view.test:
  Added a test case for bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
mysql-test/r/view.result:
  Added a test case for bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
sql/sql_lex.cc:
  Bug#12122: Views with ORDER BY can't be resolved using MERGE algorithm.
  The st_lex::can_be_merged() function now allows views with the ORDER BY
  clause to be resolved using MERGE algorithm. The ORDER BY list of the view 
  is appended to the ORDER BY list of the embedding select.
2007-02-10 00:00:07 +03:00
..
examples After merge fix 2007-02-03 09:26:11 +01:00
share Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-11 09:43:44 -05:00
.cvsignore
add_errmsg
client_settings.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
CMakeLists.txt Merge mjorgensen@bk-internal.mysql.com:/home/bk/mysql-5.0-sage 2007-01-11 09:19:32 +01:00
custom_conf.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
derror.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
des_key_file.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
discover.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
field.cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-01-18 17:10:00 +04:00
field.h Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison 2007-02-06 11:08:57 +02:00
field_conv.cc Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison 2007-02-06 11:08:57 +02:00
filesort.cc Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug24653 2007-01-25 21:01:28 -08:00
frm_crypt.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
gen_lex_hash.cc gen_lex_hash.cc: 2007-01-31 00:06:42 +01:00
gstream.cc Many files: 2006-12-23 20:17:15 +01:00
gstream.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_archive.cc Many files: 2006-12-23 20:17:15 +01:00
ha_archive.h Many files: 2006-12-23 20:17:15 +01:00
ha_berkeley.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_berkeley.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_blackhole.cc Many files: 2006-12-23 20:17:15 +01:00
ha_blackhole.h Many files: 2006-12-23 20:17:15 +01:00
ha_federated.cc Merge xiphis.org:/home/antony/work2/mysql-5.0-engines 2006-12-26 16:23:05 -08:00
ha_federated.h Many files: 2006-12-23 20:17:15 +01:00
ha_heap.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_heap.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_innodb.cc Many files: 2006-12-23 20:17:15 +01:00
ha_innodb.h Many files: 2006-12-23 20:17:15 +01:00
ha_myisam.cc After merge fix (WL#3567). 2007-01-31 18:32:53 +04:00
ha_myisam.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_myisammrg.cc After merge fix (WL#3567). 2007-01-31 18:32:53 +04:00
ha_myisammrg.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_ndbcluster.cc Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-08 00:00:14 +07:00
ha_ndbcluster.h NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc: 2007-02-07 11:36:34 +01:00
handler.cc another valgrind error fix for 4.1(backport from 5.0) 2007-02-02 17:18:42 +04:00
handler.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hash_filo.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hash_filo.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hostname.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
init.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item.cc Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison 2007-02-06 11:08:57 +02:00
item.h Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt 2007-01-26 16:36:50 +04:00
item_buff.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_cmpfunc.cc Fixed bug #26124: SELECT from a view wrapper over a table 2007-02-07 00:18:36 -08:00
item_cmpfunc.h Fixed bug #24653. 2007-01-25 18:44:35 -08:00
item_create.cc Many files: 2006-12-23 20:17:15 +01:00
item_create.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_func.cc Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt 2007-01-26 16:28:32 +04:00
item_func.h Fixed bug#16861: User defined variable can have a wrong value if a tmp table was 2007-01-09 23:24:56 +03:00
item_geofunc.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_geofunc.h Many files: 2006-12-23 20:17:15 +01:00
item_row.cc Many files: 2006-12-23 20:17:15 +01:00
item_row.h Many files: 2006-12-23 20:17:15 +01:00
item_strfunc.cc Merge moonbone.local:/work/latest-4.1-opt-mysql 2007-01-12 16:43:52 +03:00
item_strfunc.h Merge moonbone.local:/work/latest-4.1-opt-mysql 2007-01-12 16:43:52 +03:00
item_subselect.cc Post merge fix 2007-01-25 22:50:48 -08:00
item_subselect.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
item_sum.cc Merge siva.hindu.god:/usr/home/tim/m/bk/g50 2006-12-26 22:28:28 -07:00
item_sum.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-11 09:43:44 -05:00
item_timefunc.cc Bug #25643: SEC_TO_TIME function problem 2007-01-30 17:43:34 +02:00
item_timefunc.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_uniq.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_uniq.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
key.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
lex.h Many files: 2006-12-23 20:17:15 +01:00
lex_symbol.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
lock.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
log.cc Many files: 2006-12-23 20:17:15 +01:00
log_event.cc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
log_event.h Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
matherr.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
message.mc make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
mf_iocache.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_decimal.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_decimal.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_lock.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql_priv.h Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were 2007-02-07 00:46:03 +03:00
mysqld.cc Merge chilla.local:/home/mydev/mysql-4.1-axmrg 2007-02-02 23:05:46 +01:00
mysqld.cc.rej Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2007-01-22 03:33:59 +02:00
mysqld_suffix.h Many files: 2006-12-23 20:17:15 +01:00
net_serv.cc Merge siva.hindu.god:/usr/home/tim/m/bk/g50 2006-12-26 22:28:28 -07:00
nt_servc.cc
nt_servc.h
opt_range.cc Fix bug #24035. 2007-02-02 15:22:10 -08:00
opt_range.h Fixed bug #24776: an assertion abort in handler::ha_index_init 2007-01-13 10:49:26 -08:00
opt_sum.cc Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug24987 2007-01-30 13:14:52 -08:00
parse_file.cc Many files: 2006-12-23 20:17:15 +01:00
parse_file.h Many files: 2006-12-23 20:17:15 +01:00
password.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
procedure.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
procedure.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
protocol.cc Many files: 2006-12-23 20:17:15 +01:00
protocol.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
records.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
repl_failsafe.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
repl_failsafe.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
set_var.cc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
set_var.h Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
slave.cc Many files: 2006-12-23 20:17:15 +01:00
slave.h Many files: 2006-12-23 20:17:15 +01:00
sp.cc Many files: 2006-12-23 20:17:15 +01:00
sp.h Many files: 2006-12-23 20:17:15 +01:00
sp_cache.cc Many files: 2006-12-23 20:17:15 +01:00
sp_cache.h Many files: 2006-12-23 20:17:15 +01:00
sp_head.cc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-17 19:30:05 +01:00
sp_head.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-11 21:59:28 +03:00
sp_pcontext.cc Many files: 2006-12-23 20:17:15 +01:00
sp_pcontext.h Many files: 2006-12-23 20:17:15 +01:00
sp_rcontext.cc Many files: 2006-12-23 20:17:15 +01:00
sp_rcontext.h Many files: 2006-12-23 20:17:15 +01:00
spatial.cc Many files: 2006-12-23 20:17:15 +01:00
spatial.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_acl.cc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
sql_acl.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_analyse.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_analyse.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_array.h Many files: 2006-12-23 20:17:15 +01:00
sql_base.cc BUG#25575: ERROR 1052 (Column in from clause is ambiguous) with sub-join 2007-01-31 16:04:38 +02:00
sql_bitmap.h Many files: 2006-12-23 20:17:15 +01:00
sql_cache.cc Many files: 2006-12-23 20:17:15 +01:00
sql_cache.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_class.cc Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-24 09:13:47 +07:00
sql_class.h Manual merge. 2007-01-15 13:10:07 +03:00
sql_client.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_crypt.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_crypt.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_cursor.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_cursor.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_db.cc Many files: 2006-12-23 20:17:15 +01:00
sql_delete.cc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-02-01 11:07:17 +02:00
sql_derived.cc Many files: 2006-12-23 20:17:15 +01:00
sql_do.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_error.cc Many files: 2006-12-23 20:17:15 +01:00
sql_error.h Many files: 2006-12-23 20:17:15 +01:00
sql_handler.cc Many files: 2006-12-23 20:17:15 +01:00
sql_help.cc Many files: 2006-12-23 20:17:15 +01:00
sql_insert.cc Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were 2007-02-07 00:46:03 +03:00
sql_lex.cc Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is 2007-02-10 00:00:07 +03:00
sql_lex.h Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-01-31 16:12:47 +02:00
sql_list.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_list.h Manual merge. 2007-01-15 13:10:07 +03:00
sql_load.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_locale.cc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
sql_manager.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_manager.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_map.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_map.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_olap.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_parse.cc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-01-31 16:12:47 +02:00
sql_prepare.cc Merge mysql.com:/home/gluh/MySQL/Merge/5.0 2007-01-23 14:08:58 +04:00
sql_rename.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_repl.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_repl.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_select.cc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-02-01 10:50:41 +02:00
sql_select.h BUG#24127: (a,b) IN (SELECT c,d ...) can produce wrong results if a and/or b are NULLs: 2007-01-12 23:22:41 +03:00
sql_show.cc Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail 2007-02-01 19:12:45 +04:00
sql_sort.h Many files: 2006-12-23 20:17:15 +01:00
sql_state.c Many files: 2006-12-23 20:17:15 +01:00
sql_string.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-11 21:59:28 +03:00
sql_string.h Many files: 2006-12-23 20:17:15 +01:00
sql_table.cc Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt 2007-01-26 16:36:50 +04:00
sql_test.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_trigger.cc Many files: 2006-12-23 20:17:15 +01:00
sql_trigger.h Many files: 2006-12-23 20:17:15 +01:00
sql_udf.cc Merge bk-internal:/home/bk/mysql-5.0-opt 2007-01-03 18:29:39 +02:00
sql_udf.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_union.cc Bug#23417: Too strict checks against GROUP BY in the ONLY_FULL_GROUP_BY mode. 2007-01-11 23:18:01 +03:00
sql_update.cc Fixed bug #25931. 2007-02-07 14:41:57 -08:00
sql_view.cc Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0 2007-01-18 13:06:10 +03:00
sql_view.h Many files: 2006-12-23 20:17:15 +01:00
sql_yacc.yy Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-01-31 16:12:47 +02:00
stacktrace.c Many files: 2006-12-23 20:17:15 +01:00
stacktrace.h Many files: 2006-12-23 20:17:15 +01:00
strfunc.cc Many files: 2006-12-23 20:17:15 +01:00
structs.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
table.cc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-01-31 16:12:47 +02:00
table.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
thr_malloc.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
time.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
tzfile.h Many files: 2006-12-23 20:17:15 +01:00
tztime.cc Many files: 2006-12-23 20:17:15 +01:00
tztime.h Many files: 2006-12-23 20:17:15 +01:00
udf_example.c Many files: 2006-12-23 20:17:15 +01:00
udf_example.def Add the two new functions to udf_example.def so they will be exported by dll's 2006-11-16 16:19:29 +01:00
uniques.cc Many files: 2006-12-23 20:17:15 +01:00
unireg.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
unireg.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
watchdog_mysqld