summaryrefslogtreecommitdiffstats
path: root/storage/maria/maria_def.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-01 18:15:00 +0000
commita2a2e32c02643a0cec111511220227703fda1cd5 (patch)
tree69cc2b631234c2a8e026b9cd4d72676c61c594df /storage/maria/maria_def.h
parentReleasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff)
downloadmariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz
mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/maria_def.h')
-rw-r--r--storage/maria/maria_def.h39
1 files changed, 36 insertions, 3 deletions
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index b12f21e3..147dc83d 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -43,6 +43,14 @@
C_MODE_START
+#ifdef _WIN32
+/*
+ We cannot use mmap() on Windows with Aria as mmap() can cause file
+ size to increase in _ma_dynmap_file(). The extra \0 data causes
+ the file to be regarded as corrupted.
+*/
+#undef HAVE_MMAP
+#endif
/*
Limit max keys according to HA_MAX_POSSIBLE_KEY; See myisamchk.h for details
*/
@@ -213,7 +221,6 @@ extern int maria_rsame_with_pos(MARIA_HA *file, uchar *record,
extern int maria_update(MARIA_HA *file, const uchar *old,
const uchar *new_record);
extern int maria_write(MARIA_HA *file, const uchar *buff);
-extern MARIA_RECORD_POS maria_position(MARIA_HA *file);
extern int maria_status(MARIA_HA *info, MARIA_INFO *x, uint flag);
extern int maria_lock_database(MARIA_HA *file, int lock_type);
extern int maria_delete_table(const char *name);
@@ -1018,6 +1025,7 @@ struct st_maria_handler
my_bool switched_transactional;
/* If transaction will autocommit */
my_bool autocommit;
+ my_bool has_cond_pushdown;
#ifdef _WIN32
my_bool owned_by_merge; /* This Maria table is part of a merge union */
#endif
@@ -1029,6 +1037,8 @@ struct st_maria_handler
my_bool create_unique_index_by_sort;
index_cond_func_t index_cond_func; /* Index condition function */
void *index_cond_func_arg; /* parameter for the func */
+ rowid_filter_func_t rowid_filter_func; /* rowid filter check function */
+ void *rowid_filter_func_arg; /* parameter for the func */
};
/* Table options for the Aria and S3 storage engine */
@@ -1070,6 +1080,7 @@ struct ha_table_option_struct
#define STATE_IN_REPAIR 1024U /* We are running repair on table */
#define STATE_CRASHED_PRINTED 2048U
#define STATE_DATA_FILE_FULL 4096U
+#define STATE_HAS_LSN 8192U /* Some page still has LSN */
#define STATE_CRASHED_FLAGS (STATE_CRASHED | STATE_CRASHED_ON_REPAIR | STATE_CRASHED_PRINTED)
@@ -1353,7 +1364,11 @@ extern int _ma_read_rnd_no_record(MARIA_HA *info, uchar *buf,
MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks);
my_off_t _ma_no_keypos_to_recpos(MARIA_SHARE *share, my_off_t pos);
-
+/* Get position to last record */
+static inline MARIA_RECORD_POS maria_position(MARIA_HA *info)
+{
+ return info->cur_row.lastpos;
+}
extern my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key);
extern my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key,
MARIA_RECORD_POS *root);
@@ -1739,7 +1754,25 @@ extern my_bool maria_flush_log_for_page_none(PAGECACHE_IO_HOOK_ARGS *args);
extern PAGECACHE *maria_log_pagecache;
extern void ma_set_index_cond_func(MARIA_HA *info, index_cond_func_t func,
void *func_arg);
-check_result_t ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record);
+extern void ma_set_rowid_filter_func(MARIA_HA *info,
+ rowid_filter_func_t check_func,
+ void *func_arg);
+static inline void ma_reset_index_filter_functions(MARIA_HA *info)
+{
+ info->index_cond_func= NULL;
+ info->rowid_filter_func= NULL;
+ info->has_cond_pushdown= 0;
+}
+check_result_t ma_check_index_cond_real(MARIA_HA *info, uint keynr,
+ uchar *record);
+static inline check_result_t ma_check_index_cond(MARIA_HA *info, uint keynr,
+ uchar *record)
+{
+ if (!info->has_cond_pushdown)
+ return CHECK_POS;
+ return ma_check_index_cond_real(info, keynr, record);
+}
+
extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx);
extern my_bool ma_killed_standalone(MARIA_HA *);