Skip to content

01-Create

Database create basic
1. Create database with vgroup option
2. Show vgroups and verify vgroups info
3. Drop database and verify
4. Create multiple databases and verify vgroups info
5. Drop some databases and verify
6. Restart dnode and verify database and vgroup info
7. Create more databases and verify vgroup info
8. Create same name db and drop loop 100 times(TD-25762)
9. Create super/child/normal tables in multiple databases
10. Create normal table with db. prefix in multiple databases
11. Create/drop tables in a database multiple times and verify
12. Create database with options (replica, duration, keep, minrows)
13. Query information_schema.ins_databases and verify results
14. Repeatedly execute create database, drop database, create table, and write data

Options: cache model
1. Create database with different cachemodel options(none/last_row/last_value/both)
2. Insert data into subtables
3. Check cachemodel settings in information_schema and storage layer
4. Restart dnode multiple times and re-verify cachemodel settings

Database: commit
1. Write data
2. Restart taosd
3. Append data to the same file
4. Verify row count

Database compact
1. Compact a empty database and verify no error occurs
2. Show compacts and get compact id
3. Show compact with the compact id and verify the result
4. Kill the compact operation and verify it is killed successfully
5. Create databases with different compact options
6. Verify the compact options are set correctly
7. Alter the compact options and verify the options are changed correctly
8. Verify error handling for invalid compact options
9. Create databases with vgroups
10. Compact specific vgroups and verify the operation is successful
11. Verify "compact database" command can return column names correctly

Database compact meta
1. Create datbase and super table
2. Create many child tables
3. Insert data into child tables
4. Alter child table tags
5. Query data from child tables to verify
6. Compact meta only
7. Insert more data into child tables
8. Query data from child tables to verify again
9. Alter super table schema many times
10. Query data from child tables to verify again
11. Alter super table schema
12. Make sure compact meta works

Option: encrypt_algorithm
1. Create encrypt key '1234567890'
2. Create database with encrypt_algorithm 'sm4'
3. Create stable and child tables
4. Insert data and query data
5. Recreate dnode encrypt key
6. Query data again
7. Create database with wrong encrypt key and expect error

Databases retention
1. Prepare environment with single level data directories
2. Write bulk data into database with retention policy
3. Switch to multi-level data directories
4. Trim database to trigger retention
5. Check data directories to verify retention is executed correctly

Database: cache
1. Create database and table
2. Write and query data
3. Drop both
4. Reset query cache
5. Retest

Database wal_fsync_period
1. Create database with wal_fsync_period options
2. Verify wal_fsync_period value from information_schema.ins_databases
3. Verify wal_fsync_period value after alter database
4. Verify wal_fsync_period value after restart taosd
5. Verify error cases for wal_fsync_period option
6. Verify error cases for alter wal_fsync_period option

Options: wal level
1. create database wal_level = 0 and insert data
2. stop/kill taosd before alter wal level
3. restart taosd
4. alter wal level from 0 to 1/2
5. insert data
6. stop/kill taosd after alter wal level
7. restart taosd

Options: wal retention
1. Create database with different wal_retention_period and wal_retention_size
2. Create super table and child tables
3. Insert data to child tables
4. Verify wal files retention based on period and size settings
5. Check that wal files are deleted according to retention policies
6. Use TMQ to consume data and verify data integrity after retention checks

DB Name: basic
1. Case sensitivity
2. Illegal names
3. Chinese names

DB Name: length
1. Create database with an excessively long name
2. Test with invalid values

Options: basic
1. Create database using all available options
2. Query information_schema.ins_databases to verify correct display
3. Test the valid ranges of each option

Options: dnodelist
1. Create database with DNODE list option
2. Test creation with varying replica counts and vgroup numbers
3. Alter database DNODE list option

Options: keep
1. Create database with the KEEP option
2. Write and query data—including data outside the KEEP range
3. ALTER database KEEP option
4. Write and query data again

Options: table hash
1. Create a database with 2 vgroups and explicitly set table_prefix / table_suffix
2. Create one super table and 5 child tables; query information_schema.ins_tables to confirm their vgroup distribution
3. Create 5 normal tables; query information_schema.ins_tables again to verify their vgroup placement

Options: table prefix & suffix
1. Create database with TABLE_PREFIX and TABLE_SUFFIX options
2. Create tables
3. Verify that tables are distributed across vgroups as expected