()
| 89 | } |
| 90 | |
| 91 | func getExprCtxOptionsForTest() ([]ExprCtxOption, *exprCtxOptionsTestState) { |
| 92 | s := &exprCtxOptionsTestState{ |
| 93 | evalCtx: NewEvalContext(WithLocation(time.FixedZone("UTC+11", 11*3600))), |
| 94 | colIDAlloc: exprctx.NewSimplePlanColumnIDAllocator(1024), |
| 95 | rng: mathutil.NewWithSeed(12345678), |
| 96 | } |
| 97 | planCacheTracker := contextutil.NewPlanCacheTracker(s.evalCtx) |
| 98 | |
| 99 | return []ExprCtxOption{ |
| 100 | WithEvalCtx(s.evalCtx), |
| 101 | WithCharset("gbk", "gbk_bin"), |
| 102 | WithDefaultCollationForUTF8MB4("utf8mb4_0900_ai_ci"), |
| 103 | WithBlockEncryptionMode("aes-256-cbc"), |
| 104 | WithSysDateIsNow(true), |
| 105 | WithNoopFuncsMode(variable.WarnInt), |
| 106 | WithRng(s.rng), |
| 107 | WithPlanCacheTracker(&planCacheTracker), |
| 108 | WithColumnIDAllocator(s.colIDAlloc), |
| 109 | WithConnectionID(778899), |
| 110 | WithWindowingUseHighPrecision(false), |
| 111 | WithGroupConcatMaxLen(2233445566), |
| 112 | }, s |
| 113 | } |
| 114 | |
| 115 | func checkOptionsStaticExprCtx(t *testing.T, ctx *ExprContext, s *exprCtxOptionsTestState) { |
| 116 | require.Same(t, s.evalCtx, ctx.GetEvalCtx()) |
no test coverage detected