~percona-dev/percona-server/5.5.11-fix-bug-764152

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
# name       : innodb_overwrite_relay_log_info.patch
# introduced : 11 or before
# maintainer : Yasufumi
#
#!!! notice !!!
# Any small change to this file in the main branch
# should be done or reviewed by the maintainer!
diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
--- a/storage/innobase/handler/ha_innodb.cc	2010-12-03 15:37:45.516105468 +0900
+++ b/storage/innobase/handler/ha_innodb.cc	2010-12-03 15:38:20.318952987 +0900
@@ -42,6 +42,8 @@
 #pragma implementation				// gcc: Class implementation
 #endif
 
+#define MYSQL_SERVER
+
 #include <sql_table.h>	// explain_filename, nz2, EXPLAIN_PARTITIONS_AS_COMMENT,
 			// EXPLAIN_FILENAME_MAX_EXTRA_LENGTH
 
@@ -52,6 +54,15 @@
 #include <mysql/innodb_priv.h>
 #include <mysql/psi/psi.h>
 
+#ifdef MYSQL_SERVER
+#include <rpl_mi.h>
+#include <slave.h>
+// Defined in slave.cc
+int init_intvar_from_file(int* var, IO_CACHE* f, int default_val);
+int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
+			  const char *default_val);
+#endif /* MYSQL_SERVER */
+
 /** @file ha_innodb.cc */
 
 /* Include necessary InnoDB headers */
@@ -91,6 +102,14 @@
 #include "ha_innodb.h"
 #include "i_s.h"
 
+#ifdef MYSQL_SERVER
+// Defined in trx0sys.c
+extern char		trx_sys_mysql_master_log_name[];
+extern ib_int64_t	trx_sys_mysql_master_log_pos;
+extern char		trx_sys_mysql_relay_log_name[];
+extern ib_int64_t	trx_sys_mysql_relay_log_pos;
+#endif /* MYSQL_SERVER */
+
 # ifndef MYSQL_PLUGIN_IMPORT
 #  define MYSQL_PLUGIN_IMPORT /* nothing */
 # endif /* MYSQL_PLUGIN_IMPORT */
@@ -163,6 +182,7 @@
 static my_bool	innobase_use_doublewrite		= TRUE;
 static my_bool	innobase_use_checksums			= TRUE;
 static my_bool	innobase_locks_unsafe_for_binlog	= FALSE;
+static my_bool	innobase_overwrite_relay_log_info	= FALSE;
 static my_bool	innobase_rollback_on_timeout		= FALSE;
 static my_bool	innobase_create_status_file		= FALSE;
 static my_bool	innobase_stats_on_metadata		= TRUE;
@@ -2221,6 +2241,89 @@
 	}
 #endif /* DBUG_OFF */
 
