mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#1271 - RAND_TABLE_BIT in expression and only const_tables in join
This commit is contained in:
@ -2600,6 +2600,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
|||||||
table_map used_tables;
|
table_map used_tables;
|
||||||
if (join->tables > 1)
|
if (join->tables > 1)
|
||||||
cond->update_used_tables(); // Tablenr may have changed
|
cond->update_used_tables(); // Tablenr may have changed
|
||||||
|
if (join->const_tables == join->tables)
|
||||||
|
join->const_table_map|=RAND_TABLE_BIT;
|
||||||
{ // Check const tables
|
{ // Check const tables
|
||||||
COND *const_cond=
|
COND *const_cond=
|
||||||
make_cond_for_table(cond,join->const_table_map,(table_map) 0);
|
make_cond_for_table(cond,join->const_table_map,(table_map) 0);
|
||||||
|
Reference in New Issue
Block a user