Commit 96daffbb authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.1-new

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1

parents 49bae459 a5fa2d30
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
DROP TABLE IF EXISTS t1;
create temporary table t1 (a int key) engine=ndb;
ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY'
create temporary table t1 (a int key) engine=myisam;
alter table t1 engine=ndb;
ERROR HY000: Table storage engine 'ndbcluster' does not support the create option 'TEMPORARY'
drop table t1;
SET SESSION storage_engine=NDBCLUSTER;
create table t1 (a int key);
select engine from information_schema.tables where table_name = 't1';
engine
NDBCLUSTER
drop table t1;
create temporary table t1 (a int key);
show create table t1;
Table	Create Table
t1	CREATE TEMPORARY TABLE `t1` (
  `a` int(11) NOT NULL,
  PRIMARY KEY  (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+38 −0
Original line number Diff line number Diff line
-- source include/have_ndb.inc
-- source include/not_embedded.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

#
# creating a temporary table with engine=ndb should give an error
#
--error ER_ILLEGAL_HA_CREATE_OPTION
create temporary table t1 (a int key) engine=ndb;


#
# alter temporary table to engine=ndb should give an error
#
create temporary table t1 (a int key) engine=myisam;
--error ER_ILLEGAL_HA_CREATE_OPTION
alter table t1 engine=ndb;
drop table t1;


#
# if default storage engine=ndb, temporary tables
# without explicit engine= should be created as myisam
#
SET SESSION storage_engine=NDBCLUSTER;
create table t1 (a int key);

# verify that we have a ndb table
select engine from information_schema.tables where table_name = 't1';
drop table t1;

# verify that we have a myisam table
create temporary table t1 (a int key);
show create table t1;
drop table t1;
+1 −1
Original line number Diff line number Diff line
@@ -5848,7 +5848,7 @@ static bool ndbcluster_init()
#ifdef HAVE_NDB_BINLOG
    ndbcluster_binlog_init_handlerton();
#endif
    h.flags=            HTON_NO_FLAGS;
    h.flags=            HTON_TEMPORARY_NOT_SUPPORTED;
  }

  // Set connectstring if specified
+1 −0
Original line number Diff line number Diff line
@@ -604,6 +604,7 @@ struct show_table_alias_st {
#define HTON_HIDDEN                  (1 << 3) //Engine does not appear in lists
#define HTON_FLUSH_AFTER_RENAME      (1 << 4)
#define HTON_NOT_USER_SELECTABLE     (1 << 5)
#define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported

typedef struct st_thd_trans
{
+2 −0
Original line number Diff line number Diff line
@@ -5806,3 +5806,5 @@ ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
        eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use scripts/mysql_fix_privilege_tables"
ER_TABLE_NEEDS_UPGRADE
         eng "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" to fix it!"
ER_ILLEGAL_HA_CREATE_OPTION
        eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
Loading