Falcon
supports all of the standard column data
types supported by MySQL.
To create a table that uses the Falcon
engine,
employ the ENGINE =
option within the Falcon
CREATE TABLE
statement:
CREATE TABLE names ( id INT, fname VARCHAR (20), lname VARCHAR (20) ) ENGINE=Falcon
Indexes can be created using all of the standard methods; for example you can explicitly specify an index on a column:
CREATE TABLE ids ( id INT, INDEX (id) ) ENGINE=Falcon
Generate one as part of a primary key:
CREATE TABLE ids ( id INT, PRIMARY KEY (id) ) ENGINE=Falcon
Or you can create multi-key and multiple indexes:
CREATE TABLE t1 ( id INT NOT NULL, id2 INT NOT NULL, id3 INT NOT NULL, name CHAR(30), PRIMARY KEY (id,id2), INDEX index_id3 (id3) ) ENGINE=Falcon
To create a table within a specific tablespace, add the
TABLESPACE
definition:
CREATE TABLE names (id INT, fname VARCHAR (20), lname VARCHAR (20)) TABLESPACE my_big_tables ENGINE=Falcon
You can use ALTER TABLE
to change the
tablespace for a given table; Falcon
will move
the table data to the new tablespace:
ALTER TABLE names TABLESPACE my_small_tables
You can drop a tablespace when it is empty (that is, when it no
longer contains any tables) using DROP
TABLESPACE
:
DROP TABLESPACE my_big_tables ENGINE=Falcon
You cannot currently alter a tablespace (using ALTER
TABLESPACE
).
In MySQL 6.0.3 and earlier, creating a tablespace with the same
name as another tablespace would produce an error. Also, when
dropping a file associated with a tablespace, the file itself is
not physically deleted from the file system. In either case the
error returned will be: ERROR 65433 (HY000): Unknown
error -103
.
In MySQL 6.0.4 and later, the files associated with a tablespace are deleted, and a suitable error message is returned when creating a duplicate tablespace.