@@ -476,6 +476,7 @@ static mysql_pfs_key_t pending_checkpoint_mutex_key;
476
476
477
477
static PSI_mutex_info all_pthread_mutexes[] = {
478
478
PSI_KEY(commit_cond_mutex),
479
+ PSI_KEY(pending_checkpoint_mutex),
479
480
PSI_KEY(innobase_share_mutex)
480
481
};
481
482
@@ -871,13 +872,17 @@ innobase_map_isolation_level(
871
872
872
873
/** Gets field offset for a field in a table.
873
874
@param[in] table MySQL table object
874
- @param[in] field MySQL field object
875
+ @param[in] field MySQL field object (from table->field array)
875
876
@return offset */
876
877
static inline
877
878
uint
878
879
get_field_offset(
879
880
const TABLE* table,
880
- const Field* field);
881
+ const Field* field)
882
+ {
883
+ return field->offset(table->record[0]);
884
+ }
885
+
881
886
882
887
/*************************************************************//**
883
888
Check for a valid value of innobase_compression_algorithm.
@@ -3980,12 +3985,6 @@ innobase_init(
3980
3985
innobase_hton->commit_by_xid = innobase_commit_by_xid;
3981
3986
innobase_hton->rollback_by_xid = innobase_rollback_by_xid;
3982
3987
innobase_hton->commit_checkpoint_request=innobase_checkpoint_request;
3983
-
3984
- #ifdef INNOBASE_CURSOR_VIEW
3985
- innobase_hton->create_cursor_read_view = innobase_create_cursor_view;
3986
- innobase_hton->set_cursor_read_view = innobase_set_cursor_view;
3987
- innobase_hton->close_cursor_read_view = innobase_close_cursor_view;
3988
- #endif
3989
3988
innobase_hton->create = innobase_create_handler;
3990
3989
3991
3990
#ifdef MYSQL_TABLESPACES
@@ -5686,7 +5685,7 @@ ha_innobase::table_flags() const
5686
5685
all InnoDB features such as GEOMETRY, FULLTEXT etc. */
5687
5686
/* JAN: TODO: MySQL 5.7
5688
5687
flags &= ~(HA_INNOPART_DISABLED_TABLE_FLAGS);
5689
-
5688
+ }
5690
5689
*/
5691
5690
}
5692
5691
@@ -6126,8 +6125,6 @@ innobase_match_index_columns(
6126
6125
if (innodb_idx_fld >= innodb_idx_fld_end) {
6127
6126
DBUG_RETURN(FALSE);
6128
6127
}
6129
-
6130
- mtype = innodb_idx_fld->col->mtype;
6131
6128
}
6132
6129
6133
6130
/* MariaDB-5.5 compatibility */
@@ -7311,19 +7308,6 @@ ha_innobase::close()
7311
7308
7312
7309
/* The following accessor functions should really be inside MySQL code! */
7313
7310
7314
- /** Gets field offset for a field in a table.
7315
- @param[in] table MySQL table object
7316
- @param[in] field MySQL field object
7317
- @return offset */
7318
- static inline
7319
- uint
7320
- get_field_offset(
7321
- const TABLE* table,
7322
- const Field* field)
7323
- {
7324
- return(static_cast<uint>((field->ptr - table->record[0])));
7325
- }
7326
-
7327
7311
#ifdef WITH_WSREP
7328
7312
UNIV_INTERN
7329
7313
int
@@ -9649,7 +9633,7 @@ wsrep_calc_row_hash(
9649
9633
}
9650
9634
#endif /* WITH_WSREP */
9651
9635
9652
- /*
9636
+ /**
9653
9637
Updates a row given as a parameter to a new value. Note that we are given
9654
9638
whole rows, not just the fields which are updated: this incurs some
9655
9639
overhead for CPU when we check which fields are actually updated.
@@ -9694,10 +9678,9 @@ ha_innobase::update_row(
9694
9678
+ MAX_REF_PARTS * 3;
9695
9679
9696
9680
m_upd_buf = reinterpret_cast<uchar*>(
9697
- my_malloc(
9698
- m_upd_buf_size,
9681
+ my_malloc(//PSI_INSTRUMENT_ME,
9682
+ m_upd_buf_size,
9699
9683
MYF(MY_WME)));
9700
- /* JAN: TODO: MySQL 5.7: PSI_INSTRUMENT_ME,...*/
9701
9684
9702
9685
if (m_upd_buf == NULL) {
9703
9686
m_upd_buf_size = 0;
@@ -10942,10 +10925,7 @@ ha_innobase::ft_init_ext(
10942
10925
10943
10926
/* Allocate FTS handler, and instantiate it before return */
10944
10927
fts_hdl = reinterpret_cast<NEW_FT_INFO*>(
10945
- my_malloc(sizeof(NEW_FT_INFO), MYF(0)));
10946
- /* JAN: TODO: MySQL 5.7 PSI
10947
- my_malloc(PSI_INSTRUMENT_ME, sizeof(NEW_FT_INFO), MYF(0)));
10948
- */
10928
+ my_malloc(/*PSI_INSTRUMENT_ME,*/ sizeof(NEW_FT_INFO), MYF(0)));
10949
10929
10950
10930
fts_hdl->please = const_cast<_ft_vft*>(&ft_vft_result);
10951
10931
fts_hdl->could_you = const_cast<_ft_vft_ext*>(&ft_vft_ext_result);
@@ -12356,13 +12336,7 @@ create_index(
12356
12336
ind_type |= DICT_UNIQUE;
12357
12337
}
12358
12338
12359
- /* JAN: TODO: MySQL 5.7 PSI
12360
- field_lengths = (ulint*) my_malloc(PSI_INSTRUMENT_ME,
12361
- key->user_defined_key_parts * sizeof *
12362
- field_lengths, MYF(MY_FAE));
12363
- */
12364
-
12365
- field_lengths = (ulint*) my_malloc(
12339
+ field_lengths = (ulint*) my_malloc(//PSI_INSTRUMENT_ME,
12366
12340
key->user_defined_key_parts * sizeof *
12367
12341
field_lengths, MYF(MY_FAE));
12368
12342
@@ -12589,8 +12563,7 @@ validate_tablespace_name(
12589
12563
err = HA_WRONG_CREATE_OPTION;
12590
12564
}
12591
12565
} else {
12592
- my_printf_error(
12593
- ER_WRONG_TABLESPACE_NAME,
12566
+ my_printf_error(ER_WRONG_TABLESPACE_NAME,
12594
12567
"InnoDB: A general tablespace"
12595
12568
" name cannot start with `%s`.",
12596
12569
MYF(0), reserved_space_name_prefix);
@@ -13434,8 +13407,6 @@ create_table_info_t::innobase_table_flags()
13434
13407
}
13435
13408
}
13436
13409
13437
- //rec_format_t row_format = m_form->s->row_type;
13438
-
13439
13410
if (m_create_info->key_block_size > 0) {
13440
13411
/* The requested compressed page size (key_block_size)
13441
13412
is given in kilobytes. If it is a valid number, store
@@ -15114,9 +15085,7 @@ innobase_drop_database(
15114
15085
}
15115
15086
15116
15087
ptr++;
15117
- namebuf = (char*) my_malloc((uint) len + 2, MYF(0));
15118
- // JAN: TODO: MySQL 5.7
15119
- //namebuf = (char*) my_malloc(PSI_INSTRUMENT_ME, (uint) len + 2, MYF(0));
15088
+ namebuf = (char*) my_malloc(/*PSI_INSTRUMENT_ME,*/ (uint) len + 2, MYF(0));
15120
15089
15121
15090
memcpy(namebuf, ptr, len);
15122
15091
namebuf[len] = '/';
@@ -15366,8 +15335,9 @@ For other error codes, the server will fall back to counting records. */
15366
15335
15367
15336
#ifdef MYSQL_57_SELECT_COUNT_OPTIMIZATION
15368
15337
int
15369
- ha_innobase::records(ha_rows* num_rows)
15370
- /*===================================*/
15338
+ ha_innobase::records(
15339
+ /*==================*/
15340
+ ha_rows* num_rows) /*!< out: number of rows */
15371
15341
{
15372
15342
DBUG_ENTER("ha_innobase::records()");
15373
15343
@@ -15439,16 +15409,15 @@ ha_innobase::records(ha_rows* num_rows)
15439
15409
case DB_LOCK_WAIT_TIMEOUT:
15440
15410
*num_rows = HA_POS_ERROR;
15441
15411
DBUG_RETURN(convert_error_code_to_mysql(ret, 0, m_user_thd));
15442
- break;
15443
15412
case DB_INTERRUPTED:
15444
15413
*num_rows = HA_POS_ERROR;
15445
15414
DBUG_RETURN(HA_ERR_QUERY_INTERRUPTED);
15446
- break;
15447
15415
default:
15448
15416
/* No other error besides the three below is returned from
15449
15417
row_scan_index_for_mysql(). Make a debug catch. */
15450
15418
*num_rows = HA_POS_ERROR;
15451
15419
ut_ad(0);
15420
+ DBUG_RETURN(-1);
15452
15421
}
15453
15422
15454
15423
m_prebuilt->trx->op_info = "";
@@ -17894,12 +17863,8 @@ innodb_show_status(
17894
17863
/* allocate buffer for the string, and
17895
17864
read the contents of the temporary file */
17896
17865
17897
- /* JAN: TODO: MySQL 5.7 PSI */
17898
- if (!(str = (char*) my_malloc(
17899
- usable_len + 1, MYF(0)))) {
17900
- /* if (!(str = (char*) my_malloc(PSI_INSTRUMENT_ME,
17866
+ if (!(str = (char*) my_malloc(//PSI_INSTRUMENT_ME,
17901
17867
usable_len + 1, MYF(0)))) {
17902
- */
17903
17868
mutex_exit(&srv_monitor_file_mutex);
17904
17869
DBUG_RETURN(1);
17905
17870
}
@@ -18334,15 +18299,9 @@ get_share(
18334
18299
grows too big */
18335
18300
18336
18301
share = reinterpret_cast<INNOBASE_SHARE*>(
18337
- my_malloc(
18302
+ my_malloc(//PSI_INSTRUMENT_ME,
18338
18303
sizeof(*share) + length + 1,
18339
18304
MYF(MY_FAE | MY_ZEROFILL)));
18340
- /* JAN: TODO: MySQL 5.7 PSI
18341
- share = reinterpret_cast<INNOBASE_SHARE*>(
18342
- my_malloc(PSI_INSTRUMENT_ME,
18343
- sizeof(*share) + length + 1,
18344
- MYF(MY_FAE | MY_ZEROFILL)));
18345
- */
18346
18305
18347
18306
share->table_name = reinterpret_cast<char*>(
18348
18307
memcpy(share + 1, table_name, length + 1));
@@ -19320,64 +19279,6 @@ innobase_rollback_by_xid(
19320
19279
}
19321
19280
}
19322
19281
19323
- #ifdef INNOBASE_CURSOR_VIEW
19324
-
19325
- /*******************************************************************//**
19326
- Create a consistent view for a cursor based on current transaction
19327
- which is created if the corresponding MySQL thread still lacks one.
19328
- This consistent view is then used inside of MySQL when accessing records
19329
- using a cursor.
19330
- @return pointer to cursor view or NULL */
19331
- static
19332
- void*
19333
- innobase_create_cursor_view(
19334
- /*========================*/
19335
- handlerton* hton, /*!< in: innobase hton */
19336
- THD* thd) /*!< in: user thread handle */
19337
- {
19338
- DBUG_ASSERT(hton == innodb_hton_ptr);
19339
-
19340
- return(read_cursor_view_create_for_mysql(check_trx_exists(thd)));
19341
- }
19342
-
19343
- /*******************************************************************//**
19344
- Close the given consistent cursor view of a transaction and restore
19345
- global read view to a transaction read view. Transaction is created if the
19346
- corresponding MySQL thread still lacks one. */
19347
- static
19348
- void
19349
- innobase_close_cursor_view(
19350
- /*=======================*/
19351
- handlerton* hton, /*!< in: innobase hton */
19352
- THD* thd, /*!< in: user thread handle */
19353
- void* curview)/*!< in: Consistent read view to be closed */
19354
- {
19355
- DBUG_ASSERT(hton == innodb_hton_ptr);
19356
-
19357
- read_cursor_view_close_for_mysql(check_trx_exists(thd),
19358
- (cursor_view_t*) curview);
19359
- }
19360
-
19361
- /*******************************************************************//**
19362
- Set the given consistent cursor view to a transaction which is created
19363
- if the corresponding MySQL thread still lacks one. If the given
19364
- consistent cursor view is NULL global read view of a transaction is
19365
- restored to a transaction read view. */
19366
- static
19367
- void
19368
- innobase_set_cursor_view(
19369
- /*=====================*/
19370
- handlerton* hton, /*!< in: innobase hton */
19371
- THD* thd, /*!< in: user thread handle */
19372
- void* curview)/*!< in: Consistent cursor view to be set */
19373
- {
19374
- DBUG_ASSERT(hton == innodb_hton_ptr);
19375
-
19376
- read_cursor_set_for_mysql(check_trx_exists(thd),
19377
- (cursor_view_t*) curview);
19378
- }
19379
- #endif /* INNOBASE_CURSOR_VIEW */
19380
-
19381
19282
bool
19382
19283
ha_innobase::check_if_incompatible_data(
19383
19284
/*====================================*/
@@ -20531,12 +20432,8 @@ innodb_monitor_validate(
20531
20432
by InnoDB, so we can access it in another callback
20532
20433
function innodb_monitor_update() and free it appropriately */
20533
20434
if (name) {
20534
- /* JAN: TODO: MySQL 5.7 PSI
20535
- monitor_name = my_strdup(PSI_INSTRUMENT_ME,
20435
+ monitor_name = my_strdup(//PSI_INSTRUMENT_ME,
20536
20436
name, MYF(0));
20537
- */
20538
- monitor_name = my_strdup(
20539
- name, MYF(0));
20540
20437
} else {
20541
20438
return(1);
20542
20439
}
@@ -21860,7 +21757,7 @@ static MYSQL_SYSVAR_ENUM(checksum_algorithm, srv_checksum_algorithm,
21860
21757
" write a constant magic number, do not allow values other than that"
21861
21758
" magic number when reading;"
21862
21759
" Files updated when this option is set to crc32 or strict_crc32 will"
21863
- " not be readable by InnoDB versions older than 5.6.3 ",
21760
+ " not be readable by MariaDB versions older than 10.0.4 ",
21864
21761
NULL, NULL, SRV_CHECKSUM_ALGORITHM_CRC32,
21865
21762
&innodb_checksum_algorithm_typelib);
21866
21763
@@ -23789,11 +23686,6 @@ innobase_get_computed_value(
23789
23686
return(NULL);
23790
23687
}
23791
23688
23792
- /* we just want to store the data in passed in MySQL record */
23793
- if (ret != 0) {
23794
- return(NULL);
23795
- }
23796
-
23797
23689
if (vctempl->mysql_null_bit_mask
23798
23690
&& (mysql_rec[vctempl->mysql_null_byte_offset]
23799
23691
& vctempl->mysql_null_bit_mask)) {
0 commit comments