mirror of
https://github.com/actiontech/dble.git
synced 2026-01-07 05:10:20 -06:00
@@ -28,7 +28,10 @@ import io.mycat.config.ErrorCode;
|
||||
import io.mycat.net.FrontendConnection;
|
||||
import io.mycat.net.NIOHandler;
|
||||
import io.mycat.net.mysql.MySQLPacket;
|
||||
import io.mycat.server.NonBlockingSession;
|
||||
import io.mycat.statistic.CommandCount;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
@@ -39,6 +42,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
* @author mycat
|
||||
*/
|
||||
public class FrontendCommandHandler implements NIOHandler {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(NonBlockingSession.class);
|
||||
protected final ConcurrentLinkedQueue<byte[]> dataQueue = new ConcurrentLinkedQueue<>();
|
||||
protected final AtomicBoolean handleStatus;
|
||||
protected final FrontendConnection source;
|
||||
@@ -131,6 +135,7 @@ public class FrontendCommandHandler implements NIOHandler {
|
||||
handleData(data);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn("maybe occur a bug,", e);
|
||||
source.writeErrMessage(ErrorCode.ER_UNKNOWN_ERROR, e.toString());
|
||||
dataQueue.clear();
|
||||
} finally {
|
||||
|
||||
@@ -104,7 +104,7 @@ public abstract class Item {
|
||||
public ItemResult getCmpContext() {
|
||||
return cmpContext;
|
||||
}
|
||||
|
||||
//TODO DELETE
|
||||
public void setCmpContext(ItemResult cmpContext) {
|
||||
this.cmpContext = cmpContext;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
package io.mycat.plan.common.item;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLPropertyExpr;
|
||||
|
||||
import io.mycat.backend.mysql.CharsetUtil;
|
||||
import io.mycat.config.ErrorCode;
|
||||
import io.mycat.net.mysql.FieldPacket;
|
||||
@@ -24,6 +16,12 @@ import io.mycat.plan.common.field.Field;
|
||||
import io.mycat.plan.common.time.MySQLTime;
|
||||
import io.mycat.plan.node.JoinNode;
|
||||
import io.mycat.util.StringUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemField extends ItemIdent {
|
||||
|
||||
@@ -75,7 +73,7 @@ public class ItemField extends ItemIdent {
|
||||
|
||||
@Override
|
||||
public ItemResult resultType() {
|
||||
return field.resultType();
|
||||
return field == null ? null : field.resultType();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.util.List;
|
||||
|
||||
|
||||
public class ItemFuncIn extends ItemFuncOptNeg {
|
||||
//TODO :DELETE
|
||||
private ItemResult leftResultType;
|
||||
|
||||
/**
|
||||
@@ -22,7 +23,6 @@ public class ItemFuncIn extends ItemFuncOptNeg {
|
||||
*/
|
||||
public ItemFuncIn(List<Item> args, boolean isNegation) {
|
||||
super(args, isNegation);
|
||||
leftResultType = args.get(0).resultType();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user