Don't release sharding plan in the wrong place

This commit is contained in:
lazio579 2019-01-18 19:11:05 +08:00
parent 7f940251be
commit 67ed758353

View File

@ -443,10 +443,6 @@ explain_shard_sql(network_mysqld_con *con, sharding_plan_t *plan)
static void static void
proxy_generate_shard_explain_packet(network_mysqld_con *con) proxy_generate_shard_explain_packet(network_mysqld_con *con)
{ {
if (con->sharding_plan) {
sharding_plan_free(con->sharding_plan);
g_message(G_STRLOC ": shard plan is not empty:%s", con->orig_sql->str);
}
sharding_plan_t *plan = sharding_plan_new(con->orig_sql); sharding_plan_t *plan = sharding_plan_new(con->orig_sql);
plan->is_partition_mode = con->srv->is_partition_mode; plan->is_partition_mode = con->srv->is_partition_mode;
if (explain_shard_sql(con, plan) != 0) { if (explain_shard_sql(con, plan) != 0) {