+#ifndef MYSQL_SERVER
+	innodb_overwrite_relay_log_info = FALSE;
+#endif
+
+#ifdef HAVE_REPLICATION
+#ifdef MYSQL_SERVER
+	/* read master log position from relay-log.info if exists */
+	char fname[FN_REFLEN+128];
+	int pos;
+	int info_fd;
+	IO_CACHE info_file;
+
+	fname[0] = '\0';
+
+	if(innobase_overwrite_relay_log_info) {
+
+	fprintf(stderr,
+		"InnoDB: Warning: innodb_overwrite_relay_log_info is enabled."
+		" Updates by other storage engines may not be synchronized.\n");
+
+	bzero((char*) &info_file, sizeof(info_file));
+	fn_format(fname, relay_log_info_file, mysql_data_home, "", 4+32);
+
+	int error=0;
+
+	if (!access(fname,F_OK)) {
+		/* exist */
+		if ((info_fd = my_open(fname, O_RDWR|O_BINARY, MYF(MY_WME))) < 0) {
+			error=1;
+		} else if (init_io_cache(&info_file, info_fd, IO_SIZE*2,
+					READ_CACHE, 0L, 0, MYF(MY_WME))) {
+			error=1;
+		}
+
+		if (error) {
+relay_info_error:
+			if (info_fd >= 0)
+				my_close(info_fd, MYF(0));
+			fname[0] = '\0';
+			goto skip_relay;
+		}
+	} else {
+		fname[0] = '\0';
+		goto skip_relay;
+	}
+
+	if (init_strvar_from_file(fname, sizeof(fname), &info_file, "") || /* dummy (it is relay-log) */
+	    init_intvar_from_file(&pos, &info_file, BIN_LOG_HEADER_SIZE)) { 
+		end_io_cache(&info_file);
+		error=1;
+		goto relay_info_error;
+	}
+
+	fprintf(stderr,
+		"InnoDB: relay-log.info is detected.\n"
+		"InnoDB: relay log: position %u, file name %s\n",
+		pos, fname);
+
+	strncpy(trx_sys_mysql_relay_log_name, fname, TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN);
+	trx_sys_mysql_relay_log_pos = (ib_int64_t) pos;
+
+	if (init_strvar_from_file(fname, sizeof(fname), &info_file, "") ||
+	    init_intvar_from_file(&pos, &info_file, 0)) {
+		end_io_cache(&info_file);
+		error=1;
+		goto relay_info_error;
+	}
+
+	fprintf(stderr,
+		"InnoDB: master log: position %u, file name %s\n",
+		pos, fname);
+
+	strncpy(trx_sys_mysql_master_log_name, fname, TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN);
+	trx_sys_mysql_master_log_pos = (ib_int64_t) pos;
+
+	end_io_cache(&info_file);
+	if (info_fd >= 0)
+		my_close(info_fd, MYF(0));
+	}
+skip_relay:
+#endif /* MYSQL_SERVER */
+#endif /* HAVE_REPLICATION */
+
 	/* Check that values don't overflow on 32-bit systems. */
 	if (sizeof(ulint) == 4) {
 		if (innobase_buffer_pool_size > UINT_MAX32) {
@@ -2519,6 +2622,76 @@
 		goto mem_free_and_error;
 	}
 
+#ifdef HAVE_REPLICATION
+#ifdef MYSQL_SERVER
+	if(innobase_overwrite_relay_log_info) {
+	/* If InnoDB progressed from relay-log.info, overwrite it */
+	if (fname[0] == '\0') {
+		fprintf(stderr,
+			"InnoDB: Something is wrong with the file relay-info.log. InnoDB will not overwrite it.\n");
+	} else if (0 != strcmp(fname, trx_sys_mysql_master_log_name)
+		   || pos != trx_sys_mysql_master_log_pos) {
+		/* Overwrite relay-log.info */
+		bzero((char*) &info_file, sizeof(info_file));
+		fn_format(fname, relay_log_info_file, mysql_data_home, "", 4+32);
+
+		int error = 0;
+
+		if (!access(fname,F_OK)) {
+			/* exist */
+			if ((info_fd = my_open(fname, O_RDWR|O_BINARY, MYF(MY_WME))) < 0) {
+				error = 1;
+			} else if (init_io_cache(&info_file, info_fd, IO_SIZE*2,
+						WRITE_CACHE, 0L, 0, MYF(MY_WME))) {
+				error = 1;
+			}
+
+			if (error) {
+				if (info_fd >= 0)
+					my_close(info_fd, MYF(0));
+				goto skip_overwrite;
+			}
+		} else {
+			error = 1;
+			goto skip_overwrite;
+		}
+
+		char buff[FN_REFLEN*2+22*2+4], *pos;
+
+		my_b_seek(&info_file, 0L);
+		pos=strmov(buff, trx_sys_mysql_relay_log_name);
+		*pos++='\n';
+		pos=longlong2str(trx_sys_mysql_relay_log_pos, pos, 10);
+		*pos++='\n';
+		pos=strmov(pos, trx_sys_mysql_master_log_name);
+		*pos++='\n';
+		pos=longlong2str(trx_sys_mysql_master_log_pos, pos, 10);
+		*pos='\n';
+
+		if (my_b_write(&info_file, (uchar*) buff, (size_t) (pos-buff)+1))
+			error = 1;
+		if (flush_io_cache(&info_file))
+			error = 1;
+
+		end_io_cache(&info_file);
+		if (info_fd >= 0)
+			my_close(info_fd, MYF(0));
+skip_overwrite:
+		if (error) {
+			fprintf(stderr,
+				"InnoDB: ERROR: An error occurred while overwriting relay-log.info.\n");
+		} else {
+			fprintf(stderr,
+				"InnoDB: The file relay-log.info was successfully overwritten.\n");
+		}
+	} else {
+		fprintf(stderr,
+			"InnoDB: InnoDB and relay-log.info are synchronized. InnoDB will not overwrite it.\n");
+	}
+	}
+#endif /* MYSQL_SERVER */
+#endif /* HAVE_REPLICATION */
+
 	innobase_old_blocks_pct = buf_LRU_old_ratio_update(
 		innobase_old_blocks_pct, TRUE);
 
@@ -2631,6 +2804,25 @@
 	trx_t*	trx)	/*!< in: transaction handle */
 {
 	if (trx_is_started(trx)) {
+#ifdef HAVE_REPLICATION
+#ifdef MYSQL_SERVER
+		THD *thd=current_thd;
+
+		if (thd && thd->slave_thread) {
+			/* Update the replication position info inside InnoDB */
+			trx->mysql_master_log_file_name
+				= active_mi->rli.group_master_log_name;
+			trx->mysql_master_log_pos
+				= ((ib_int64_t)active_mi->rli.group_master_log_pos +
+				   ((ib_int64_t)active_mi->rli.future_event_relay_log_pos -
+				    (ib_int64_t)active_mi->rli.group_relay_log_pos));
+			trx->mysql_relay_log_file_name
+				= active_mi->rli.group_relay_log_name;
+			trx->mysql_relay_log_pos
+				= (ib_int64_t)active_mi->rli.future_event_relay_log_pos;
+		}
+#endif /* MYSQL_SERVER */
+#endif /* HAVE_REPLICATION */
 
 		trx_commit_for_mysql(trx);
 	}
@@ -10990,6 +11182,12 @@
   "The common part for InnoDB table spaces.",
   NULL, NULL, NULL);
 
