This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new ce20cf5e49 [enhancement](mysql) Add have_query_cache variable to be
compatible with old mysql client (#21710)
ce20cf5e49 is described below
commit ce20cf5e496d66c38c48669465736fa33f9a5bf0
Author: zy-kkk <[email protected]>
AuthorDate: Tue Jul 11 13:10:58 2023 +0800
[enhancement](mysql) Add have_query_cache variable to be compatible with
old mysql client (#21710)
---
docs/en/docs/advanced/variables.md | 4 ++++
docs/zh-CN/docs/advanced/variables.md | 4 ++++
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java | 8 ++++++++
3 files changed, 16 insertions(+)
diff --git a/docs/en/docs/advanced/variables.md
b/docs/en/docs/advanced/variables.md
index bca47193bd..27769a6fae 100644
--- a/docs/en/docs/advanced/variables.md
+++ b/docs/en/docs/advanced/variables.md
@@ -177,6 +177,10 @@ Note that the comment must start with /*+ and can only
follow the SELECT.
Used for compatibility with MySQL clients. No practical effect.
+* `have_query_cache`
+
+ Used for compatibility with MySQL clients. No practical effect.
+
* `default_order_by_limit`
Used to control the default number of items returned after OrderBy. The
default value is -1, and the maximum number of records after the query is
returned by default, and the upper limit is the MAX_VALUE of the long data type.
diff --git a/docs/zh-CN/docs/advanced/variables.md
b/docs/zh-CN/docs/advanced/variables.md
index 81b74850a9..939f69b6c2 100644
--- a/docs/zh-CN/docs/advanced/variables.md
+++ b/docs/zh-CN/docs/advanced/variables.md
@@ -175,6 +175,10 @@ SELECT /*+ SET_VAR(query_timeout = 1,
enable_partition_cache=true) */ sleep(3);
用于兼容 MySQL 客户端。无实际作用。
+- `have_query_cache`
+
+ 用于兼容 MySQL 客户端。无实际作用。
+
- `default_order_by_limit`
用于控制 OrderBy 以后返回的默认条数。默认值为 -1,默认返回查询后的最大条数,上限为 long 数据类型的 MAX_VALUE 值。
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index a57b3e542e..83e55452bf 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -80,6 +80,7 @@ public class SessionVariable implements Serializable,
Writable {
public static final String SQL_SAFE_UPDATES = "sql_safe_updates";
public static final String NET_BUFFER_LENGTH = "net_buffer_length";
public static final String CODEGEN_LEVEL = "codegen_level";
+ public static final String HAVE_QUERY_CACHE = "have_query_cache";
// mem limit can't smaller than bufferpool's default page size
public static final int MIN_EXEC_MEM_LIMIT = 2097152;
public static final String BATCH_SIZE = "batch_size";
@@ -398,6 +399,9 @@ public class SessionVariable implements Serializable,
Writable {
@VariableMgr.VarAttr(name = CODEGEN_LEVEL)
public int codegenLevel = 0;
+ @VariableMgr.VarAttr(name = HAVE_QUERY_CACHE, flag = VariableMgr.READ_ONLY)
+ public boolean haveQueryCache = false;
+
// 4096 minus 16 + 16 bytes padding that in padding pod array
@VariableMgr.VarAttr(name = BATCH_SIZE)
public int batchSize = 4064;
@@ -879,6 +883,10 @@ public class SessionVariable implements Serializable,
Writable {
return codegenLevel;
}
+ public boolean getHaveQueryCache() {
+ return haveQueryCache;
+ }
+
/**
* setMaxExecMemByte.
**/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]