1
1
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/btr/btr0btr.c mysql-5.1.46/storage/innodb_plugin/btr/btr0btr.c
2
2
--- mysql-5.1.46_orig/storage/innodb_plugin/btr/btr0btr.c 2010-04-06 23:07:11.000000000 +0900
3
+++ mysql-5.1.46/storage/innodb_plugin/btr/btr0btr.c 2010-05-12 16:26:07.000000000 +0900
3
+++ mysql-5.1.46/storage/innodb_plugin/btr/btr0btr.c 2010-06-07 18:27:33.920911696 +0900
5
5
/**************************************************************//**
6
6
Gets the root node of a tree and x-latches it.
21
21
/*===================*/
22
22
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/buf/buf0buf.c mysql-5.1.46/storage/innodb_plugin/buf/buf0buf.c
23
23
--- mysql-5.1.46_orig/storage/innodb_plugin/buf/buf0buf.c 2010-04-06 23:07:12.000000000 +0900
24
+++ mysql-5.1.46/storage/innodb_plugin/buf/buf0buf.c 2010-05-12 16:26:07.000000000 +0900
24
+++ mysql-5.1.46/storage/innodb_plugin/buf/buf0buf.c 2010-06-07 18:27:33.923944429 +0900
25
25
@@ -358,7 +358,7 @@
42
42
bpage->offset, buf_page_get_zip_size(bpage),
43
43
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/buf/buf0rea.c mysql-5.1.46/storage/innodb_plugin/buf/buf0rea.c
44
44
--- mysql-5.1.46_orig/storage/innodb_plugin/buf/buf0rea.c 2010-04-06 23:07:12.000000000 +0900
45
+++ mysql-5.1.46/storage/innodb_plugin/buf/buf0rea.c 2010-05-12 16:26:07.000000000 +0900
45
+++ mysql-5.1.46/storage/innodb_plugin/buf/buf0rea.c 2010-06-07 18:29:41.373922507 +0900
46
46
@@ -120,6 +120,45 @@
47
47
bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip,
48
48
tablespace_version, offset);
143
143
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/fil/fil0fil.c mysql-5.1.46/storage/innodb_plugin/fil/fil0fil.c
144
144
--- mysql-5.1.46_orig/storage/innodb_plugin/fil/fil0fil.c 2010-04-06 23:07:12.000000000 +0900
145
+++ mysql-5.1.46/storage/innodb_plugin/fil/fil0fil.c 2010-05-12 16:26:07.000000000 +0900
145
+++ mysql-5.1.46/storage/innodb_plugin/fil/fil0fil.c 2010-08-24 19:04:11.158519001 +0900
146
146
@@ -283,7 +283,7 @@
148
148
/** The tablespace memory cache. This variable is NULL before the module is
440
440
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/ibuf/ibuf0ibuf.c mysql-5.1.46/storage/innodb_plugin/ibuf/ibuf0ibuf.c
441
441
--- mysql-5.1.46_orig/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-04-06 23:07:12.000000000 +0900
442
+++ mysql-5.1.46/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-05-12 16:26:07.000000000 +0900
442
+++ mysql-5.1.46/storage/innodb_plugin/ibuf/ibuf0ibuf.c 2010-06-07 18:27:33.943898424 +0900
443
443
@@ -1055,6 +1055,9 @@
445
445
ut_ad(!recv_no_ibuf_operations);
463
463
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/include/srv0srv.h mysql-5.1.46/storage/innodb_plugin/include/srv0srv.h
464
464
--- mysql-5.1.46_orig/storage/innodb_plugin/include/srv0srv.h 2010-04-06 23:07:13.000000000 +0900
465
+++ mysql-5.1.46/storage/innodb_plugin/include/srv0srv.h 2010-05-12 16:26:07.000000000 +0900
465
+++ mysql-5.1.46/storage/innodb_plugin/include/srv0srv.h 2010-10-20 17:26:39.471127453 +0900
467
467
extern ulong srv_max_purge_lag;
469
469
extern ulong srv_replication_delay;
471
471
+extern ibool srv_read_only;
472
472
+extern ibool srv_fake_write;
473
+extern ibool srv_apply_log_only;
473
474
/*-------------------------------------------*/
475
476
extern ulint srv_n_rows_inserted;
476
477
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/include/srv0start.h mysql-5.1.46/storage/innodb_plugin/include/srv0start.h
477
478
--- mysql-5.1.46_orig/storage/innodb_plugin/include/srv0start.h 2010-04-06 23:07:13.000000000 +0900
478
+++ mysql-5.1.46/storage/innodb_plugin/include/srv0start.h 2010-05-12 16:26:07.000000000 +0900
479
+++ mysql-5.1.46/storage/innodb_plugin/include/srv0start.h 2010-06-07 18:27:33.949899579 +0900
479
480
@@ -91,6 +91,8 @@
480
481
/** Log sequence number immediately after startup */
481
482
extern ib_uint64_t srv_start_lsn;
488
489
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/include/ut0byte.ic mysql-5.1.46/storage/innodb_plugin/include/ut0byte.ic
489
490
--- mysql-5.1.46_orig/storage/innodb_plugin/include/ut0byte.ic 2010-04-06 23:07:13.000000000 +0900
490
+++ mysql-5.1.46/storage/innodb_plugin/include/ut0byte.ic 2010-05-12 16:26:07.000000000 +0900
491
+++ mysql-5.1.46/storage/innodb_plugin/include/ut0byte.ic 2010-06-07 18:27:33.950903922 +0900
491
492
@@ -168,6 +168,14 @@
492
493
dulint a, /*!< in: dulint */
493
494
ulint b) /*!< in: ulint */
532
533
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/log/log0log.c mysql-5.1.46/storage/innodb_plugin/log/log0log.c
533
534
--- mysql-5.1.46_orig/storage/innodb_plugin/log/log0log.c 2010-04-06 23:07:13.000000000 +0900
534
+++ mysql-5.1.46/storage/innodb_plugin/log/log0log.c 2010-05-12 16:26:07.000000000 +0900
535
+++ mysql-5.1.46/storage/innodb_plugin/log/log0log.c 2010-10-20 17:27:23.837158511 +0900
535
536
@@ -564,7 +564,9 @@
537
538
offset = (gr_lsn_size_offset + difference) % group_size;
551
552
/* Recovery is running and no operations on the log files are
552
553
allowed yet (the variable name .._no_ibuf_.. is misleading) */
555
@@ -3089,6 +3091,7 @@
556
for the 'very fast' shutdown, because the InnoDB layer may have
557
committed or prepared transactions and we don't want to lose them. */
559
+ if (!srv_apply_log_only) {
560
if (trx_n_mysql_transactions > 0
561
|| UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {
563
@@ -3096,6 +3099,7 @@
569
if (srv_fast_shutdown == 2) {
570
/* In this fastest shutdown we do not flush the buffer pool:
554
571
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/log/log0recv.c mysql-5.1.46/storage/innodb_plugin/log/log0recv.c
555
572
--- mysql-5.1.46_orig/storage/innodb_plugin/log/log0recv.c 2010-04-06 23:07:13.000000000 +0900
556
+++ mysql-5.1.46/storage/innodb_plugin/log/log0recv.c 2010-05-12 16:26:07.000000000 +0900
573
+++ mysql-5.1.46/storage/innodb_plugin/log/log0recv.c 2010-10-20 17:28:01.225196579 +0900
557
574
@@ -42,27 +42,27 @@
558
575
#include "trx0undo.h"
559
576
#include "trx0rec.h"
697
714
contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,
715
@@ -3284,6 +3291,7 @@
716
that the data dictionary tables will be free of any locks.
717
The data dictionary latch should guarantee that there is at
718
most one data dictionary transaction active at a time. */
719
+ if (!srv_apply_log_only)
720
trx_rollback_or_clean_recovered(FALSE);
698
723
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/os/os0file.c mysql-5.1.46/storage/innodb_plugin/os/os0file.c
699
724
--- mysql-5.1.46_orig/storage/innodb_plugin/os/os0file.c 2010-04-06 23:07:14.000000000 +0900
700
+++ mysql-5.1.46/storage/innodb_plugin/os/os0file.c 2010-05-12 16:26:07.000000000 +0900
725
+++ mysql-5.1.46/storage/innodb_plugin/os/os0file.c 2010-06-07 18:27:33.972898477 +0900
701
726
@@ -514,7 +514,7 @@
753
778
if ((ulint)ret == n) {
754
779
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/os/os0thread.c mysql-5.1.46/storage/innodb_plugin/os/os0thread.c
755
780
--- mysql-5.1.46_orig/storage/innodb_plugin/os/os0thread.c 2010-04-06 23:07:14.000000000 +0900
756
+++ mysql-5.1.46/storage/innodb_plugin/os/os0thread.c 2010-05-12 16:26:07.000000000 +0900
781
+++ mysql-5.1.46/storage/innodb_plugin/os/os0thread.c 2010-06-07 18:27:33.974943797 +0900
757
782
@@ -287,12 +287,17 @@
758
783
#elif defined(__NETWARE__)
759
784
delay(tm / 1000);
775
800
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/row/row0merge.c mysql-5.1.46/storage/innodb_plugin/row/row0merge.c
776
801
--- mysql-5.1.46_orig/storage/innodb_plugin/row/row0merge.c 2010-04-06 23:07:14.000000000 +0900
777
+++ mysql-5.1.46/storage/innodb_plugin/row/row0merge.c 2010-05-12 16:26:07.000000000 +0900
802
+++ mysql-5.1.46/storage/innodb_plugin/row/row0merge.c 2010-06-07 18:27:33.975896904 +0900
778
803
@@ -453,7 +453,9 @@
779
804
rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);
780
805
offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);
812
837
secondary index entries for merge sort */
813
838
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/srv/srv0srv.c mysql-5.1.46/storage/innodb_plugin/srv/srv0srv.c
814
839
--- mysql-5.1.46_orig/storage/innodb_plugin/srv/srv0srv.c 2010-04-06 23:07:14.000000000 +0900
815
+++ mysql-5.1.46/storage/innodb_plugin/srv/srv0srv.c 2010-05-12 16:26:07.000000000 +0900
840
+++ mysql-5.1.46/storage/innodb_plugin/srv/srv0srv.c 2010-10-20 17:33:40.350528861 +0900
818
843
UNIV_INTERN ulong srv_replication_delay = 0;
820
845
+UNIV_INTERN ibool srv_read_only = FALSE;
821
846
+UNIV_INTERN ibool srv_fake_write = FALSE;
847
+UNIV_INTERN ibool srv_apply_log_only = FALSE;
822
848
/*-------------------------------------------*/
823
849
UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;
824
850
UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
828
854
/* Initialize some INFORMATION SCHEMA internal structures */
849
875
/*********************************************************************//**
850
876
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/srv/srv0start.c mysql-5.1.46/storage/innodb_plugin/srv/srv0start.c
851
877
--- mysql-5.1.46_orig/storage/innodb_plugin/srv/srv0start.c 2010-04-06 23:07:14.000000000 +0900
852
+++ mysql-5.1.46/storage/innodb_plugin/srv/srv0start.c 2010-05-12 16:26:07.000000000 +0900
878
+++ mysql-5.1.46/storage/innodb_plugin/srv/srv0start.c 2010-10-20 17:36:06.661114418 +0900
853
879
@@ -94,6 +94,8 @@
854
880
/** Log sequence number at shutdown */
855
881
UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
887
913
"InnoDB: Error: combined size of log files"
888
914
" must be < 4 GB\n");
889
@@ -1724,7 +1726,18 @@
915
@@ -1578,6 +1580,10 @@
916
are initialized in trx_sys_init_at_db_start(). */
918
recv_recovery_from_checkpoint_finish();
920
+ if (srv_apply_log_only)
921
+ goto skip_processes;
923
if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
924
/* The following call is necessary for the insert
925
buffer to work with multiple tablespaces. We must
926
@@ -1724,7 +1730,18 @@
891
928
if (srv_auto_extend_last_data_file
892
929
&& sum_of_data_file_sizes < tablespace_size_in_header) {
915
952
/* Check that os_fast_mutexes work as expected */
953
@@ -1844,6 +1862,7 @@
954
ibuf_update_max_tablespace_id();
958
srv_file_per_table = srv_file_per_table_original_value;
960
srv_was_started = TRUE;
916
961
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0purge.c mysql-5.1.46/storage/innodb_plugin/trx/trx0purge.c
917
962
--- mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0purge.c 2010-04-06 23:07:14.000000000 +0900
918
+++ mysql-5.1.46/storage/innodb_plugin/trx/trx0purge.c 2010-05-12 16:26:07.000000000 +0900
963
+++ mysql-5.1.46/storage/innodb_plugin/trx/trx0purge.c 2010-06-07 18:27:33.980911072 +0900
919
964
@@ -1091,6 +1091,9 @@
920
965
/* que_thr_t* thr2; */
921
966
ulint old_pages_handled;
926
971
mutex_enter(&(purge_sys->mutex));
928
973
if (purge_sys->trx->n_active_thrs > 0) {
974
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0rseg.c mysql-5.1.46/storage/innodb_plugin/trx/trx0rseg.c
975
--- mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0rseg.c 2010-04-06 23:07:14.000000000 +0900
976
+++ mysql-5.1.46/storage/innodb_plugin/trx/trx0rseg.c 2010-10-20 17:37:40.357160757 +0900
979
mutex_free(&rseg->mutex);
981
+ if (!srv_apply_log_only) {
982
/* There can't be any active transactions. */
983
ut_a(UT_LIST_GET_LEN(rseg->update_undo_list) == 0);
984
ut_a(UT_LIST_GET_LEN(rseg->insert_undo_list) == 0);
987
undo = UT_LIST_GET_FIRST(rseg->update_undo_cached);
989
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0sys.c mysql-5.1.46/storage/innodb_plugin/trx/trx0sys.c
990
--- mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0sys.c 2010-04-06 23:07:14.000000000 +0900
991
+++ mysql-5.1.46/storage/innodb_plugin/trx/trx0sys.c 2010-10-20 17:38:19.744125410 +0900
992
@@ -1602,10 +1602,12 @@
993
UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
996
+ if (!srv_apply_log_only) {
997
ut_a(UT_LIST_GET_LEN(trx_sys->trx_list) == 0);
998
ut_a(UT_LIST_GET_LEN(trx_sys->rseg_list) == 0);
999
ut_a(UT_LIST_GET_LEN(trx_sys->view_list) == 0);
1000
ut_a(UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0);
929
1005
diff -ru mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0trx.c mysql-5.1.46/storage/innodb_plugin/trx/trx0trx.c
930
1006
--- mysql-5.1.46_orig/storage/innodb_plugin/trx/trx0trx.c 2010-04-06 23:07:14.000000000 +0900
931
+++ mysql-5.1.46/storage/innodb_plugin/trx/trx0trx.c 2010-05-12 16:26:07.000000000 +0900
1007
+++ mysql-5.1.46/storage/innodb_plugin/trx/trx0trx.c 2010-06-07 18:27:33.981914301 +0900
932
1008
@@ -462,8 +462,8 @@
933
1009
TRX_ID_PREP_PRINTF(trx->id));