You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by sushixiang <sh...@qq.com> on 2019/11/20 05:47:57 UTC
How does shardingsphere handle queries about information_shema ?
How does shardingsphere handle queries about information_shema ?
Now, when I query from tables in information_schema, exception like "Table 'information.column' doesn't exist" will cause.
So, does shardingsphere deal with the information_shema query scene?
Re:How does shardingsphere handle queries about information_shema ?
Posted by Juan Pan <pa...@apache.org>.
Sure, a further discussion, as the first step, is necessary.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 14:23,sushixiang<sh...@qq.com> wrote:
Thank you,
And I think this feature may need a further disscussion.
------------------ Original ------------------
From: "Juan Pan"<panjuan@apache.org>;
Date: Wed, Nov 20, 2019 02:15 PM
To: "dev@shardingsphere.apache.org"<dev@shardingsphere.apache.org>;
Cc: "dev"<dev@shardingsphere.apache.org>;
Subject: Re:How does shardingsphere handle queries about information_shema ?
Exactly true. ShardingSphere only returns the metadata of actual table currently. We expect someone who is interested in it can do some contributions to make it better. :)
Welcome.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 14:11,sushixiang<shixiangsu@qq.com> wrote:
Thanks for replying.
But, there are also some problems.If my sql is "select * from information_schema.columns where table_name = 't_order'", shardingsphere will not response the correct result while the t_oder is a sharding table, because the physical table name may be t_order_0. It may be not elegant for using the physical table name.
------------------&nbsp;Original&nbsp;------------------
From:&nbsp;"Juan Pan"<panjuan@apache.org&gt;;
Date:&nbsp;Wed, Nov 20, 2019 02:03 PM
To:&nbsp;"dev@shardingsphere.apache.org"<dev@shardingsphere.apache.org&gt;;
Cc:&nbsp;"dev"<dev@shardingsphere.apache.org&gt;;
Subject:&nbsp;Re:How does shardingsphere handle queries about information_shema ?
Hi did you use MySQL?
Please add item of `defaultDataSource` to your shardingRule configuration. When ShardingSphere doesn’t find any sharding table named `column`, it will send query to default datasource, i.e `innformation_schema`.
&nbsp;Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 13:47,sushixiang<shixiangsu@qq.com&gt; wrote:
How does shardingsphere handle queries about information_shema ?
Now, when I query from tables in information_schema, exception like "Table 'information.column' doesn't exist"&amp;nbsp;will cause.
So, does shardingsphere deal with the information_shema query scene?
Re:How does shardingsphere handle queries about information_shema ?
Posted by sushixiang <sh...@qq.com>.
Thank you,
And I think this feature may need a further disscussion.
------------------ Original ------------------
From: "Juan Pan"<panjuan@apache.org>;
Date: Wed, Nov 20, 2019 02:15 PM
To: "dev@shardingsphere.apache.org"<dev@shardingsphere.apache.org>;
Cc: "dev"<dev@shardingsphere.apache.org>;
Subject: Re:How does shardingsphere handle queries about information_shema ?
Exactly true. ShardingSphere only returns the metadata of actual table currently. We expect someone who is interested in it can do some contributions to make it better. :)
Welcome.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 14:11,sushixiang<shixiangsu@qq.com> wrote:
Thanks for replying.
But, there are also some problems.If my sql is "select * from information_schema.columns where table_name = 't_order'", shardingsphere will not response the correct result while the t_oder is a sharding table, because the physical table name may be t_order_0. It may be not elegant for using the physical table name.
------------------&nbsp;Original&nbsp;------------------
From:&nbsp;"Juan Pan"<panjuan@apache.org&gt;;
Date:&nbsp;Wed, Nov 20, 2019 02:03 PM
To:&nbsp;"dev@shardingsphere.apache.org"<dev@shardingsphere.apache.org&gt;;
Cc:&nbsp;"dev"<dev@shardingsphere.apache.org&gt;;
Subject:&nbsp;Re:How does shardingsphere handle queries about information_shema ?
Hi did you use MySQL?
Please add item of `defaultDataSource` to your shardingRule configuration. When ShardingSphere doesn’t find any sharding table named `column`, it will send query to default datasource, i.e `innformation_schema`.
&nbsp;Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 13:47,sushixiang<shixiangsu@qq.com&gt; wrote:
How does shardingsphere handle queries about information_shema ?
Now, when I query from tables in information_schema, exception like "Table 'information.column' doesn't exist"&amp;nbsp;will cause.
So, does shardingsphere deal with the information_shema query scene?
Re:How does shardingsphere handle queries about information_shema ?
Posted by Juan Pan <pa...@apache.org>.
Exactly true. ShardingSphere only returns the metadata of actual table currently. We expect someone who is interested in it can do some contributions to make it better. :)
Welcome.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 14:11,sushixiang<sh...@qq.com> wrote:
Thanks for replying.
But, there are also some problems.If my sql is "select * from information_schema.columns where table_name = 't_order'", shardingsphere will not response the correct result while the t_oder is a sharding table, because the physical table name may be t_order_0. It may be not elegant for using the physical table name.
------------------ Original ------------------
From: "Juan Pan"<panjuan@apache.org>;
Date: Wed, Nov 20, 2019 02:03 PM
To: "dev@shardingsphere.apache.org"<dev@shardingsphere.apache.org>;
Cc: "dev"<dev@shardingsphere.apache.org>;
Subject: Re:How does shardingsphere handle queries about information_shema ?
Hi did you use MySQL?
Please add item of `defaultDataSource` to your shardingRule configuration. When ShardingSphere doesn’t find any sharding table named `column`, it will send query to default datasource, i.e `innformation_schema`.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 13:47,sushixiang<shixiangsu@qq.com> wrote:
How does shardingsphere handle queries about information_shema ?
Now, when I query from tables in information_schema, exception like "Table 'information.column' doesn't exist"&nbsp;will cause.
So, does shardingsphere deal with the information_shema query scene?
Re:How does shardingsphere handle queries about information_shema ?
Posted by sushixiang <sh...@qq.com>.
Thanks for replying.
But, there are also some problems.If my sql is "select * from information_schema.columns where table_name = 't_order'", shardingsphere will not response the correct result while the t_oder is a sharding table, because the physical table name may be t_order_0. It may be not elegant for using the physical table name.
------------------ Original ------------------
From: "Juan Pan"<panjuan@apache.org>;
Date: Wed, Nov 20, 2019 02:03 PM
To: "dev@shardingsphere.apache.org"<dev@shardingsphere.apache.org>;
Cc: "dev"<dev@shardingsphere.apache.org>;
Subject: Re:How does shardingsphere handle queries about information_shema ?
Hi did you use MySQL?
Please add item of `defaultDataSource` to your shardingRule configuration. When ShardingSphere doesn’t find any sharding table named `column`, it will send query to default datasource, i.e `innformation_schema`.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 13:47,sushixiang<shixiangsu@qq.com> wrote:
How does shardingsphere handle queries about information_shema ?
Now, when I query from tables in information_schema, exception like "Table 'information.column' doesn't exist"&nbsp;will cause.
So, does shardingsphere deal with the information_shema query scene?
Re:How does shardingsphere handle queries about information_shema ?
Posted by Juan Pan <pa...@apache.org>.
Hi did you use MySQL?
Please add item of `defaultDataSource` to your shardingRule configuration. When ShardingSphere doesn’t find any sharding table named `column`, it will send query to default datasource, i.e `innformation_schema`.
Juan Pan
panjuan@apache.org
Juan Pan(Trista), Apache ShardingSphere
On 11/20/2019 13:47,sushixiang<sh...@qq.com> wrote:
How does shardingsphere handle queries about information_shema ?
Now, when I query from tables in information_schema, exception like "Table 'information.column' doesn't exist" will cause.
So, does shardingsphere deal with the information_shema query scene?