mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 21:32:58 +00:00
fix: table resolving logic related to pg_catalog (#4580)
* fix: table resolving logic related to pg_catalog refer to https://github.com/GreptimeTeam/greptimedb/issues/3560#issuecomment-2287794348 and #4543 * refactor: remove CatalogProtocol type * fix: sqlness * fix: forbid create database pg_catalog with mysql client * refactor: use QueryContext as arguments rather than Channel * refactor: pass None as default behaviour in information_schema * test: fix test
This commit is contained in:
@@ -181,7 +181,8 @@ mod test {
|
||||
.table(
|
||||
"greptime",
|
||||
"database_created_through_grpc",
|
||||
"table_created_through_grpc"
|
||||
"table_created_through_grpc",
|
||||
None,
|
||||
)
|
||||
.await
|
||||
.unwrap()
|
||||
@@ -510,7 +511,7 @@ CREATE TABLE {table_name} (
|
||||
let table = instance
|
||||
.frontend()
|
||||
.catalog_manager()
|
||||
.table("greptime", "public", table_name)
|
||||
.table("greptime", "public", table_name, None)
|
||||
.await
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
||||
@@ -278,7 +278,7 @@ mod tests {
|
||||
assert!(instance
|
||||
.frontend()
|
||||
.catalog_manager()
|
||||
.table("greptime", "public", "demo")
|
||||
.table("greptime", "public", "demo", None)
|
||||
.await
|
||||
.unwrap()
|
||||
.is_none())
|
||||
|
||||
@@ -462,7 +462,6 @@ async fn test_execute_show_databases_tables(instance: Arc<dyn MockInstance>) {
|
||||
+--------------------+
|
||||
| greptime_private |
|
||||
| information_schema |
|
||||
| pg_catalog |
|
||||
| public |
|
||||
+--------------------+\
|
||||
";
|
||||
@@ -1900,7 +1899,6 @@ async fn test_show_databases(instance: Arc<dyn MockInstance>) {
|
||||
+--------------------+
|
||||
| greptime_private |
|
||||
| information_schema |
|
||||
| pg_catalog |
|
||||
| public |
|
||||
+--------------------+";
|
||||
check_output_stream(output, expected).await;
|
||||
@@ -1914,7 +1912,6 @@ async fn test_show_databases(instance: Arc<dyn MockInstance>) {
|
||||
| Database |
|
||||
+--------------------+
|
||||
| information_schema |
|
||||
| pg_catalog |
|
||||
+--------------------+";
|
||||
check_output_stream(output, expected).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user