Merge lp:~akopytov/percona-xtrabackup/update-versions-1.6 into lp:percona-xtrabackup/1.6

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 307
Proposed branch: lp:~akopytov/percona-xtrabackup/update-versions-1.6
Merge into: lp:percona-xtrabackup/1.6
Diff against target: 2220 lines (+448/-270)
6 files modified
patches/innodb51_builtin.patch (+9/-7)
patches/innodb55.patch (+67/-63)
patches/xtradb51.patch (+141/-90)
patches/xtradb55.patch (+149/-98)
utils/build.sh (+12/-6)
xtrabackup.c (+70/-6)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/update-versions-1.6
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+83102@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'patches/innodb51_builtin.patch'
--- patches/innodb51_builtin.patch 2011-09-14 12:48:27 +0000
+++ patches/innodb51_builtin.patch 2011-11-27 06:47:26 +0000
@@ -727,15 +727,15 @@
727 /* Recovery is running and no operations on the log files are727 /* Recovery is running and no operations on the log files are
728 allowed yet (the variable name .._no_ibuf_.. is misleading) */728 allowed yet (the variable name .._no_ibuf_.. is misleading) */
729 729
730@@ -3056,6 +3058,7 @@730@@ -3057,6 +3059,7 @@
731 for the 'very fast' shutdown, because the InnoDB layer may have731 shutdown, because the InnoDB layer may have committed or
732 committed or prepared transactions and we don't want to lose them. */732 prepared transactions and we don't want to lose them. */
733 733
734+ if (!srv_apply_log_only) {734+ if (!srv_apply_log_only) {
735 if (trx_n_mysql_transactions > 0735 if (trx_n_mysql_transactions > 0
736 || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {736 || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) {
737 737
738@@ -3063,6 +3066,7 @@738@@ -3064,6 +3067,7 @@
739 739
740 goto loop;740 goto loop;
741 }741 }
@@ -1262,18 +1262,19 @@
1262 if (purge_sys->trx->n_active_thrs > 0) {1262 if (purge_sys->trx->n_active_thrs > 0) {
1263--- a/storage/innobase/trx/trx0trx.c1263--- a/storage/innobase/trx/trx0trx.c
1264+++ b/storage/innobase/trx/trx0trx.c1264+++ b/storage/innobase/trx/trx0trx.c
1265@@ -478,8 +478,8 @@1265@@ -481,9 +481,8 @@
1266 ut_dulint_get_low(trx->id));1266 ut_dulint_get_low(trx->id));
1267 1267
1268 if (srv_force_recovery == 0) {1268 if (srv_force_recovery == 0) {
1269-1269-
1270- trx->conc_state = TRX_PREPARED;1270- trx->conc_state = TRX_PREPARED;
1271- trx_n_prepared++;
1271+ /* xtrabackup should rollback it */1272+ /* xtrabackup should rollback it */
1272+ trx->conc_state = TRX_ACTIVE;1273+ trx->conc_state = TRX_ACTIVE;
1273 } else {1274 } else {
1274 fprintf(stderr,1275 fprintf(stderr,
1275 "InnoDB: Since"1276 "InnoDB: Since"
1276@@ -555,9 +555,9 @@1277@@ -559,10 +558,9 @@
1277 trx->id));1278 trx->id));
1278 1279
1279 if (srv_force_recovery == 0) {1280 if (srv_force_recovery == 0) {
@@ -1281,6 +1282,7 @@
1281+ /* xtrabackup should rollback it */1282+ /* xtrabackup should rollback it */
1282 trx->conc_state1283 trx->conc_state
1283- = TRX_PREPARED;1284- = TRX_PREPARED;
1285- trx_n_prepared++;
1284+ = TRX_ACTIVE;1286+ = TRX_ACTIVE;
1285 } else {1287 } else {
1286 fprintf(stderr,1288 fprintf(stderr,
12871289
=== modified file 'patches/innodb55.patch'
--- patches/innodb55.patch 2011-09-14 12:48:27 +0000
+++ patches/innodb55.patch 2011-11-27 06:47:26 +0000
@@ -1,6 +1,6 @@
1--- a/storage/innobase/btr/btr0btr.c1--- a/storage/innobase/btr/btr0btr.c
2+++ b/storage/innobase/btr/btr0btr.c2+++ b/storage/innobase/btr/btr0btr.c
3@@ -120,7 +120,7 @@3@@ -674,7 +674,7 @@
4 /**************************************************************//**4 /**************************************************************//**
5 Gets the root node of a tree and x-latches it.5 Gets the root node of a tree and x-latches it.
6 @return root page, x-latched */6 @return root page, x-latched */
@@ -9,7 +9,7 @@
9 buf_block_t*9 buf_block_t*
10 btr_root_block_get(10 btr_root_block_get(
11 /*===============*/11 /*===============*/
12@@ -566,7 +566,7 @@12@@ -1123,7 +1123,7 @@
13 /************************************************************//**13 /************************************************************//**
14 Returns the child page of a node pointer and x-latches it.14 Returns the child page of a node pointer and x-latches it.
15 @return child page, x-latched */15 @return child page, x-latched */
@@ -20,7 +20,7 @@
20 /*===================*/20 /*===================*/
21--- a/storage/innobase/buf/buf0buf.c21--- a/storage/innobase/buf/buf0buf.c
22+++ b/storage/innobase/buf/buf0buf.c22+++ b/storage/innobase/buf/buf0buf.c
23@@ -517,7 +517,7 @@23@@ -518,7 +518,7 @@
24 return(TRUE);24 return(TRUE);
25 }25 }
26 26
@@ -29,7 +29,7 @@
29 if (recv_lsn_checks_on) {29 if (recv_lsn_checks_on) {
30 ib_uint64_t current_lsn;30 ib_uint64_t current_lsn;
31 31
32@@ -4056,7 +4056,7 @@32@@ -3668,7 +3668,7 @@
33 recv_recover_page(TRUE, (buf_block_t*) bpage);33 recv_recover_page(TRUE, (buf_block_t*) bpage);
34 }34 }
35 35
@@ -40,7 +40,7 @@
40 bpage->offset, buf_page_get_zip_size(bpage),40 bpage->offset, buf_page_get_zip_size(bpage),
41--- a/storage/innobase/buf/buf0rea.c41--- a/storage/innobase/buf/buf0rea.c
42+++ b/storage/innobase/buf/buf0rea.c42+++ b/storage/innobase/buf/buf0rea.c
43@@ -122,6 +122,45 @@43@@ -124,6 +124,45 @@
44 bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip,44 bpage = buf_page_init_for_read(err, mode, space, zip_size, unzip,
45 tablespace_version, offset);45 tablespace_version, offset);
46 if (bpage == NULL) {46 if (bpage == NULL) {
@@ -86,7 +86,7 @@
86 86
87 return(0);87 return(0);
88 }88 }
89@@ -604,6 +643,50 @@89@@ -768,6 +807,50 @@
90 /* It is a single table tablespace and the .ibd file is90 /* It is a single table tablespace and the .ibd file is
91 missing: do nothing */91 missing: do nothing */
92 92
@@ -233,7 +233,7 @@
233 }233 }
234 234
235 /**********************************************************************//**235 /**********************************************************************//**
236@@ -1463,7 +1480,12 @@236@@ -1464,7 +1481,12 @@
237 the file yet; the following calls will open it and update the237 the file yet; the following calls will open it and update the
238 size fields */238 size fields */
239 239
@@ -247,7 +247,7 @@
247 fil_node_complete_io(node, fil_system, OS_FILE_READ);247 fil_node_complete_io(node, fil_system, OS_FILE_READ);
248 }248 }
249 249
250@@ -1515,7 +1537,12 @@250@@ -1516,7 +1538,12 @@
251 the file yet; the following calls will open it and update the251 the file yet; the following calls will open it and update the
252 size fields */252 size fields */
253 253
@@ -261,7 +261,7 @@
261 fil_node_complete_io(node, fil_system, OS_FILE_READ);261 fil_node_complete_io(node, fil_system, OS_FILE_READ);
262 }262 }
263 263
264@@ -2180,7 +2207,7 @@264@@ -2181,7 +2208,7 @@
265 if (fil_create_new_single_table_tablespace(265 if (fil_create_new_single_table_tablespace(
266 space_id, name, FALSE, flags,266 space_id, name, FALSE, flags,
267 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {267 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
@@ -270,7 +270,7 @@
270 }270 }
271 }271 }
272 272
273@@ -2343,7 +2370,7 @@273@@ -2344,7 +2371,7 @@
274 }274 }
275 275
276 if (success) {276 if (success) {
@@ -279,7 +279,7 @@
279 /* Write a log record about the deletion of the .ibd279 /* Write a log record about the deletion of the .ibd
280 file, so that ibbackup can replay it in the280 file, so that ibbackup can replay it in the
281 --apply-log phase. We use a dummy mtr and the familiar281 --apply-log phase. We use a dummy mtr and the familiar
282@@ -2644,7 +2671,7 @@282@@ -2645,7 +2672,7 @@
283 283
284 mutex_exit(&fil_system->mutex);284 mutex_exit(&fil_system->mutex);
285 285
@@ -288,7 +288,7 @@
288 if (success) {288 if (success) {
289 mtr_t mtr;289 mtr_t mtr;
290 290
291@@ -2835,7 +2862,7 @@291@@ -2836,7 +2863,7 @@
292 292
293 fil_node_create(path, size, space_id, FALSE);293 fil_node_create(path, size, space_id, FALSE);
294 294
@@ -297,7 +297,7 @@
297 {297 {
298 mtr_t mtr;298 mtr_t mtr;
299 299
300@@ -3090,19 +3117,97 @@300@@ -3091,19 +3118,97 @@
301 "InnoDB: open the tablespace file ", stderr);301 "InnoDB: open the tablespace file ", stderr);
302 ut_print_filename(stderr, filepath);302 ut_print_filename(stderr, filepath);
303 fputs("!\n"303 fputs("!\n"
@@ -405,7 +405,7 @@
405 return(FALSE);405 return(FALSE);
406 }406 }
407 407
408@@ -3334,7 +3439,7 @@408@@ -3335,7 +3440,7 @@
409 cannot be ok. */409 cannot be ok. */
410 410
411 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;411 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
@@ -414,7 +414,7 @@
414 if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {414 if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
415 fprintf(stderr,415 fprintf(stderr,
416 "InnoDB: Error: the size of single-table tablespace"416 "InnoDB: Error: the size of single-table tablespace"
417@@ -3475,7 +3580,7 @@417@@ -3476,7 +3581,7 @@
418 idea is to read as much good data as we can and jump over bad data.418 idea is to read as much good data as we can and jump over bad data.
419 @return 0 if ok, -1 if error even after the retries, 1 if at the end419 @return 0 if ok, -1 if error even after the retries, 1 if at the end
420 of the directory */420 of the directory */
@@ -423,7 +423,7 @@
423 int423 int
424 fil_file_readdir_next_file(424 fil_file_readdir_next_file(
425 /*=======================*/425 /*=======================*/
426@@ -3774,15 +3879,97 @@426@@ -3775,15 +3880,97 @@
427 "InnoDB: in InnoDB data dictionary"427 "InnoDB: in InnoDB data dictionary"
428 " has tablespace id %lu,\n"428 " has tablespace id %lu,\n"
429 "InnoDB: but tablespace with that id"429 "InnoDB: but tablespace with that id"
@@ -529,7 +529,7 @@
529 } else {529 } else {
530 ut_print_timestamp(stderr);530 ut_print_timestamp(stderr);
531 fputs(" InnoDB: Error: table ", stderr);531 fputs(" InnoDB: Error: table ", stderr);
532@@ -4171,7 +4358,7 @@532@@ -4172,7 +4359,7 @@
533 off the LRU list if it is in the LRU list. The caller must hold the fil_sys533 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
534 mutex. */534 mutex. */
535 static535 static
@@ -538,7 +538,7 @@
538 fil_node_prepare_for_io(538 fil_node_prepare_for_io(
539 /*====================*/539 /*====================*/
540 fil_node_t* node, /*!< in: file node */540 fil_node_t* node, /*!< in: file node */
541@@ -4191,10 +4378,13 @@541@@ -4192,10 +4379,13 @@
542 }542 }
543 543
544 if (node->open == FALSE) {544 if (node->open == FALSE) {
@@ -553,7 +553,7 @@
553 }553 }
554 554
555 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE555 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
556@@ -4207,6 +4397,8 @@556@@ -4208,6 +4398,8 @@
557 }557 }
558 558
559 node->n_pending++;559 node->n_pending++;
@@ -562,7 +562,7 @@
562 }562 }
563 563
564 /********************************************************************//**564 /********************************************************************//**
565@@ -4391,6 +4583,16 @@565@@ -4390,6 +4582,16 @@
566 566
567 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));567 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));
568 568
@@ -581,7 +581,7 @@
581 for (;;) {581 for (;;) {
582--- a/storage/innobase/ibuf/ibuf0ibuf.c582--- a/storage/innobase/ibuf/ibuf0ibuf.c
583+++ b/storage/innobase/ibuf/ibuf0ibuf.c583+++ b/storage/innobase/ibuf/ibuf0ibuf.c
584@@ -1160,6 +1160,9 @@584@@ -1148,6 +1148,9 @@
585 ut_ad(!recv_no_ibuf_operations);585 ut_ad(!recv_no_ibuf_operations);
586 ut_ad(x_latch || mtr == NULL);586 ut_ad(x_latch || mtr == NULL);
587 587
@@ -591,7 +591,7 @@
591 if (ibuf_fixed_addr_page(space, zip_size, page_no)) {591 if (ibuf_fixed_addr_page(space, zip_size, page_no)) {
592 592
593 return(TRUE);593 return(TRUE);
594@@ -2674,6 +2677,9 @@594@@ -2715,6 +2718,9 @@
595 ulint n_bytes;595 ulint n_bytes;
596 ulint n_pag2;596 ulint n_pag2;
597 597
@@ -603,7 +603,7 @@
603 603
604--- a/storage/innobase/include/srv0srv.h604--- a/storage/innobase/include/srv0srv.h
605+++ b/storage/innobase/include/srv0srv.h605+++ b/storage/innobase/include/srv0srv.h
606@@ -216,6 +216,10 @@606@@ -218,6 +218,10 @@
607 extern ulong srv_max_purge_lag;607 extern ulong srv_max_purge_lag;
608 608
609 extern ulong srv_replication_delay;609 extern ulong srv_replication_delay;
@@ -647,21 +647,24 @@
647 allowed yet (the variable name .._no_ibuf_.. is misleading) */647 allowed yet (the variable name .._no_ibuf_.. is misleading) */
648 648
649@@ -3114,6 +3116,7 @@649@@ -3114,6 +3116,7 @@
650 for the 'very fast' shutdown, because the InnoDB layer may have650 shutdown, because the InnoDB layer may have committed or
651 committed or prepared transactions and we don't want to lose them. */651 prepared transactions and we don't want to lose them. */
652 652
653+ if (!srv_apply_log_only) {653+ if (!srv_apply_log_only) {
654 if (trx_n_mysql_transactions > 0654 server_busy = trx_n_mysql_transactions > 0
655 || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {655 || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared;
656 656 mutex_exit(&kernel_mutex);
657@@ -3121,6 +3124,7 @@657@@ -3121,6 +3124,10 @@
658 658 if (server_busy || srv_is_any_background_thread_active()) {
659 goto loop;659 goto loop;
660 }660 }
661+ }661+ }
662+ else {
663+ mutex_exit(&kernel_mutex);
664+ }
662 665
663 if (srv_fast_shutdown == 2) {666 mutex_enter(&log_sys->mutex);
664 /* In this fastest shutdown we do not flush the buffer pool:667 server_busy = log_sys->n_pending_checkpoint_writes
665--- a/storage/innobase/log/log0recv.c668--- a/storage/innobase/log/log0recv.c
666+++ b/storage/innobase/log/log0recv.c669+++ b/storage/innobase/log/log0recv.c
667@@ -42,27 +42,27 @@670@@ -42,27 +42,27 @@
@@ -870,7 +873,7 @@
870 if ((ulint)ret == n) {873 if ((ulint)ret == n) {
871--- a/storage/innobase/os/os0thread.c874--- a/storage/innobase/os/os0thread.c
872+++ b/storage/innobase/os/os0thread.c875+++ b/storage/innobase/os/os0thread.c
873@@ -266,12 +266,17 @@876@@ -251,11 +251,16 @@
874 #ifdef __WIN__877 #ifdef __WIN__
875 Sleep((DWORD) tm / 1000);878 Sleep((DWORD) tm / 1000);
876 #else879 #else
@@ -887,7 +890,6 @@
887+*/890+*/
888 #endif891 #endif
889 }892 }
890
891--- a/storage/innobase/row/row0merge.c893--- a/storage/innobase/row/row0merge.c
892+++ b/storage/innobase/row/row0merge.c894+++ b/storage/innobase/row/row0merge.c
893@@ -459,7 +459,9 @@895@@ -459,7 +459,9 @@
@@ -914,7 +916,7 @@
914 mem_heap_free(heap);916 mem_heap_free(heap);
915 return(DB_DUPLICATE_KEY);917 return(DB_DUPLICATE_KEY);
916 }918 }
917@@ -2628,7 +2632,9 @@919@@ -2627,7 +2631,9 @@
918 920
919 /* Reset the MySQL row buffer that is used when reporting921 /* Reset the MySQL row buffer that is used when reporting
920 duplicate keys. */922 duplicate keys. */
@@ -927,7 +929,7 @@
927 secondary index entries for merge sort */929 secondary index entries for merge sort */
928--- a/storage/innobase/srv/srv0srv.c930--- a/storage/innobase/srv/srv0srv.c
929+++ b/storage/innobase/srv/srv0srv.c931+++ b/storage/innobase/srv/srv0srv.c
930@@ -401,6 +401,9 @@932@@ -399,6 +399,9 @@
931 933
932 UNIV_INTERN ulong srv_replication_delay = 0;934 UNIV_INTERN ulong srv_replication_delay = 0;
933 935
@@ -937,7 +939,7 @@
937 /*-------------------------------------------*/939 /*-------------------------------------------*/
938 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;940 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;
939 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;941 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
940@@ -1099,7 +1102,7 @@942@@ -1078,7 +1081,7 @@
941 }943 }
942 944
943 /* Initialize some INFORMATION SCHEMA internal structures */945 /* Initialize some INFORMATION SCHEMA internal structures */
@@ -946,7 +948,7 @@
946 }948 }
947 949
948 /*********************************************************************//**950 /*********************************************************************//**
949@@ -1110,6 +1113,7 @@951@@ -1089,6 +1092,7 @@
950 /*==========*/952 /*==========*/
951 {953 {
952 os_fast_mutex_free(&srv_conc_mutex);954 os_fast_mutex_free(&srv_conc_mutex);
@@ -954,7 +956,7 @@
954 mem_free(srv_conc_slots);956 mem_free(srv_conc_slots);
955 srv_conc_slots = NULL;957 srv_conc_slots = NULL;
956 958
957@@ -1123,6 +1127,7 @@959@@ -1102,6 +1106,7 @@
958 srv_mysql_table = NULL;960 srv_mysql_table = NULL;
959 961
960 trx_i_s_cache_free(trx_i_s_cache);962 trx_i_s_cache_free(trx_i_s_cache);
@@ -962,7 +964,7 @@
962 }964 }
963 965
964 /*********************************************************************//**966 /*********************************************************************//**
965@@ -1718,7 +1723,7 @@967@@ -1717,7 +1722,7 @@
966 }968 }
967 969
968 /* Record the lock wait time for this thread */970 /* Record the lock wait time for this thread */
@@ -973,7 +975,7 @@
973 if (trx->was_chosen_as_deadlock_victim) {975 if (trx->was_chosen_as_deadlock_victim) {
974--- a/storage/innobase/srv/srv0start.c976--- a/storage/innobase/srv/srv0start.c
975+++ b/storage/innobase/srv/srv0start.c977+++ b/storage/innobase/srv/srv0start.c
976@@ -94,6 +94,8 @@978@@ -93,6 +93,8 @@
977 /** Log sequence number at shutdown */979 /** Log sequence number at shutdown */
978 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;980 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
979 981
@@ -982,7 +984,7 @@
982 #ifdef HAVE_DARWIN_THREADS984 #ifdef HAVE_DARWIN_THREADS
983 # include <sys/utsname.h>985 # include <sys/utsname.h>
984 /** TRUE if the F_FULLFSYNC option is available */986 /** TRUE if the F_FULLFSYNC option is available */
985@@ -549,7 +551,7 @@987@@ -548,7 +550,7 @@
986 /*********************************************************************//**988 /*********************************************************************//**
987 Creates or opens the log files and closes them.989 Creates or opens the log files and closes them.
988 @return DB_SUCCESS or error code */990 @return DB_SUCCESS or error code */
@@ -991,7 +993,7 @@
991 ulint993 ulint
992 open_or_create_log_file(994 open_or_create_log_file(
993 /*====================*/995 /*====================*/
994@@ -709,7 +711,7 @@996@@ -708,7 +710,7 @@
995 /*********************************************************************//**997 /*********************************************************************//**
996 Creates or opens database data files and closes them.998 Creates or opens database data files and closes them.
997 @return DB_SUCCESS or error code */999 @return DB_SUCCESS or error code */
@@ -1000,7 +1002,7 @@
1000 ulint1002 ulint
1001 open_or_create_data_files(1003 open_or_create_data_files(
1002 /*======================*/1004 /*======================*/
1003@@ -1414,7 +1416,7 @@1005@@ -1419,7 +1421,7 @@
1004 }1006 }
1005 #endif /* UNIV_LOG_ARCHIVE */1007 #endif /* UNIV_LOG_ARCHIVE */
1006 1008
@@ -1009,7 +1011,7 @@
1009 ut_print_timestamp(stderr);1011 ut_print_timestamp(stderr);
1010 fprintf(stderr,1012 fprintf(stderr,
1011 " InnoDB: Error: combined size of log files"1013 " InnoDB: Error: combined size of log files"
1012@@ -1709,6 +1711,10 @@1014@@ -1714,6 +1716,10 @@
1013 are initialized in trx_sys_init_at_db_start(). */1015 are initialized in trx_sys_init_at_db_start(). */
1014 1016
1015 recv_recovery_from_checkpoint_finish();1017 recv_recovery_from_checkpoint_finish();
@@ -1020,7 +1022,7 @@
1020 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {1022 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
1021 /* The following call is necessary for the insert1023 /* The following call is necessary for the insert
1022 buffer to work with multiple tablespaces. We must1024 buffer to work with multiple tablespaces. We must
1023@@ -1868,6 +1874,17 @@1025@@ -1873,6 +1879,17 @@
1024 if (!srv_auto_extend_last_data_file1026 if (!srv_auto_extend_last_data_file
1025 && sum_of_data_file_sizes != tablespace_size_in_header) {1027 && sum_of_data_file_sizes != tablespace_size_in_header) {
1026 1028
@@ -1038,7 +1040,7 @@
1038 ut_print_timestamp(stderr);1040 ut_print_timestamp(stderr);
1039 fprintf(stderr,1041 fprintf(stderr,
1040 " InnoDB: Error: tablespace size"1042 " InnoDB: Error: tablespace size"
1041@@ -1947,6 +1964,7 @@1043@@ -1952,6 +1969,7 @@
1042 1044
1043 return(DB_ERROR);1045 return(DB_ERROR);
1044 }1046 }
@@ -1046,7 +1048,7 @@
1046 }1048 }
1047 1049
1048 /* Check that os_fast_mutexes work as expected */1050 /* Check that os_fast_mutexes work as expected */
1049@@ -2059,6 +2077,7 @@1051@@ -2064,6 +2082,7 @@
1050 ibuf_update_max_tablespace_id();1052 ibuf_update_max_tablespace_id();
1051 }1053 }
1052 1054
@@ -1054,18 +1056,6 @@
1054 srv_file_per_table = srv_file_per_table_original_value;1056 srv_file_per_table = srv_file_per_table_original_value;
1055 1057
1056 srv_was_started = TRUE;1058 srv_was_started = TRUE;
1057--- a/storage/innobase/trx/trx0purge.c
1058+++ b/storage/innobase/trx/trx0purge.c
1059@@ -1100,6 +1100,9 @@
1060 /* que_thr_t* thr2; */
1061 ulint old_pages_handled;
1062
1063+ if (srv_fake_write)
1064+ return(0);
1065+
1066 mutex_enter(&(purge_sys->mutex));
1067
1068 if (purge_sys->trx->n_active_thrs > 0) {
1069--- a/storage/innobase/trx/trx0rseg.c1059--- a/storage/innobase/trx/trx0rseg.c
1070+++ b/storage/innobase/trx/trx0rseg.c1060+++ b/storage/innobase/trx/trx0rseg.c
1071@@ -140,9 +140,11 @@1061@@ -140,9 +140,11 @@
@@ -1082,7 +1072,7 @@
1082 1072
1083--- a/storage/innobase/trx/trx0sys.c1073--- a/storage/innobase/trx/trx0sys.c
1084+++ b/storage/innobase/trx/trx0sys.c1074+++ b/storage/innobase/trx/trx0sys.c
1085@@ -1641,10 +1641,12 @@1075@@ -1686,10 +1686,12 @@
1086 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);1076 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
1087 }1077 }
1088 1078
@@ -1097,18 +1087,19 @@
1097 1087
1098--- a/storage/innobase/trx/trx0trx.c1088--- a/storage/innobase/trx/trx0trx.c
1099+++ b/storage/innobase/trx/trx0trx.c1089+++ b/storage/innobase/trx/trx0trx.c
1100@@ -469,8 +469,8 @@1090@@ -522,9 +522,8 @@
1101 (ullint) trx->id);1091 (ullint) trx->id);
1102 1092
1103 if (srv_force_recovery == 0) {1093 if (srv_force_recovery == 0) {
1104-1094-
1105- trx->conc_state = TRX_PREPARED;1095- trx->conc_state = TRX_PREPARED;
1096- trx_n_prepared++;
1106+ /* xtrabackup should rollback it */1097+ /* xtrabackup should rollback it */
1107+ trx->conc_state = TRX_ACTIVE;1098+ trx->conc_state = TRX_ACTIVE;
1108 } else {1099 } else {
1109 fprintf(stderr,1100 fprintf(stderr,
1110 "InnoDB: Since"1101 "InnoDB: Since"
1111@@ -544,9 +544,9 @@1102@@ -598,10 +597,9 @@
1112 (ullint) trx->id);1103 (ullint) trx->id);
1113 1104
1114 if (srv_force_recovery == 0) {1105 if (srv_force_recovery == 0) {
@@ -1116,7 +1107,20 @@
1116+ /* xtrabackup should rollback it */1107+ /* xtrabackup should rollback it */
1117 trx->conc_state1108 trx->conc_state
1118- = TRX_PREPARED;1109- = TRX_PREPARED;
1110- trx_n_prepared++;
1119+ = TRX_ACTIVE;1111+ = TRX_ACTIVE;
1120 } else {1112 } else {
1121 fprintf(stderr,1113 fprintf(stderr,
1122 "InnoDB: Since"1114 "InnoDB: Since"
1115--- a/storage/innobase/trx/trx0purge.c
1116+++ b/storage/innobase/trx/trx0purge.c
1117@@ -1129,6 +1129,9 @@
1118 que_thr_t* thr;
1119 ulint old_pages_handled;
1120
1121+ if (srv_fake_write)
1122+ return(0);
1123+
1124 ut_a(purge_sys->trx->n_active_thrs == 0);
1125
1126 rw_lock_x_lock(&purge_sys->latch);
11231127
=== modified file 'patches/xtradb51.patch'
--- patches/xtradb51.patch 2011-09-14 12:48:27 +0000
+++ patches/xtradb51.patch 2011-11-27 06:47:26 +0000
@@ -1,6 +1,6 @@
1--- a/storage/innodb_plugin/btr/btr0btr.c1--- a/storage/innodb_plugin/btr/btr0btr.c
2+++ b/storage/innodb_plugin/btr/btr0btr.c2+++ b/storage/innodb_plugin/btr/btr0btr.c
3@@ -120,7 +120,7 @@3@@ -674,7 +674,7 @@
4 /**************************************************************//**4 /**************************************************************//**
5 Gets the root node of a tree and x-latches it.5 Gets the root node of a tree and x-latches it.
6 @return root page, x-latched */6 @return root page, x-latched */
@@ -9,7 +9,7 @@
9 buf_block_t*9 buf_block_t*
10 btr_root_block_get(10 btr_root_block_get(
11 /*===============*/11 /*===============*/
12@@ -578,7 +578,7 @@12@@ -1134,7 +1134,7 @@
13 /************************************************************//**13 /************************************************************//**
14 Returns the child page of a node pointer and x-latches it.14 Returns the child page of a node pointer and x-latches it.
15 @return child page, x-latched */15 @return child page, x-latched */
@@ -20,7 +20,7 @@
20 /*===================*/20 /*===================*/
21--- a/storage/innodb_plugin/buf/buf0buf.c21--- a/storage/innodb_plugin/buf/buf0buf.c
22+++ b/storage/innodb_plugin/buf/buf0buf.c22+++ b/storage/innodb_plugin/buf/buf0buf.c
23@@ -440,7 +440,7 @@23@@ -412,7 +412,7 @@
24 return(TRUE);24 return(TRUE);
25 }25 }
26 26
@@ -29,7 +29,7 @@
29 if (recv_lsn_checks_on) {29 if (recv_lsn_checks_on) {
30 ib_uint64_t current_lsn;30 ib_uint64_t current_lsn;
31 31
32@@ -4030,7 +4030,7 @@32@@ -3302,7 +3302,7 @@
33 recv_recover_page(TRUE, (buf_block_t*) bpage);33 recv_recover_page(TRUE, (buf_block_t*) bpage);
34 }34 }
35 35
@@ -40,7 +40,7 @@
40 (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL :40 (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL :
41--- a/storage/innodb_plugin/fil/fil0fil.c41--- a/storage/innodb_plugin/fil/fil0fil.c
42+++ b/storage/innodb_plugin/fil/fil0fil.c42+++ b/storage/innodb_plugin/fil/fil0fil.c
43@@ -294,7 +294,7 @@43@@ -297,7 +297,7 @@
44 44
45 /** The tablespace memory cache. This variable is NULL before the module is45 /** The tablespace memory cache. This variable is NULL before the module is
46 initialized. */46 initialized. */
@@ -49,7 +49,7 @@
49 49
50 50
51 /********************************************************************//**51 /********************************************************************//**
52@@ -305,7 +305,7 @@52@@ -308,7 +308,7 @@
53 off the LRU list if it is in the LRU list. The caller must hold the fil_sys53 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
54 mutex. */54 mutex. */
55 static55 static
@@ -58,7 +58,7 @@
58 fil_node_prepare_for_io(58 fil_node_prepare_for_io(
59 /*====================*/59 /*====================*/
60 fil_node_t* node, /*!< in: file node */60 fil_node_t* node, /*!< in: file node */
61@@ -630,7 +630,7 @@61@@ -633,7 +633,7 @@
62 Opens a the file of a node of a tablespace. The caller must own the fil_system62 Opens a the file of a node of a tablespace. The caller must own the fil_system
63 mutex. */63 mutex. */
64 static64 static
@@ -67,7 +67,7 @@
67 fil_node_open_file(67 fil_node_open_file(
68 /*===============*/68 /*===============*/
69 fil_node_t* node, /*!< in: file node */69 fil_node_t* node, /*!< in: file node */
70@@ -664,7 +664,17 @@70@@ -667,7 +667,17 @@
71 node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success);71 node->name, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success);
72 if (!success) {72 if (!success) {
73 /* The following call prints an error message */73 /* The following call prints an error message */
@@ -86,7 +86,7 @@
86 86
87 ut_print_timestamp(stderr);87 ut_print_timestamp(stderr);
88 88
89@@ -725,12 +735,14 @@89@@ -728,12 +738,14 @@
90 90
91 if (UNIV_UNLIKELY(space_id != space->id)) {91 if (UNIV_UNLIKELY(space_id != space->id)) {
92 fprintf(stderr,92 fprintf(stderr,
@@ -105,7 +105,7 @@
105 }105 }
106 106
107 if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED107 if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED
108@@ -754,8 +766,8 @@108@@ -757,8 +769,8 @@
109 }109 }
110 110
111 if (size_bytes >= 1024 * 1024) {111 if (size_bytes >= 1024 * 1024) {
@@ -116,7 +116,7 @@
116 }116 }
117 117
118 if (!(flags & DICT_TF_ZSSIZE_MASK)) {118 if (!(flags & DICT_TF_ZSSIZE_MASK)) {
119@@ -800,6 +812,8 @@119@@ -803,6 +815,8 @@
120 /* Put the node to the LRU list */120 /* Put the node to the LRU list */
121 UT_LIST_ADD_FIRST(LRU, system->LRU, node);121 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
122 }122 }
@@ -125,7 +125,7 @@
125 }125 }
126 126
127 /**********************************************************************//**127 /**********************************************************************//**
128@@ -1428,7 +1442,12 @@128@@ -1431,7 +1445,12 @@
129 the file yet; the following calls will open it and update the129 the file yet; the following calls will open it and update the
130 size fields */130 size fields */
131 131
@@ -139,7 +139,7 @@
139 fil_node_complete_io(node, fil_system, OS_FILE_READ);139 fil_node_complete_io(node, fil_system, OS_FILE_READ);
140 }140 }
141 141
142@@ -1480,7 +1499,12 @@142@@ -1483,7 +1502,12 @@
143 the file yet; the following calls will open it and update the143 the file yet; the following calls will open it and update the
144 size fields */144 size fields */
145 145
@@ -153,7 +153,7 @@
153 fil_node_complete_io(node, fil_system, OS_FILE_READ);153 fil_node_complete_io(node, fil_system, OS_FILE_READ);
154 }154 }
155 155
156@@ -2153,7 +2177,7 @@156@@ -2157,7 +2181,7 @@
157 if (fil_create_new_single_table_tablespace(157 if (fil_create_new_single_table_tablespace(
158 space_id, name, FALSE, flags,158 space_id, name, FALSE, flags,
159 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {159 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
@@ -162,7 +162,7 @@
162 }162 }
163 }163 }
164 164
165@@ -2316,7 +2340,7 @@165@@ -2324,7 +2348,7 @@
166 }166 }
167 167
168 if (success) {168 if (success) {
@@ -171,7 +171,7 @@
171 /* Write a log record about the deletion of the .ibd171 /* Write a log record about the deletion of the .ibd
172 file, so that ibbackup can replay it in the172 file, so that ibbackup can replay it in the
173 --apply-log phase. We use a dummy mtr and the familiar173 --apply-log phase. We use a dummy mtr and the familiar
174@@ -2617,7 +2641,7 @@174@@ -2625,7 +2649,7 @@
175 175
176 mutex_exit(&fil_system->mutex);176 mutex_exit(&fil_system->mutex);
177 177
@@ -180,7 +180,7 @@
180 if (success) {180 if (success) {
181 mtr_t mtr;181 mtr_t mtr;
182 182
183@@ -2807,7 +2831,7 @@183@@ -2815,7 +2839,7 @@
184 184
185 fil_node_create(path, size, space_id, FALSE);185 fil_node_create(path, size, space_id, FALSE);
186 186
@@ -189,7 +189,7 @@
189 {189 {
190 mtr_t mtr;190 mtr_t mtr;
191 191
192@@ -3060,19 +3084,97 @@192@@ -3159,19 +3183,97 @@
193 "InnoDB: open the tablespace file ", stderr);193 "InnoDB: open the tablespace file ", stderr);
194 ut_print_filename(stderr, filepath);194 ut_print_filename(stderr, filepath);
195 fputs("!\n"195 fputs("!\n"
@@ -297,7 +297,7 @@
297 return(FALSE);297 return(FALSE);
298 }298 }
299 299
300@@ -3777,7 +3879,7 @@300@@ -4106,7 +4208,7 @@
301 cannot be ok. */301 cannot be ok. */
302 302
303 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;303 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
@@ -306,7 +306,7 @@
306 if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {306 if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
307 fprintf(stderr,307 fprintf(stderr,
308 "InnoDB: Error: the size of single-table tablespace"308 "InnoDB: Error: the size of single-table tablespace"
309@@ -3918,7 +4020,7 @@309@@ -4247,7 +4349,7 @@
310 idea is to read as much good data as we can and jump over bad data.310 idea is to read as much good data as we can and jump over bad data.
311 @return 0 if ok, -1 if error even after the retries, 1 if at the end311 @return 0 if ok, -1 if error even after the retries, 1 if at the end
312 of the directory */312 of the directory */
@@ -315,7 +315,7 @@
315 int315 int
316 fil_file_readdir_next_file(316 fil_file_readdir_next_file(
317 /*=======================*/317 /*=======================*/
318@@ -4217,15 +4319,97 @@318@@ -4546,15 +4648,97 @@
319 "InnoDB: in InnoDB data dictionary"319 "InnoDB: in InnoDB data dictionary"
320 " has tablespace id %lu,\n"320 " has tablespace id %lu,\n"
321 "InnoDB: but tablespace with that id"321 "InnoDB: but tablespace with that id"
@@ -421,7 +421,7 @@
421 } else {421 } else {
422 ut_print_timestamp(stderr);422 ut_print_timestamp(stderr);
423 fputs(" InnoDB: Error: table ", stderr);423 fputs(" InnoDB: Error: table ", stderr);
424@@ -4614,7 +4798,7 @@424@@ -4953,7 +5137,7 @@
425 off the LRU list if it is in the LRU list. The caller must hold the fil_sys425 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
426 mutex. */426 mutex. */
427 static427 static
@@ -430,7 +430,7 @@
430 fil_node_prepare_for_io(430 fil_node_prepare_for_io(
431 /*====================*/431 /*====================*/
432 fil_node_t* node, /*!< in: file node */432 fil_node_t* node, /*!< in: file node */
433@@ -4634,10 +4818,13 @@433@@ -4973,10 +5157,13 @@
434 }434 }
435 435
436 if (node->open == FALSE) {436 if (node->open == FALSE) {
@@ -445,7 +445,7 @@
445 }445 }
446 446
447 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE447 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
448@@ -4650,6 +4837,8 @@448@@ -4989,6 +5176,8 @@
449 }449 }
450 450
451 node->n_pending++;451 node->n_pending++;
@@ -454,7 +454,7 @@
454 }454 }
455 455
456 /********************************************************************//**456 /********************************************************************//**
457@@ -4835,6 +5024,16 @@457@@ -5190,6 +5379,16 @@
458 458
459 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));459 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));
460 460
@@ -473,7 +473,7 @@
473 for (;;) {473 for (;;) {
474--- a/storage/innodb_plugin/handler/ha_innodb.cc474--- a/storage/innodb_plugin/handler/ha_innodb.cc
475+++ b/storage/innodb_plugin/handler/ha_innodb.cc475+++ b/storage/innodb_plugin/handler/ha_innodb.cc
476@@ -343,12 +343,6 @@476@@ -365,12 +365,6 @@
477 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",477 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
478 NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);478 NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);
479 479
@@ -483,14 +483,13 @@
483- "The value 3 regards innodb_flush_log_at_trx_commit (default).",483- "The value 3 regards innodb_flush_log_at_trx_commit (default).",
484- NULL, NULL, 3, 0, 3, 0);484- NULL, NULL, 3, 0, 3, 0);
485-485-
486 486 static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG,
487 static handler *innobase_create_handler(handlerton *hton,487 "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records "
488 TABLE_SHARE *table,488 "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. "
489@@ -729,17 +723,6 @@489@@ -760,17 +754,6 @@
490 return(THDVAR((THD*) thd, lock_wait_timeout));
491 }490 }
492 491
493-/******************************************************************//**492 /******************************************************************//**
494-*/493-*/
495-extern "C" UNIV_INTERN494-extern "C" UNIV_INTERN
496-ulong495-ulong
@@ -501,10 +500,11 @@
501- return(THDVAR((THD*) thd, flush_log_at_trx_commit_session));500- return(THDVAR((THD*) thd, flush_log_at_trx_commit_session));
502-}501-}
503-502-
504 /********************************************************************//**503-/******************************************************************//**
505 Obtain the InnoDB transaction of a MySQL thread.504 Returns true if expand_fast_index_creation is enabled for the current
506 @return reference to transaction pointer */505 session.
507@@ -11775,7 +11758,6 @@506 @return the value of the server's expand_fast_index_creation variable */
507@@ -11966,7 +11949,6 @@
508 MYSQL_SYSVAR(flush_neighbor_pages),508 MYSQL_SYSVAR(flush_neighbor_pages),
509 MYSQL_SYSVAR(read_ahead),509 MYSQL_SYSVAR(read_ahead),
510 MYSQL_SYSVAR(adaptive_checkpoint),510 MYSQL_SYSVAR(adaptive_checkpoint),
@@ -536,11 +536,10 @@
536 536
537--- a/storage/innodb_plugin/include/ha_prototypes.h537--- a/storage/innodb_plugin/include/ha_prototypes.h
538+++ b/storage/innodb_plugin/include/ha_prototypes.h538+++ b/storage/innodb_plugin/include/ha_prototypes.h
539@@ -268,12 +268,4 @@539@@ -269,14 +269,6 @@
540 void* thd); /*!< in: thread handle (THD*), or NULL to query
541 the global innodb_lock_wait_timeout */540 the global innodb_lock_wait_timeout */
542 541
543-/******************************************************************//**542 /******************************************************************//**
544-*/543-*/
545-544-
546-ulong545-ulong
@@ -548,10 +547,13 @@
548-/*================================*/547-/*================================*/
549- void* thd);548- void* thd);
550-549-
551 #endif550-/******************************************************************//**
551 Returns true if innodb_expand_fast_index_creation is enabled for the current
552 session.
553 @return the value of the server's innodb_expand_fast_index_creation variable */
552--- a/storage/innodb_plugin/include/srv0srv.h554--- a/storage/innodb_plugin/include/srv0srv.h
553+++ b/storage/innodb_plugin/include/srv0srv.h555+++ b/storage/innodb_plugin/include/srv0srv.h
554@@ -228,6 +228,10 @@556@@ -226,6 +226,10 @@
555 557
556 extern ulong srv_replication_delay;558 extern ulong srv_replication_delay;
557 559
@@ -575,14 +577,14 @@
575 #endif577 #endif
576--- a/storage/innodb_plugin/include/trx0trx.h578--- a/storage/innodb_plugin/include/trx0trx.h
577+++ b/storage/innodb_plugin/include/trx0trx.h579+++ b/storage/innodb_plugin/include/trx0trx.h
578@@ -497,7 +497,6 @@580@@ -508,7 +508,6 @@
579 FALSE, one can save CPU time and about581 FALSE, one can save CPU time and about
580 150 bytes in the undo log size as then582 150 bytes in the undo log size as then
581 we skip XA steps */583 we skip XA steps */
582- ulint flush_log_at_trx_commit_session;584- ulint flush_log_at_trx_commit_session;
585 ulint fake_changes;
583 ulint flush_log_later;/* In 2PC, we hold the586 ulint flush_log_later;/* In 2PC, we hold the
584 prepare_commit mutex across587 prepare_commit mutex across
585 both phases. In that case, we
586--- a/storage/innodb_plugin/include/ut0byte.ic588--- a/storage/innodb_plugin/include/ut0byte.ic
587+++ b/storage/innodb_plugin/include/ut0byte.ic589+++ b/storage/innodb_plugin/include/ut0byte.ic
588@@ -168,6 +168,14 @@590@@ -168,6 +168,14 @@
@@ -637,15 +639,15 @@
637 /* Recovery is running and no operations on the log files are639 /* Recovery is running and no operations on the log files are
638 allowed yet (the variable name .._no_ibuf_.. is misleading) */640 allowed yet (the variable name .._no_ibuf_.. is misleading) */
639 641
640@@ -3126,6 +3126,7 @@642@@ -3127,6 +3127,7 @@
641 for the 'very fast' shutdown, because the InnoDB layer may have643 shutdown, because the InnoDB layer may have committed or
642 committed or prepared transactions and we don't want to lose them. */644 prepared transactions and we don't want to lose them. */
643 645
644+ if (!srv_apply_log_only) {646+ if (!srv_apply_log_only) {
645 if (trx_n_mysql_transactions > 0647 if (trx_n_mysql_transactions > 0
646 || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {648 || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared) {
647 649
648@@ -3133,6 +3134,7 @@650@@ -3134,6 +3135,7 @@
649 651
650 goto loop;652 goto loop;
651 }653 }
@@ -746,7 +748,7 @@
746 }748 }
747 }749 }
748 750
749@@ -2923,12 +2926,14 @@751@@ -2922,12 +2925,14 @@
750 752
751 if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {753 if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {
752 754
@@ -762,7 +764,7 @@
762 }764 }
763 }765 }
764 766
765@@ -3096,6 +3101,7 @@767@@ -3095,6 +3100,7 @@
766 recv_sys->recovered_lsn = checkpoint_lsn;768 recv_sys->recovered_lsn = checkpoint_lsn;
767 769
768 srv_start_lsn = checkpoint_lsn;770 srv_start_lsn = checkpoint_lsn;
@@ -770,7 +772,7 @@
770 }772 }
771 773
772 contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,774 contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,
773@@ -3454,6 +3460,7 @@775@@ -3453,6 +3459,7 @@
774 that the data dictionary tables will be free of any locks.776 that the data dictionary tables will be free of any locks.
775 The data dictionary latch should guarantee that there is at777 The data dictionary latch should guarantee that there is at
776 most one data dictionary transaction active at a time. */778 most one data dictionary transaction active at a time. */
@@ -780,7 +782,7 @@
780 782
781--- a/storage/innodb_plugin/os/os0file.c783--- a/storage/innodb_plugin/os/os0file.c
782+++ b/storage/innodb_plugin/os/os0file.c784+++ b/storage/innodb_plugin/os/os0file.c
783@@ -554,7 +554,7 @@785@@ -555,7 +555,7 @@
784 }786 }
785 787
786 #undef USE_FILE_LOCK788 #undef USE_FILE_LOCK
@@ -789,7 +791,7 @@
789 #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__)791 #if defined(UNIV_HOTBACKUP) || defined(__WIN__) || defined(__NETWARE__)
790 /* InnoDB Hot Backup does not lock the data files.792 /* InnoDB Hot Backup does not lock the data files.
791 * On Windows, mandatory locking is used.793 * On Windows, mandatory locking is used.
792@@ -1356,8 +1356,9 @@794@@ -1357,8 +1357,9 @@
793 attributes = 0;795 attributes = 0;
794 ut_error;796 ut_error;
795 }797 }
@@ -800,7 +802,7 @@
800 GENERIC_READ | GENERIC_WRITE, /* read and write802 GENERIC_READ | GENERIC_WRITE, /* read and write
801 access */803 access */
802 share_mode, /* File can be read also by other804 share_mode, /* File can be read also by other
803@@ -1416,7 +1417,11 @@805@@ -1417,7 +1418,11 @@
804 if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW806 if (create_mode == OS_FILE_OPEN || create_mode == OS_FILE_OPEN_RAW
805 || create_mode == OS_FILE_OPEN_RETRY) {807 || create_mode == OS_FILE_OPEN_RETRY) {
806 mode_str = "OPEN";808 mode_str = "OPEN";
@@ -813,7 +815,7 @@
813 } else if (create_mode == OS_FILE_CREATE) {815 } else if (create_mode == OS_FILE_CREATE) {
814 mode_str = "CREATE";816 mode_str = "CREATE";
815 create_flag = O_RDWR | O_CREAT | O_EXCL;817 create_flag = O_RDWR | O_CREAT | O_EXCL;
816@@ -2622,6 +2627,9 @@818@@ -2682,6 +2687,9 @@
817 ut_a((offset & 0xFFFFFFFFUL) == offset);819 ut_a((offset & 0xFFFFFFFFUL) == offset);
818 ut_a((n & 0xFFFFFFFFUL) == n);820 ut_a((n & 0xFFFFFFFFUL) == n);
819 821
@@ -823,7 +825,7 @@
823 os_n_file_writes++;825 os_n_file_writes++;
824 826
825 ut_ad(file);827 ut_ad(file);
826@@ -2746,6 +2754,9 @@828@@ -2806,6 +2814,9 @@
827 #else829 #else
828 ssize_t ret;830 ssize_t ret;
829 831
@@ -855,7 +857,7 @@
855 857
856--- a/storage/innodb_plugin/row/row0merge.c858--- a/storage/innodb_plugin/row/row0merge.c
857+++ b/storage/innodb_plugin/row/row0merge.c859+++ b/storage/innodb_plugin/row/row0merge.c
858@@ -453,7 +453,9 @@860@@ -454,7 +454,9 @@
859 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);861 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);
860 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);862 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);
861 863
@@ -866,7 +868,7 @@
866 868
867 mem_heap_free(heap);869 mem_heap_free(heap);
868 }870 }
869@@ -1464,8 +1466,10 @@871@@ -1465,8 +1467,10 @@
870 case 0:872 case 0:
871 if (UNIV_UNLIKELY873 if (UNIV_UNLIKELY
872 (dict_index_is_unique(index) && !null_eq)) {874 (dict_index_is_unique(index) && !null_eq)) {
@@ -879,7 +881,7 @@
879 mem_heap_free(heap);881 mem_heap_free(heap);
880 return(DB_DUPLICATE_KEY);882 return(DB_DUPLICATE_KEY);
881 }883 }
882@@ -2593,7 +2597,9 @@884@@ -2594,7 +2598,9 @@
883 885
884 /* Reset the MySQL row buffer that is used when reporting886 /* Reset the MySQL row buffer that is used when reporting
885 duplicate keys. */887 duplicate keys. */
@@ -892,7 +894,19 @@
892 secondary index entries for merge sort */894 secondary index entries for merge sort */
893--- a/storage/innodb_plugin/srv/srv0srv.c895--- a/storage/innodb_plugin/srv/srv0srv.c
894+++ b/storage/innodb_plugin/srv/srv0srv.c896+++ b/storage/innodb_plugin/srv/srv0srv.c
895@@ -402,6 +402,10 @@897@@ -86,11 +86,6 @@
898 #include "trx0i_s.h"
899 #include "os0sync.h" /* for HAVE_ATOMIC_BUILTINS */
900
901-/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */
902-ibool innobase_thd_is_idle(const void* thd);
903-ib_int64_t innobase_thd_get_start_time(const void* thd);
904-void innobase_thd_kill(void* thd);
905-
906 /* prototypes for new functions added to ha_innodb.cc */
907 ibool innobase_get_slow_log();
908
909@@ -415,6 +410,10 @@
896 910
897 UNIV_INTERN ulong srv_replication_delay = 0;911 UNIV_INTERN ulong srv_replication_delay = 0;
898 912
@@ -903,7 +917,7 @@
903 UNIV_INTERN long long srv_ibuf_max_size = 0;917 UNIV_INTERN long long srv_ibuf_max_size = 0;
904 UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */918 UNIV_INTERN ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */
905 UNIV_INTERN ulint srv_ibuf_accel_rate = 100;919 UNIV_INTERN ulint srv_ibuf_accel_rate = 100;
906@@ -1050,7 +1054,7 @@920@@ -1065,7 +1064,7 @@
907 }921 }
908 922
909 /* Initialize some INFORMATION SCHEMA internal structures */923 /* Initialize some INFORMATION SCHEMA internal structures */
@@ -912,7 +926,7 @@
912 }926 }
913 927
914 /*********************************************************************//**928 /*********************************************************************//**
915@@ -1061,6 +1065,7 @@929@@ -1076,6 +1075,7 @@
916 /*==========*/930 /*==========*/
917 {931 {
918 os_fast_mutex_free(&srv_conc_mutex);932 os_fast_mutex_free(&srv_conc_mutex);
@@ -920,7 +934,7 @@
920 mem_free(srv_conc_slots);934 mem_free(srv_conc_slots);
921 srv_conc_slots = NULL;935 srv_conc_slots = NULL;
922 936
923@@ -1074,6 +1079,7 @@937@@ -1089,6 +1089,7 @@
924 srv_mysql_table = NULL;938 srv_mysql_table = NULL;
925 939
926 trx_i_s_cache_free(trx_i_s_cache);940 trx_i_s_cache_free(trx_i_s_cache);
@@ -928,9 +942,46 @@
928 }942 }
929 943
930 /*********************************************************************//**944 /*********************************************************************//**
945@@ -2570,36 +2571,6 @@
946 old_sema = sema;
947 }
948
949- if (srv_kill_idle_transaction && trx_sys) {
950- trx_t* trx;
951- time_t now;
952-rescan_idle:
953- now = time(NULL);
954- mutex_enter(&kernel_mutex);
955- trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list);
956- while (trx) {
957- if (trx->conc_state == TRX_ACTIVE
958- && trx->mysql_thd
959- && innobase_thd_is_idle(trx->mysql_thd)) {
960- ib_int64_t start_time; /* as stmt ID */
961-
962- start_time = innobase_thd_get_start_time(trx->mysql_thd);
963- if (trx->last_stmt_start != start_time) {
964- trx->idle_start = now;
965- trx->last_stmt_start = start_time;
966- } else if (difftime(now, trx->idle_start)
967- > srv_kill_idle_transaction) {
968- /* kill the session */
969- mutex_exit(&kernel_mutex);
970- innobase_thd_kill(trx->mysql_thd);
971- goto rescan_idle;
972- }
973- }
974- trx = UT_LIST_GET_NEXT(mysql_trx_list, trx);
975- }
976- mutex_exit(&kernel_mutex);
977- }
978-
979 /* Flush stderr so that a database user gets the output
980 to possible MySQL error file */
981
931--- a/storage/innodb_plugin/srv/srv0start.c982--- a/storage/innodb_plugin/srv/srv0start.c
932+++ b/storage/innodb_plugin/srv/srv0start.c983+++ b/storage/innodb_plugin/srv/srv0start.c
933@@ -94,6 +94,8 @@984@@ -95,6 +95,8 @@
934 /** Log sequence number at shutdown */985 /** Log sequence number at shutdown */
935 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;986 UNIV_INTERN ib_uint64_t srv_shutdown_lsn;
936 987
@@ -939,7 +990,7 @@
939 #ifdef HAVE_DARWIN_THREADS990 #ifdef HAVE_DARWIN_THREADS
940 # include <sys/utsname.h>991 # include <sys/utsname.h>
941 /** TRUE if the F_FULLFSYNC option is available */992 /** TRUE if the F_FULLFSYNC option is available */
942@@ -544,7 +546,7 @@993@@ -545,7 +547,7 @@
943 /*********************************************************************//**994 /*********************************************************************//**
944 Creates or opens the log files and closes them.995 Creates or opens the log files and closes them.
945 @return DB_SUCCESS or error code */996 @return DB_SUCCESS or error code */
@@ -948,7 +999,7 @@
948 ulint999 ulint
949 open_or_create_log_file(1000 open_or_create_log_file(
950 /*====================*/1001 /*====================*/
951@@ -702,7 +704,7 @@1002@@ -703,7 +705,7 @@
952 /*********************************************************************//**1003 /*********************************************************************//**
953 Creates or opens database data files and closes them.1004 Creates or opens database data files and closes them.
954 @return DB_SUCCESS or error code */1005 @return DB_SUCCESS or error code */
@@ -957,7 +1008,7 @@
957 ulint1008 ulint
958 open_or_create_data_files(1009 open_or_create_data_files(
959 /*======================*/1010 /*======================*/
960@@ -1777,6 +1779,10 @@1011@@ -1782,6 +1784,10 @@
961 are initialized in trx_sys_init_at_db_start(). */1012 are initialized in trx_sys_init_at_db_start(). */
962 1013
963 recv_recovery_from_checkpoint_finish();1014 recv_recovery_from_checkpoint_finish();
@@ -968,7 +1019,7 @@
968 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {1019 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
969 /* The following call is necessary for the insert1020 /* The following call is necessary for the insert
970 buffer to work with multiple tablespaces. We must1021 buffer to work with multiple tablespaces. We must
971@@ -1952,7 +1958,18 @@1022@@ -1962,7 +1968,18 @@
972 1023
973 if (srv_auto_extend_last_data_file1024 if (srv_auto_extend_last_data_file
974 && sum_of_data_file_sizes < tablespace_size_in_header) {1025 && sum_of_data_file_sizes < tablespace_size_in_header) {
@@ -987,7 +1038,7 @@
987 fprintf(stderr,1038 fprintf(stderr,
988 "InnoDB: Error: tablespace size stored in header"1039 "InnoDB: Error: tablespace size stored in header"
989 " is %lu pages, but\n"1040 " is %lu pages, but\n"
990@@ -1977,6 +1994,7 @@1041@@ -1987,6 +2004,7 @@
991 1042
992 return(DB_ERROR);1043 return(DB_ERROR);
993 }1044 }
@@ -995,7 +1046,7 @@
995 }1046 }
996 1047
997 /* Check that os_fast_mutexes work as expected */1048 /* Check that os_fast_mutexes work as expected */
998@@ -2079,6 +2097,7 @@1049@@ -2089,6 +2107,7 @@
999 ibuf_update_max_tablespace_id();1050 ibuf_update_max_tablespace_id();
1000 }1051 }
1001 1052
@@ -1031,7 +1082,7 @@
1031 1082
1032--- a/storage/innodb_plugin/trx/trx0sys.c1083--- a/storage/innodb_plugin/trx/trx0sys.c
1033+++ b/storage/innodb_plugin/trx/trx0sys.c1084+++ b/storage/innodb_plugin/trx/trx0sys.c
1034@@ -1931,10 +1931,12 @@1085@@ -1941,10 +1941,12 @@
1035 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);1086 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
1036 }1087 }
1037 1088
@@ -1046,27 +1097,27 @@
1046 1097
1047--- a/storage/innodb_plugin/trx/trx0trx.c1098--- a/storage/innodb_plugin/trx/trx0trx.c
1048+++ b/storage/innodb_plugin/trx/trx0trx.c1099+++ b/storage/innodb_plugin/trx/trx0trx.c
1049@@ -109,8 +109,6 @@1100@@ -112,8 +112,6 @@
1050 1101
1051 trx->support_xa = TRUE;1102 trx->support_xa = TRUE;
1052 1103
1053- trx->flush_log_at_trx_commit_session = 3; /* means to use innodb_flush_log_at_trx_commit value */1104- trx->flush_log_at_trx_commit_session = 3; /* means to use innodb_flush_log_at_trx_commit value */
1054-1105-
1106 trx->fake_changes = FALSE;
1107
1055 trx->check_foreigns = TRUE;1108 trx->check_foreigns = TRUE;
1056 trx->check_unique_secondary = TRUE;1109@@ -556,8 +554,8 @@
1057
1058@@ -493,8 +491,8 @@
1059 TRX_ID_PREP_PRINTF(trx->id));
1060 1110
1061 if (srv_force_recovery == 0) {1111 if (srv_force_recovery == 0) {
1062-1112
1063- trx->conc_state = TRX_PREPARED;1113- trx->conc_state = TRX_PREPARED;
1114- trx_n_prepared++;
1064+ /* xtrabackup should rollback it */1115+ /* xtrabackup should rollback it */
1065+ trx->conc_state = TRX_ACTIVE;1116+ trx->conc_state = TRX_ACTIVE;
1066 } else {1117 } else {
1067 fprintf(stderr,1118 fprintf(stderr,
1068 "InnoDB: Since"1119 "InnoDB: Since"
1069@@ -570,9 +568,9 @@1120@@ -633,10 +631,9 @@
1070 trx->id));1121 trx->id));
1071 1122
1072 if (srv_force_recovery == 0) {1123 if (srv_force_recovery == 0) {
@@ -1074,11 +1125,12 @@
1074+ /* xtrabackup should rollback it */1125+ /* xtrabackup should rollback it */
1075 trx->conc_state1126 trx->conc_state
1076- = TRX_PREPARED;1127- = TRX_PREPARED;
1128- trx_n_prepared++;
1077+ = TRX_ACTIVE;1129+ = TRX_ACTIVE;
1078 } else {1130 } else {
1079 fprintf(stderr,1131 fprintf(stderr,
1080 "InnoDB: Since"1132 "InnoDB: Since"
1081@@ -737,9 +735,6 @@1133@@ -801,9 +798,6 @@
1082 generated by the same transaction, doesn't. */1134 generated by the same transaction, doesn't. */
1083 trx->support_xa = thd_supports_xa(trx->mysql_thd);1135 trx->support_xa = thd_supports_xa(trx->mysql_thd);
1084 1136
@@ -1088,7 +1140,7 @@
1088 mutex_enter(&kernel_mutex);1140 mutex_enter(&kernel_mutex);
1089 1141
1090 ret = trx_start_low(trx, rseg_id);1142 ret = trx_start_low(trx, rseg_id);
1091@@ -921,7 +916,6 @@1143@@ -990,7 +984,6 @@
1092 trx->read_view = NULL;1144 trx->read_view = NULL;
1093 1145
1094 if (lsn) {1146 if (lsn) {
@@ -1096,7 +1148,7 @@
1096 1148
1097 mutex_exit(&kernel_mutex);1149 mutex_exit(&kernel_mutex);
1098 1150
1099@@ -930,12 +924,6 @@1151@@ -999,11 +992,6 @@
1100 trx_undo_insert_cleanup(trx);1152 trx_undo_insert_cleanup(trx);
1101 }1153 }
1102 1154
@@ -1105,11 +1157,10 @@
1105- } else {1157- } else {
1106- flush_log_at_trx_commit = trx->flush_log_at_trx_commit_session;1158- flush_log_at_trx_commit = trx->flush_log_at_trx_commit_session;
1107- }1159- }
1108-1160
1109 /* NOTE that we could possibly make a group commit more1161 /* NOTE that we could possibly make a group commit more
1110 efficient here: call os_thread_yield here to allow also other1162 efficient here: call os_thread_yield here to allow also other
1111 trxs to come to commit! */1163@@ -1036,9 +1024,9 @@
1112@@ -967,9 +955,9 @@
1113 if (trx->flush_log_later) {1164 if (trx->flush_log_later) {
1114 /* Do nothing yet */1165 /* Do nothing yet */
1115 trx->must_flush_log_later = TRUE;1166 trx->must_flush_log_later = TRUE;
@@ -1121,7 +1172,7 @@
1121 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {1172 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
1122 /* Write the log but do not flush it to disk */1173 /* Write the log but do not flush it to disk */
1123 1174
1124@@ -981,7 +969,7 @@1175@@ -1050,7 +1038,7 @@
1125 1176
1126 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);1177 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
1127 }1178 }
@@ -1130,7 +1181,7 @@
1130 1181
1131 /* Write the log but do not flush it to disk */1182 /* Write the log but do not flush it to disk */
1132 1183
1133@@ -1661,23 +1649,16 @@1184@@ -1730,23 +1718,16 @@
1134 trx_t* trx) /*!< in: trx handle */1185 trx_t* trx) /*!< in: trx handle */
1135 {1186 {
1136 ib_uint64_t lsn = trx->commit_lsn;1187 ib_uint64_t lsn = trx->commit_lsn;
@@ -1156,7 +1207,7 @@
1156 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {1207 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
1157 /* Write the log but do not flush it to disk */1208 /* Write the log but do not flush it to disk */
1158 1209
1159@@ -1688,7 +1669,7 @@1210@@ -1757,7 +1738,7 @@
1160 1211
1161 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);1212 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
1162 }1213 }
@@ -1165,7 +1216,7 @@
1165 1216
1166 /* Write the log but do not flush it to disk */1217 /* Write the log but do not flush it to disk */
1167 1218
1168@@ -1948,8 +1929,6 @@1219@@ -2018,8 +1999,6 @@
1169 /*--------------------------------------*/1220 /*--------------------------------------*/
1170 1221
1171 if (lsn) {1222 if (lsn) {
@@ -1174,7 +1225,7 @@
1174 /* Depending on the my.cnf options, we may now write the log1225 /* Depending on the my.cnf options, we may now write the log
1175 buffer to the log files, making the prepared state of the1226 buffer to the log files, making the prepared state of the
1176 transaction durable if the OS does not crash. We may also1227 transaction durable if the OS does not crash. We may also
1177@@ -1969,15 +1948,9 @@1228@@ -2039,15 +2018,9 @@
1178 1229
1179 mutex_exit(&kernel_mutex);1230 mutex_exit(&kernel_mutex);
1180 1231
@@ -1192,7 +1243,7 @@
1192 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {1243 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
1193 /* Write the log but do not flush it to disk */1244 /* Write the log but do not flush it to disk */
1194 1245
1195@@ -1989,7 +1962,7 @@1246@@ -2059,7 +2032,7 @@
1196 1247
1197 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);1248 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
1198 }1249 }
11991250
=== modified file 'patches/xtradb55.patch'
--- patches/xtradb55.patch 2011-09-14 12:48:27 +0000
+++ patches/xtradb55.patch 2011-11-27 06:47:26 +0000
@@ -1,6 +1,6 @@
1--- a/storage/innobase/btr/btr0btr.c1--- a/storage/innobase/btr/btr0btr.c
2+++ b/storage/innobase/btr/btr0btr.c2+++ b/storage/innobase/btr/btr0btr.c
3@@ -120,7 +120,7 @@3@@ -674,7 +674,7 @@
4 /**************************************************************//**4 /**************************************************************//**
5 Gets the root node of a tree and x-latches it.5 Gets the root node of a tree and x-latches it.
6 @return root page, x-latched */6 @return root page, x-latched */
@@ -9,7 +9,7 @@
9 buf_block_t*9 buf_block_t*
10 btr_root_block_get(10 btr_root_block_get(
11 /*===============*/11 /*===============*/
12@@ -578,7 +578,7 @@12@@ -1134,7 +1134,7 @@
13 /************************************************************//**13 /************************************************************//**
14 Returns the child page of a node pointer and x-latches it.14 Returns the child page of a node pointer and x-latches it.
15 @return child page, x-latched */15 @return child page, x-latched */
@@ -20,7 +20,7 @@
20 /*===================*/20 /*===================*/
21--- a/storage/innobase/buf/buf0buf.c21--- a/storage/innobase/buf/buf0buf.c
22+++ b/storage/innobase/buf/buf0buf.c22+++ b/storage/innobase/buf/buf0buf.c
23@@ -609,7 +609,7 @@23@@ -581,7 +581,7 @@
24 return(TRUE);24 return(TRUE);
25 }25 }
26 26
@@ -29,7 +29,7 @@
29 if (recv_lsn_checks_on) {29 if (recv_lsn_checks_on) {
30 ib_uint64_t current_lsn;30 ib_uint64_t current_lsn;
31 31
32@@ -4901,7 +4901,7 @@32@@ -4064,7 +4064,7 @@
33 recv_recover_page(TRUE, (buf_block_t*) bpage);33 recv_recover_page(TRUE, (buf_block_t*) bpage);
34 }34 }
35 35
@@ -40,7 +40,7 @@
40 (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL :40 (srv_pass_corrupt_table && bpage->is_corrupt) ? NULL :
41--- a/storage/innobase/fil/fil0fil.c41--- a/storage/innobase/fil/fil0fil.c
42+++ b/storage/innobase/fil/fil0fil.c42+++ b/storage/innobase/fil/fil0fil.c
43@@ -305,7 +305,7 @@43@@ -307,7 +307,7 @@
44 44
45 /** The tablespace memory cache. This variable is NULL before the module is45 /** The tablespace memory cache. This variable is NULL before the module is
46 initialized. */46 initialized. */
@@ -49,7 +49,7 @@
49 49
50 #ifdef UNIV_DEBUG50 #ifdef UNIV_DEBUG
51 /** Try fil_validate() every this many times */51 /** Try fil_validate() every this many times */
52@@ -344,7 +344,7 @@52@@ -346,7 +346,7 @@
53 off the LRU list if it is in the LRU list. The caller must hold the fil_sys53 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
54 mutex. */54 mutex. */
55 static55 static
@@ -58,7 +58,7 @@
58 fil_node_prepare_for_io(58 fil_node_prepare_for_io(
59 /*====================*/59 /*====================*/
60 fil_node_t* node, /*!< in: file node */60 fil_node_t* node, /*!< in: file node */
61@@ -669,7 +669,7 @@61@@ -671,7 +671,7 @@
62 Opens a the file of a node of a tablespace. The caller must own the fil_system62 Opens a the file of a node of a tablespace. The caller must own the fil_system
63 mutex. */63 mutex. */
64 static64 static
@@ -67,7 +67,7 @@
67 fil_node_open_file(67 fil_node_open_file(
68 /*===============*/68 /*===============*/
69 fil_node_t* node, /*!< in: file node */69 fil_node_t* node, /*!< in: file node */
70@@ -704,7 +704,17 @@70@@ -706,7 +706,17 @@
71 OS_FILE_READ_ONLY, &success);71 OS_FILE_READ_ONLY, &success);
72 if (!success) {72 if (!success) {
73 /* The following call prints an error message */73 /* The following call prints an error message */
@@ -86,7 +86,7 @@
86 86
87 ut_print_timestamp(stderr);87 ut_print_timestamp(stderr);
88 88
89@@ -765,12 +775,15 @@89@@ -767,12 +777,15 @@
90 90
91 if (UNIV_UNLIKELY(space_id != space->id)) {91 if (UNIV_UNLIKELY(space_id != space->id)) {
92 fprintf(stderr,92 fprintf(stderr,
@@ -105,7 +105,7 @@
105 }105 }
106 106
107 if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED107 if (UNIV_UNLIKELY(space_id == ULINT_UNDEFINED
108@@ -794,8 +807,8 @@108@@ -796,8 +809,8 @@
109 }109 }
110 110
111 if (size_bytes >= 1024 * 1024) {111 if (size_bytes >= 1024 * 1024) {
@@ -116,7 +116,7 @@
116 }116 }
117 117
118 if (!(flags & DICT_TF_ZSSIZE_MASK)) {118 if (!(flags & DICT_TF_ZSSIZE_MASK)) {
119@@ -846,6 +859,8 @@119@@ -848,6 +861,8 @@
120 /* Put the node to the LRU list */120 /* Put the node to the LRU list */
121 UT_LIST_ADD_FIRST(LRU, system->LRU, node);121 UT_LIST_ADD_FIRST(LRU, system->LRU, node);
122 }122 }
@@ -125,7 +125,7 @@
125 }125 }
126 126
127 /**********************************************************************//**127 /**********************************************************************//**
128@@ -1474,7 +1489,12 @@128@@ -1477,7 +1492,12 @@
129 the file yet; the following calls will open it and update the129 the file yet; the following calls will open it and update the
130 size fields */130 size fields */
131 131
@@ -139,7 +139,7 @@
139 fil_node_complete_io(node, fil_system, OS_FILE_READ);139 fil_node_complete_io(node, fil_system, OS_FILE_READ);
140 }140 }
141 141
142@@ -1526,7 +1546,12 @@142@@ -1529,7 +1549,12 @@
143 the file yet; the following calls will open it and update the143 the file yet; the following calls will open it and update the
144 size fields */144 size fields */
145 145
@@ -153,7 +153,7 @@
153 fil_node_complete_io(node, fil_system, OS_FILE_READ);153 fil_node_complete_io(node, fil_system, OS_FILE_READ);
154 }154 }
155 155
156@@ -2202,7 +2227,7 @@156@@ -2205,7 +2230,7 @@
157 if (fil_create_new_single_table_tablespace(157 if (fil_create_new_single_table_tablespace(
158 space_id, name, FALSE, flags,158 space_id, name, FALSE, flags,
159 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {159 FIL_IBD_FILE_INITIAL_SIZE) != DB_SUCCESS) {
@@ -162,7 +162,7 @@
162 }162 }
163 }163 }
164 164
165@@ -2369,7 +2394,7 @@165@@ -2372,7 +2397,7 @@
166 }166 }
167 167
168 if (success) {168 if (success) {
@@ -171,7 +171,7 @@
171 /* Write a log record about the deletion of the .ibd171 /* Write a log record about the deletion of the .ibd
172 file, so that ibbackup can replay it in the172 file, so that ibbackup can replay it in the
173 --apply-log phase. We use a dummy mtr and the familiar173 --apply-log phase. We use a dummy mtr and the familiar
174@@ -2670,7 +2695,7 @@174@@ -2673,7 +2698,7 @@
175 175
176 mutex_exit(&fil_system->mutex);176 mutex_exit(&fil_system->mutex);
177 177
@@ -180,7 +180,7 @@
180 if (success) {180 if (success) {
181 mtr_t mtr;181 mtr_t mtr;
182 182
183@@ -2861,7 +2886,7 @@183@@ -2864,7 +2889,7 @@
184 184
185 fil_node_create(path, size, space_id, FALSE);185 fil_node_create(path, size, space_id, FALSE);
186 186
@@ -189,7 +189,7 @@
189 {189 {
190 mtr_t mtr;190 mtr_t mtr;
191 191
192@@ -3116,19 +3141,97 @@192@@ -3210,19 +3235,97 @@
193 "InnoDB: open the tablespace file ", stderr);193 "InnoDB: open the tablespace file ", stderr);
194 ut_print_filename(stderr, filepath);194 ut_print_filename(stderr, filepath);
195 fputs("!\n"195 fputs("!\n"
@@ -297,7 +297,7 @@
297 return(FALSE);297 return(FALSE);
298 }298 }
299 299
300@@ -3836,7 +3939,7 @@300@@ -4158,7 +4261,7 @@
301 cannot be ok. */301 cannot be ok. */
302 302
303 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;303 size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low;
@@ -306,7 +306,7 @@
306 if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {306 if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) {
307 fprintf(stderr,307 fprintf(stderr,
308 "InnoDB: Error: the size of single-table tablespace"308 "InnoDB: Error: the size of single-table tablespace"
309@@ -3977,7 +4080,7 @@309@@ -4299,7 +4402,7 @@
310 idea is to read as much good data as we can and jump over bad data.310 idea is to read as much good data as we can and jump over bad data.
311 @return 0 if ok, -1 if error even after the retries, 1 if at the end311 @return 0 if ok, -1 if error even after the retries, 1 if at the end
312 of the directory */312 of the directory */
@@ -315,7 +315,7 @@
315 int315 int
316 fil_file_readdir_next_file(316 fil_file_readdir_next_file(
317 /*=======================*/317 /*=======================*/
318@@ -4276,15 +4379,97 @@318@@ -4598,15 +4701,97 @@
319 "InnoDB: in InnoDB data dictionary"319 "InnoDB: in InnoDB data dictionary"
320 " has tablespace id %lu,\n"320 " has tablespace id %lu,\n"
321 "InnoDB: but tablespace with that id"321 "InnoDB: but tablespace with that id"
@@ -421,7 +421,7 @@
421 } else {421 } else {
422 ut_print_timestamp(stderr);422 ut_print_timestamp(stderr);
423 fputs(" InnoDB: Error: table ", stderr);423 fputs(" InnoDB: Error: table ", stderr);
424@@ -4683,7 +4868,7 @@424@@ -5005,7 +5190,7 @@
425 off the LRU list if it is in the LRU list. The caller must hold the fil_sys425 off the LRU list if it is in the LRU list. The caller must hold the fil_sys
426 mutex. */426 mutex. */
427 static427 static
@@ -430,7 +430,7 @@
430 fil_node_prepare_for_io(430 fil_node_prepare_for_io(
431 /*====================*/431 /*====================*/
432 fil_node_t* node, /*!< in: file node */432 fil_node_t* node, /*!< in: file node */
433@@ -4703,10 +4888,13 @@433@@ -5025,10 +5210,13 @@
434 }434 }
435 435
436 if (node->open == FALSE) {436 if (node->open == FALSE) {
@@ -445,7 +445,7 @@
445 }445 }
446 446
447 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE447 if (node->n_pending == 0 && space->purpose == FIL_TABLESPACE
448@@ -4719,6 +4907,8 @@448@@ -5041,6 +5229,8 @@
449 }449 }
450 450
451 node->n_pending++;451 node->n_pending++;
@@ -454,7 +454,7 @@
454 }454 }
455 455
456 /********************************************************************//**456 /********************************************************************//**
457@@ -4920,6 +5110,16 @@457@@ -5240,6 +5430,16 @@
458 458
459 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));459 ut_ad((mode != OS_AIO_IBUF) || (space->purpose == FIL_TABLESPACE));
460 460
@@ -473,7 +473,7 @@
473 for (;;) {473 for (;;) {
474--- a/storage/innobase/handler/ha_innodb.cc474--- a/storage/innobase/handler/ha_innodb.cc
475+++ b/storage/innobase/handler/ha_innodb.cc475+++ b/storage/innobase/handler/ha_innodb.cc
476@@ -460,13 +460,6 @@476@@ -482,12 +482,6 @@
477 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",477 "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
478 NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);478 NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);
479 479
@@ -483,15 +483,13 @@
483- " or 2 (write at commit, flush once per second).",483- " or 2 (write at commit, flush once per second).",
484- NULL, NULL, 1, 0, 2, 0);484- NULL, NULL, 1, 0, 2, 0);
485-485-
486-486 static MYSQL_THDVAR_BOOL(fake_changes, PLUGIN_VAR_OPCMDARG,
487 static handler *innobase_create_handler(handlerton *hton,487 "In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records "
488 TABLE_SHARE *table,488 "and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. "
489 MEM_ROOT *mem_root)489@@ -989,17 +983,6 @@
490@@ -958,17 +951,6 @@
491 }
492 }490 }
493 491
494-/******************************************************************//**492 /******************************************************************//**
495-*/493-*/
496-extern "C" UNIV_INTERN494-extern "C" UNIV_INTERN
497-ulong495-ulong
@@ -502,14 +500,14 @@
502- return(THDVAR((THD*) thd, flush_log_at_trx_commit));500- return(THDVAR((THD*) thd, flush_log_at_trx_commit));
503-}501-}
504-502-
505 /********************************************************************//**503-/******************************************************************//**
506 Obtain the InnoDB transaction of a MySQL thread.504 Returns true if expand_fast_index_creation is enabled for the current
507 @return reference to transaction pointer */505 session.
508@@ -11595,18 +11577,12 @@506 @return the value of the server's expand_fast_index_creation variable */
509 innodb_file_format_max_validate,507@@ -11806,17 +11789,12 @@
510 innodb_file_format_max_update, "Antelope");508 innodb_file_format_max_update, "Antelope");
511 509
512-/* Changed to the THDVAR */510 /* Changed to the THDVAR */
513-//static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,511-//static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,
514-// PLUGIN_VAR_OPCMDARG,512-// PLUGIN_VAR_OPCMDARG,
515-// "Set to 0 (write and flush once per second),"513-// "Set to 0 (write and flush once per second),"
@@ -522,25 +520,25 @@
522- "Use global innodb_flush_log_at_trx_commit value. (default: ON).",520- "Use global innodb_flush_log_at_trx_commit value. (default: ON).",
523- NULL, NULL, TRUE);521- NULL, NULL, TRUE);
524+static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,522+static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,
525+ PLUGIN_VAR_OPCMDARG,523+ PLUGIN_VAR_OPCMDARG,
526+ "Set to 0 (write and flush once per second),"524+ "Set to 0 (write and flush once per second),"
527+ " 1 (write and flush at each commit)"525+ " 1 (write and flush at each commit)"
528+ " or 2 (write at commit, flush once per second).",526+ " or 2 (write at commit, flush once per second).",
529+ NULL, NULL, 1, 0, 2, 0);527+ NULL, NULL, 1, 0, 2, 0);
530 528
531 static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,529 static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
532 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,530 PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
533@@ -12073,7 +12049,6 @@531@@ -12294,7 +12272,6 @@
534 MYSQL_SYSVAR(file_format_check),532 MYSQL_SYSVAR(file_format_check),
535 MYSQL_SYSVAR(file_format_max),533 MYSQL_SYSVAR(file_format_max),
536 MYSQL_SYSVAR(flush_log_at_trx_commit),534 MYSQL_SYSVAR(flush_log_at_trx_commit),
537- MYSQL_SYSVAR(use_global_flush_log_at_trx_commit),535- MYSQL_SYSVAR(use_global_flush_log_at_trx_commit),
538 MYSQL_SYSVAR(flush_method),536 MYSQL_SYSVAR(flush_method),
539 MYSQL_SYSVAR(force_recovery),537 MYSQL_SYSVAR(force_recovery),
540 MYSQL_SYSVAR(locks_unsafe_for_binlog),538 MYSQL_SYSVAR(large_prefix),
541--- a/storage/innobase/ibuf/ibuf0ibuf.c539--- a/storage/innobase/ibuf/ibuf0ibuf.c
542+++ b/storage/innobase/ibuf/ibuf0ibuf.c540+++ b/storage/innobase/ibuf/ibuf0ibuf.c
543@@ -1202,6 +1202,9 @@541@@ -1190,6 +1190,9 @@
544 ut_ad(!recv_no_ibuf_operations);542 ut_ad(!recv_no_ibuf_operations);
545 ut_ad(x_latch || mtr == NULL);543 ut_ad(x_latch || mtr == NULL);
546 544
@@ -550,7 +548,7 @@
550 if (ibuf_fixed_addr_page(space, zip_size, page_no)) {548 if (ibuf_fixed_addr_page(space, zip_size, page_no)) {
551 549
552 return(TRUE);550 return(TRUE);
553@@ -2733,6 +2736,9 @@551@@ -2757,6 +2760,9 @@
554 ulint n_bytes;552 ulint n_bytes;
555 ulint n_pag2;553 ulint n_pag2;
556 554
@@ -562,7 +560,7 @@
562 560
563--- a/storage/innobase/include/ha_prototypes.h561--- a/storage/innobase/include/ha_prototypes.h
564+++ b/storage/innobase/include/ha_prototypes.h562+++ b/storage/innobase/include/ha_prototypes.h
565@@ -275,12 +275,5 @@563@@ -284,13 +284,6 @@
566 /*===================*/564 /*===================*/
567 void* thd, /*!< in: thread handle (THD*) */565 void* thd, /*!< in: thread handle (THD*) */
568 ulint value); /*!< in: time waited for the lock */566 ulint value); /*!< in: time waited for the lock */
@@ -574,10 +572,11 @@
574-/*================================*/572-/*================================*/
575- void* thd);573- void* thd);
576 574
577 #endif575 /**********************************************************************//**
576 Get the current setting of the lower_case_table_names global parameter from
578--- a/storage/innobase/include/srv0srv.h577--- a/storage/innobase/include/srv0srv.h
579+++ b/storage/innobase/include/srv0srv.h578+++ b/storage/innobase/include/srv0srv.h
580@@ -148,8 +148,7 @@579@@ -145,8 +145,7 @@
581 extern ulint srv_n_log_files;580 extern ulint srv_n_log_files;
582 extern ulint srv_log_file_size;581 extern ulint srv_log_file_size;
583 extern ulint srv_log_buffer_size;582 extern ulint srv_log_buffer_size;
@@ -587,7 +586,7 @@
587 extern char srv_adaptive_flushing;586 extern char srv_adaptive_flushing;
588 587
589 588
590@@ -253,6 +252,10 @@589@@ -247,6 +246,10 @@
591 extern ulint srv_dict_size_limit;590 extern ulint srv_dict_size_limit;
592 591
593 extern ulint srv_lazy_drop_table;592 extern ulint srv_lazy_drop_table;
@@ -618,7 +617,7 @@
618- && thd_flush_log_at_trx_commit(NULL) != 2) {617- && thd_flush_log_at_trx_commit(NULL) != 2) {
619+ && srv_flush_log_at_trx_commit != 2) {618+ && srv_flush_log_at_trx_commit != 2) {
620 619
621 fil_flush(group->space_id);620 fil_flush(group->space_id, FALSE);
622 }621 }
623@@ -1389,7 +1389,7 @@622@@ -1389,7 +1389,7 @@
624 #endif /* UNIV_DEBUG */623 #endif /* UNIV_DEBUG */
@@ -630,21 +629,23 @@
630 allowed yet (the variable name .._no_ibuf_.. is misleading) */629 allowed yet (the variable name .._no_ibuf_.. is misleading) */
631 630
632@@ -3151,6 +3151,7 @@631@@ -3151,6 +3151,7 @@
633 for the 'very fast' shutdown, because the InnoDB layer may have632 shutdown, because the InnoDB layer may have committed or
634 committed or prepared transactions and we don't want to lose them. */633 prepared transactions and we don't want to lose them. */
635 634
636+ if (!srv_apply_log_only) {635+ if (!srv_apply_log_only) {
637 if (trx_n_mysql_transactions > 0636 server_busy = trx_n_mysql_transactions > 0
638 || UT_LIST_GET_LEN(trx_sys->trx_list) > 0) {637 || UT_LIST_GET_LEN(trx_sys->trx_list) > trx_n_prepared;
639 638 mutex_exit(&kernel_mutex);
640@@ -3158,6 +3159,7 @@639@@ -3158,6 +3159,9 @@
641 640 if (server_busy || srv_is_any_background_thread_active()) {
642 goto loop;641 goto loop;
643 }642 }
643+ } else {
644+ mutex_exit(&kernel_mutex);
644+ }645+ }
645 646
646 if (srv_fast_shutdown == 2) {647 mutex_enter(&log_sys->mutex);
647 /* In this fastest shutdown we do not flush the buffer pool:648 server_busy = log_sys->n_pending_checkpoint_writes
648--- a/storage/innobase/log/log0recv.c649--- a/storage/innobase/log/log0recv.c
649+++ b/storage/innobase/log/log0recv.c650+++ b/storage/innobase/log/log0recv.c
650@@ -42,27 +42,27 @@651@@ -42,27 +42,27 @@
@@ -738,7 +739,7 @@
738 }739 }
739 }740 }
740 741
741@@ -2936,12 +2939,14 @@742@@ -2935,12 +2938,14 @@
742 743
743 if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {744 if (srv_force_recovery < SRV_FORCE_NO_LOG_REDO) {
744 745
@@ -754,7 +755,7 @@
754 }755 }
755 }756 }
756 757
757@@ -3110,6 +3115,7 @@758@@ -3109,6 +3114,7 @@
758 recv_sys->recovered_lsn = checkpoint_lsn;759 recv_sys->recovered_lsn = checkpoint_lsn;
759 760
760 srv_start_lsn = checkpoint_lsn;761 srv_start_lsn = checkpoint_lsn;
@@ -762,7 +763,7 @@
762 }763 }
763 764
764 contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,765 contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,
765@@ -3475,6 +3481,7 @@766@@ -3474,6 +3480,7 @@
766 that the data dictionary tables will be free of any locks.767 that the data dictionary tables will be free of any locks.
767 The data dictionary latch should guarantee that there is at768 The data dictionary latch should guarantee that there is at
768 most one data dictionary transaction active at a time. */769 most one data dictionary transaction active at a time. */
@@ -823,7 +824,7 @@
823 } else if (create_mode == OS_FILE_CREATE) {824 } else if (create_mode == OS_FILE_CREATE) {
824 mode_str = "CREATE";825 mode_str = "CREATE";
825 create_flag = O_RDWR | O_CREAT | O_EXCL;826 create_flag = O_RDWR | O_CREAT | O_EXCL;
826@@ -2732,6 +2737,9 @@827@@ -2791,6 +2796,9 @@
827 ut_a((offset & 0xFFFFFFFFUL) == offset);828 ut_a((offset & 0xFFFFFFFFUL) == offset);
828 ut_a((n & 0xFFFFFFFFUL) == n);829 ut_a((n & 0xFFFFFFFFUL) == n);
829 830
@@ -833,7 +834,7 @@
833 os_n_file_writes++;834 os_n_file_writes++;
834 835
835 ut_ad(file);836 ut_ad(file);
836@@ -2856,6 +2864,9 @@837@@ -2915,6 +2923,9 @@
837 #else838 #else
838 ssize_t ret;839 ssize_t ret;
839 840
@@ -845,7 +846,7 @@
845 if ((ulint)ret == n) {846 if ((ulint)ret == n) {
846--- a/storage/innobase/os/os0thread.c847--- a/storage/innobase/os/os0thread.c
847+++ b/storage/innobase/os/os0thread.c848+++ b/storage/innobase/os/os0thread.c
848@@ -266,12 +266,17 @@849@@ -251,11 +251,16 @@
849 #ifdef __WIN__850 #ifdef __WIN__
850 Sleep((DWORD) tm / 1000);851 Sleep((DWORD) tm / 1000);
851 #else852 #else
@@ -862,10 +863,9 @@
862+*/863+*/
863 #endif864 #endif
864 }865 }
865
866--- a/storage/innobase/row/row0merge.c866--- a/storage/innobase/row/row0merge.c
867+++ b/storage/innobase/row/row0merge.c867+++ b/storage/innobase/row/row0merge.c
868@@ -459,7 +459,9 @@868@@ -460,7 +460,9 @@
869 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);869 rec = rec_convert_dtuple_to_rec(*buf, index, tuple, n_ext);
870 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);870 offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, &heap);
871 871
@@ -876,7 +876,7 @@
876 876
877 mem_heap_free(heap);877 mem_heap_free(heap);
878 }878 }
879@@ -1485,8 +1487,10 @@879@@ -1486,8 +1488,10 @@
880 case 0:880 case 0:
881 if (UNIV_UNLIKELY881 if (UNIV_UNLIKELY
882 (dict_index_is_unique(index) && !null_eq)) {882 (dict_index_is_unique(index) && !null_eq)) {
@@ -889,7 +889,7 @@
889 mem_heap_free(heap);889 mem_heap_free(heap);
890 return(DB_DUPLICATE_KEY);890 return(DB_DUPLICATE_KEY);
891 }891 }
892@@ -2613,7 +2617,9 @@892@@ -2636,7 +2640,9 @@
893 893
894 /* Reset the MySQL row buffer that is used when reporting894 /* Reset the MySQL row buffer that is used when reporting
895 duplicate keys. */895 duplicate keys. */
@@ -902,7 +902,19 @@
902 secondary index entries for merge sort */902 secondary index entries for merge sort */
903--- a/storage/innobase/srv/srv0srv.c903--- a/storage/innobase/srv/srv0srv.c
904+++ b/storage/innobase/srv/srv0srv.c904+++ b/storage/innobase/srv/srv0srv.c
905@@ -197,8 +197,7 @@905@@ -87,11 +87,6 @@
906 #include "mysql/plugin.h"
907 #include "mysql/service_thd_wait.h"
908
909-/* prototypes of new functions added to ha_innodb.cc for kill_idle_transaction */
910-ibool innobase_thd_is_idle(const void* thd);
911-ib_int64_t innobase_thd_get_start_time(const void* thd);
912-void innobase_thd_kill(void* thd);
913-
914 /* prototypes for new functions added to ha_innodb.cc */
915 ibool innobase_get_slow_log();
916
917@@ -198,8 +193,7 @@
906 UNIV_INTERN ulint srv_log_file_size = ULINT_MAX;918 UNIV_INTERN ulint srv_log_file_size = ULINT_MAX;
907 /* size in database pages */919 /* size in database pages */
908 UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX;920 UNIV_INTERN ulint srv_log_buffer_size = ULINT_MAX;
@@ -912,7 +924,7 @@
912 924
913 /* Try to flush dirty pages so as to avoid IO bursts at925 /* Try to flush dirty pages so as to avoid IO bursts at
914 the checkpoints. */926 the checkpoints. */
915@@ -449,6 +448,10 @@927@@ -457,6 +451,10 @@
916 UNIV_INTERN ulint srv_dict_size_limit = 0;928 UNIV_INTERN ulint srv_dict_size_limit = 0;
917 929
918 UNIV_INTERN ulint srv_lazy_drop_table = 0;930 UNIV_INTERN ulint srv_lazy_drop_table = 0;
@@ -923,7 +935,7 @@
923 /*-------------------------------------------*/935 /*-------------------------------------------*/
924 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;936 UNIV_INTERN ulong srv_n_spin_wait_rounds = 30;
925 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;937 UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
926@@ -1148,7 +1151,7 @@938@@ -1137,7 +1135,7 @@
927 }939 }
928 940
929 /* Initialize some INFORMATION SCHEMA internal structures */941 /* Initialize some INFORMATION SCHEMA internal structures */
@@ -932,7 +944,7 @@
932 }944 }
933 945
934 /*********************************************************************//**946 /*********************************************************************//**
935@@ -1159,6 +1162,7 @@947@@ -1148,6 +1146,7 @@
936 /*==========*/948 /*==========*/
937 {949 {
938 os_fast_mutex_free(&srv_conc_mutex);950 os_fast_mutex_free(&srv_conc_mutex);
@@ -940,7 +952,7 @@
940 mem_free(srv_conc_slots);952 mem_free(srv_conc_slots);
941 srv_conc_slots = NULL;953 srv_conc_slots = NULL;
942 954
943@@ -1172,6 +1176,7 @@955@@ -1161,6 +1160,7 @@
944 srv_mysql_table = NULL;956 srv_mysql_table = NULL;
945 957
946 trx_i_s_cache_free(trx_i_s_cache);958 trx_i_s_cache_free(trx_i_s_cache);
@@ -948,7 +960,7 @@
948 }960 }
949 961
950 /*********************************************************************//**962 /*********************************************************************//**
951@@ -1876,7 +1881,7 @@963@@ -1886,7 +1886,7 @@
952 }964 }
953 965
954 /* Record the lock wait time for this thread */966 /* Record the lock wait time for this thread */
@@ -957,6 +969,43 @@
957 }969 }
958 970
959 if (trx->was_chosen_as_deadlock_victim) {971 if (trx->was_chosen_as_deadlock_victim) {
972@@ -2842,36 +2842,6 @@
973 old_sema = sema;
974 }
975
976- if (srv_kill_idle_transaction && trx_sys) {
977- trx_t* trx;
978- time_t now;
979-rescan_idle:
980- now = time(NULL);
981- mutex_enter(&kernel_mutex);
982- trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list);
983- while (trx) {
984- if (trx->conc_state == TRX_ACTIVE
985- && trx->mysql_thd
986- && innobase_thd_is_idle(trx->mysql_thd)) {
987- ib_int64_t start_time; /* as stmt ID */
988-
989- start_time = innobase_thd_get_start_time(trx->mysql_thd);
990- if (trx->last_stmt_start != start_time) {
991- trx->idle_start = now;
992- trx->last_stmt_start = start_time;
993- } else if (difftime(now, trx->idle_start)
994- > srv_kill_idle_transaction) {
995- /* kill the session */
996- mutex_exit(&kernel_mutex);
997- innobase_thd_kill(trx->mysql_thd);
998- goto rescan_idle;
999- }
1000- }
1001- trx = UT_LIST_GET_NEXT(mysql_trx_list, trx);
1002- }
1003- mutex_exit(&kernel_mutex);
1004- }
1005-
1006 /* Flush stderr so that a database user gets the output
1007 to possible MySQL error file */
1008
960--- a/storage/innobase/srv/srv0start.c1009--- a/storage/innobase/srv/srv0start.c
961+++ b/storage/innobase/srv/srv0start.c1010+++ b/storage/innobase/srv/srv0start.c
962@@ -94,6 +94,8 @@1011@@ -94,6 +94,8 @@
@@ -986,7 +1035,7 @@
986 ulint1035 ulint
987 open_or_create_data_files(1036 open_or_create_data_files(
988 /*======================*/1037 /*======================*/
989@@ -1868,6 +1870,10 @@1038@@ -1875,6 +1877,10 @@
990 are initialized in trx_sys_init_at_db_start(). */1039 are initialized in trx_sys_init_at_db_start(). */
991 1040
992 recv_recovery_from_checkpoint_finish();1041 recv_recovery_from_checkpoint_finish();
@@ -997,7 +1046,7 @@
997 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {1046 if (srv_force_recovery < SRV_FORCE_NO_IBUF_MERGE) {
998 /* The following call is necessary for the insert1047 /* The following call is necessary for the insert
999 buffer to work with multiple tablespaces. We must1048 buffer to work with multiple tablespaces. We must
1000@@ -2042,6 +2048,17 @@1049@@ -2054,6 +2060,17 @@
1001 if (!srv_auto_extend_last_data_file1050 if (!srv_auto_extend_last_data_file
1002 && sum_of_data_file_sizes != tablespace_size_in_header) {1051 && sum_of_data_file_sizes != tablespace_size_in_header) {
1003 1052
@@ -1015,7 +1064,7 @@
1015 ut_print_timestamp(stderr);1064 ut_print_timestamp(stderr);
1016 fprintf(stderr,1065 fprintf(stderr,
1017 " InnoDB: Error: tablespace size"1066 " InnoDB: Error: tablespace size"
1018@@ -2121,6 +2138,7 @@1067@@ -2133,6 +2150,7 @@
1019 1068
1020 return(DB_ERROR);1069 return(DB_ERROR);
1021 }1070 }
@@ -1023,7 +1072,7 @@
1023 }1072 }
1024 1073
1025 /* Check that os_fast_mutexes work as expected */1074 /* Check that os_fast_mutexes work as expected */
1026@@ -2240,6 +2258,7 @@1075@@ -2252,6 +2270,7 @@
1027 ibuf_update_max_tablespace_id();1076 ibuf_update_max_tablespace_id();
1028 }1077 }
1029 1078
@@ -1033,16 +1082,16 @@
1033 srv_was_started = TRUE;1082 srv_was_started = TRUE;
1034--- a/storage/innobase/trx/trx0purge.c1083--- a/storage/innobase/trx/trx0purge.c
1035+++ b/storage/innobase/trx/trx0purge.c1084+++ b/storage/innobase/trx/trx0purge.c
1036@@ -1100,6 +1100,9 @@1085@@ -1129,6 +1129,9 @@
1037 /* que_thr_t* thr2; */1086 que_thr_t* thr;
1038 ulint old_pages_handled;1087 ulint old_pages_handled;
1039 1088
1040+ if (srv_fake_write)1089+ if (srv_fake_write)
1041+ return(0);1090+ return(0);
1042+1091+
1043 mutex_enter(&(purge_sys->mutex));1092 ut_a(purge_sys->trx->n_active_thrs == 0);
1044 1093
1045 if (purge_sys->trx->n_active_thrs > 0) {1094 rw_lock_x_lock(&purge_sys->latch);
1046--- a/storage/innobase/trx/trx0rseg.c1095--- a/storage/innobase/trx/trx0rseg.c
1047+++ b/storage/innobase/trx/trx0rseg.c1096+++ b/storage/innobase/trx/trx0rseg.c
1048@@ -140,9 +140,11 @@1097@@ -140,9 +140,11 @@
@@ -1059,7 +1108,7 @@
1059 1108
1060--- a/storage/innobase/trx/trx0sys.c1109--- a/storage/innobase/trx/trx0sys.c
1061+++ b/storage/innobase/trx/trx0sys.c1110+++ b/storage/innobase/trx/trx0sys.c
1062@@ -1938,10 +1938,12 @@1111@@ -1983,10 +1983,12 @@
1063 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);1112 UT_LIST_REMOVE(view_list, trx_sys->view_list, prev_view);
1064 }1113 }
1065 1114
@@ -1074,18 +1123,19 @@
1074 1123
1075--- a/storage/innobase/trx/trx0trx.c1124--- a/storage/innobase/trx/trx0trx.c
1076+++ b/storage/innobase/trx/trx0trx.c1125+++ b/storage/innobase/trx/trx0trx.c
1077@@ -505,8 +505,8 @@1126@@ -563,9 +563,8 @@
1078 (ullint) trx->id);1127 (ullint) trx->id);
1079 1128
1080 if (srv_force_recovery == 0) {1129 if (srv_force_recovery == 0) {
1081-1130-
1082- trx->conc_state = TRX_PREPARED;1131- trx->conc_state = TRX_PREPARED;
1132- trx_n_prepared++;
1083+ /* xtrabackup should rollback it */1133+ /* xtrabackup should rollback it */
1084+ trx->conc_state = TRX_ACTIVE;1134+ trx->conc_state = TRX_ACTIVE;
1085 } else {1135 } else {
1086 fprintf(stderr,1136 fprintf(stderr,
1087 "InnoDB: Since"1137 "InnoDB: Since"
1088@@ -580,9 +580,9 @@1138@@ -639,10 +638,9 @@
1089 (ullint) trx->id);1139 (ullint) trx->id);
1090 1140
1091 if (srv_force_recovery == 0) {1141 if (srv_force_recovery == 0) {
@@ -1093,11 +1143,12 @@
1093+ /* xtrabackup should rollback it */1143+ /* xtrabackup should rollback it */
1094 trx->conc_state1144 trx->conc_state
1095- = TRX_PREPARED;1145- = TRX_PREPARED;
1146- trx_n_prepared++;
1096+ = TRX_ACTIVE;1147+ = TRX_ACTIVE;
1097 } else {1148 } else {
1098 fprintf(stderr,1149 fprintf(stderr,
1099 "InnoDB: Since"1150 "InnoDB: Since"
1100@@ -925,7 +925,6 @@1151@@ -1051,7 +1049,6 @@
1101 trx->read_view = NULL;1152 trx->read_view = NULL;
1102 1153
1103 if (lsn) {1154 if (lsn) {
@@ -1105,7 +1156,7 @@
1105 1156
1106 mutex_exit(&kernel_mutex);1157 mutex_exit(&kernel_mutex);
1107 1158
1108@@ -934,12 +933,6 @@1159@@ -1060,12 +1057,6 @@
1109 trx_undo_insert_cleanup(trx);1160 trx_undo_insert_cleanup(trx);
1110 }1161 }
1111 1162
@@ -1118,7 +1169,7 @@
1118 /* NOTE that we could possibly make a group commit more1169 /* NOTE that we could possibly make a group commit more
1119 efficient here: call os_thread_yield here to allow also other1170 efficient here: call os_thread_yield here to allow also other
1120 trxs to come to commit! */1171 trxs to come to commit! */
1121@@ -971,9 +964,9 @@1172@@ -1097,9 +1088,9 @@
1122 if (trx->flush_log_later) {1173 if (trx->flush_log_later) {
1123 /* Do nothing yet */1174 /* Do nothing yet */
1124 trx->must_flush_log_later = TRUE;1175 trx->must_flush_log_later = TRUE;
@@ -1130,7 +1181,7 @@
1130 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {1181 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
1131 /* Write the log but do not flush it to disk */1182 /* Write the log but do not flush it to disk */
1132 1183
1133@@ -985,7 +978,7 @@1184@@ -1111,7 +1102,7 @@
1134 1185
1135 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);1186 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
1136 }1187 }
@@ -1139,7 +1190,7 @@
1139 1190
1140 /* Write the log but do not flush it to disk */1191 /* Write the log but do not flush it to disk */
1141 1192
1142@@ -1665,23 +1658,16 @@1193@@ -1791,23 +1782,16 @@
1143 trx_t* trx) /*!< in: trx handle */1194 trx_t* trx) /*!< in: trx handle */
1144 {1195 {
1145 ib_uint64_t lsn = trx->commit_lsn;1196 ib_uint64_t lsn = trx->commit_lsn;
@@ -1165,7 +1216,7 @@
1165 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {1216 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
1166 /* Write the log but do not flush it to disk */1217 /* Write the log but do not flush it to disk */
1167 1218
1168@@ -1692,7 +1678,7 @@1219@@ -1818,7 +1802,7 @@
1169 1220
1170 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);1221 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
1171 }1222 }
@@ -1174,7 +1225,7 @@
1174 1225
1175 /* Write the log but do not flush it to disk */1226 /* Write the log but do not flush it to disk */
1176 1227
1177@@ -1945,7 +1931,6 @@1228@@ -2066,7 +2050,6 @@
1178 /*--------------------------------------*/1229 /*--------------------------------------*/
1179 1230
1180 if (lsn) {1231 if (lsn) {
@@ -1182,7 +1233,7 @@
1182 1233
1183 /* Depending on the my.cnf options, we may now write the log1234 /* Depending on the my.cnf options, we may now write the log
1184 buffer to the log files, making the prepared state of the1235 buffer to the log files, making the prepared state of the
1185@@ -1966,15 +1951,9 @@1236@@ -2087,15 +2070,9 @@
1186 1237
1187 mutex_exit(&kernel_mutex);1238 mutex_exit(&kernel_mutex);
1188 1239
@@ -1200,7 +1251,7 @@
1200 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {1251 if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
1201 /* Write the log but do not flush it to disk */1252 /* Write the log but do not flush it to disk */
1202 1253
1203@@ -1986,7 +1965,7 @@1254@@ -2107,7 +2084,7 @@
1204 1255
1205 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);1256 log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
1206 }1257 }
12071258
=== modified file 'utils/build.sh'
--- utils/build.sh 2011-10-05 02:29:27 +0000
+++ utils/build.sh 2011-11-27 06:47:26 +0000
@@ -1,7 +1,9 @@
1#!/usr/bin/env bash1#!/usr/bin/env bash
22
3MYSQL_51_VERSION=5.1.563MYSQL_51_VERSION=5.1.59
4MYSQL_55_VERSION=5.5.104MYSQL_55_VERSION=5.5.17
5PS_51_VERSION=5.1.59-13.0
6PS_55_VERSION=5.5.16-22.0
57
6AUTO_DOWNLOAD=${AUTO_DOWNLOAD:-no}8AUTO_DOWNLOAD=${AUTO_DOWNLOAD:-no}
7MASTER_SITE="http://s3.amazonaws.com/percona.com/downloads/community"9MASTER_SITE="http://s3.amazonaws.com/percona.com/downloads/community"
@@ -216,13 +218,15 @@
216 cd $branch_dir218 cd $branch_dir
217 bzr pull219 bzr pull
218 else220 else
219 bzr branch lp:~percona-dev/percona-server/$branch_dir $branch_dir221 bzr branch -r tag:Percona-Server-$PS_51_VERSION \
222 lp:percona-server/5.1 $branch_dir
220 cd $branch_dir223 cd $branch_dir
221 fi224 fi
222225
223 $MAKE_CMD main226 $MAKE_CMD main
227 cd $top_dir
224 rm -rf $server_dir228 rm -rf $server_dir
225 mv Percona-Server $top_dir229 ln -s $branch_dir/Percona-Server $server_dir
226230
227 # Patch Percona Server231 # Patch Percona Server
228 cd $server_dir232 cd $server_dir
@@ -264,13 +268,15 @@
264 cd $branch_dir268 cd $branch_dir
265 bzr pull269 bzr pull
266 else270 else
267 bzr branch lp:~percona-dev/percona-server/$branch_dir $branch_dir271 bzr branch -r tag:Percona-Server-$PS_55_VERSION \
272 lp:percona-server $branch_dir
268 cd $branch_dir273 cd $branch_dir
269 fi274 fi
270275
271 $MAKE_CMD PERCONA_SERVER=Percona-Server-5.5 main276 $MAKE_CMD PERCONA_SERVER=Percona-Server-5.5 main
277 cd $top_dir
272 rm -rf $server_dir278 rm -rf $server_dir
273 mv Percona-Server-5.5 $top_dir279 ln -s $branch_dir/Percona-Server $server_dir
274280
275 # Patch Percona Server281 # Patch Percona Server
276 cd $server_dir282 cd $server_dir
277283
=== modified file 'xtrabackup.c'
--- xtrabackup.c 2011-10-05 02:29:27 +0000
+++ xtrabackup.c 2011-11-27 06:47:26 +0000
@@ -135,7 +135,7 @@
135#include <mysql/plugin.h>135#include <mysql/plugin.h>
136#include <mysql/service_thd_wait.h>136#include <mysql/service_thd_wait.h>
137137
138void thd_wait_begin(MYSQL_THD thd, thd_wait_type wait_type)138void thd_wait_begin(MYSQL_THD thd, int wait_type)
139{139{
140 (void)thd;140 (void)thd;
141 (void)wait_type;141 (void)wait_type;
@@ -251,6 +251,15 @@
251 a file, so this is either "open" or251 a file, so this is either "open" or
252 "create" */252 "create" */
253253
254/***********************************************************************//**
255Compatibility wrapper around os_file_flush().
256@return TRUE if success */
257static
258ibool
259xb_file_flush(
260/*==========*/
261 os_file_t file); /*!< in, own: handle to a file */
262
254#include <fcntl.h>263#include <fcntl.h>
255#include <regex.h>264#include <regex.h>
256265
@@ -510,7 +519,7 @@
510struct fil_system_struct {519struct fil_system_struct {
511#ifndef UNIV_HOTBACKUP520#ifndef UNIV_HOTBACKUP
512 mutex_t mutex; /*!< The mutex protecting the cache */521 mutex_t mutex; /*!< The mutex protecting the cache */
513#ifdef XTRADB55522#ifdef XTRADB_BASED
514 mutex_t file_extend_mutex;523 mutex_t file_extend_mutex;
515#endif524#endif
516#endif /* !UNIV_HOTBACKUP */525#endif /* !UNIV_HOTBACKUP */
@@ -557,6 +566,10 @@
557 request */566 request */
558 UT_LIST_BASE_NODE_T(fil_space_t) space_list;567 UT_LIST_BASE_NODE_T(fil_space_t) space_list;
559 /*!< list of all file spaces */568 /*!< list of all file spaces */
569 ibool space_id_reuse_warned;
570 /* !< TRUE if fil_space_create()
571 has issued a warning about
572 potential space_id reuse */
560};573};
561574
562#endif /* INNODB_VERSION_SHORT */575#endif /* INNODB_VERSION_SHORT */
@@ -1520,6 +1533,31 @@
1520 putc(q, f);1533 putc(q, f);
1521}1534}
15221535
1536/**********************************************************************//**
1537It should be safe to use lower_case_table_names=0 for xtrabackup. If it causes
1538any problems, we can add the lower_case_table_names option to xtrabackup
1539later.
1540@return 0 */
1541ulint
1542innobase_get_lower_case_table_names(void)
1543/*=====================================*/
1544{
1545 return(0);
1546}
1547
1548/******************************************************************//**
1549Strip dir name from a full path name and return only the file name
1550@return file name or "null" if no file name */
1551const char*
1552innobase_basename(
1553/*==============*/
1554 const char* path_name) /*!< in: full path name */
1555{
1556 const char* name = base_name(path_name);
1557
1558 return((name) ? name : "null");
1559}
1560
1523/*****************************************************************//**1561/*****************************************************************//**
1524Convert an SQL identifier to the MySQL system_charset_info (UTF-8)1562Convert an SQL identifier to the MySQL system_charset_info (UTF-8)
1525and quote it if needed.1563and quote it if needed.
@@ -1856,6 +1894,22 @@
1856#endif1894#endif
1857#endif1895#endif
18581896
1897/***********************************************************************//**
1898Compatibility wrapper around os_file_flush().
1899@return TRUE if success */
1900static
1901ibool
1902xb_file_flush(
1903/*==========*/
1904 os_file_t file) /*!< in, own: handle to a file */
1905{
1906#ifdef XTRADB_BASED
1907 return os_file_flush(file, TRUE);
1908#else
1909 return os_file_flush(file);
1910#endif
1911}
1912
1859/***********************************************************************1913/***********************************************************************
1860Computes bit shift for a given value. If the argument is not a power1914Computes bit shift for a given value. If the argument is not a power
1861of 2, returns 0.*/1915of 2, returns 0.*/
@@ -2925,7 +2979,7 @@
2925 }2979 }
2926 }2980 }
29272981
2928 success = os_file_flush(dst_file);2982 success = xb_file_flush(dst_file);
2929 if (!success) {2983 if (!success) {
2930 goto error;2984 goto error;
2931 }2985 }
@@ -3237,7 +3291,7 @@
32373291
32383292
3239 if (!xtrabackup_stream) {3293 if (!xtrabackup_stream) {
3240 success = os_file_flush(dst_log);3294 success = xb_file_flush(dst_log);
3241 } else {3295 } else {
3242 fflush(stdout);3296 fflush(stdout);
3243 success = TRUE;3297 success = TRUE;
@@ -4270,7 +4324,11 @@
4270#ifndef INNODB_VERSION_SHORT4324#ifndef INNODB_VERSION_SHORT
4271 local_page = buf_page_get(space_id, page_no, RW_S_LATCH, &local_mtr);4325 local_page = buf_page_get(space_id, page_no, RW_S_LATCH, &local_mtr);
4272#else4326#else
4327#if (MYSQL_VERSION_ID < 50517)
4273 local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, &local_mtr);4328 local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, &local_mtr);
4329#else
4330 local_block = btr_block_get(space_id, zip_size, page_no, RW_S_LATCH, index, &local_mtr);
4331#endif
4274 local_page = buf_block_get_frame(local_block);4332 local_page = buf_block_get_frame(local_block);
4275#endif4333#endif
4276 blob_header = local_page + offset;4334 blob_header = local_page + offset;
@@ -4315,7 +4373,13 @@
4315#ifndef INNODB_VERSION_SHORT4373#ifndef INNODB_VERSION_SHORT
4316 page = btr_page_get(space, right_page_no, RW_X_LATCH, &mtr);4374 page = btr_page_get(space, right_page_no, RW_X_LATCH, &mtr);
4317#else4375#else
4318 block = btr_block_get(space, zip_size, right_page_no, RW_X_LATCH, &mtr);4376#if (MYSQL_VERSION_ID < 50517)
4377 block = btr_block_get(space, zip_size, right_page_no,
4378 RW_X_LATCH, &mtr);
4379#else
4380 block = btr_block_get(space, zip_size, right_page_no,
4381 RW_X_LATCH, index, &mtr);
4382#endif
4319 page = buf_block_get_frame(block);4383 page = buf_block_get_frame(block);
4320#endif4384#endif
4321 goto loop;4385 goto loop;
@@ -5771,7 +5835,7 @@
5771 os_file_get_last_error(TRUE);5835 os_file_get_last_error(TRUE);
5772 goto next_node;5836 goto next_node;
5773 }5837 }
5774 success = os_file_flush(info_file);5838 success = xb_file_flush(info_file);
5775 if (!success) {5839 if (!success) {
5776 os_file_get_last_error(TRUE);5840 os_file_get_last_error(TRUE);
5777 goto next_node;5841 goto next_node;

Subscribers

People subscribed via source and target branches