1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Misc: code cleanup

This commit is contained in:
kevg
2017-04-11 18:28:24 +03:00
committed by Aleksey Midenkov
parent 06ad9c01a6
commit a1d42a6f20
2 changed files with 9 additions and 3 deletions

View File

@ -366,7 +366,8 @@ int mysql_update(THD *thd,
{
DBUG_RETURN(1);
}
bool has_vers_fields= check_has_vers_fields(fields);
bool has_vers_fields=
table->versioned() ? check_has_vers_fields(fields) : false;
if (check_key_in_view(thd, table_list))
{
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "UPDATE");

View File

@ -243,8 +243,13 @@ read_trx_id(const rec_t *rec) {
*/
static
void
find_best_match(mtr_t &mtr, btr_pcur_t &pcur, bool backwards,
timeval commit_ts, const rec_t *rec) {
find_best_match(
mtr_t &mtr,
btr_pcur_t &pcur,
bool backwards,
timeval commit_ts,
const rec_t *rec)
{
btr_pcur_t best;
btr_pcur_init(&best);
btr_pcur_copy_stored_position(&best, &pcur);