Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For global table, in select ...where... syntax, now not support "schema.table.column" in where clause #964

Closed
wjl1619 opened this issue Jan 29, 2019 · 2 comments
Assignees
Labels
complex-query resolve problem has been fixed by developer
Milestone

Comments

@wjl1619
Copy link
Member

wjl1619 commented Jan 29, 2019

  • dble version:
    5.6.29-dble-9.9.9.9-b83955577d2f5f3555ac6f1254e9c5edb69cefb4-20190129042006
  • preconditions :
drop table if exists test1;
drop table if exists schema3.test3;
CREATE TABLE test1(`id` int(10) unsigned NOT NULL,`t_id` int(10) unsigned NOT NULL DEFAULT '0',`name` char(120) NOT NULL DEFAULT '',`pad` int(11) NOT NULL,PRIMARY KEY (`id`),KEY `k_1` (`t_id`))DEFAULT CHARSET=UTF8;
CREATE TABLE schema3.test3(`id` int(10) unsigned NOT NULL,`m_id` int(10) unsigned NOT NULL DEFAULT '0',`name` char(120) NOT NULL DEFAULT '',`pad` int(11) NOT NULL,PRIMARY KEY (`id`),KEY `k_1` (`m_id`))DEFAULT CHARSET=UTF8;
  • configs:

schema.xml

<schema name="schema1" sqlMaxLimit="100">
		<table name="global_4_t1" dataNode="dn1,dn2,dn3,dn4" type="global" />
		<table name="test1" dataNode="dn1,dn2,dn3,dn4" type="global" />
	</schema>
<schema name="schema3" sqlMaxLimit="100" dataNode="dn5">
		<table name="test3" dataNode="dn1,dn2,dn3,dn4" type="global" />
	</schema>

server.xml

<user name="test">
		<property name="password">111111</property>
		<property name="schemas">schema1,schema2,schema3</property>
	</user>
  • steps:
    step1. execute the sql:
select schema3.test3.id,schema3.test3.pad from test1 join schema3.test3 where test1.pad=schema3.test3.pad;
  • expect result:
    1.execute correctly and return right result

  • real result:
    mysql> select schema3.test3.id,schema3.test3.pad from test1 join schema3.test3 where test1.pad=schema3.test3.pad;
    ERROR 1003 (HY000): Unknown column 'schema3.test3.pad' in 'where clause'
    mysql> explain select schema3.test3.id,schema3.test3.pad from test1 join schema3.test3 where test1.pad=schema3.test3.pad;
    +-----------+----------+---------------------------------------------------------------------------------------------------+
    | DATA_NODE | TYPE | SQL/REF |
    +-----------+----------+---------------------------------------------------------------------------------------------------+
    | dn1_0 | BASE SQL | select test3.id,test3.pad from test1 join test3 where test1.pad = schema3.test3.pad |
    | merge_1 | MERGE | dn1_0 |
    +-----------+----------+---------------------------------------------------------------------------------------------------+

  • supplements:
    1.

/label ~BUG
located in auto_test: dble/features/sql_cover/special/sql_global.feature, dble/sqls/special_global/select/join.sql (line 17)

@FlyingMao
Copy link

#965

@wjl1619
Copy link
Member Author

wjl1619 commented Feb 15, 2019

verified on version: 5.6.29-dble-9.9.9.9-2c240dda40d1ed03c20d5c8415c5916c88f53491-20190215032215

@wjl1619 wjl1619 closed this as completed Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex-query resolve problem has been fixed by developer
Projects
None yet
Development

No branches or pull requests

3 participants