mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
mysql_priv.h:
Fixed bug #12154: a query returned: Column <name> cannot be null. The problem was due to a bug in the function setup_table_map: the flag maybe_null was set up incorrectly for inner tables of nested outer joins. join_nested.result, join_nested.test: Added a test case for bug #12154.
This commit is contained in:
@ -1450,6 +1450,12 @@ inline void setup_table_map(TABLE *table, TABLE_LIST *table_list, uint tablenr)
|
||||
table->status= STATUS_NO_RECORD;
|
||||
table->keys_in_use_for_query= table->s->keys_in_use;
|
||||
table->maybe_null= table_list->outer_join;
|
||||
TABLE_LIST *embedding= table_list->embedding;
|
||||
while (!table->maybe_null && embedding)
|
||||
{
|
||||
table->maybe_null= embedding->outer_join;
|
||||
embedding= embedding->embedding;
|
||||
}
|
||||
table->tablenr= tablenr;
|
||||
table->map= (table_map) 1 << tablenr;
|
||||
table->force_index= table_list->force_index;
|
||||
|
Reference in New Issue
Block a user