mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
SQL: incorrect check on specific JOIN query [fixes #145]
This commit is contained in:
@ -6420,8 +6420,9 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2,
|
||||
if (!my_strcasecmp(system_charset_info, field_name_1, cur_field_name_2))
|
||||
{
|
||||
DBUG_PRINT ("info", ("match c1.is_common=%d", nj_col_1->is_common));
|
||||
if (cur_nj_col_2->is_common ||
|
||||
(found && (!using_fields || is_using_column_1)))
|
||||
if ((!it_1.field() || !it_1.field()->vers_sys_field()) &&
|
||||
(cur_nj_col_2->is_common ||
|
||||
(found && (!using_fields || is_using_column_1))))
|
||||
{
|
||||
my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1, thd->where);
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user