コード例 #1
0
ファイル: sqlquery.go プロジェクト: haoqoo/vitess
// GetSessionId2 should not be used by anything other than tests.
// It will eventually replace GetSessionId, but it breaks compatibility with older clients.
// Once all clients are upgraded, it can be replaced.
func (sq *SqlQuery) GetSessionId2(sessionIdReq *proto.GetSessionIdRequest, sessionInfo *proto.SessionInfo) (err error) {
	defer sq.server.HandlePanic(&err)
	tErr := sq.server.GetSessionId(&sessionIdReq.Params, sessionInfo)
	tabletserver.AddTabletErrorToSessionInfo(tErr, sessionInfo)
	if *tabletserver.RPCErrorOnlyInReply {
		return nil
	}
	return tErr
}
コード例 #2
0
ファイル: sqlquery.go プロジェクト: richarwu/vitess
// GetSessionId is exposing tabletserver.SqlQuery.GetSessionId
func (sq *SqlQuery) GetSessionId(sessionParams *proto.SessionParams, sessionInfo *proto.SessionInfo) (err error) {
	defer sq.server.HandlePanic(&err)
	tErr := sq.server.GetSessionId(sessionParams, sessionInfo)
	tabletserver.AddTabletErrorToSessionInfo(tErr, sessionInfo)
	return nil
}