~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/handler/handler0alter.cc

Tags: innodb-plugin-1.0.3
InnoDB Plugin 1.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (c) 2005, 2009, Innobase Oy. All Rights Reserved.
 
4
 
 
5
This program is free software; you can redistribute it and/or modify it under
 
6
the terms of the GNU General Public License as published by the Free Software
 
7
Foundation; version 2 of the License.
 
8
 
 
9
This program is distributed in the hope that it will be useful, but WITHOUT
 
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
12
 
 
13
You should have received a copy of the GNU General Public License along with
 
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
15
Place, Suite 330, Boston, MA 02111-1307 USA
 
16
 
 
17
*****************************************************************************/
 
18
 
1
19
/******************************************************
2
20
Smart ALTER TABLE
3
 
 
4
 
(c) 2005-2008 Innobase Oy
5
21
*******************************************************/
6
22
 
7
23
#include <mysql_priv.h>
633
649
 
634
650
        /* Create a background transaction for the operations on
635
651
        the data dictionary tables. */
636
 
        trx = trx_allocate_for_mysql();
 
652
        trx = innobase_trx_allocate(user_thd);
637
653
        trx_start_if_not_started(trx);
638
654
 
639
 
        trx->mysql_thd = user_thd;
640
 
        trx->mysql_query_str = thd_query(user_thd);
641
 
 
642
655
        innodb_table = indexed_table
643
656
                = dict_table_get(prebuilt->table->name, FALSE);
644
657
 
1125
1138
 
1126
1139
        /* Create a background transaction for the operations on
1127
1140
        the data dictionary tables. */
1128
 
        trx = trx_allocate_for_mysql();
 
1141
        trx = innobase_trx_allocate(user_thd);
1129
1142
        trx_start_if_not_started(trx);
1130
1143
 
1131
 
        trx->mysql_thd = user_thd;
1132
 
        trx->mysql_query_str = thd_query(user_thd);
1133
 
 
1134
1144
        /* Flag this transaction as a dictionary operation, so that
1135
1145
        the data dictionary will be locked in crash recovery. */
1136
1146
        trx_set_dict_operation(trx, TRX_DICT_OP_INDEX);