03-Alter¶
¶
create database with cacheshardbits option
1. Create database with auto-calculated shards (-1, default)
2. Create database with explicit shard values (0, 1, 2, 3, 4)
3. Verify databases are created successfully
¶
alter database cacheshardbits option
1. Create database with cacheshardbits=1
2. Create tables and insert data
3. Query to populate cache
4. Alter cacheshardbits to 3
5. Insert more data and verify cache still works
¶
concurrent access with multiple shards
1. Create database with cacheshardbits=3 (8 shards)
2. Create 50 tables with data
3. Run concurrent queries from multiple threads
4. Verify all queries succeed
¶
invalid cacheshardbits values
1. Test that invalid shard bits (>= 20) are rejected
2. Test negative values (except -1)
3. Verify proper error messages
¶
cacheshardbits with different cache models
1. Test cacheshardbits with cachemodel 'none'
2. Test cacheshardbits with cachemodel 'last_row'
3. Test cacheshardbits with cachemodel 'last_value'
4. Test cacheshardbits with cachemodel 'both'
¶
compare performance with different shard counts
1. Create database with 1 shard
2. Create database with 4 shards
3. Insert data and query
4. Compare basic functionality (not strict performance measurement)
¶
Alter database
1. Alter database buffer
2. Alter database pages
3. Alter database encrypt_algorithm
4. Alter database with same options
5. Alter database keep_time_offset
¶
Alter all options
1. Create database and inspect all option values.
2. Attempt to alter database with invalid options (expect failure).
3. Alter database with valid options and verify the changes.
4. Check alter buffer size
5. Check alter cache model
6. Check alter cache size
7. Check alter min rows
8. Check alter pages
9. Check alter wal_level
10. Check alter wal_fsync_period
11. Check alter stt_trigger
12. Check alter wal_retention_period
13. Check alter wal_retention_size
14. Check alter ss_keeplocal
15. Check alter ss_compact
16. Check alter keep_time_offset
17. Check alter compact_interval
18. Check alter compact_time_offset
19. Check alter unsupport option
¶
Alter keep
1. Use invalid input to alter the KEEP option
2. Verify results after changing KEEP
3. Add or drop columns on the super table
4. Insert data
5. Check results
6. Repeat steps 3-5 several times
¶
Alter database replica
1. Alter replica basic operations
2. Alter replica count from 1 to 3
3. Alter replica count from 3 to 1