Below is the list of changes that have just been committed into a local
5.0 repository of grog. When grog 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
1.2040 06/02/14 11:19:42 grog@stripped +9 -0
BUG#14286: mysqld --bootstrap fails if the server is compiled
transactional storage engines.
This bug occurred due to missing initialization of thd->transaction.
The original report included a suggested fix that addressed the
immediate problem, but it did not check all instances of the use of
this substructure.
In view of the upcoming prospect of dynamically loadable storage
engines, the optimization of removing (part or all of) struct
transaction no longer makes sense. Instead, remove this feature.
This turns out to be the removal of the preprocessor variable
USING_TRANSACTIONS.
sql/sql_parse.cc
1.528 06/02/14 11:19:37 grog@stripped +0 -2
Remove USING_TRANSACTIONS
sql/sql_cursor.cc
1.5 06/02/14 11:19:37 grog@stripped +1 -3
Remove USING_TRANSACTIONS
sql/sql_class.h
1.281 06/02/14 11:19:37 grog@stripped +3 -11
Remove USING_TRANSACTIONS
sql/sql_class.cc
1.228 06/02/14 11:19:37 grog@stripped +0 -4
Remove USING_TRANSACTIONS
sql/set_var.cc
1.149 06/02/14 11:19:37 grog@stripped +0 -2
Remove USING_TRANSACTIONS
sql/log_event.cc
1.203 06/02/14 11:19:37 grog@stripped +1 -2
Remove USING_TRANSACTIONS
sql/log.cc
1.188 06/02/14 11:19:37 grog@stripped +0 -2
Remove USING_TRANSACTIONS
sql/handler.h
1.167 06/02/14 11:19:37 grog@stripped +0 -5
Don't define USING_TRANSACTIONS
sql/handler.cc
1.211 06/02/14 11:19:37 grog@stripped +1 -12
Remove USING_TRANSACTIONS
# 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: grog
# Host: echunga.lemis.com
# Root: /src/MySQL/FreeBSD/5.0
--- 1.210/sql/handler.cc 2006-02-07 15:23:25 +10:30
+++ 1.211/sql/handler.cc 2006-02-14 11:19:37 +10:30
@@ -618,7 +618,6 @@
THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
handlerton **ht=trans->ht;
DBUG_ENTER("ha_prepare");
-#ifdef USING_TRANSACTIONS
if (trans->nht)
{
for (; *ht; ht++)
@@ -642,7 +641,6 @@
}
}
}
-#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
}
@@ -681,7 +679,6 @@
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
DBUG_RETURN(2);
}
-#ifdef USING_TRANSACTIONS
if (trans->nht)
{
if (is_real_trans && wait_if_global_read_lock(thd, 0, 0))
@@ -726,7 +723,6 @@
if (is_real_trans)
start_waiting_global_read_lock(thd);
}
-#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
}
@@ -741,7 +737,6 @@
bool is_real_trans=all || thd->transaction.all.nht == 0;
handlerton **ht=trans->ht;
DBUG_ENTER("ha_commit_one_phase");
-#ifdef USING_TRANSACTIONS
if (trans->nht)
{
for (ht=trans->ht; *ht; ht++)
@@ -769,7 +764,6 @@
thd->transaction.cleanup();
}
}
-#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
}
@@ -793,7 +787,6 @@
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
DBUG_RETURN(1);
}
-#ifdef USING_TRANSACTIONS
if (trans->nht)
{
/* Close all cursors that can not survive ROLLBACK */
@@ -821,7 +814,7 @@
thd->transaction.cleanup();
}
}
-#endif /* USING_TRANSACTIONS */
+
/*
If a non-transactional table was updated, warn; don't warn if this is a
slave thread (because when a slave thread executes a ROLLBACK, it has
@@ -851,7 +844,6 @@
int ha_autocommit_or_rollback(THD *thd, int error)
{
DBUG_ENTER("ha_autocommit_or_rollback");
-#ifdef USING_TRANSACTIONS
if (thd->transaction.stmt.nht)
{
if (!error)
@@ -864,7 +856,6 @@
thd->variables.tx_isolation=thd->session_tx_isolation;
}
-#endif
DBUG_RETURN(error);
}
@@ -1215,7 +1206,6 @@
&thd->transaction.all);
handlerton **ht=trans->ht;
DBUG_ENTER("ha_savepoint");
-#ifdef USING_TRANSACTIONS
for (; *ht; ht++)
{
int err;
@@ -1233,7 +1223,6 @@
statistic_increment(thd->status_var.ha_savepoint_count,&LOCK_status);
}
sv->nht=trans->nht;
-#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
}
--- 1.166/sql/handler.h 2006-02-07 15:23:22 +10:30
+++ 1.167/sql/handler.h 2006-02-14 11:19:37 +10:30
@@ -28,11 +28,6 @@
#define NO_HASH /* Not yet implemented */
#endif
-#if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) || \
- defined(HAVE_NDBCLUSTER_DB)
-#define USING_TRANSACTIONS
-#endif
-
// the following is for checking tables
#define HA_ADMIN_ALREADY_DONE 1
--- 1.187/sql/log.cc 2006-02-07 15:23:24 +10:30
+++ 1.188/sql/log.cc 2006-02-14 11:19:37 +10:30
@@ -1627,7 +1627,6 @@
}
#endif /* HAVE_REPLICATION */
-#ifdef USING_TRANSACTIONS
/*
Should we write to the binlog cache or to the binlog on disk?
Write to the binlog cache if:
@@ -1671,7 +1670,6 @@
else if (trans_log && my_b_tell(trans_log))
file= trans_log;
}
-#endif
DBUG_PRINT("info",("event type=%d",event_info->get_type_code()));
/*
--- 1.202/sql/log_event.cc 2006-02-07 15:23:25 +10:30
+++ 1.203/sql/log_event.cc 2006-02-14 11:19:37 +10:30
@@ -2192,7 +2192,6 @@
delete rli->relay_log.description_event_for_exec;
rli->relay_log.description_event_for_exec= this;
-#ifdef USING_TRANSACTIONS
/*
As a transaction NEVER spans on 2 or more binlogs:
if we have an active transaction at this point, the master died
@@ -2214,7 +2213,7 @@
"to its binary log.");
end_trans(thd, ROLLBACK);
}
-#endif
+
/*
If this event comes from ourselves, there is no cleaning task to perform,
we don't call Start_log_event_v3::exec_event() (this was just to update the
--- 1.227/sql/sql_class.cc 2006-02-07 15:22:06 +10:30
+++ 1.228/sql/sql_class.cc 2006-02-14 11:19:37 +10:30
@@ -321,11 +321,9 @@
reset_root_defaults(mem_root, variables.query_alloc_block_size,
variables.query_prealloc_size);
-#ifdef USING_TRANSACTIONS
reset_root_defaults(&transaction.mem_root,
variables.trans_alloc_block_size,
variables.trans_prealloc_size);
-#endif
transaction.xid_state.xid.null();
transaction.xid_state.in_thd=1;
}
@@ -432,9 +430,7 @@
main_security_ctx.destroy();
safeFree(db);
free_root(&warn_root,MYF(0));
-#ifdef USING_TRANSACTIONS
free_root(&transaction.mem_root,MYF(0));
-#endif
mysys_var=0; // Safety (shouldn't be needed)
pthread_mutex_destroy(&LOCK_delete);
#ifndef DBUG_OFF
--- 1.280/sql/sql_class.h 2006-02-07 15:23:24 +10:30
+++ 1.281/sql/sql_class.h 2006-02-14 11:19:37 +10:30
@@ -1212,19 +1212,15 @@
{
changed_tables= 0;
savepoints= 0;
-#ifdef USING_TRANSACTIONS
free_root(&mem_root,MYF(MY_KEEP_PREALLOC));
-#endif
}
st_transactions()
{
-#ifdef USING_TRANSACTIONS
bzero((char*)this, sizeof(*this));
xid_state.xid.null();
init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0);
-#else
- xid_state.xa_state= XA_NOTR;
-#endif
+/* XXX #ifndef USING_TRANSACTIONS
+ xid_state.xa_state= XA_NOTR; */
}
} transaction;
Field *dupp_field;
@@ -1482,11 +1478,7 @@
}
inline bool active_transaction()
{
-#ifdef USING_TRANSACTIONS
- return server_status & SERVER_STATUS_IN_TRANS;
-#else
- return 0;
-#endif
+ return server_status & SERVER_STATUS_IN_TRANS;
}
inline bool fill_derived_tables()
{
--- 1.527/sql/sql_parse.cc 2006-02-07 15:23:23 +10:30
+++ 1.528/sql/sql_parse.cc 2006-02-14 11:19:37 +10:30
@@ -1276,9 +1276,7 @@
if (thd->is_fatal_error)
break;
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
-#ifdef USING_TRANSACTIONS
free_root(&thd->transaction.mem_root,MYF(MY_KEEP_PREALLOC));
-#endif
}
/* thd->fatal_error should be set in case something went wrong */
--- 1.4/sql/sql_cursor.cc 2005-11-20 02:29:56 +10:30
+++ 1.5/sql/sql_cursor.cc 2006-02-14 11:19:37 +10:30
@@ -445,9 +445,7 @@
if (error == NESTED_LOOP_CURSOR_LIMIT)
join->resume_nested_loop= TRUE;
-#ifdef USING_TRANSACTIONS
- ha_release_temporary_latches(thd);
-#endif
+ ha_release_temporary_latches(thd);
/* Grab free_list here to correctly free it in close */
thd->restore_active_arena(this, &backup_arena);
--- 1.148/sql/set_var.cc 2006-02-07 15:23:25 +10:30
+++ 1.149/sql/set_var.cc 2006-02-14 11:19:37 +10:30
@@ -1337,12 +1337,10 @@
static void fix_trans_mem_root(THD *thd, enum_var_type type)
{
-#ifdef USING_TRANSACTIONS
if (type != OPT_GLOBAL)
reset_root_defaults(&thd->transaction.mem_root,
thd->variables.trans_alloc_block_size,
thd->variables.trans_prealloc_size);
-#endif
}
| Thread |
|---|
| • bk commit into 5.0 tree (grog:1.2040) BUG#14286 | Greg Lehey | 14 Feb |