Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. Please try narrowing your query scope or increase the tidb_mem_quota_query limit and try again.[conn=3607482257570389131]

是不是作用域的原因?global对当前连接不生效。