{"action":"created","issue":{"url":"https://api.github.com/repos/flike/kingshard/issues/87","labels_url":"https://api.github.com/repos/flike/kingshard/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/flike/kingshard/issues/87/comments","events_url":"https://api.github.com/repos/flike/kingshard/issues/87/events","html_url":"https://github.com/flike/kingshard/issues/87","id":121141919,"number":87,"title":"JOIN语法支持","user":{"login":"miao606","id":5111356,"avatar_url":"https://avatars.githubusercontent.com/u/5111356?v=3","gravatar_id":"","url":"https://api.github.com/users/miao606","html_url":"https://github.com/miao606","followers_url":"https://api.github.com/users/miao606/followers","following_url":"https://api.github.com/users/miao606/following{/other_user}","gists_url":"https://api.github.com/users/miao606/gists{/gist_id}","starred_url":"https://api.github.com/users/miao606/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miao606/subscriptions","organizations_url":"https://api.github.com/users/miao606/orgs","repos_url":"https://api.github.com/users/miao606/repos","events_url":"https://api.github.com/users/miao606/events{/privacy}","received_events_url":"https://api.github.com/users/miao606/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flike/kingshard/labels/todo","name":"todo","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T01:45:13Z","updated_at":"2015-12-09T04:14:37Z","closed_at":null,"body":"ks目前不支持所有的join语法\r\n\r\n[root@127.0.0.1]-[test]>select * from test_shard_hash_0000 a inner join test_bug b on a.id = b.id;\r\nEmpty set (0.00 sec)\r\n\r\n[root@127.0.0.1]-[test]>select a.* from test_shard_hash_0000 a left join test_bug b on a.id = b.id;\r\n+----+------+------+-------+-----+------+\r\n| id | str  | f    | e     | u   | i    |\r\n+----+------+------+-------+-----+------+\r\n|  1 | abc1 | 3.14 | test1 | 255 | -127 |\r\n|  2 | abc2 | 3.14 | test2 | 255 | -127 |\r\n|  3 | abc3 | 3.14 | test3 | 255 | -127 |\r\n|  4 | abc4 | 3.14 | test4 | 255 | -127 |\r\n|  5 | abc5 | 3.14 | test5 | 255 | -127 |\r\n+----+------+------+-------+-----+------+\r\n5 rows in set (0.01 sec)\r\n\r\n[root@127.0.0.1]-[test]>select a.* from test_shard_hash_0000 a right join test_bug b on a.id = b.id;\r\nEmpty set (0.01 sec)\r\n\r\n[root@127.0.0.1]-[test]>select a.* from test_shard_hash_0000 a cross join test_bug b on a.id = b.id;\r\nEmpty set (0.00 sec)\r\n\r\n[root@127.0.0.1]-[test]>select * from test_shard_hash a inner join test_bug b on a.id = b.id;\r\nERROR 1146 (42S02): Table 'test.test_shard_hash' doesn't exist\r\n[root@127.0.0.1]-[test]>select * from test_shard_hash a left join test_bug b on a.id = b.id;\r\nERROR 1146 (42S02): Table 'test.test_shard_hash' doesn't exist\r\n[root@127.0.0.1]-[test]>select * from test_shard_hash a right join test_bug b on a.id = b.id;\r\nERROR 1146 (42S02): Table 'test.test_shard_hash' doesn't exist\r\n[root@127.0.0.1]-[test]>select * from test_shard_hash a cross join test_bug b on a.id = b.id;\r\nERROR 1146 (42S02): Table 'test.test_shard_hash' doesn't exist\r\n[root@127.0.0.1]-[test]>\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/flike/kingshard/issues/comments/163101851","html_url":"https://github.com/flike/kingshard/issues/87#issuecomment-163101851","issue_url":"https://api.github.com/repos/flike/kingshard/issues/87","id":163101851,"user":{"login":"miao606","id":5111356,"avatar_url":"https://avatars.githubusercontent.com/u/5111356?v=3","gravatar_id":"","url":"https://api.github.com/users/miao606","html_url":"https://github.com/miao606","followers_url":"https://api.github.com/users/miao606/followers","following_url":"https://api.github.com/users/miao606/following{/other_user}","gists_url":"https://api.github.com/users/miao606/gists{/gist_id}","starred_url":"https://api.github.com/users/miao606/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miao606/subscriptions","organizations_url":"https://api.github.com/users/miao606/orgs","repos_url":"https://api.github.com/users/miao606/repos","events_url":"https://api.github.com/users/miao606/events{/privacy}","received_events_url":"https://api.github.com/users/miao606/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T04:14:37Z","updated_at":"2015-12-09T04:14:37Z","body":"Mycat有一种父子关系的表，比如orders和order_details，通过父子关系设定，可以使得某一个订单和订单明细可以分配到同一个node，这样就可以支持jion。\r\n\r\n在有Mycat会设定全局表（ks可能默认全局吧），Mycat配置中没有提供的表印象中不能访问，全局表通常是数据字典表或者Lookup表，这个也能jion和更新/删除/新增，Mycat会发送到所有节点。"}}