mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 22:12:30 +01:00
e42c980967
The table opening process now works the following way: - Create common TABLE_SHARE object - Read the .frm file and unpack it into the TABLE_SHARE object - Create a TABLE object based on the information in the TABLE_SHARE object and open a handler to the table object Other noteworthy changes: - In TABLE_SHARE the most common strings are now LEX_STRING's - Better error message when table is not found - Variable table_cache is now renamed 'table_open_cache' - New variable 'table_definition_cache' that is the number of table defintions that will be cached - strxnmov() calls are now fixed to avoid overflows - strxnmov() will now always add one end \0 to result - engine objects are now created with a TABLE_SHARE object instead of a TABLE object. - After creating a field object one must call field->init(table) before using it - For a busy system this change will give you: - Less memory usage for table object - Faster opening of tables (if it's has been in use or is in table definition cache) - Allow you to cache many table definitions objects - Faster drop of table
30 lines
796 B
Text
30 lines
796 B
Text
drop table if exists t1;
|
|
CREATE TABLE t1 (
|
|
a int not null,
|
|
b int not null,
|
|
c int not null,
|
|
primary key(a,b),
|
|
index (a))
|
|
engine = ndb
|
|
partition by range (a)
|
|
partitions 3
|
|
(partition x1 values less than (5) nodegroup 12,
|
|
partition x2 values less than (10) nodegroup 13,
|
|
partition x3 values less than (20) nodegroup 14);
|
|
ERROR HY000: Can't create table 'test.t1' (errno: 140)
|
|
show warnings;
|
|
Level Code Message
|
|
Error 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB
|
|
Error 1005 Can't create table 'test.t1' (errno: 140)
|
|
CREATE TABLE t1 (
|
|
a int not null,
|
|
b int not null,
|
|
c int not null,
|
|
primary key(a))
|
|
engine = ndb
|
|
partition by range (a)
|
|
partitions 3
|
|
(partition x1 values less than (5),
|
|
partition x2 values less than (10),
|
|
partition x3 values less than (20));
|
|
drop table t1;
|