summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index e8ec8104f8b..b0fe02aba69 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5350,7 +5350,7 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
{
if (!my_strcasecmp(system_charset_info, curr_nj_col->name(), name))
{
- if (nj_col)
+ if (nj_col && !curr_nj_col->table_field->field->vers_sys_field())
{
my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd->where);
DBUG_RETURN(NULL);