Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-12 22:02:46+02:00, mats@stripped +16 -0
Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into kindahl-laptop.dnsalias.net:/home/bk/b23051-mysql-5.1-rpl
MERGE: 1.2469.212.14
BitKeeper/deleted/.del-binlog_row_blackhole.result@stripped, 2007-06-12 21:53:45+02:00,
mats@stripped +0 -0
Auto merged
MERGE: 1.11.1.1
BitKeeper/deleted/.del-binlog_row_blackhole.result@stripped, 2007-06-12 21:53:44+02:00,
mats@stripped +0 -0
Merge rename: mysql-test/r/binlog_row_blackhole.result ->
BitKeeper/deleted/.del-binlog_row_blackhole.result
mysql-test/t/partition_hash.test@stripped, 2007-06-12 22:02:39+02:00,
mats@stripped +1 -1
Manual merge
MERGE: 1.6.1.1
sql/ha_ndbcluster.cc@stripped, 2007-06-12 21:53:45+02:00, mats@stripped
+0 -0
Auto merged
MERGE: 1.438.4.1
sql/handler.cc@stripped, 2007-06-12 21:53:47+02:00, mats@stripped +0 -0
Auto merged
MERGE: 1.304.3.1
sql/handler.h@stripped, 2007-06-12 22:02:39+02:00, mats@stripped +0 -0
Manual merge
MERGE: 1.256.1.3
sql/mysql_priv.h@stripped, 2007-06-12 21:53:47+02:00, mats@stripped +0
-0
Auto merged
MERGE: 1.497.2.1
sql/set_var.cc@stripped, 2007-06-12 22:02:40+02:00, mats@stripped +0 -0
Manual merge
MERGE: 1.229.3.1
sql/share/errmsg.txt@stripped, 2007-06-12 21:53:49+02:00, mats@stripped
+0 -0
Auto merged
MERGE: 1.154.1.3
sql/sql_base.cc@stripped, 2007-06-12 21:53:48+02:00, mats@stripped +0 -0
Auto merged
MERGE: 1.396.3.4
sql/sql_class.h@stripped, 2007-06-12 22:02:40+02:00, mats@stripped +7
-10
Manual merge
MERGE: 1.354.1.2
sql/sql_insert.cc@stripped, 2007-06-12 22:02:40+02:00, mats@stripped +0
-0
Manual merge
MERGE: 1.261.3.2
sql/sql_parse.cc@stripped, 2007-06-12 22:02:40+02:00, mats@stripped +2
-3
Manual merge
MERGE: 1.659.3.1
storage/blackhole/ha_blackhole.h@stripped, 2007-06-12 21:53:50+02:00,
mats@stripped +0 -0
Auto merged
MERGE: 1.14.1.1
storage/innobase/handler/ha_innodb.cc@stripped, 2007-06-12 21:53:50+02:00,
mats@stripped +0 -0
Auto merged
MERGE: 1.331.2.1
storage/innobase/handler/ha_innodb.h@stripped, 2007-06-12 21:53:50+02:00,
mats@stripped +0 -0
Auto merged
MERGE: 1.136.2.1
storage/myisam/ha_myisam.cc@stripped, 2007-06-12 21:53:50+02:00,
mats@stripped +0 -0
Auto merged
MERGE: 1.217.2.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mats
# Host: kindahl-laptop.dnsalias.net
# Root: /home/bk/b23051-mysql-5.1-rpl/RESYNC
--- 1.220/storage/myisam/ha_myisam.cc 2007-06-12 22:02:57 +02:00
+++ 1.221/storage/myisam/ha_myisam.cc 2007-06-12 22:02:57 +02:00
@@ -474,6 +474,7 @@
ha_myisam::ha_myisam(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), file(0),
int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
+ HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
HA_FILE_BASED | HA_CAN_GEOMETRY | HA_NO_TRANSACTIONS |
HA_CAN_INSERT_DELAYED | HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS |
--- 1.309/sql/handler.cc 2007-06-12 22:02:57 +02:00
+++ 1.310/sql/handler.cc 2007-06-12 22:02:57 +02:00
@@ -3639,7 +3639,15 @@
taken a table lock), ha_release_auto_increment() was too.
*/
DBUG_ASSERT(next_insert_id == 0);
- DBUG_RETURN(external_lock(thd, lock_type));
+
+ /*
+ We cache the table flags if the locking succeeded. Otherwise, we
+ keep them as they were when they were fetched in ha_open().
+ */
+ int error= external_lock(thd, lock_type);
+ if (error == 0)
+ cached_table_flags= table_flags();
+ DBUG_RETURN(error);
}
--- 1.260/sql/handler.h 2007-06-12 22:02:57 +02:00
+++ 1.261/sql/handler.h 2007-06-12 22:02:57 +02:00
@@ -117,6 +117,18 @@
#define HA_HAS_RECORDS (LL(1) << 32) /* records() gives exact count*/
/* Has it's own method of binlog logging */
#define HA_HAS_OWN_BINLOGGING (LL(1) << 33)
+/*
+ Engine is capable of row-format and statement-format logging,
+ respectively
+*/
+#define HA_BINLOG_ROW_CAPABLE (LL(1) << 34)
+#define HA_BINLOG_STMT_CAPABLE (LL(1) << 35)
+
+/*
+ Set of all binlog flags. Currently only contain the capabilities
+ flags.
+ */
+#define HA_BINLOG_FLAGS (HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE)
/* bits in index_flags(index_number) for what you can do with index */
#define HA_READ_NEXT 1 /* TODO really use this flag */
@@ -688,7 +700,7 @@
};
-/* Possible flags of a handlerton */
+/* Possible flags of a handlerton (there can be 32 of them) */
#define HTON_NO_FLAGS 0
#define HTON_CLOSE_CURSORS_AT_COMMIT (1 << 0)
#define HTON_ALTER_NOT_SUPPORTED (1 << 1) //Engine does not support alter
@@ -793,19 +805,37 @@
class TABLEOP_HOOKS
{
public:
+ TABLEOP_HOOKS() {}
+ virtual ~TABLEOP_HOOKS() {}
+
inline void prelock(TABLE **tables, uint count)
{
do_prelock(tables, count);
}
- virtual ~TABLEOP_HOOKS() {}
- TABLEOP_HOOKS() {}
+ inline int postlock(TABLE **tables, uint count)
+ {
+ return do_postlock(tables, count);
+ }
private:
/* Function primitive that is called prior to locking tables */
virtual void do_prelock(TABLE **tables, uint count)
{
/* Default is to do nothing */
}
+
+ /**
+ Primitive called after tables are locked.
+
+ If an error is returned, the tables will be unlocked and error
+ handling start.
+
+ @return Error code or zero.
+ */
+ virtual int do_postlock(TABLE **tables, uint count)
+ {
+ return 0; /* Default is to do nothing */
+ }
};
typedef struct st_savepoint SAVEPOINT;
@@ -892,10 +922,13 @@
friend int ha_delete_table(THD*,handlerton*,const char*,const char*,
const char*,bool);
+public:
+ typedef ulonglong Table_flags;
+
protected:
struct st_table_share *table_share; /* The table definition */
struct st_table *table; /* The current open table */
- ulonglong cached_table_flags; /* Set on init() and open() */
+ Table_flags cached_table_flags; /* Set on init() and open() */
virtual int index_init(uint idx, bool sorted) { active_index=idx; return 0; }
virtual int index_end() { active_index=MAX_KEY; return 0; }
@@ -908,7 +941,7 @@
*/
virtual int rnd_init(bool scan) =0;
virtual int rnd_end() { return 0; }
- virtual ulonglong table_flags(void) const =0;
+ virtual Table_flags table_flags(void) const =0;
void ha_statistic_increment(ulong SSV::*offset) const;
void **ha_data(THD *) const;
@@ -1122,7 +1155,7 @@
{
return inited == INDEX ? ha_index_end() : inited == RND ? ha_rnd_end() : 0;
}
- longlong ha_table_flags() { return cached_table_flags; }
+ Table_flags ha_table_flags() const { return cached_table_flags; }
/*
Signal that the table->read_set and table->write_set table maps changed
@@ -1686,6 +1719,8 @@
/* Some extern variables used with handlers */
extern const char *ha_row_type[];
+extern const char *tx_isolation_names[];
+extern const char *binlog_format_names[];
extern TYPELIB tx_isolation_typelib;
extern TYPELIB myisam_stats_method_typelib;
extern ulong total_ha, total_ha_2pc;
--- 1.513/sql/mysql_priv.h 2007-06-12 22:02:57 +02:00
+++ 1.514/sql/mysql_priv.h 2007-06-12 22:02:57 +02:00
@@ -1274,6 +1274,7 @@
bool open_and_lock_tables(THD *thd,TABLE_LIST *tables);
bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags);
int lock_tables(THD *thd, TABLE_LIST *tables, uint counter, bool *need_reopen);
+int decide_logging_format(THD *thd, TABLE_LIST *tables);
TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
const char *table_name, bool link_in_list);
bool rm_temporary_table(handlerton *base, char *path);
--- 1.406/sql/sql_base.cc 2007-06-12 22:02:57 +02:00
+++ 1.407/sql/sql_base.cc 2007-06-12 22:02:57 +02:00
@@ -3948,6 +3948,121 @@
}
+/**
+ Decide on logging format to use for the statement.
+
+ Compute the capabilities vector for the involved storage engines
+ and mask out the flags for the binary log. Right now, the binlog
+ flags only include the capabilities of the storage engines, so this
+ is safe.
+
+ We now have three alternatives that prevent the statement from
+ being loggable:
+
+ 1. If there are no capabilities left (all flags are clear) it is
+ not possible to log the statement at all, so we roll back the
+ statement and report an error.
+
+ 2. Statement mode is set, but the capabilities indicate that
+ statement format is not possible.
+
+ 3. Row mode is set, but the capabilities indicate that row
+ format is not possible.
+
+ 4. Statement is unsafe, but the capabilities indicate that row
+ format is not possible.
+
+ If we are in MIXED mode, we then decide what logging format to use:
+
+ 1. If the statement is unsafe, row-based logging is used.
+
+ 2. If statement-based logging is not possible, row-based logging is
+ used.
+
+ 3. Otherwise, statement-based logging is used.
+
+ @param thd Client thread
+ @param tables Tables involved in the query
+ */
+
+int decide_logging_format(THD *thd, TABLE_LIST *tables)
+{
+ if (mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG))
+ {
+ handler::Table_flags binlog_flags= ~handler::Table_flags();
+ for (TABLE_LIST *table= tables; table; table= table->next_global)
+ if (!table->placeholder() && table->lock_type >=
TL_WRITE_ALLOW_WRITE)
+ {
+#define FLAGSTR(S,F) ((S) & (F) ? #F " " : "")
+#ifndef DBUG_OFF
+ ulonglong flags= table->table->file->ha_table_flags();
+ DBUG_PRINT("info", ("table: %s; ha_table_flags: %s%s",
+ table->table_name,
+ FLAGSTR(flags, HA_BINLOG_STMT_CAPABLE),
+ FLAGSTR(flags, HA_BINLOG_ROW_CAPABLE)));
+#endif
+ binlog_flags &= table->table->file->ha_table_flags();
+ }
+ binlog_flags&= HA_BINLOG_FLAGS;
+ DBUG_PRINT("info", ("binlog_flags: %s%s",
+ FLAGSTR(binlog_flags, HA_BINLOG_STMT_CAPABLE),
+ FLAGSTR(binlog_flags, HA_BINLOG_ROW_CAPABLE)));
+ DBUG_PRINT("info", ("thd->variables.binlog_format: %ld",
+ thd->variables.binlog_format));
+
+ int error= 0;
+ if (binlog_flags == 0)
+ {
+ my_error((error= ER_BINLOG_LOGGING_IMPOSSIBLE), MYF(0),
+ "Statement cannot be logged to the binary log in"
+ " row-based nor statement-based format");
+ }
+ else if (thd->variables.binlog_format == BINLOG_FORMAT_STMT &&
+ (binlog_flags & HA_BINLOG_STMT_CAPABLE) == 0)
+ {
+ my_error((error= ER_BINLOG_LOGGING_IMPOSSIBLE), MYF(0),
+ "Statement-based format required for this statement,"
+ " but not allowed by this combination of engines");
+ }
+ else if ((thd->variables.binlog_format == BINLOG_FORMAT_ROW ||
+ thd->lex->is_stmt_unsafe()) &&
+ (binlog_flags & HA_BINLOG_ROW_CAPABLE) == 0)
+ {
+ my_error((error= ER_BINLOG_LOGGING_IMPOSSIBLE), MYF(0),
+ "Row-based format required for this statement,"
+ " but not allowed by this combination of engines");
+ }
+
+ DBUG_PRINT("info", ("error: %d", error));
+
+ if (error)
+ {
+ ha_rollback_stmt(thd);
+ return -1;
+ }
+
+ /*
+ We switch to row-based format if we are in mixed mode and one of
+ the following are true:
+
+ 1. If the statement is unsafe
+ 2. If statement format cannot be used
+
+ Observe that point to cannot be decided before the tables
+ involved in a statement has been checked, i.e., we cannot put
+ this code in reset_current_stmt_binlog_row_based(), it has to be
+ here.
+ */
+ if (thd->lex->is_stmt_unsafe() ||
+ (binlog_flags & HA_BINLOG_STMT_CAPABLE) == 0)
+ {
+ thd->set_current_stmt_binlog_row_based_if_mixed();
+ }
+ }
+
+ return 0;
+}
+
/*
Lock all tables in list
@@ -3986,17 +4101,10 @@
in prelocked mode.
*/
DBUG_ASSERT(!thd->prelocked_mode || !thd->lex->requires_prelocking());
-
*need_reopen= FALSE;
- /*
- CREATE ... SELECT UUID() locks no tables, we have to test here.
- */
- if (thd->lex->is_stmt_unsafe())
- thd->set_current_stmt_binlog_row_based_if_mixed();
-
if (!tables && !thd->lex->requires_prelocking())
- DBUG_RETURN(0);
+ DBUG_RETURN(decide_logging_format(thd, tables));
/*
We need this extra check for thd->prelocked_mode because we want to avoid
@@ -4049,6 +4157,7 @@
}
DBUG_RETURN(-1);
}
+
if (thd->lex->requires_prelocking() &&
thd->lex->sql_command != SQLCOM_LOCK_TABLES)
{
@@ -4115,7 +4224,8 @@
thd->prelocked_mode= PRELOCKED_UNDER_LOCK_TABLES;
}
}
- DBUG_RETURN(0);
+
+ DBUG_RETURN(decide_logging_format(thd, tables));
}
--- 1.365/sql/sql_class.h 2007-06-12 22:02:57 +02:00
+++ 1.366/sql/sql_class.h 2007-06-12 22:02:57 +02:00
@@ -2002,20 +2002,21 @@
class select_create: public select_insert {
ORDER *group;
TABLE_LIST *create_table;
+ TABLE_LIST *select_tables;
HA_CREATE_INFO *create_info;
Alter_info *alter_info;
Field **field;
public:
- select_create(TABLE_LIST *table_arg,
- HA_CREATE_INFO *create_info_arg,
- Alter_info *alter_info_arg,
- List<Item> &select_fields,
- enum_duplicates duplic, bool ignore)
- :select_insert(NULL, NULL, &select_fields, 0, 0, duplic, ignore),
+ select_create (TABLE_LIST *table_arg,
+ HA_CREATE_INFO *create_info_par,
+ List<create_field> &fields_par,
+ List<Key> &keys_par,
+ List<Item> &select_fields,enum_duplicates duplic, bool ignore,
+ TABLE_LIST *select_tables_arg)
+ :select_insert (NULL, NULL, &select_fields, 0, 0, duplic, ignore),
create_table(table_arg),
- create_info(create_info_arg),
- alter_info(alter_info_arg)
- {}
+ create_info(create_info_par), select_tables(select_tables_arg)
+ {}
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
void binlog_show_create_table(TABLE **tables, uint count);
--- 1.273/sql/sql_insert.cc 2007-06-12 22:02:57 +02:00
+++ 1.274/sql/sql_insert.cc 2007-06-12 22:02:57 +02:00
@@ -3341,8 +3341,15 @@
table->reginfo.lock_type=TL_WRITE;
hooks->prelock(&table, 1); // Call prelock hooks
if (! ((*lock)= mysql_lock_tables(thd, &table, 1,
- MYSQL_LOCK_IGNORE_FLUSH, ¬_used)))
+ MYSQL_LOCK_IGNORE_FLUSH, ¬_used)) ||
+ hooks->postlock(&table, 1))
{
+ if (*lock)
+ {
+ mysql_unlock_tables(thd, *lock);
+ *lock= 0;
+ }
+
if (!create_info->table_existed)
drop_open_table(thd, table, create_table->db, create_table->table_name);
DBUG_RETURN(0);
@@ -3377,24 +3384,35 @@
*/
class MY_HOOKS : public TABLEOP_HOOKS {
public:
- MY_HOOKS(select_create *x) : ptr(x) { }
+ MY_HOOKS(select_create *x, TABLE_LIST *create_table,
+ TABLE_LIST *select_tables)
+ : ptr(x), all_tables(*create_table)
+ {
+ all_tables.next_global= select_tables;
+ }
private:
- virtual void do_prelock(TABLE **tables, uint count)
+ virtual int do_postlock(TABLE **tables, uint count)
{
+ THD *thd= const_cast<THD*>(ptr->get_thd());
+ if (int error= decide_logging_format(thd, &all_tables))
+ return error;
+
TABLE const *const table = *tables;
- if (ptr->get_thd()->current_stmt_binlog_row_based &&
+ if (thd->current_stmt_binlog_row_based &&
!table->s->tmp_table &&
!ptr->get_create_info()->table_existed)
{
ptr->binlog_show_create_table(tables, count);
}
+ return 0;
}
select_create *ptr;
+ TABLE_LIST all_tables;
};
- MY_HOOKS hooks(this);
+ MY_HOOKS hooks(this, create_table, select_tables);
hook_ptr= &hooks;
unit= u;
--- 1.674/sql/sql_parse.cc 2007-06-12 22:02:57 +02:00
+++ 1.675/sql/sql_parse.cc 2007-06-12 22:02:57 +02:00
@@ -2227,7 +2227,8 @@
&alter_info,
select_lex->item_list,
lex->duplicates,
- lex->ignore)))
+ lex->ignore,
+ select_tables)))
{
/*
CREATE from SELECT give its SELECT_LEX for SELECT,
--- 1.156/sql/share/errmsg.txt 2007-06-12 22:02:57 +02:00
+++ 1.157/sql/share/errmsg.txt 2007-06-12 22:02:57 +02:00
@@ -6062,3 +6062,5 @@
ER_BINLOG_UNSAFE_STATEMENT
eng "Statement is not safe to log in statement format."
swe "Detta är inte säkert att logga i statement-format."
+ER_BINLOG_LOGGING_IMPOSSIBLE
+ eng "Binary logging not possible. Message: %s"
--- 1.16/storage/blackhole/ha_blackhole.h 2007-06-12 22:02:57 +02:00
+++ 1.17/storage/blackhole/ha_blackhole.h 2007-06-12 22:02:57 +02:00
@@ -53,6 +53,7 @@
ulonglong table_flags() const
{
return(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER |
+ HA_BINLOG_STMT_CAPABLE |
HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY |
HA_FILE_BASED | HA_CAN_GEOMETRY | HA_CAN_INSERT_DELAYED);
}
--- 1.452/sql/ha_ndbcluster.cc 2007-06-12 22:02:57 +02:00
+++ 1.453/sql/ha_ndbcluster.cc 2007-06-12 22:02:57 +02:00
@@ -4509,7 +4509,6 @@
DBUG_PRINT("warning", ("ops_pending != 0L"));
m_ops_pending= 0;
}
- thd->set_current_stmt_binlog_row_based_if_mixed();
DBUG_RETURN(error);
}
@@ -4559,7 +4558,6 @@
m_active_trans= trans;
// Start of statement
m_ops_pending= 0;
- thd->set_current_stmt_binlog_row_based_if_mixed();
DBUG_RETURN(error);
}
@@ -6117,6 +6115,7 @@
HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | \
HA_PARTIAL_COLUMN_READ | \
HA_HAS_OWN_BINLOGGING | \
+ HA_BINLOG_ROW_CAPABLE | \
HA_HAS_RECORDS
ha_ndbcluster::ha_ndbcluster(handlerton *hton, TABLE_SHARE *table_arg):
@@ -8923,7 +8922,6 @@
my_net_init(&thd->net, 0);
thd->main_security_ctx.master_access= ~0;
thd->main_security_ctx.priv_user = 0;
- thd->current_stmt_binlog_row_based= TRUE; // If in mixed mode
/* Signal successful initialization */
ndb_util_thread_running= 1;
--- 1.338/storage/innobase/handler/ha_innodb.cc 2007-06-12 22:02:57 +02:00
+++ 1.339/storage/innobase/handler/ha_innodb.cc 2007-06-12 22:02:57 +02:00
@@ -958,6 +958,7 @@
HA_CAN_SQL_HANDLER |
HA_PRIMARY_KEY_REQUIRED_FOR_POSITION |
HA_PRIMARY_KEY_IN_READ_INDEX |
+ HA_BINLOG_ROW_CAPABLE |
HA_CAN_GEOMETRY | HA_PARTIAL_COLUMN_READ |
HA_TABLE_SCAN_ON_INDEX),
start_of_scan(0),
@@ -2266,6 +2267,45 @@
}
ut_ad(0);
return(ROW_TYPE_NOT_USED);
+}
+
+
+
+/********************************************************************
+Get the table flags to use for the statement. */
+handler::Table_flags
+ha_innobase::table_flags() const
+{
+ THD *const thd= current_thd;
+ /* We are using thd->variables.tx_isolation here instead of
+ trx->isolation_level since store_lock() has not been called
+ yet.
+
+ The trx->isolation_level is set inside store_lock() (which
+ is called from mysql_lock_tables()) until after this
+ function has been called (which is called in lock_tables()
+ before that function calls mysql_lock_tables()). */
+ ulong const tx_isolation= thd->variables.tx_isolation;
+ if (tx_isolation <= ISO_READ_COMMITTED)
+ {
+ ulong const binlog_format= thd->variables.binlog_format;
+ /* Statement based binlogging does not work in these
+ isolation levels since the necessary locks cannot
+ be taken */
+ if (binlog_format == BINLOG_FORMAT_STMT)
+ {
+ char buf[256];
+ my_snprintf(buf, sizeof(buf),
+ "Transaction level '%s' in InnoDB is"
+ " not safe for binlog mode '%s'",
+ tx_isolation_names[tx_isolation],
+ binlog_format_names[binlog_format]);
+ my_error(ER_BINLOG_LOGGING_IMPOSSIBLE, MYF(0), buf);
+ }
+ return int_table_flags;
+ }
+
+ return int_table_flags | HA_BINLOG_STMT_CAPABLE;
}
/********************************************************************
--- 1.139/storage/innobase/handler/ha_innodb.h 2007-06-12 22:02:57 +02:00
+++ 1.140/storage/innobase/handler/ha_innodb.h 2007-06-12 22:02:57 +02:00
@@ -54,7 +54,7 @@
ulong upd_and_key_val_buff_len;
/* the length of each of the previous
two buffers */
- ulong int_table_flags;
+ Table_flags int_table_flags;
uint primary_key;
ulong start_of_scan; /* this is set to 1 when we are
starting a table scan but have not
@@ -84,7 +84,7 @@
const char* table_type() const { return("InnoDB");}
const char *index_type(uint key_number) { return "BTREE"; }
const char** bas_ext() const;
- ulonglong table_flags() const { return int_table_flags; }
+ Table_flags table_flags() const;
ulong index_flags(uint idx, uint part, bool all_parts) const
{
return (HA_READ_NEXT |
--- 1.234/sql/set_var.cc 2007-06-12 22:02:57 +02:00
+++ 1.235/sql/set_var.cc 2007-06-12 22:02:57 +02:00
@@ -1007,17 +1007,6 @@
my_error(ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT, MYF(0));
return 1;
}
-#ifdef HAVE_NDB_BINLOG
- /*
- Cluster does not support changing the binlog format on the fly yet.
- */
- LEX_STRING ndb_name= {(char*)STRING_WITH_LEN("ndbcluster")};
- if (opt_bin_log && plugin_is_ready(&ndb_name, MYSQL_STORAGE_ENGINE_PLUGIN))
- {
- my_error(ER_NDB_CANT_SWITCH_BINLOG_FORMAT, MYF(0));
- return 1;
- }
-#endif /* HAVE_NDB_BINLOG */
return sys_var_thd_enum::is_readonly();
}
--- 1.7/mysql-test/t/partition_hash.test 2007-06-12 22:02:57 +02:00
+++ 1.8/mysql-test/t/partition_hash.test 2007-06-12 22:02:57 +02:00
@@ -134,6 +134,7 @@
--disable_warnings
CREATE TABLE t1 (s1 int) ENGINE=BLACKHOLE PARTITION BY HASH (s1);
--enable_warnings
+--error 0,ER_BINLOG_ROW_FORMAT_FORBIDDEN
INSERT INTO t1 VALUES (0);
DROP TABLE t1;
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.2538) | Mats Kindahl | 12 Jun |