{"action":"created","issue":{"url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/957","repository_url":"https://api.github.com/repos/MyCATApache/Mycat-Server","labels_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/957/labels{/name}","comments_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/957/comments","events_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/957/events","html_url":"https://github.com/MyCATApache/Mycat-Server/issues/957","id":160554416,"number":957,"title":"使用mysql connector c++连接mycat的问题","user":{"login":"Shannon1","id":5164767,"avatar_url":"https://avatars.githubusercontent.com/u/5164767?v=3","gravatar_id":"","url":"https://api.github.com/users/Shannon1","html_url":"https://github.com/Shannon1","followers_url":"https://api.github.com/users/Shannon1/followers","following_url":"https://api.github.com/users/Shannon1/following{/other_user}","gists_url":"https://api.github.com/users/Shannon1/gists{/gist_id}","starred_url":"https://api.github.com/users/Shannon1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shannon1/subscriptions","organizations_url":"https://api.github.com/users/Shannon1/orgs","repos_url":"https://api.github.com/users/Shannon1/repos","events_url":"https://api.github.com/users/Shannon1/events{/privacy}","received_events_url":"https://api.github.com/users/Shannon1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-16T00:38:30Z","updated_at":"2016-06-25T13:14:05Z","closed_at":null,"body":"在使用mysql提供的c++ API [mysql connector c++](https://dev.mysql.com/doc/connector-cpp/en/) 连接mycat的时候，在调用prepareStatement的时候mycat会返回`Prepare unsupported`的错误。\r\n```\r\ntry {\r\n    sql::mysql::MySQL_Driver* driver = sql::mysql::get_mysql_driver_instance();\r\n    boost::scoped_ptr< sql::Connection > conn(driver->connect(host.c_str(), user.c_str(), password.c_str()));\r\n    std::string sql = \"select * from table\";\r\n    boost::scoped_ptr< sql::PreparedStatement > prep_stmt(conn->prepareStatement(sql));\r\n\r\n    // ...\r\n\r\n} catch (sql::SQLException& e) {\r\n    std::cout << e.what() << std::endl;\r\n    std::cout << e.getErrorCode() << std::endl;\r\n    std::cout << e.getSQLStateCStr() << std::endl;\r\n}\r\n\r\n// 程序输出\r\nPrepare unsupported！\r\n1047\r\nHY000\r\n```\r\n\r\n同样的代码直接连mysql的时候是正常的。\r\n\r\n不用prepareStatement方法直接执行语句也是正常的。\r\n\r\nmycat版本1.4-Release\r\nmysql connector c++ 版本1.1.7\r\n\r\n请问这个问题是什么原因呢\r\n"},"comment":{"url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/comments/228540220","html_url":"https://github.com/MyCATApache/Mycat-Server/issues/957#issuecomment-228540220","issue_url":"https://api.github.com/repos/MyCATApache/Mycat-Server/issues/957","id":228540220,"user":{"login":"Shannon1","id":5164767,"avatar_url":"https://avatars.githubusercontent.com/u/5164767?v=3","gravatar_id":"","url":"https://api.github.com/users/Shannon1","html_url":"https://github.com/Shannon1","followers_url":"https://api.github.com/users/Shannon1/followers","following_url":"https://api.github.com/users/Shannon1/following{/other_user}","gists_url":"https://api.github.com/users/Shannon1/gists{/gist_id}","starred_url":"https://api.github.com/users/Shannon1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shannon1/subscriptions","organizations_url":"https://api.github.com/users/Shannon1/orgs","repos_url":"https://api.github.com/users/Shannon1/repos","events_url":"https://api.github.com/users/Shannon1/events{/privacy}","received_events_url":"https://api.github.com/users/Shannon1/received_events","type":"User","site_admin":false},"created_at":"2016-06-25T13:14:05Z","updated_at":"2016-06-25T13:14:05Z","body":"@magicdoom 你指的“这个选项”具体是什么，预处理吗？"}}
{"actor":{"display_login":"Shannon1"}}