+static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info,
+  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
+  "During InnoDB crash recovery on slave overwrite relay-log.info "
+  "to align master log file position if information in InnoDB and relay-log.info is different.",
+  NULL, NULL, FALSE);
+
 static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
   PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
   "Enable InnoDB doublewrite buffer (enabled by default). "
@@ -11450,6 +11648,7 @@
   MYSQL_SYSVAR(old_blocks_pct),
   MYSQL_SYSVAR(old_blocks_time),
   MYSQL_SYSVAR(open_files),
+  MYSQL_SYSVAR(recovery_update_relay_log),
   MYSQL_SYSVAR(rollback_on_timeout),
   MYSQL_SYSVAR(stats_on_metadata),
   MYSQL_SYSVAR(stats_sample_pages),
diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h
--- a/storage/innobase/include/trx0sys.h	2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/include/trx0sys.h	2010-12-03 15:38:20.321953297 +0900
@@ -53,6 +53,9 @@
 extern ib_int64_t	trx_sys_mysql_master_log_pos;
 /* @} */
 
+extern char		trx_sys_mysql_relay_log_name[];
+extern ib_int64_t	trx_sys_mysql_relay_log_pos;
+
 /** If this MySQL server uses binary logging, after InnoDB has been inited
 and if it has done a crash recovery, we store the binlog file name and position
 here. */
