terrymanu commented on a change in pull request #4353: #4255, use CAPI in stmt 
mode return incorrect response
URL: 
https://github.com/apache/incubator-shardingsphere/pull/4353#discussion_r380703126
 
 

 ##########
 File path: 
sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/mysql/command/query/binary/prepare/MySQLComStmtPrepareExecutor.java
 ##########
 @@ -59,11 +55,9 @@ public MySQLComStmtPrepareExecutor(final 
MySQLComStmtPreparePacket packet, final
         SQLStatement sqlStatement = 
logicSchema.getParseEngine().parse(packet.getSql(), true);
         int parametersCount = sqlStatement.getParametersCount();
         result.add(new MySQLComStmtPrepareOKPacket(++currentSequenceId, 
PREPARED_STATEMENT_REGISTRY.register(packet.getSql(), parametersCount), 
getNumColumns(), parametersCount, 0));
-        TablesContext tablesContext = new TablesContext(sqlStatement);
         for (int i = 0; i < parametersCount; i++) {
             // TODO add column name
-            result.add(new MySQLColumnDefinition41Packet(++currentSequenceId, 
schemaName,
-                    tablesContext.isSingleTable() ? 
tablesContext.getSingleTableName() : "", "", "", "", 100, 
MySQLColumnType.MYSQL_TYPE_VARCHAR, 0));
+            result.add(new MySQLColumnDefinition41Packet(++currentSequenceId, 
"", "", "", "?", "", 0, MySQLColumnType.MYSQL_TYPE_VAR_STRING, 0));
 
 Review comment:
   We need to explain hard code with empty string

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to