Fix some bugs

This commit is contained in:
liboyang0730
2023-05-25 02:11:29 +00:00
committed by ob-robot
parent 1679608484
commit 57e42e3359
9 changed files with 36 additions and 19 deletions

View File

@ -1,11 +1,11 @@
drop table if exists pt1;
create table pt1 (c1 int primary key, c2 int) partition by key(c1) partitions 3;
select * from information_schema.partitions where table_name = 'pt1';
select * from information_schema.partitions where table_name = 'pt1' order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION SUBPARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
def test pt1 p0 NULL 1 NULL KEY NULL c1 NULL NULL NULL NULL NULL NULL NULL NULL NULL YYYY-MM-DD hh:mm:ss NULL NULL NULL default NULL
def test pt1 p1 NULL 2 NULL KEY NULL c1 NULL NULL NULL NULL NULL NULL NULL NULL NULL YYYY-MM-DD hh:mm:ss NULL NULL NULL default NULL
def test pt1 p2 NULL 3 NULL KEY NULL c1 NULL NULL NULL NULL NULL NULL NULL NULL NULL YYYY-MM-DD hh:mm:ss NULL NULL NULL default NULL
select table_schema, table_name from information_schema.partitions where table_name = 'pt1';
select table_schema, table_name from information_schema.partitions where table_name = 'pt1' order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME;
table_schema table_name
test pt1
test pt1

View File

@ -10,7 +10,7 @@ drop table if exists pt1;
--enable_warnings
create table pt1 (c1 int primary key, c2 int) partition by key(c1) partitions 3;
--replace_column 20 "YYYY-MM-DD hh:mm:ss"
select * from information_schema.partitions where table_name = 'pt1';
select table_schema, table_name from information_schema.partitions where table_name = 'pt1';
select * from information_schema.partitions where table_name = 'pt1' order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME;
select table_schema, table_name from information_schema.partitions where table_name = 'pt1' order by TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME;
desc information_schema.partitions;
drop table pt1;

View File

@ -280,7 +280,7 @@ def substr(cast(date_c as char(1024)), 10) 251 536870908 17 Y 16 0 45
+----------------------------------------+
select substr(cast(1024 as char(1024)), 1, 2) from build_in_func_test_table;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def substr(cast(1024 as char(1024)), 1, 2) 251 536870908 2 Y 16 0 45
def substr(cast(1024 as char(1024)), 1, 2) 253 8 2 Y 0 0 45
+----------------------------------------+
| substr(cast(1024 as char(1024)), 1, 2) |
+----------------------------------------+
@ -296,7 +296,7 @@ def substr(cast(date_c as char(1024)) from 10) 251 536870908 17 Y 16 0 45
+--------------------------------------------+
select substr(cast(date_c as char(1024)) from 10 for 10) from build_in_func_test_table;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def substr(cast(date_c as char(1024)) from 10 for 10) 251 536870908 10 Y 16 0 45
def substr(cast(date_c as char(1024)) from 10 for 10) 253 40 10 Y 0 0 45
+---------------------------------------------------+
| substr(cast(date_c as char(1024)) from 10 for 10) |
+---------------------------------------------------+