@@ -287,7 +290,8 @@
 void
 trx_sys_update_mysql_binlog_offset(
 /*===============================*/
-	const char*	file_name,/*!< in: MySQL log file name */
+	trx_sysf_t*	sys_header,
+	const char*	file_name_in,/*!< in: MySQL log file name */
 	ib_int64_t	offset,	/*!< in: position in that log file */
 	ulint		field,	/*!< in: offset of the MySQL log info field in
 				the trx sys header */
@@ -482,6 +486,7 @@
 @see trx_sys_mysql_master_log_name
 @see trx_sys_mysql_bin_log_name */
 #define TRX_SYS_MYSQL_LOG_NAME_LEN	512
+#define TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN	480	/* (500 - 12) is dead line. */
 /** Contents of TRX_SYS_MYSQL_LOG_MAGIC_N_FLD */
 #define TRX_SYS_MYSQL_LOG_MAGIC_N	873422344
 
@@ -491,6 +496,7 @@
 /** The offset of the MySQL replication info in the trx system header;
 this contains the same fields as TRX_SYS_MYSQL_LOG_INFO below */
 #define TRX_SYS_MYSQL_MASTER_LOG_INFO	(UNIV_PAGE_SIZE - 2000)
+#define TRX_SYS_MYSQL_RELAY_LOG_INFO	(UNIV_PAGE_SIZE - 1500)
 
 /** The offset of the MySQL binlog offset info in the trx system header */
 #define TRX_SYS_MYSQL_LOG_INFO		(UNIV_PAGE_SIZE - 1000)
diff -ruN a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
--- a/storage/innobase/include/trx0trx.h	2010-12-03 15:18:48.894955550 +0900
+++ b/storage/innobase/include/trx0trx.h	2010-12-03 15:38:20.323953416 +0900
@@ -569,6 +569,21 @@
 	ib_int64_t	mysql_log_offset;/* if MySQL binlog is used, this field
 					contains the end offset of the binlog
 					entry */
+	const char*	mysql_master_log_file_name;
+					/* if the database server is a MySQL
+					replication slave, we have here the
+					master binlog name up to which
+					replication has processed; otherwise
+					this is a pointer to a null
+					character */
+	ib_int64_t	mysql_master_log_pos;
+					/* if the database server is a MySQL
+					replication slave, this is the
+					position in the log file up to which
+					replication has processed */
+	const char*	mysql_relay_log_file_name;
+	ib_int64_t	mysql_relay_log_pos;
+
 	os_thread_id_t	mysql_thread_id;/* id of the MySQL thread associated
 					with this transaction object */
 	ulint		mysql_process_no;/* since in Linux, 'top' reports
diff -ruN a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c
--- a/storage/innobase/trx/trx0sys.c	2010-11-03 07:01:13.000000000 +0900
+++ b/storage/innobase/trx/trx0sys.c	2010-12-03 15:38:20.325956917 +0900
@@ -75,13 +75,16 @@
 file name and position here. */
 /* @{ */
 /** Master binlog file name */
-UNIV_INTERN char	trx_sys_mysql_master_log_name[TRX_SYS_MYSQL_LOG_NAME_LEN];
+UNIV_INTERN char	trx_sys_mysql_master_log_name[TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN];
 /** Master binlog file position.  We have successfully got the updates
 up to this position.  -1 means that no crash recovery was needed, or
 there was no master log position info inside InnoDB.*/
 UNIV_INTERN ib_int64_t	trx_sys_mysql_master_log_pos	= -1;
 /* @} */
 
+UNIV_INTERN char	trx_sys_mysql_relay_log_name[TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN];
+UNIV_INTERN ib_int64_t	trx_sys_mysql_relay_log_pos	= -1;
+
 /** If this MySQL server uses binary logging, after InnoDB has been inited
 and if it has done a crash recovery, we store the binlog file name and position
 here. */
@@ -683,23 +686,25 @@
 void
 trx_sys_update_mysql_binlog_offset(
 /*===============================*/
-	const char*	file_name,/*!< in: MySQL log file name */
+	trx_sysf_t*	sys_header,
+	const char*	file_name_in,/*!< in: MySQL log file name */
 	ib_int64_t	offset,	/*!< in: position in that log file */
 	ulint		field,	/*!< in: offset of the MySQL log info field in
 				the trx sys header */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
-	trx_sysf_t*	sys_header;
+	const char*	file_name;
 
-	if (ut_strlen(file_name) >= TRX_SYS_MYSQL_LOG_NAME_LEN) {
+	if (ut_strlen(file_name_in) >= TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN) {
 
 		/* We cannot fit the name to the 512 bytes we have reserved */
+		/* -> To store relay log file information, file_name must fit to the 480 bytes */
 
-		return;
+		file_name = "";
+	} else {
+		file_name = file_name_in;
 	}
 
-	sys_header = trx_sysf_get(mtr);
-
 	if (mach_read_from_4(sys_header + field
 			     + TRX_SYS_MYSQL_LOG_MAGIC_N_FLD)
 	    != TRX_SYS_MYSQL_LOG_MAGIC_N) {
@@ -821,13 +826,26 @@
 					 + TRX_SYS_MYSQL_LOG_OFFSET_LOW),
 		sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
 		+ TRX_SYS_MYSQL_LOG_NAME);
+
+	fprintf(stderr,
+		"InnoDB: and relay log file\n"
+		"InnoDB: position %lu %lu, file name %s\n",
+		(ulong) mach_read_from_4(sys_header
+					 + TRX_SYS_MYSQL_RELAY_LOG_INFO
+					 + TRX_SYS_MYSQL_LOG_OFFSET_HIGH),
+		(ulong) mach_read_from_4(sys_header
+					 + TRX_SYS_MYSQL_RELAY_LOG_INFO
+					 + TRX_SYS_MYSQL_LOG_OFFSET_LOW),
+		sys_header + TRX_SYS_MYSQL_RELAY_LOG_INFO
+		+ TRX_SYS_MYSQL_LOG_NAME);
+
 	/* Copy the master log position info to global variables we can
 	use in ha_innobase.cc to initialize glob_mi to right values */
 
 	ut_memcpy(trx_sys_mysql_master_log_name,
 		  sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
 		  + TRX_SYS_MYSQL_LOG_NAME,
-		  TRX_SYS_MYSQL_LOG_NAME_LEN);
+		  TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN);
 
 	trx_sys_mysql_master_log_pos
 		= (((ib_int64_t) mach_read_from_4(
@@ -836,6 +854,19 @@
 		+ ((ib_int64_t) mach_read_from_4(
 			   sys_header + TRX_SYS_MYSQL_MASTER_LOG_INFO
 			   + TRX_SYS_MYSQL_LOG_OFFSET_LOW));
+
+	ut_memcpy(trx_sys_mysql_relay_log_name,
+		  sys_header + TRX_SYS_MYSQL_RELAY_LOG_INFO
+		  + TRX_SYS_MYSQL_LOG_NAME,
+		  TRX_SYS_MYSQL_MASTER_LOG_NAME_LEN);
+
+	trx_sys_mysql_relay_log_pos
+		= (((ib_int64_t) mach_read_from_4(
+			    sys_header + TRX_SYS_MYSQL_RELAY_LOG_INFO
+			    + TRX_SYS_MYSQL_LOG_OFFSET_HIGH)) << 32)
+		+ ((ib_int64_t) mach_read_from_4(
+			   sys_header + TRX_SYS_MYSQL_RELAY_LOG_INFO
+			   + TRX_SYS_MYSQL_LOG_OFFSET_LOW));
 	mtr_commit(&mtr);
 }
 
diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
--- a/storage/innobase/trx/trx0trx.c	2010-12-03 15:37:45.549028990 +0900
+++ b/storage/innobase/trx/trx0trx.c	2010-12-03 15:38:20.328957217 +0900
@@ -136,6 +136,10 @@
 
 	trx->mysql_log_file_name = NULL;
 	trx->mysql_log_offset = 0;
+	trx->mysql_master_log_file_name = "";
+	trx->mysql_master_log_pos = 0;
+	trx->mysql_relay_log_file_name = "";
+	trx->mysql_relay_log_pos = 0;
 
 	mutex_create(trx_undo_mutex_key, &trx->undo_mutex, SYNC_TRX_UNDO);
 
@@ -766,6 +770,7 @@
 {
 	mtr_t		mtr;
 	trx_rseg_t*	rseg;
+	trx_sysf_t*	sys_header = NULL;
 
 	ut_ad(!mutex_own(&kernel_mutex));
 
@@ -819,8 +824,12 @@
 
 	if (trx->mysql_log_file_name
 	    && trx->mysql_log_file_name[0] != '\0') {
+		if (!sys_header) {
+			sys_header = trx_sysf_get(&mtr);
+		}
 
 		trx_sys_update_mysql_binlog_offset(
+			sys_header,
 			trx->mysql_log_file_name,
 			trx->mysql_log_offset,
 			TRX_SYS_MYSQL_LOG_INFO, &mtr);
@@ -828,6 +837,27 @@
 		trx->mysql_log_file_name = NULL;
 	}
 
+	if (trx->mysql_master_log_file_name[0] != '\0') {
+		/* This database server is a MySQL replication slave */
+		if (!sys_header) {
+			sys_header = trx_sysf_get(&mtr);
+		}
+
+		trx_sys_update_mysql_binlog_offset(
+			sys_header,
+			trx->mysql_relay_log_file_name,
+			trx->mysql_relay_log_pos,
+			TRX_SYS_MYSQL_RELAY_LOG_INFO, &mtr);
+
+		trx_sys_update_mysql_binlog_offset(
+			sys_header,
+			trx->mysql_master_log_file_name,
+			trx->mysql_master_log_pos,
+			TRX_SYS_MYSQL_MASTER_LOG_INFO, &mtr);
+
+		trx->mysql_master_log_file_name = "";
+	}
+
 	/* The following call commits the mini-transaction, making the
 	whole transaction committed in the file-based world, at this
 	log sequence number. The transaction becomes 'durable' when