{"action":"created","issue":{"url":"https://api.github.com/repos/flike/kingshard/issues/229","repository_url":"https://api.github.com/repos/flike/kingshard","labels_url":"https://api.github.com/repos/flike/kingshard/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/flike/kingshard/issues/229/comments","events_url":"https://api.github.com/repos/flike/kingshard/issues/229/events","html_url":"https://github.com/flike/kingshard/issues/229","id":170356226,"number":229,"title":"插入分表键为null值没错误提示，没返回信息，导致卡死","user":{"login":"zhanyoulu","id":20944076,"avatar_url":"https://avatars.githubusercontent.com/u/20944076?v=3","gravatar_id":"","url":"https://api.github.com/users/zhanyoulu","html_url":"https://github.com/zhanyoulu","followers_url":"https://api.github.com/users/zhanyoulu/followers","following_url":"https://api.github.com/users/zhanyoulu/following{/other_user}","gists_url":"https://api.github.com/users/zhanyoulu/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanyoulu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanyoulu/subscriptions","organizations_url":"https://api.github.com/users/zhanyoulu/orgs","repos_url":"https://api.github.com/users/zhanyoulu/repos","events_url":"https://api.github.com/users/zhanyoulu/events{/privacy}","received_events_url":"https://api.github.com/users/zhanyoulu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-10T08:05:26Z","updated_at":"2016-08-10T11:58:20Z","closed_at":null,"body":"反馈一个kingshard-bug-20160810\r\n\r\nkingshard 环境：\r\n#kingshard版本\r\n[root@localhost bin]# /app/program/src/github.com/flike/kingshard/bin/kingshard -v\r\n\r\n    __   _                  __                   __\r\n   / /__(_)___  ____ ______/ /_  ____ __________/ /\r\n  / //_/ / __ \\/ __ \\/ ___/ __ \\ / __\\/ ___/ __  /\r\n / ,< / / / / / /_/ (__  ) / / / /_/ / /  / /_/ /\r\n/_/|_/_/_/ /_/\\__, /____/_/ /_/\\__,_/_/   \\__,_/\r\n             /____/\r\nGit commit:2016-08-09 18:53:55 +0800 @7aa713e\r\nBuild time:2016-08-10 15:23:33 -0400 by go version go1.6 linux/amd64\r\n\r\n#ks.yaml配置\r\naddr : 0.0.0.0:9696\r\nuser :  ks\r\npassword : bbs\r\nlog_path : /data/logs/kingshardlog\r\nlog_level : debug\r\nlog_sql: on\r\nslow_log_time : 500\r\n\r\nnodes :\r\n- \r\n    name : bbs1\r\n    max_conns_limit : 32\r\n    user :  bbs\r\n    password : 123456\r\n    master : 127.0.0.1:3309\r\n    down_after_noalive : 32\r\nschema :\r\n    db : bbs\r\n    nodes: [bbs1]\r\n    default: bbs1\r\n    shard:\r\n    - \r\n        table: account_post\r\n        key: account_uuid\r\n        nodes: [bbs1]\r\n        type: hash\r\n        locations: [2]\r\n\r\n数据库表结构\r\n#表account_post以account_uuid进行分表\r\n#分表account_post_0000,account_post_0001 表结构\r\nCREATE TABLE `account_post_0000` (\r\n  `id` int(11) NOT NULL AUTO_INCREMENT,\r\n  `account_uuid` char(16) DEFAULT '' ,\r\n  `post_uuid` char(16) DEFAULT '' ,\r\n  `status` tinyint(4) DEFAULT '0' ,\r\n  `template` tinyint(4) DEFAULT '1' ,\r\n  `is_examine` tinyint(4) DEFAULT '0' ,\r\n  `is_anonymity` tinyint(4) DEFAULT '0' ,\r\n  `is_ball` tinyint(4) DEFAULT '-1' ,\r\n  `gender_type` tinyint(4) DEFAULT '0',\r\n  `create_time` int(11) DEFAULT '0',\r\n  PRIMARY KEY (`id`),\r\n  KEY `idx_accuuid` (`account_uuid`),\r\n  KEY `idx_post_uuid` (`post_uuid`),\r\n  KEY `idx_create_time` (`create_time`)\r\n) ENGINE=InnoDB AUTO_INCREMENT=168 DEFAULT CHARSET=utf8 ;\r\n\r\n问题描述：\r\naccount_post表是以account_uuid作为分表键，当插入数据的sql,分表键account_uuid 为null时，\r\n会使进程卡住，无法往下执行\r\n#问题:通过kingshard连接， php执行sql \r\n#数据没插入成功，php也没捕获错误，程序就卡在这句sql这里，无法往下执行\r\n#sql语句\r\ninsert into account_post(account_uuid,post_uuid) values(null,'1111');\r\n#\r\n在navicat测试也一样：\r\ninsert into account_post(account_uuid,post_uuid) values(null,'1111');\r\nnavicat执行tab页一直处于运行状态，强制关闭navicat也关闭不到，导致只能杀进程\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/flike/kingshard/issues/comments/238845308","html_url":"https://github.com/flike/kingshard/issues/229#issuecomment-238845308","issue_url":"https://api.github.com/repos/flike/kingshard/issues/229","id":238845308,"user":{"login":"flike","id":1825381,"avatar_url":"https://avatars.githubusercontent.com/u/1825381?v=3","gravatar_id":"","url":"https://api.github.com/users/flike","html_url":"https://github.com/flike","followers_url":"https://api.github.com/users/flike/followers","following_url":"https://api.github.com/users/flike/following{/other_user}","gists_url":"https://api.github.com/users/flike/gists{/gist_id}","starred_url":"https://api.github.com/users/flike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flike/subscriptions","organizations_url":"https://api.github.com/users/flike/orgs","repos_url":"https://api.github.com/users/flike/repos","events_url":"https://api.github.com/users/flike/events{/privacy}","received_events_url":"https://api.github.com/users/flike/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T11:58:20Z","updated_at":"2016-08-10T11:58:20Z","body":"kingshard目前还未对char类型的shard key做支持。后续会支持的。"}}
{"actor":{"display_login":"flike"}}