diff --git a/config/config.md b/config/config.md
index 12fde8ffd68..248662f5963 100644
--- a/config/config.md
+++ b/config/config.md
@@ -55,7 +55,6 @@
| `mysql` | -- | -- | MySQL server options. |
| `mysql.enable` | Bool | `true` | Whether to enable. |
| `mysql.addr` | String | `127.0.0.1:4002` | The addr to bind the MySQL server. |
-| `mysql.runtime_size` | Integer | `2` | The number of server worker threads. |
| `mysql.keep_alive` | String | `0s` | Server-side keep-alive time.
Set to 0 (default) to disable. |
| `mysql.prepared_stmt_cache_size` | Integer | `10000` | Maximum entries in the MySQL prepared statement cache; default is 10,000. |
| `mysql.tls` | -- | -- | -- |
@@ -66,7 +65,6 @@
| `postgres` | -- | -- | PostgresSQL server options. |
| `postgres.enable` | Bool | `true` | Whether to enable |
| `postgres.addr` | String | `127.0.0.1:4003` | The addr to bind the PostgresSQL server. |
-| `postgres.runtime_size` | Integer | `2` | The number of server worker threads. |
| `postgres.keep_alive` | String | `0s` | Server-side keep-alive time.
Set to 0 (default) to disable. |
| `postgres.max_copy_in_payload` | String | `64MB` | Maximum size of a table-less `COPY ... FROM STDIN` payload: the influxdb line protocol, OTLP and Prometheus Remote Write formats, which buffer the whole payload until the copy completes, like an HTTP request body.
Table-bound formats (csv, jsonl, arrow) stream and are not bound by it.
The following units are supported: `B`, `KB`, `KiB`, `MB`, `MiB`, `GB`, `GiB`, `TB`, `TiB`, `PB`, `PiB`.
Set to 0 to disable the limit; nonzero sizes must be at least one byte. |
| `postgres.tls` | -- | -- | PostgresSQL server TLS options, see `mysql.tls` section. |
@@ -346,7 +344,6 @@
| `mysql` | -- | -- | MySQL server options. |
| `mysql.enable` | Bool | `true` | Whether to enable. |
| `mysql.addr` | String | `127.0.0.1:4002` | The addr to bind the MySQL server. |
-| `mysql.runtime_size` | Integer | `2` | The number of server worker threads. |
| `mysql.keep_alive` | String | `0s` | Server-side keep-alive time.
Set to 0 (default) to disable. |
| `mysql.prepared_stmt_cache_size` | Integer | `10000` | Maximum entries in the MySQL prepared statement cache; default is 10,000. |
| `mysql.tls` | -- | -- | -- |
@@ -357,7 +354,6 @@
| `postgres` | -- | -- | PostgresSQL server options. |
| `postgres.enable` | Bool | `true` | Whether to enable |
| `postgres.addr` | String | `127.0.0.1:4003` | The addr to bind the PostgresSQL server. |
-| `postgres.runtime_size` | Integer | `2` | The number of server worker threads. |
| `postgres.keep_alive` | String | `0s` | Server-side keep-alive time.
Set to 0 (default) to disable. |
| `postgres.max_copy_in_payload` | String | `64MB` | Maximum size of a table-less `COPY ... FROM STDIN` payload: the influxdb line protocol, OTLP and Prometheus Remote Write formats, which buffer the whole payload until the copy completes, like an HTTP request body.
Table-bound formats (csv, jsonl, arrow) stream and are not bound by it.
The following units are supported: `B`, `KB`, `KiB`, `MB`, `MiB`, `GB`, `GiB`, `TB`, `TiB`, `PB`, `PiB`.
Set to 0 to disable the limit; nonzero sizes must be at least one byte. |
| `postgres.tls` | -- | -- | PostgresSQL server TLS options, see `mysql.tls` section. |
diff --git a/config/frontend.example.toml b/config/frontend.example.toml
index 9e158a16d16..e2bac8ef4e6 100644
--- a/config/frontend.example.toml
+++ b/config/frontend.example.toml
@@ -180,8 +180,6 @@ watch = false
enable = true
## The addr to bind the MySQL server.
addr = "127.0.0.1:4002"
-## The number of server worker threads.
-runtime_size = 2
## Server-side keep-alive time.
## Set to 0 (default) to disable.
keep_alive = "0s"
@@ -216,8 +214,6 @@ watch = false
enable = true
## The addr to bind the PostgresSQL server.
addr = "127.0.0.1:4003"
-## The number of server worker threads.
-runtime_size = 2
## Server-side keep-alive time.
## Set to 0 (default) to disable.
keep_alive = "0s"
diff --git a/config/standalone.example.toml b/config/standalone.example.toml
index b3847b8fd0a..1b37ae36232 100644
--- a/config/standalone.example.toml
+++ b/config/standalone.example.toml
@@ -161,8 +161,6 @@ watch = false
enable = true
## The addr to bind the MySQL server.
addr = "127.0.0.1:4002"
-## The number of server worker threads.
-runtime_size = 2
## Server-side keep-alive time.
## Set to 0 (default) to disable.
keep_alive = "0s"
@@ -196,8 +194,6 @@ watch = false
enable = true
## The addr to bind the PostgresSQL server.
addr = "127.0.0.1:4003"
-## The number of server worker threads.
-runtime_size = 2
## Server-side keep-alive time.
## Set to 0 (default) to disable.
keep_alive = "0s"
diff --git a/src/cmd/src/frontend.rs b/src/cmd/src/frontend.rs
index 4220f243297..949fe97ae25 100644
--- a/src/cmd/src/frontend.rs
+++ b/src/cmd/src/frontend.rs
@@ -787,12 +787,7 @@ mod tests {
assert_eq!(opts.grpc.bind_addr, default_opts.grpc.bind_addr);
assert!(opts.mysql.enable);
- assert_eq!(opts.mysql.runtime_size, default_opts.mysql.runtime_size);
assert!(opts.postgres.enable);
- assert_eq!(
- opts.postgres.runtime_size,
- default_opts.postgres.runtime_size
- );
assert!(opts.opentsdb.enable);
assert!(!opts.influxdb.enable);
@@ -926,11 +921,11 @@ mod tests {
Some("127.0.0.1:14002"),
),
(
- // mysql.runtime_size = 11
+ // mysql.prepared_stmt_cache_size = 11
[
env_prefix.to_string(),
"mysql".to_uppercase(),
- "runtime_size".to_uppercase(),
+ "prepared_stmt_cache_size".to_uppercase(),
]
.join(ENV_VAR_SEP),
Some("11"),
@@ -967,7 +962,7 @@ mod tests {
let fe_opts = command.load_options(&Default::default()).unwrap().component;
// Should be read from env, env > default values.
- assert_eq!(fe_opts.mysql.runtime_size, 11);
+ assert_eq!(fe_opts.mysql.prepared_stmt_cache_size, 11);
assert_eq!(
fe_opts.meta_client.unwrap().metasrv_addrs,
vec![
diff --git a/src/cmd/src/standalone.rs b/src/cmd/src/standalone.rs
index c66b27d46e5..8518711c791 100644
--- a/src/cmd/src/standalone.rs
+++ b/src/cmd/src/standalone.rs
@@ -1441,7 +1441,6 @@ mod tests {
assert_eq!("127.0.0.1:4001".to_string(), fe_opts.grpc.bind_addr);
assert!(fe_opts.mysql.enable);
assert_eq!("127.0.0.1:4002", fe_opts.mysql.addr);
- assert_eq!(2, fe_opts.mysql.runtime_size);
assert_eq!(None, fe_opts.mysql.reject_no_database);
assert!(fe_opts.influxdb.enable);
assert!(fe_opts.opentsdb.enable);
diff --git a/src/frontend/src/instance.rs b/src/frontend/src/instance.rs
index 5baeb968463..aa75d5cc44c 100644
--- a/src/frontend/src/instance.rs
+++ b/src/frontend/src/instance.rs
@@ -1147,6 +1147,10 @@ impl Instance {
Statement::ShowProcesslist(show) => {
query::sql::show_processlist_dataframe(show, engine, catalog_manager, ctx).await
}
+ #[cfg(feature = "enterprise")]
+ Statement::ShowTriggers(show) => {
+ query::sql::show_triggers_dataframe(show, engine, catalog_manager, ctx).await
+ }
_ => return None,
};
Some(dataframe)
diff --git a/src/frontend/src/service_config/mysql.rs b/src/frontend/src/service_config/mysql.rs
index f55dd78de8f..b632b5aeda5 100644
--- a/src/frontend/src/service_config/mysql.rs
+++ b/src/frontend/src/service_config/mysql.rs
@@ -19,7 +19,6 @@ use servers::tls::TlsOption;
pub struct MysqlOptions {
pub enable: bool,
pub addr: String,
- pub runtime_size: usize,
#[serde(default = "Default::default")]
pub tls: TlsOption,
pub reject_no_database: Option,
@@ -37,7 +36,6 @@ impl Default for MysqlOptions {
Self {
enable: true,
addr: "127.0.0.1:4002".to_string(),
- runtime_size: 2,
tls: TlsOption::default(),
reject_no_database: None,
keep_alive: std::time::Duration::from_secs(0),
diff --git a/src/frontend/src/service_config/postgres.rs b/src/frontend/src/service_config/postgres.rs
index 09b06b877a3..24a38938234 100644
--- a/src/frontend/src/service_config/postgres.rs
+++ b/src/frontend/src/service_config/postgres.rs
@@ -57,7 +57,6 @@ fn deserialize_max_copy_in_payload<'de, D: Deserializer<'de>>(
pub struct PostgresOptions {
pub enable: bool,
pub addr: String,
- pub runtime_size: usize,
#[serde(default = "Default::default")]
pub tls: TlsOption,
/// Server-side keep-alive time.
@@ -85,7 +84,6 @@ impl Default for PostgresOptions {
Self {
enable: true,
addr: "127.0.0.1:4003".to_string(),
- runtime_size: 2,
tls: Default::default(),
keep_alive: std::time::Duration::from_secs(0),
max_copy_in_payload: default_max_copy_in_payload(),
@@ -101,7 +99,7 @@ mod tests {
fn test_max_copy_in_payload() {
let parse = |value: &str| {
toml::from_str::(&format!(
- "enable = true\naddr = '127.0.0.1:4003'\nruntime_size = 2\nmax_copy_in_payload = {value}"
+ "enable = true\naddr = '127.0.0.1:4003'\nmax_copy_in_payload = {value}"
))
};
for value in ["-1", "'-1MiB'", "'0.5B'", "'1e-999B'"] {
diff --git a/src/query/src/sql.rs b/src/query/src/sql.rs
index daac3a269e5..966d4398c07 100644
--- a/src/query/src/sql.rs
+++ b/src/query/src/sql.rs
@@ -144,7 +144,7 @@ pub static DESCRIBE_TABLE_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
]))
});
-static SHOW_CREATE_DATABASE_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
+pub static SHOW_CREATE_DATABASE_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
Arc::new(Schema::new(vec![
ColumnSchema::new("Database", ConcreteDataType::string_datatype(), false),
ColumnSchema::new(
@@ -155,21 +155,21 @@ static SHOW_CREATE_DATABASE_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
]))
});
-static SHOW_CREATE_TABLE_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
+pub static SHOW_CREATE_TABLE_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
Arc::new(Schema::new(vec![
ColumnSchema::new("Table", ConcreteDataType::string_datatype(), false),
ColumnSchema::new("Create Table", ConcreteDataType::string_datatype(), false),
]))
});
-static SHOW_CREATE_FLOW_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
+pub static SHOW_CREATE_FLOW_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
Arc::new(Schema::new(vec![
ColumnSchema::new("Flow", ConcreteDataType::string_datatype(), false),
ColumnSchema::new("Create Flow", ConcreteDataType::string_datatype(), false),
]))
});
-static SHOW_CREATE_VIEW_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
+pub static SHOW_CREATE_VIEW_OUTPUT_SCHEMA: Lazy> = Lazy::new(|| {
Arc::new(Schema::new(vec![
ColumnSchema::new("View", ConcreteDataType::string_datatype(), false),
ColumnSchema::new("Create View", ConcreteDataType::string_datatype(), false),
@@ -946,6 +946,18 @@ pub fn show_query_option(
Ok(Some(Output::new_with_record_batches(records)))
}
+/// Returns the column name of a `SHOW VARIABLES` result: supported query
+/// options keep their spelling (see [`show_query_option`]), other variables
+/// are upper-cased (see [`show_variable`]).
+pub fn show_variable_column_name(variable: &ObjectName) -> String {
+ let name = sql::ast::object_name_to_string_unquoted(variable);
+ if session::query_options::canonical_query_option_name(&name).is_some() {
+ name
+ } else {
+ variable.to_string().to_uppercase()
+ }
+}
+
pub fn show_variable(stmt: ShowVariables, query_ctx: QueryContextRef) -> Result