mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-10 15:22:56 +00:00
* feat(mysql): add SHOW WARNINGS support and return warnings for unsupported SET variables Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * feat(function): add MySQL IF() function and PostgreSQL description functions for connector compatibility Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: show tables for mysql Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: partitions table in information_schema and add starrocks external catalog compatibility Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * refactor: async udf Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: set warnings Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * feat: impl pg_my_temp_schema and make description functions simple Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test: add test for issue 7313 Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * feat: apply suggestions Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: partition_expression and partition_description Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: test Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: unit tests Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: saerch_path only works for pg Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * feat: improve warnings processing Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: warnings while writing affected rows and refactor Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * chore: improve ShobjDescriptionFunction signature Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * refactor: array_to_boolean Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
154 lines
5.0 KiB
Plaintext
154 lines
5.0 KiB
Plaintext
-- SQLNESS ARG version=v0.9.5
|
|
CREATE TABLE test_ttl_0s(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '0 second');
|
|
|
|
Affected Rows: 0
|
|
|
|
CREATE TABLE test_ttl_1s(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '1 second');
|
|
|
|
Affected Rows: 0
|
|
|
|
CREATE TABLE test_ttl_none(ts TIMESTAMP TIME INDEX, val INT);
|
|
|
|
Affected Rows: 0
|
|
|
|
CREATE DATABASE ttl_db_1s WITH (ttl = '1 second');
|
|
|
|
Affected Rows: 1
|
|
|
|
CREATE DATABASE ttl_db_0s WITH (ttl = '0 second');
|
|
|
|
Affected Rows: 1
|
|
|
|
CREATE DATABASE ttl_db_none;
|
|
|
|
Affected Rows: 1
|
|
|
|
-- SQLNESS ARG version=latest
|
|
SHOW TABLES;
|
|
|
|
+------------------+
|
|
| Tables_in_public |
|
|
+------------------+
|
|
| numbers |
|
|
| test_ttl_0s |
|
|
| test_ttl_1s |
|
|
| test_ttl_none |
|
|
+------------------+
|
|
|
|
SHOW CREATE TABLE test_ttl_1s;
|
|
|
|
+-------------+--------------------------------------------+
|
|
| Table | Create Table |
|
|
+-------------+--------------------------------------------+
|
|
| test_ttl_1s | CREATE TABLE IF NOT EXISTS "test_ttl_1s" ( |
|
|
| | "ts" TIMESTAMP(3) NOT NULL, |
|
|
| | "val" INT NULL, |
|
|
| | TIME INDEX ("ts") |
|
|
| | ) |
|
|
| | |
|
|
| | ENGINE=mito |
|
|
| | WITH( |
|
|
| | ttl = '1s' |
|
|
| | ) |
|
|
+-------------+--------------------------------------------+
|
|
|
|
SHOW CREATE TABLE test_ttl_0s;
|
|
|
|
+-------------+--------------------------------------------+
|
|
| Table | Create Table |
|
|
+-------------+--------------------------------------------+
|
|
| test_ttl_0s | CREATE TABLE IF NOT EXISTS "test_ttl_0s" ( |
|
|
| | "ts" TIMESTAMP(3) NOT NULL, |
|
|
| | "val" INT NULL, |
|
|
| | TIME INDEX ("ts") |
|
|
| | ) |
|
|
| | |
|
|
| | ENGINE=mito |
|
|
| | WITH( |
|
|
| | ttl = '0s' |
|
|
| | ) |
|
|
+-------------+--------------------------------------------+
|
|
|
|
SHOW CREATE TABLE test_ttl_none;
|
|
|
|
+---------------+----------------------------------------------+
|
|
| Table | Create Table |
|
|
+---------------+----------------------------------------------+
|
|
| test_ttl_none | CREATE TABLE IF NOT EXISTS "test_ttl_none" ( |
|
|
| | "ts" TIMESTAMP(3) NOT NULL, |
|
|
| | "val" INT NULL, |
|
|
| | TIME INDEX ("ts") |
|
|
| | ) |
|
|
| | |
|
|
| | ENGINE=mito |
|
|
| | |
|
|
+---------------+----------------------------------------------+
|
|
|
|
DROP TABLE test_ttl_1s;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP TABLE test_ttl_0s;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP TABLE test_ttl_none;
|
|
|
|
Affected Rows: 0
|
|
|
|
SHOW DATABASES;
|
|
|
|
+--------------------+
|
|
| Database |
|
|
+--------------------+
|
|
| greptime_private |
|
|
| information_schema |
|
|
| public |
|
|
| ttl_db_0s |
|
|
| ttl_db_1s |
|
|
| ttl_db_none |
|
|
+--------------------+
|
|
|
|
SHOW CREATE DATABASE ttl_db_1s;
|
|
|
|
+-----------+-----------------------------------------+
|
|
| Database | Create Database |
|
|
+-----------+-----------------------------------------+
|
|
| ttl_db_1s | CREATE DATABASE IF NOT EXISTS ttl_db_1s |
|
|
| | WITH( |
|
|
| | ttl = '1s' |
|
|
| | ) |
|
|
+-----------+-----------------------------------------+
|
|
|
|
SHOW CREATE DATABASE ttl_db_0s;
|
|
|
|
+-----------+-----------------------------------------+
|
|
| Database | Create Database |
|
|
+-----------+-----------------------------------------+
|
|
| ttl_db_0s | CREATE DATABASE IF NOT EXISTS ttl_db_0s |
|
|
| | WITH( |
|
|
| | ttl = '0s' |
|
|
| | ) |
|
|
+-----------+-----------------------------------------+
|
|
|
|
SHOW CREATE DATABASE ttl_db_none;
|
|
|
|
+-------------+-------------------------------------------+
|
|
| Database | Create Database |
|
|
+-------------+-------------------------------------------+
|
|
| ttl_db_none | CREATE DATABASE IF NOT EXISTS ttl_db_none |
|
|
+-------------+-------------------------------------------+
|
|
|
|
DROP DATABASE ttl_db_1s;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP DATABASE ttl_db_0s;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP DATABASE ttl_db_none;
|
|
|
|
Affected Rows: 0
|
|
|