group comment is not valid for partition

This commit is contained in:
lazio579 2019-01-16 18:43:31 +08:00
parent 27d9b04a5c
commit be0009042a
3 changed files with 8 additions and 10 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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) {