SET DEFAULT_STORAGE_ENGINE='TokuDB';
DROP TABLE IF EXISTS foo;
SET SESSION tokudb_disable_slow_alter=1;
CREATE TABLE foo (a INT NOT NULL DEFAULT 0, b INT DEFAULT NULL);
SHOW CREATE TABLE foo;
Table	Create Table
foo	CREATE TABLE `foo` (
  `a` int(11) NOT NULL DEFAULT '0',
  `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN a SET DEFAULT 100;
SHOW CREATE TABLE foo;
Table	Create Table
foo	CREATE TABLE `foo` (
  `a` int(11) NOT NULL DEFAULT '100',
  `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN a DROP DEFAULT;
SHOW CREATE TABLE foo;
Table	Create Table
foo	CREATE TABLE `foo` (
  `a` int(11) NOT NULL,
  `b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN b SET DEFAULT 42;
SHOW CREATE TABLE foo;
Table	Create Table
foo	CREATE TABLE `foo` (
  `a` int(11) NOT NULL,
  `b` int(11) DEFAULT '42'
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN b DROP DEFAULT;
SHOW CREATE TABLE foo;
Table	Create Table
foo	CREATE TABLE `foo` (
  `a` int(11) NOT NULL,
  `b` int(11)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
DROP TABLE foo;
