fae55e0e46
[Feature](information_schema) add processlist table for information_schema db ( #32511 )
2024-04-07 23:24:22 +08:00
baae7bf339
[fix](information_schema)fix bug that metadata_name_ids error tableid and append information_schema case. ( #26238 )
...
fix bug that #24059 .
Added some information_schema scanner tests.
files
schema_privileges
table_privileges
partitions
rowsets
statistics
table_constraints
Based on infodb_support_ext_catalog=false, it currently includes tests for all tables under the information_schema database.
2023-11-09 14:07:12 +08:00
e680d42fe7
[feature](information_schema)add metadata_name_ids for quickly get catlogs,db,table and add profiling table in order to Compatible with mysql ( #22702 )
...
add information_schema.metadata_name_idsfor quickly get catlogs,db,table.
1. table struct :
```mysql
mysql> desc internal.information_schema.metadata_name_ids;
+---------------+--------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+--------------+------+-------+---------+-------+
| CATALOG_ID | BIGINT | Yes | false | NULL | |
| CATALOG_NAME | VARCHAR(512) | Yes | false | NULL | |
| DATABASE_ID | BIGINT | Yes | false | NULL | |
| DATABASE_NAME | VARCHAR(64) | Yes | false | NULL | |
| TABLE_ID | BIGINT | Yes | false | NULL | |
| TABLE_NAME | VARCHAR(64) | Yes | false | NULL | |
+---------------+--------------+------+-------+---------+-------+
6 rows in set (0.00 sec)
mysql> select * from internal.information_schema.metadata_name_ids where CATALOG_NAME="hive1" limit 1 \G;
*************************** 1. row ***************************
CATALOG_ID: 113008
CATALOG_NAME: hive1
DATABASE_ID: 113042
DATABASE_NAME: ssb1_parquet
TABLE_ID: 114009
TABLE_NAME: dates
1 row in set (0.07 sec)
```
2. when you create / drop catalog , need not refresh catalog .
```mysql
mysql> select count(*) from internal.information_schema.metadata_name_ids\G;
*************************** 1. row ***************************
count(*): 21301
1 row in set (0.34 sec)
mysql> drop catalog hive2;
Query OK, 0 rows affected (0.01 sec)
mysql> select count(*) from internal.information_schema.metadata_name_ids\G;
*************************** 1. row ***************************
count(*): 10665
1 row in set (0.04 sec)
mysql> create catalog hive3 ...
mysql> select count(*) from internal.information_schema.metadata_name_ids\G;
*************************** 1. row ***************************
count(*): 21301
1 row in set (0.32 sec)
```
3. create / drop table , need not refresh catalog .
```mysql
mysql> CREATE TABLE IF NOT EXISTS demo.example_tbl ... ;
mysql> select count(*) from internal.information_schema.metadata_name_ids\G;
*************************** 1. row ***************************
count(*): 10666
1 row in set (0.04 sec)
mysql> drop table demo.example_tbl;
Query OK, 0 rows affected (0.01 sec)
mysql> select count(*) from internal.information_schema.metadata_name_ids\G;
*************************** 1. row ***************************
count(*): 10665
1 row in set (0.04 sec)
```
4. you can set query time , prevent queries from taking too long .
```
fe.conf : query_metadata_name_ids_timeout
the time used to obtain all tables in one database
```
5. add information_schema.profiling in order to Compatible with mysql
```mysql
mysql> select * from information_schema.profiling;
Empty set (0.07 sec)
mysql> set profiling=1;
Query OK, 0 rows affected (0.01 sec)
```
2023-08-31 21:22:26 +08:00
9e960f4c4f
[chore](build) Use include-what-you-use to optimize includes ( #18681 )
...
Currently, there are some useless includes in the codebase. We can use a tool named include-what-you-use to optimize these includes. By using a strict include-what-you-use policy, we can get lots of benefits from it.
2023-04-17 11:44:58 +08:00
a8f20eb4ac
[Enhencement](schema_scanner) Optimize the performance of reading information schema tables ( #17371 )
...
batch fill block
batch call rpc from FE to get table desc
For 34w colunms
SELECT COUNT( * ) FROM information_schema.columns;
time: 10.3s --> 0.4s
2023-03-06 09:53:01 +08:00
fd0bd395ac
[Enhancement] Remove some unused include ( #10035 )
2022-06-17 10:47:25 +08:00
6c6380969b
[refactor] replace boost smart ptr with stl ( #6856 )
...
1. replace all boost::shared_ptr to std::shared_ptr
2. replace all boost::scopted_ptr to std::unique_ptr
3. replace all boost::scoped_array to std::unique<T[]>
4. replace all boost:thread to std::thread
2021-11-17 10:18:35 +08:00
98e80aa65e
[refactor] Replace boost::function with std::function ( #5700 )
...
Replace boost::function with std::function
2021-05-09 22:00:48 +08:00
a803ceea86
[refactor] Remove boost mutex, use std::mutex instead ( #5684 )
...
* Remove boost mutex, use std::mutex instead
* replace shared_mutex
2021-04-22 11:29:36 +08:00
c4cc681d14
remove boost_foreach, using c++ foreach instead ( #5611 )
2021-04-15 10:52:29 +08:00
6fedf5881b
[CodeFormat] Clang-format cpp sources ( #4965 )
...
Clang-format all c++ source files.
2020-11-28 18:36:49 +08:00
448df42fb0
[Compatibility] Add table_privileges, schema_privileges and user_privileges tables( #4899 )
...
Add privileges tables in information_schema database
2020-11-16 21:58:30 +08:00
09f97f8a05
[Refactor] Fixes some be typo part 2 ( #4747 )
2020-10-20 09:28:57 +08:00
2f0808137a
Refactor FrontendHelper ( #1888 )
2019-09-27 13:21:14 +08:00
0820a29b8d
Implement the routine load process of Kafka on Backend ( #671 )
2019-04-28 10:33:50 +08:00