diff --git a/plugins/shard/sharding-parser.c b/plugins/shard/sharding-parser.c index cfc2bd4..a8fcd47 100644 --- a/plugins/shard/sharding-parser.c +++ b/plugins/shard/sharding-parser.c @@ -1622,11 +1622,13 @@ sharding_parse_groups(GString *default_db, sql_context_t *context, query_stats_t char *db = default_db->str; g_debug(G_STRLOC ":default db:%s", db); - if (sql_context_has_sharding_property(context)) { - int rc = routing_by_property(context, context->property, db, groups); - sharding_plan_add_groups(plan, groups); - g_ptr_array_free(groups, TRUE); - return rc; + if (!plan->is_partition_mode) { + if (sql_context_has_sharding_property(context)) { + int rc = routing_by_property(context, context->property, db, groups); + sharding_plan_add_groups(plan, groups); + g_ptr_array_free(groups, TRUE); + return rc; + } } int rc = ERROR_UNPARSABLE; diff --git a/src/mysql-proxy-cli.c b/src/mysql-proxy-cli.c index b6bea07..c934f39 100644 --- a/src/mysql-proxy-cli.c +++ b/src/mysql-proxy-cli.c @@ -209,7 +209,7 @@ chassis_frontend_new(void) frontend->is_tcp_stream_enabled = 0; frontend->is_fast_stream_enabled = 1; - frontend->is_partition_mode = 0; + frontend->is_partition_mode = 1; frontend->group_replication_mode = 0; frontend->sql_log_bufsize = 0; frontend->sql_log_switch = NULL; diff --git a/src/network-mysqld.c b/src/network-mysqld.c index d25ed55..3721214 100644 --- a/src/network-mysqld.c +++ b/src/network-mysqld.c @@ -3793,8 +3793,6 @@ fast_analyze_stream(network_mysqld_con *con, network_socket *server, int *send_f con->eof_met_cnt++; con->eof_met_cnt++; } - g_debug("%s: packet id here:%d, packet len:%d, eof flag:%d for con:%p, con->analysis_next_pos:%d, con->cur_resp_len:%d", - G_STRLOC, header[NET_HEADER_SIZE - 1], packet_len, header[NET_HEADER_SIZE], con, (int) con->analysis_next_pos, (int) con->cur_resp_len); header = header + packet_len; if (header <= end) { complete_record_len = diff + packet_len; @@ -3824,8 +3822,6 @@ fast_analyze_stream(network_mysqld_con *con, network_socket *server, int *send_f con->eof_met_cnt++; con->eof_met_cnt++; } - g_debug("%s: packet id here:%d, packet len:%d, eof flag:%d, complete_record_len:%d for con:%p", - G_STRLOC, header[NET_HEADER_SIZE - 1], packet_len, header[NET_HEADER_SIZE], complete_record_len, con); header = header + packet_len; con->analysis_next_pos += packet_len; if (header < end) {