145
145
the creating trx of the oldest view is set as not visible in the 'copied'
146
146
view. Opens a new view if no views currently exist. The view must be closed
147
147
with ..._close. This is used in purge. */
150
150
read_view_oldest_copy_or_open_new(
151
151
/*==============================*/
250
252
view->creator_trx_id = cr_trx_id;
251
253
view->type = VIEW_NORMAL;
252
view->undo_no = ut_dulint_zero;
254
view->undo_no = ut_dulint_create(0, 0);
254
256
/* No future transactions should be visible in the view */
256
258
view->low_limit_no = trx_sys->max_trx_id;
257
259
view->low_limit_id = view->low_limit_no;
261
view->can_be_too_old = FALSE;
260
264
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
316
320
/*************************************************************************
317
321
Closes a consistent read view for MySQL. This function is called at an SQL
318
322
statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. */
321
325
read_view_close_for_mysql(
322
326
/*======================*/
360
364
(ulong) ut_dulint_get_high(view->low_limit_no),
361
365
(ulong) ut_dulint_get_low(view->low_limit_no));
363
fprintf(stderr, "Read view up limit trx id " TRX_ID_FMT "\n",
364
TRX_ID_PREP_PRINTF(view->up_limit_id));
367
fprintf(stderr, "Read view up limit trx id %lu %lu\n",
368
(ulong) ut_dulint_get_high(view->up_limit_id),
369
(ulong) ut_dulint_get_low(view->up_limit_id));
366
fprintf(stderr, "Read view low limit trx id " TRX_ID_FMT "\n",
367
TRX_ID_PREP_PRINTF(view->low_limit_id));
371
fprintf(stderr, "Read view low limit trx id %lu %lu\n",
372
(ulong) ut_dulint_get_high(view->low_limit_id),
373
(ulong) ut_dulint_get_low(view->low_limit_id));
369
375
fprintf(stderr, "Read view individually stored trx ids:\n");
371
377
n_ids = view->n_trx_ids;
373
379
for (i = 0; i < n_ids; i++) {
374
fprintf(stderr, "Read view trx id " TRX_ID_FMT "\n",
380
fprintf(stderr, "Read view trx id %lu %lu\n",
381
(ulong) ut_dulint_get_high(
382
read_view_get_nth_trx_id(view, i)),
383
(ulong) ut_dulint_get_low(
376
384
read_view_get_nth_trx_id(view, i)));
382
390
in cursors. In this consistent read view modifications done by the
383
391
creating transaction after the cursor is created or future transactions
384
392
are not visible. */
387
395
read_cursor_view_create_for_mysql(
388
396
/*==============================*/
472
482
/*************************************************************************
473
483
Close a given consistent cursor view for mysql and restore global read view
474
484
back to a transaction read view. */
477
487
read_cursor_view_close_for_mysql(
478
488
/*=============================*/
501
511
This function sets a given consistent cursor view to a transaction
502
512
read view if given consistent cursor view is not NULL. Otherwise, function
503
513
restores a global read view to a transaction read view. */
506
516
read_cursor_set_for_mysql(
507
517
/*======================*/