MySQL 8.0.40
Source Code Documentation
ha_innopart.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2014, 2024, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28/* The InnoDB Partition handler: the interface between MySQL and InnoDB. */
29
30#ifndef ha_innopart_h
31#define ha_innopart_h
32
33#include <stddef.h>
34#include <sys/types.h>
35
36#include "ha_innodb.h"
37#include "my_compiler.h"
39#include "row0mysql.h"
40#include "ut0bitset.h"
41
42/* Forward declarations */
44class partition_info;
45
46/* Error Text */
47static constexpr auto PARTITION_IN_SHARED_TABLESPACE =
48 "InnoDB : A partitioned table"
49 " is not allowed in a shared tablespace.";
50
51/** HA_DUPLICATE_POS and HA_READ_BEFORE_WRITE_REMOVAL is not
52set from ha_innobase, but cannot yet be supported in ha_innopart.
53Full text and geometry is not yet supported. */
57
59
60/** InnoDB partition specific Handler_share. */
62 private:
63 /** Array of all included table definitions (one per partition). */
65
66 /** Instead of INNOBASE_SHARE::idx_trans_tbl. Maps MySQL index number
67 to InnoDB index per partition. */
69
70 /** Total number of partitions. */
72
73 /** Number of indexes. */
75
76 /** Reference count. */
78
79 /** Pointer back to owning TABLE_SHARE. */
81
82 public:
83 Ha_innopart_share(TABLE_SHARE *table_share);
84
85 ~Ha_innopart_share() override;
86
87 /** Set innodb table for given partition.
88 @param[in] part_id Partition number.
89 @param[in] table Table. */
90 inline void set_table_part(uint part_id, dict_table_t *table) {
91 ut_ad(m_table_parts != nullptr);
92 ut_ad(part_id < m_tot_parts);
93 m_table_parts[part_id] = table;
94 }
95 /** Get table reference for given partition.
96 @param[in] part_id Partition number
97 @return InnoDB table reference. */
99 return (&m_table_parts[part_id]);
100 }
101
102 /** Return innodb table for given partition.
103 @param[in] part_id Partition number.
104 @return InnoDB table. */
105 inline dict_table_t *get_table_part(uint part_id) const {
106 ut_ad(m_table_parts != nullptr);
107 ut_ad(part_id < m_tot_parts);
108 return (m_table_parts[part_id]);
109 }
110
111 /** Return innodb index for given partition and key number.
112 @param[in] part_id Partition number.
113 @param[in] keynr Key number.
114 @return InnoDB index. */
115 dict_index_t *get_index(uint part_id, uint keynr);
116
117 /** Get MySQL key number corresponding to InnoDB index.
118 Calculates the key number used inside MySQL for an Innobase index. We will
119 first check the "index translation table" for a match of the index to get
120 the index number. If there does not exist an "index translation table",
121 or not able to find the index in the translation table, then we will fall back
122 to the traditional way of looping through dict_index_t list to find a
123 match. In this case, we have to take into account if we generated a
124 default clustered index for the table
125 @param[in] part_id Partition the index belongs to.
126 @param[in] index Index to return MySQL key number for.
127 @return the key number used inside MySQL or UINT_MAX if key is not
128 found. */
129 uint get_mysql_key(uint part_id, const dict_index_t *index);
130
131 /** Return whether share has opened InnoDB tables for partitions. */
132 bool has_table_parts() const { return (m_table_parts != nullptr); }
133
134 /** Increment share and InnoDB tables reference counters. */
136
137 /** Open InnoDB tables for partitions and return them as array.
138 @param[in,out] thd Thread context
139 @param[in] table MySQL table definition
140 @param[in] dd_table Global DD table object
141 @param[in] part_info Partition info (partition names to use)
142 @param[in] table_name Table name (db/table_name)
143 @return Array on InnoDB tables on success else nullptr. */
144 static dict_table_t **open_table_parts(THD *thd, const TABLE *table,
145 const dd::Table *dd_table,
146 partition_info *part_info,
147 const char *table_name);
148
149 /** Initialize the share with table and indexes per partition.
150 @param[in] part_info Partition info (partition names to use).
151 @param[in] table_parts Array of InnoDB tables for partitions.
152 @return false on success else true. */
154 dict_table_t **table_parts);
155
156 /** Close the table partitions.
157 If all instances are closed, also release the resources.*/
158 void close_table_parts();
159
160 /** Close InnoDB tables for partitions.
161 @param[in] table_parts Array of InnoDB tables for partitions.
162 @param[in] tot_parts Number of partitions. */
163 static void close_table_parts(dict_table_t **table_parts, uint tot_parts);
164
165 /** @return the TABLE SHARE object */
166 const TABLE_SHARE *get_table_share() const { return (m_table_share); }
167
168 /** Get the number of partitions
169 @return number of partitions */
171 ut_ad(m_tot_parts != 0);
172 return (m_tot_parts);
173 }
174
175 /** Set up the virtual column template for partition table, and points
176 all m_table_parts[]->vc_templ to it.
177 @param[in] table MySQL TABLE object
178 @param[in] ib_table InnoDB dict_table_t
179 @param[in] name Table name (db/table_name) */
180 void set_v_templ(TABLE *table, dict_table_t *ib_table, const char *name);
181
182 private:
183 /** Disable default constructor. */
184 Ha_innopart_share() = default;
185
186 /** Open one partition
187 @param[in,out] client Data dictionary client
188 @param[in] thd Thread THD
189 @param[in] table MySQL table definition
190 @param[in] dd_part dd::Partition
191 @param[in] part_name Table name of this partition
192 @param[out] part_dict_table InnoDB table for partition
193 @retval false On success
194 @retval true On failure */
196 THD *thd, const TABLE *table,
197 const dd::Partition *dd_part,
198 const char *part_name,
199 dict_table_t **part_dict_table);
200};
201
202/** Get explicit specified tablespace for one (sub)partition, checking
203from lowest level
204@param[in] tablespace table-level tablespace if specified
205@param[in] part Partition to check
206@param[in] sub_part Sub-partition to check, if no, just NULL
207@return Tablespace name, if nullptr or [0] = '\0' then nothing specified */
208const char *partition_get_tablespace(const char *tablespace,
209 const partition_element *part,
210 const partition_element *sub_part);
211
212/** The class defining a partitioning aware handle to an InnoDB table.
213Based on ha_innobase and extended with
214- Partition_helper for re-using common partitioning functionality
215- Partition_handler for providing partitioning specific api calls.
216Generic partitioning functions are implemented in Partition_helper.
217Lower level storage functions are implemented in ha_innobase.
218Partition_handler is inherited for implementing the handler level interface
219for partitioning specific functions, like truncate_partition.
220InnoDB specific functions related to partitioning is implemented here. */
222 public Partition_helper,
223 public Partition_handler {
224 public:
225 ha_innopart(handlerton *hton, TABLE_SHARE *table_arg);
226
227 ~ha_innopart() override = default;
228
229 /** Clone this handler, used when needing more than one cursor
230 to the same table.
231 @param[in] name Table name.
232 @param[in] mem_root mem_root to allocate from.
233 @retval Pointer to clone or NULL if error. */
234 handler *clone(const char *name, MEM_ROOT *mem_root) override;
235
236 /** \defgroup ONLINE_ALTER_TABLE_INTERFACE On-line ALTER TABLE interface
237 @see handler0alter.cc
238 @{ */
239
240 /** Check if InnoDB supports a particular alter table in-place.
241 @param[in] altered_table TABLE object for new version of table.
242 @param[in,out] ha_alter_info Structure describing changes to be done
243 by ALTER TABLE and holding data used during in-place alter.
244 @retval HA_ALTER_INPLACE_NOT_SUPPORTED Not supported
245 @retval HA_ALTER_INPLACE_NO_LOCK Supported
246 @retval HA_ALTER_INPLACE_SHARED_LOCK_AFTER_PREPARE Supported, but
247 requires lock during main phase and exclusive lock during prepare
248 phase.
249 @retval HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE Supported, prepare
250 phase requires exclusive lock. */
252 TABLE *altered_table, Alter_inplace_info *ha_alter_info) override;
253
254 /** Prepare in-place ALTER for table.
255 Allows InnoDB to update internal structures with concurrent
256 writes blocked (provided that check_if_supported_inplace_alter()
257 did not return HA_ALTER_INPLACE_NO_LOCK).
258 This will be invoked before inplace_alter_table().
259 @param[in] altered_table TABLE object for new version of table.
260 @param[in,out] ha_alter_info Structure describing changes to be done
261 by ALTER TABLE and holding data used during in-place alter.
262 @param[in] old_table_def dd::Table object describing old
263 version of the table.
264 @param[in,out] new_table_def dd::Table object for the new version
265 of the table. Can be adjusted by this call. Changes to the table
266 definition will be persisted in the data-dictionary at statement
267 commit time.
268 @retval true Failure.
269 @retval false Success. */
270 bool prepare_inplace_alter_table(TABLE *altered_table,
271 Alter_inplace_info *ha_alter_info,
272 const dd::Table *old_table_def,
273 dd::Table *new_table_def) override;
274
275 /** Alter the table structure in-place.
276 Alter the table structure in-place with operations
277 specified using HA_ALTER_FLAGS and Alter_inplace_information.
278 The level of concurrency allowed during this operation depends
279 on the return value from check_if_supported_inplace_alter().
280 @param[in] altered_table TABLE object for new version of table.
281 @param[in,out] ha_alter_info Structure describing changes to be done
282 by ALTER TABLE and holding data used during in-place alter.
283 @param[in] old_table_def dd::Table object describing old
284 version of the table.
285 @param[in,out] new_table_def dd::Table object for the new version
286 of the table. Can be adjusted by this call. Changes to the table
287 definition will be persisted in the data-dictionary at statement
288 commit time.
289 @retval true Failure.
290 @retval false Success. */
291 bool inplace_alter_table(TABLE *altered_table,
292 Alter_inplace_info *ha_alter_info,
293 const dd::Table *old_table_def,
294 dd::Table *new_table_def) override;
295
296 /** Commit or rollback.
297 Commit or rollback the changes made during
298 prepare_inplace_alter_table() and inplace_alter_table() inside
299 the storage engine. Note that the allowed level of concurrency
300 during this operation will be the same as for
301 inplace_alter_table() and thus might be higher than during
302 prepare_inplace_alter_table(). (E.g concurrent writes were
303 blocked during prepare, but might not be during commit).
304 @param[in] altered_table TABLE object for new version of table.
305 @param[in,out] ha_alter_info Structure describing changes to be done
306 by ALTER TABLE and holding data used during
307 in-place alter.
308 @param[in] commit true => Commit, false => Rollback.
309 @param[in] old_table_def dd::Table object describing old
310 version of the table.
311 @param[in,out] new_table_def dd::Table object for the new version
312 of the table. Can be adjusted by this call. Changes to the table
313 definition will be persisted in the data-dictionary at statement
314 commit time.
315 @retval true Failure.
316 @retval false Success. */
317 bool commit_inplace_alter_table(TABLE *altered_table,
318 Alter_inplace_info *ha_alter_info,
319 bool commit, const dd::Table *old_table_def,
320 dd::Table *new_table_def) override;
321 /** @} */
322
323 /** Allows InnoDB to update internal structures with concurrent
324 writes blocked (given that check_if_supported_inplace_alter()
325 did not return HA_ALTER_INPLACE_NO_LOCK).
326 This is for 'ALTER TABLE ... PARTITION' and a corresponding function
327 to inplace_alter_table().
328 This will be invoked before inplace_alter_partition().
329
330 @param[in,out] altered_table TABLE object for new version of table
331 @param[in,out] ha_alter_info Structure describing changes to be done
332 by ALTER TABLE and holding data used during
333 in-place alter.
334 @param[in] old_dd_tab Table definition before the ALTER
335 @param[in,out] new_dd_tab Table definition after the ALTER
336 @retval true Failure
337 @retval false Success */
338 bool prepare_inplace_alter_partition(TABLE *altered_table,
339 Alter_inplace_info *ha_alter_info,
340 const dd::Table *old_dd_tab,
341 dd::Table *new_dd_tab);
342
343 /** Alter the table structure in-place with operations
344 specified using HA_ALTER_FLAGS and Alter_inplace_information.
345 This is for 'ALTER TABLE ... PARTITION' and a corresponding function
346 to inplace_alter_table().
347 The level of concurrency allowed during this operation depends
348 on the return value from check_if_supported_inplace_alter().
349
350 @param[in,out] ha_alter_info Structure describing changes to be done
351 by ALTER TABLE and holding data used
352 during in-place alter.
353 @retval true Failure
354 @retval false Success */
355 bool inplace_alter_partition(Alter_inplace_info *ha_alter_info);
356
357 /** Prepare to commit or roll back ALTER TABLE...ALGORITHM=INPLACE.
358 This is for 'ALTER TABLE ... PARTITION' and a corresponding function
359 to commit_inplace_alter_table().
360 @param[in,out] altered_table TABLE object for new version of table.
361 @param[in,out] ha_alter_info ALGORITHM=INPLACE metadata
362 @param[in] commit true=Commit, false=Rollback.
363 @param[in] old_dd_tab old table
364 @param[in,out] new_dd_tab new table
365 @retval true on failure (my_error() will have been called)
366 @retval false on success */
367 bool commit_inplace_alter_partition(TABLE *altered_table,
368 Alter_inplace_info *ha_alter_info,
369 bool commit, const dd::Table *old_dd_tab,
370 dd::Table *new_dd_tab);
371
372 // TODO: should we implement init_table_handle_for_HANDLER() ?
373 // (or is sql_stat_start handled correctly anyway?)
374 /** Optimize table.
375 This is mapped to "ALTER TABLE tablename ENGINE=InnoDB", which rebuilds
376 the table in MySQL.
377 @param[in] thd Connection thread handle.
378 @param[in] check_opt Currently ignored.
379 @return 0 for success else error code. */
380 int optimize(THD *thd, HA_CHECK_OPT *check_opt) override;
381
382 /** Set DD discard attribute for tablespace.
383 @param[in] table_def dd table
384 @param[in] discard True if this table is discarded
385 @return 0 or error number. */
386 int set_dd_discard_attribute(dd::Table *table_def, bool discard);
387
388 int discard_or_import_tablespace(bool discard, dd::Table *table_def) override;
389
390 /** Compare key and rowid.
391 Helper function for sorting records in the priority queue.
392 a/b points to table->record[0] rows which must have the
393 key fields set. The bytes before a and b store the rowid.
394 This is used for comparing/sorting rows first according to
395 KEY and if same KEY, by rowid (ref).
396
397 @param[in] key_info Null terminated array of index
398 information.
399 @param[in] a Pointer to record+ref in first record.
400 @param[in] b Pointer to record+ref in second record.
401 @return Return value is SIGN(first_rec - second_rec)
402 @retval 0 Keys are equal.
403 @retval -1 second_rec is greater than first_rec.
404 @retval +1 first_rec is greater than second_rec. */
405 static int key_and_rowid_cmp(KEY **key_info, uchar *a, uchar *b);
406
407 int extra(enum ha_extra_function operation) override;
408
409 void print_error(int error, myf errflag) override;
410
411 bool is_ignorable_error(int error) override;
412
413 int start_stmt(THD *thd, thr_lock_type lock_type) override;
414
416 key_range *max_key) override;
417
419
421
422 void update_create_info(HA_CREATE_INFO *create_info) override;
423
424 int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info,
425 dd::Table *table_def) override;
426
427 /** Drop a table.
428 @param[in] name table name
429 @param[in,out] dd_table data dictionary table
430 @return error number
431 @retval 0 on success */
432 int delete_table(const char *name, const dd::Table *dd_table) override;
433
434 /** Rename a table.
435 @param[in] from table name before rename
436 @param[in] to table name after rename
437 @param[in] from_table data dictionary table before rename
438 @param[in,out] to_table data dictionary table after rename
439 @return error number
440 @retval 0 on success */
441 int rename_table(const char *from, const char *to,
442 const dd::Table *from_table, dd::Table *to_table) override;
443
444 int check(THD *thd, HA_CHECK_OPT *check_opt) override;
445
446 /** Repair a partitioned table.
447 Only repairs records in wrong partitions (moves them to the correct
448 partition or deletes them if not in any partition).
449 @param[in] thd MySQL THD object/thread handle.
450 @param[in] repair_opt Repair options.
451 @return 0 or error code. */
452 int repair(THD *thd, HA_CHECK_OPT *repair_opt) override;
453
454 /** Get the current auto_increment value.
455 @param[in] offset Table auto-inc offset.
456 @param[in] increment Table auto-inc increment.
457 @param[in] nb_desired_values Number of required values.
458 @param[out] first_value The auto increment value.
459 @param[out] nb_reserved_values Number of reserved values. */
460 void get_auto_increment(ulonglong offset, ulonglong increment,
461 ulonglong nb_desired_values, ulonglong *first_value,
462 ulonglong *nb_reserved_values) override;
463
464 /* Get partition row type
465 @param[in] partition_table partition table
466 @param[in] part_id Id of partition for which row type to be retrieved
467 @return Partition row type. */
468 enum row_type get_partition_row_type(const dd::Table *partition_table,
469 uint part_id) override;
470
471 int cmp_ref(const uchar *ref1, const uchar *ref2) const override;
472
473 int read_range_first(const key_range *start_key, const key_range *end_key,
474 bool eq_range_arg, bool sorted) override {
475 return (Partition_helper::ph_read_range_first(start_key, end_key,
476 eq_range_arg, sorted));
477 }
478
479 void position(const uchar *record) override {
481 }
482
483 /* TODO: Implement these! */
485 uint table_changes
486 [[maybe_unused]]) override {
487 ut_d(ut_error);
488 ut_o(return (COMPATIBLE_DATA_NO));
489 }
490
491 int delete_all_rows() override { return (handler::delete_all_rows()); }
492
493 int disable_indexes(uint mode [[maybe_unused]]) override {
494 return (HA_ERR_WRONG_COMMAND);
495 }
496
497 int enable_indexes(uint mode [[maybe_unused]]) override {
498 return (HA_ERR_WRONG_COMMAND);
499 }
500
501 int ft_init() override {
502 ut_d(ut_error);
503 ut_o(return (HA_ERR_WRONG_COMMAND));
504 }
505
506 FT_INFO *ft_init_ext(uint flags [[maybe_unused]], uint inx [[maybe_unused]],
507 String *key [[maybe_unused]]) override {
508 ut_d(ut_error);
509 ut_o(return (nullptr));
510 }
511
512 FT_INFO *ft_init_ext_with_hints(uint inx [[maybe_unused]],
513 String *key [[maybe_unused]],
514 Ft_hints *hints [[maybe_unused]]) override {
515 ut_d(ut_error);
516 ut_o(return (nullptr));
517 }
518
519 int ft_read(uchar *buf [[maybe_unused]]) override {
520 ut_d(ut_error);
521 ut_o(return (HA_ERR_WRONG_COMMAND));
522 }
523
524 bool get_foreign_dup_key(char *child_table_name [[maybe_unused]],
525 uint child_table_name_len [[maybe_unused]],
526 char *child_key_name [[maybe_unused]],
527 uint child_key_name_len [[maybe_unused]]) override {
528 ut_d(ut_error);
529 ut_o(return (false));
530 }
531
532 int read_range_next() override {
534 }
535
536 uint32_t calculate_key_hash_value(Field **field_array) override {
538 }
539
540 Table_flags table_flags() const override {
542 }
543
544 void release_auto_increment() override {
546 }
547
548 /** Implementing Partition_handler interface @see partition_handler.h
549 @{ */
550
551 /** See Partition_handler. */
553 ha_checksum *check_sum,
554 uint part_id) override {
556 part_id);
557 }
558
559 uint alter_flags(uint flags [[maybe_unused]]) const override {
561 }
562
564 return (static_cast<Partition_handler *>(this));
565 }
566
567 void set_part_info(partition_info *part_info, bool early) override {
568 Partition_helper::set_part_info_low(part_info, early);
569 }
570
571 void initialize_partitioning(partition_info *part_info, bool early) {
572 Partition_helper::set_part_info_low(part_info, early);
573 }
574
575 handler *get_handler() override { return (static_cast<handler *>(this)); }
576 /** @} */
577
578 /** Get number of threads that would be spawned for parallel read.
579 @param[out] scan_ctx A scan context created by this method
580 that has to be used in
581 parallel_scan
582 @param[out] num_threads Number of threads to be spawned
583 @param[in] use_reserved_threads true if reserved threads are to be used
584 if we exhaust the max cap of number of
585 parallel read threads that can be
586 spawned at a time
587 @return error code
588 @return 0 on success */
589 int parallel_scan_init(void *&scan_ctx, size_t *num_threads,
590 bool use_reserved_threads) override;
591
593
594 /** Start parallel read of data.
595 @param[in] scan_ctx Scan context created by parallel_scan_init
596 @param[in] thread_ctxs context for each of the spawned threads
597 @param[in] init_fn callback called by each parallel load
598 thread at the beginning of the parallel load.
599 @param[in] load_fn callback called by each parallel load
600 thread when processing of rows is required.
601 @param[in] end_fn callback called by each parallel load
602 thread when processing of rows has ended.
603 @return error code
604 @return 0 on success */
605 int parallel_scan(void *scan_ctx, void **thread_ctxs, Reader::Init_fn init_fn,
606 Reader::Load_fn load_fn, Reader::End_fn end_fn) override;
607 /** Run the parallel read of data.
608 @param[in] parallel_scan_ctx a scan context created by
609 parallel_scan_init
610 */
611 void parallel_scan_end(void *parallel_scan_ctx) override;
612
613 private:
614 /** Pointer to Ha_innopart_share on the TABLE_SHARE. */
616
618 /** saved m_prebuilt->ins_node */
620
621 /** saved m_prebuilt->upd_node */
623
624 /** saved m_prebuilt->blob_heap */
626
627 /** saved m_prebuilt->trx_id (which in turn reflects table->def_trx_id) */
629
630 /** saved m_prebuilt->row_read_type */
632
633 /** save m_prebuilt->new_rec_lock[] values */
635 };
636 /* Per partition information storing last values of m_prebuilt when we've last
637 finished using given partition, so we can restore it when we return to it.
638 Synchronized with m_prebuilt when changing partitions:
639 set_partition(part_id) copies to m_prebuilt from m_parts[part_id]
640 update_partition(part_id) copies to m_parts[part_id] from m_prebuilt
641
642 NOTE: these are not the only fields synchronized with m_prebuilt.
643 */
645
646 /** byte array for sql_stat_start bitset */
647 byte *m_bitset;
648
649 /** sql_stat_start per partition. */
651
652 /** persistent cursors per partition. */
654
655 /** persistent cluster cursors per partition. */
657
658 /** map from part_id to offset in above two arrays. */
659 uint16_t *m_pcur_map;
660
661 /** Original m_prebuilt->pcur. */
663
664 /** Original m_prebuilt->clust_pcur. */
666
667 /** New partitions during ADD/REORG/... PARTITION. */
669
670 /** Can reuse the template for the previous partition. */
672
673 /** Clear used ins_nodes and upd_nodes. */
674 void clear_ins_upd_nodes();
675
676 /** Clear the blob heaps for all partitions */
677 void clear_blob_heaps();
678
679 /** Reset state of file to after 'open'. This function is called
680 after every statement for all tables used by that statement. */
681 int reset() override;
682
683 /** Changes the active index of a handle.
684 @param[in] part_id Use this partition.
685 @param[in] keynr Use this index; MAX_KEY means always clustered index,
686 even if it was internally generated by InnoDB.
687 @return 0 or error number. */
688 int change_active_index(uint part_id, uint keynr);
689
690 /** Move to next partition and set its index.
691 @return 0 for success else error number. */
693
694 /** Internally called for initializing auto increment value.
695 Should never be called, but defined to catch such errors.
696 @return 0 on success else error code. */
698
699 /** Get the index for the current partition
700 @param[in] keynr MySQL index number.
701 @return InnoDB index or NULL. */
702 dict_index_t *innobase_get_index(uint keynr) override;
703
704 /** Get the index for a handle.
705 Does not change active index.
706 @param[in] keynr Use this index; MAX_KEY means always clustered index,
707 even if it was internally generated by InnoDB.
708 @param[in] part_id From this partition.
709 @return NULL or index instance. */
710 dict_index_t *innopart_get_index(uint part_id, uint keynr);
711
712 /** Change active partition.
713 Copies needed info into m_prebuilt from the partition specific memory.
714 @param[in] part_id Partition to set as active. */
715 void set_partition(uint part_id);
716
717 /** Update active partition.
718 Copies needed info from m_prebuilt into the partition specific memory.
719 @param[in] part_id Partition to set as active. */
720 void update_partition(uint part_id);
721
722 /** TRUNCATE an InnoDB partitioned table.
723 @param[in] name table name
724 @param[in] form table definition
725 @param[in,out] table_def dd::Table describing table to be
726 truncated. Can be adjusted by SE, the changes will be saved into
727 the data-dictionary at statement commit time.
728 @return error number
729 @retval 0 on success */
730 int truncate_impl(const char *name, TABLE *form, dd::Table *table_def);
731
732 /** @defgroup PARTITION_HANDLER_HELPERS Helpers needed by Partition_helper
733 @see partition_handler.h
734 @{ */
735
736 /** Set the autoinc column max value.
737 This should only be called once from ha_innobase::open().
738 Therefore there's no need for a covering lock.
739 @param[in] no_lock If locking should be skipped. Not used!
740 @return 0 for success or error code. */
741 int initialize_auto_increment(bool no_lock) override;
742
743 /** Save currently highest auto increment value.
744 @param[in] nr Auto increment value to save. */
745 void save_auto_increment(ulonglong nr) override;
746
747 /** Setup the ordered record buffer and the priority queue.
748 @param[in] used_parts Number of used partitions in query.
749 @return false for success, else true. */
750 int init_record_priority_queue_for_parts(uint used_parts) override;
751
752 /** Destroy the ordered record buffer and the priority queue. */
754
755 /** Create the Altered_partitoins object
756 @param[in] ha_alter_info thd DDL operation
757 @retval true On failure
758 @retval false On success */
760
761 /** write row to new partition.
762 @param[in] new_part New partition to write to.
763 @return 0 for success else error code. */
764 int write_row_in_new_part(uint new_part) override;
765
766 /** Write a row in specific partition.
767 Stores a row in an InnoDB database, to the table specified in this
768 handle.
769 @param[in] part_id Partition to write to.
770 @param[in] record A row in MySQL format.
771 @return error code. */
772 int write_row_in_part(uint part_id, uchar *record) override;
773
774 /** Update a row in partition.
775 Updates a row given as a parameter to a new value.
776 @param[in] part_id Partition to update row in.
777 @param[in] old_row Old row in MySQL format.
778 @param[in] new_row New row in MySQL format.
779 @return 0 or error number. */
780 int update_row_in_part(uint part_id, const uchar *old_row,
781 uchar *new_row) override;
782
783 /** Deletes a row in partition.
784 @param[in] part_id Partition to delete from.
785 @param[in] record Row to delete in MySQL format.
786 @return 0 or error number. */
787 int delete_row_in_part(uint part_id, const uchar *record) override;
788
789 /** Return first record in index from a partition.
790 @param[in] part Partition to read from.
791 @param[out] record First record in index in the partition.
792 @return error number or 0. */
793 int index_first_in_part(uint part, uchar *record) override;
794
795 /** Return last record in index from a partition.
796 @param[in] part Partition to read from.
797 @param[out] record Last record in index in the partition.
798 @return error number or 0. */
799 int index_last_in_part(uint part, uchar *record) override;
800
801 /** Return previous record in index from a partition.
802 @param[in] part Partition to read from.
803 @param[out] record Last record in index in the partition.
804 @return error number or 0. */
805 int index_prev_in_part(uint part, uchar *record) override;
806
807 /** Return next record in index from a partition.
808 @param[in] part Partition to read from.
809 @param[out] record Last record in index in the partition.
810 @return error number or 0. */
811 int index_next_in_part(uint part, uchar *record) override;
812
813 /** Return next same record in index from a partition.
814 This routine is used to read the next record, but only if the key is
815 the same as supplied in the call.
816 @param[in] part Partition to read from.
817 @param[out] record Last record in index in the partition.
818 @param[in] key Key to match.
819 @param[in] length Length of key.
820 @return error number or 0. */
822 uint length) override;
823
824 /** Start index scan and return first record from a partition.
825 This routine starts an index scan using a start key. The calling
826 function will check the end key on its own.
827 @param[in] part Partition to read from.
828 @param[out] record First matching record in index in the partition.
829 @param[in] key Key to match.
830 @param[in] keypart_map Which part of the key to use.
831 @param[in] find_flag Key condition/direction to use.
832 @return error number or 0. */
833 int index_read_map_in_part(uint part, uchar *record, const uchar *key,
834 key_part_map keypart_map,
835 enum ha_rkey_function find_flag) override;
836
837 /** Return last matching record in index from a partition.
838 @param[in] part Partition to read from.
839 @param[out] record Last matching record in index in the partition.
840 @param[in] key Key to match.
841 @param[in] keypart_map Which part of the key to use.
842 @return error number or 0. */
844 key_part_map keypart_map) override;
845
846 /** Start index scan and return first record from a partition.
847 This routine starts an index scan using a start and end key.
848 @param[in] part Partition to read from.
849 @param[in,out] record First matching record in index in the
850 partition, if NULL use table->record[0] as return buffer.
851 @param[in] start_key Start key to match.
852 @param[in] end_key End key to match.
853 @param[in] sorted Return rows in sorted order.
854 @return error number or 0. */
856 const key_range *start_key,
857 const key_range *end_key, bool sorted) override;
858
859 /** Return next record in index range scan from a partition.
860 @param[in] part Partition to read from.
861 @param[in,out] record First matching record in index in the partition,
862 if NULL use table->record[0] as return buffer.
863 @return error number or 0. */
864 int read_range_next_in_part(uint part, uchar *record) override;
865
866 /** Start index scan and return first record from a partition.
867 This routine starts an index scan using a start key. The calling
868 function will check the end key on its own.
869 @param[in] part Partition to read from.
870 @param[out] record First matching record in index in the partition.
871 @param[in] index Index to read from.
872 @param[in] key Key to match.
873 @param[in] keypart_map Which part of the key to use.
874 @param[in] find_flag Key condition/direction to use.
875 @return error number or 0. */
877 const uchar *key, key_part_map keypart_map,
878 enum ha_rkey_function find_flag) override;
879
880 /** Initialize sampling.
881 @param[out] scan_ctx A scan context created by this method that has to be
882 used in sample_next
883 @param[in] sampling_percentage percentage of records that need to be
884 sampled
885 @param[in] sampling_seed random seed that the random generator will
886 use
887 @param[in] sampling_method sampling method to be used; currently only
888 SYSTEM sampling is supported
889 @param[in] tablesample true if the sampling is for tablesample
890 @return 0 for success, else one of the HA_xxx values in case of error. */
891 int sample_init(void *&scan_ctx, double sampling_percentage,
892 int sampling_seed, enum_sampling_method sampling_method,
893 const bool tablesample) override;
894
895 /** Get the next record for sampling.
896 @param[in] scan_ctx Scan context of the sampling
897 @param[in] buf buffer to place the read record
898 @return 0 for success, else one of the HA_xxx values in case of error. */
899 int sample_next(void *scan_ctx, uchar *buf) override;
900
901 /** End sampling.
902 @param[in] scan_ctx Scan context of the sampling
903 @return 0 for success, else one of the HA_xxx values in case of error. */
904 int sample_end(void *scan_ctx) override;
905
906 /** Initialize random read/scan of a specific partition.
907 @param[in] part_id Partition to initialize.
908 @param[in] scan True for scan else random access.
909 @return error number or 0. */
910 int rnd_init_in_part(uint part_id, bool scan) override;
911
912 /** Get next row during scan of a specific partition.
913 Also used to read the FIRST row in a table scan.
914 @param[in] part_id Partition to read from.
915 @param[out] buf Next row.
916 @return error number or 0. */
917 int rnd_next_in_part(uint part_id, uchar *buf) override;
918
919 /** End random read/scan of a specific partition.
920 @param[in] part_id Partition to end random read/scan.
921 @param[in] scan True for scan else random access.
922 @return error number or 0. */
923 int rnd_end_in_part(uint part_id, bool scan) override;
924
925 /** Return position for cursor in last used partition.
926 Stores a reference to the current row to 'ref' field of the handle. Note
927 that in the case where we have generated the clustered index for the
928 table, the function parameter is illogical: we MUST ASSUME that 'record'
929 is the current 'position' of the handle, because if row ref is actually
930 the row id internally generated in InnoDB, then 'record' does not contain
931 it. We just guess that the row id must be for the record where the handle
932 was positioned the last time.
933 @param[out] ref_arg Pointer to buffer where to write the position.
934 @param[in] record Record to position for. */
935 void position_in_last_part(uchar *ref_arg, const uchar *record) override;
936
937 /** Read row using position using given record to find.
938 This works as position()+rnd_pos() functions, but does some
939 extra work,calculating m_last_part - the partition to where
940 the 'record' should go.
941 Only useful when position is based on primary key
942 (HA_PRIMARY_KEY_REQUIRED_FOR_POSITION).
943 @param[in] record Current record in MySQL Row Format.
944 @return 0 for success else error code. */
945 int rnd_pos_by_record(uchar *record) override;
946
947 /** Copy a cached MySQL row.
948 If requested, also avoids overwriting non-read columns.
949 @param[out] buf Row in MySQL format.
950 @param[in] cached_row Which row to copy. */
951 void copy_cached_row(uchar *buf, const uchar *cached_row) override;
952 /** @} */
953
954 /** @defgroup PRIVATE_HANDLER InnoDB Partitioning Private Handler
955 Functions specific for native InnoDB partitioning.
956 @see handler.h
957 @{ */
958
959 /** Open an InnoDB table.
960 @param[in] name table name
961 @param[in] mode access mode
962 @param[in] test_if_locked test if the file to be opened is locked
963 @param[in] table_def dd::Table describing table to be opened
964 @retval 1 if error
965 @retval 0 if success */
966 int open(const char *name, int mode, uint test_if_locked,
967 const dd::Table *table_def) override;
968
969 int close() override;
970
971 double scan_time() override;
972
973 /** Was the last returned row semi consistent read.
974 In an UPDATE or DELETE, if the row under the cursor was locked by
975 another transaction, and the engine used an optimistic read of the last
976 committed row value under the cursor, then the engine returns 1 from
977 this function. MySQL must NOT try to update this optimistic value. If
978 the optimistic value does not match the WHERE condition, MySQL can
979 decide to skip over this row. This can be used to avoid unnecessary
980 lock waits.
981
982 If this method returns true, it will also signal the storage
983 engine that the next read will be a locking re-read of the row.
984 @see handler.h and row0mysql.h
985 @return true if last read was semi consistent else false. */
986 bool was_semi_consistent_read() override;
987
988 /** Try semi consistent read.
989 Tell the engine whether it should avoid unnecessary lock waits.
990 If yes, in an UPDATE or DELETE, if the row under the cursor was locked
991 by another transaction, the engine may try an optimistic read of
992 the last committed row value under the cursor.
993 @see handler.h and row0mysql.h
994 @param[in] yes Should semi-consistent read be used. */
995 void try_semi_consistent_read(bool yes) override;
996
997 /** Removes a lock on a row.
998 Removes a new lock set on a row, if it was not read optimistically.
999 This can be called after a row has been read in the processing of
1000 an UPDATE or a DELETE query. @see ha_innobase::unlock_row(). */
1001 void unlock_row() override;
1002
1003 int index_init(uint index, bool sorted) override;
1004
1005 int index_end() override;
1006
1007 int rnd_init(bool scan) override {
1008 return (Partition_helper::ph_rnd_init(scan));
1009 }
1010
1011 int rnd_end() override { return (Partition_helper::ph_rnd_end()); }
1012
1013 int external_lock(THD *thd, int lock_type) override;
1014
1016 thr_lock_type lock_type) override;
1017
1018 int write_row(uchar *record) override {
1019 bool entered = false;
1020 auto trx = m_prebuilt->trx;
1021
1022 /* Enter innodb to order Auto INC partition lock after Innodb. No need to
1023 enter if there are tickets left. Currently we cannot handle re-enter
1024 without exit if no more tickets left.
1025
1026 1. We avoid consuming the last ticket as there could be another enter
1027 call from innobase.
1028
1029 2. If we enter innodb here, there is at least one more ticket left as
1030 the minimum value for "innodb_concurrency_tickets" is 1 */
1031
1032 if (!trx->declared_to_be_inside_innodb) {
1033 auto err = srv_concurrency_enter();
1034 if (err != 0) {
1035 return (err);
1036 }
1037 entered = true;
1038 }
1039
1041
1042 if (entered) {
1044 }
1045
1046 return (err);
1047 }
1048
1049 int update_row(const uchar *old_record, uchar *new_record) override {
1050 return (Partition_helper::ph_update_row(old_record, new_record));
1051 }
1052
1053 int delete_row(const uchar *record) override {
1055 }
1056 /** @} */
1057
1058 /** Delete all rows in the requested partitions.
1059 Done by deleting the partitions and recreate them again.
1060 @param[in,out] dd_table dd::Table object for partitioned table
1061 which partitions need to be truncated. Can be adjusted by this call.
1062 Changes to the table definition will be persisted in the data-dictionary
1063 at statement commit time.
1064 @return 0 or error number. */
1065 int truncate_partition_low(dd::Table *dd_table) override;
1066
1067 /** Exchange partition.
1068 Low-level primitive which implementation is provided here.
1069 @param[in] part_id The id of the partition to be exchanged
1070 @param[in] part_table partitioned table to be exchanged
1071 @param[in] swap_table table to be exchanged
1072 @return error number
1073 @retval 0 on success */
1074 int exchange_partition_low(uint part_id, dd::Table *part_table,
1075 dd::Table *swap_table) override;
1076
1077 /** Access methods to protected areas in handler to avoid adding
1078 friend class Partition_helper in class handler.
1079 @see partition_handler.h
1080 @{ */
1081
1082 THD *get_thd() const override { return ha_thd(); }
1083
1084 TABLE *get_table() const override { return table; }
1085
1086 bool get_eq_range() const override { return eq_range; }
1087
1088 void set_eq_range(bool eq_range_arg) override { eq_range = eq_range_arg; }
1089
1090 void set_range_key_part(KEY_PART_INFO *key_part) override {
1091 range_key_part = key_part;
1092 }
1093 /** @} */
1094
1095 /** Fill in data_dir_path and tablespace name from internal data
1096 dictionary.
1097 @param[in,out] part_elem Partition element to fill.
1098 @param[in] ib_table InnoDB table to copy from.
1099 @param[in] display_tablespace Display tablespace name if
1100 set. */
1101 void update_part_elem(partition_element *part_elem, dict_table_t *ib_table,
1102 bool display_tablespace);
1103
1104 protected:
1105 /** Protected handler:: functions specific for native InnoDB partitioning.
1106 @see handler.h
1107 @{ */
1108
1109 int rnd_next(uchar *record) override {
1111 }
1112
1113 int rnd_pos(uchar *record, uchar *pos) override;
1114
1115 int records(ha_rows *num_rows) override;
1116
1117 int index_next(uchar *record) override {
1119 }
1120
1121 int index_next_same(uchar *record, const uchar *, uint keylen) override {
1123 }
1124
1125 int index_prev(uchar *record) override {
1127 }
1128
1129 int index_first(uchar *record) override {
1131 }
1132
1133 int index_last(uchar *record) override {
1135 }
1136
1138 key_part_map keypart_map) override {
1139 return (Partition_helper::ph_index_read_last_map(record, key, keypart_map));
1140 }
1141
1142 int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map,
1143 enum ha_rkey_function find_flag) override {
1144 return (
1145 Partition_helper::ph_index_read_map(buf, key, keypart_map, find_flag));
1146 }
1147
1149 key_part_map keypart_map,
1150 enum ha_rkey_function find_flag) override {
1152 keypart_map, find_flag));
1153 }
1154 /** @} */
1155
1156 /** Updates and return statistics.
1157 Returns statistics information of the table to the MySQL interpreter,
1158 in various fields of the handle object.
1159 @param[in] flag Flags for what to update and return.
1160 @param[in] is_analyze True if called from "::analyze()".
1161 @return HA_ERR_* error code or 0. */
1162 int info_low(uint flag, bool is_analyze) override;
1163
1164 bool can_reuse_mysql_template() const override {
1166 }
1167};
1168#endif /* ha_innopart_h */
Class describing changes to be done by ALTER TABLE.
Definition: handler.h:3196
Helper class for encapsulating new/altered partitions during ADD(HASH/KEY)/COALESCE/REORGANIZE PARTIT...
Definition: handler0alter.cc:8023
A simple bitset wrapper class, which lets you access an existing range of bytes (not owned by it!...
Definition: ut0bitset.h:54
Definition: field.h:575
Wrapper for struct ft_hints.
Definition: handler.h:3966
InnoDB partition specific Handler_share.
Definition: ha_innopart.h:61
dict_table_t * get_table_part(uint part_id) const
Return innodb table for given partition.
Definition: ha_innopart.h:105
uint m_index_count
Number of indexes.
Definition: ha_innopart.h:74
uint get_num_parts() const
Get the number of partitions.
Definition: ha_innopart.h:170
uint m_ref_count
Reference count.
Definition: ha_innopart.h:77
void close_table_parts()
Close the table partitions.
Definition: ha_innopart.cc:450
~Ha_innopart_share() override
Definition: ha_innopart.cc:97
void increment_ref_counts()
Increment share and InnoDB tables reference counters.
Definition: ha_innopart.cc:233
dict_table_t ** m_table_parts
Array of all included table definitions (one per partition).
Definition: ha_innopart.h:64
uint m_tot_parts
Total number of partitions.
Definition: ha_innopart.h:71
void set_table_part(uint part_id, dict_table_t *table)
Set innodb table for given partition.
Definition: ha_innopart.h:90
Ha_innopart_share()=default
Disable default constructor.
const TABLE_SHARE * get_table_share() const
Definition: ha_innopart.h:166
dict_index_t * get_index(uint part_id, uint keynr)
Return innodb index for given partition and key number.
Definition: ha_innopart.cc:496
static dict_table_t ** open_table_parts(THD *thd, const TABLE *table, const dd::Table *dd_table, partition_info *part_info, const char *table_name)
Open InnoDB tables for partitions and return them as array.
Definition: ha_innopart.cc:263
bool set_table_parts_and_indexes(partition_info *part_info, dict_table_t **table_parts)
Initialize the share with table and indexes per partition.
Definition: ha_innopart.cc:314
static bool open_one_table_part(dd::cache::Dictionary_client *client, THD *thd, const TABLE *table, const dd::Partition *dd_part, const char *part_name, dict_table_t **part_dict_table)
Open one partition.
Definition: ha_innopart.cc:130
bool has_table_parts() const
Return whether share has opened InnoDB tables for partitions.
Definition: ha_innopart.h:132
dict_index_t ** m_index_mapping
Instead of INNOBASE_SHARE::idx_trans_tbl.
Definition: ha_innopart.h:68
uint get_mysql_key(uint part_id, const dict_index_t *index)
Get MySQL key number corresponding to InnoDB index.
Definition: ha_innopart.cc:525
void set_v_templ(TABLE *table, dict_table_t *ib_table, const char *name)
Set up the virtual column template for partition table, and points all m_table_parts[]->vc_templ to i...
Definition: ha_innopart.cc:208
TABLE_SHARE * m_table_share
Pointer back to owning TABLE_SHARE.
Definition: ha_innopart.h:80
dict_table_t ** get_table_part_ref(uint part_id)
Get table reference for given partition.
Definition: ha_innopart.h:98
Definition: key.h:57
Definition: key.h:113
Traverse an index in the leaf page block list order and send records to adapter.
Definition: row0pread-adapter.h:43
handler::Load_init_cbk Init_fn
Definition: row0pread-adapter.h:55
handler::Load_end_cbk End_fn
Definition: row0pread-adapter.h:53
handler::Load_cbk Load_fn
Definition: row0pread-adapter.h:51
Class for partitioning specific operations.
Definition: partition_handler.h:194
Partition_helper is a helper class that implements most generic partitioning functionality such as: t...
Definition: partition_handler.h:390
int ph_index_first(uchar *buf)
Start an index scan from leftmost record and return first record.
Definition: partition_handler.cc:1904
int ph_index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
Read one record in an index scan and start an index scan.
Definition: partition_handler.cc:1829
int ph_index_prev(uchar *buf)
Read next record when performing index scan backwards.
Definition: partition_handler.cc:2125
int ph_update_row(const uchar *old_data, uchar *new_data)
Update an existing row in the partitioned table.
Definition: partition_handler.cc:557
int ph_write_row(uchar *buf)
INSERT/UPDATE/DELETE functions.
Definition: partition_handler.cc:452
int ph_rnd_init(bool scan)
MODULE full table scan.
Definition: partition_handler.cc:1427
int ph_index_next_same(uchar *buf, uint keylen)
Read next same record.
Definition: partition_handler.cc:2103
int ph_index_last(uchar *buf)
Start an index scan from rightmost record and return first record.
Definition: partition_handler.cc:1927
int ph_rnd_next(uchar *buf)
Read next row during full table scan (scan in random row order).
Definition: partition_handler.cc:1535
int ph_read_range_next()
Read next record in read of a range with start and end key.
Definition: partition_handler.cc:2188
virtual void set_part_info_low(partition_info *part_info, bool early)
Set partition info.
Definition: partition_handler.cc:368
static uint32 ph_calculate_key_hash_value(Field **field_array)
Calculate key hash value from an null terminated array of fields.
Definition: partition_handler.cc:801
void ph_position(const uchar *record)
Save position of current row.
Definition: partition_handler.cc:1603
int ph_rnd_end()
End of a table scan.
Definition: partition_handler.cc:1488
int ph_index_read_idx_map(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag)
Read index by key and keymap.
Definition: partition_handler.cc:2011
int ph_index_read_last_map(uchar *buf, const uchar *key, key_part_map keypart_map)
Read last using key.
Definition: partition_handler.cc:1979
void ph_release_auto_increment()
Release unused auto increment values.
Definition: partition_handler.cc:766
int ph_index_next(uchar *buf)
Read next record in a forward index scan.
Definition: partition_handler.cc:2072
int ph_read_range_first(const key_range *start_key, const key_range *end_key, bool eq_range_arg, bool sorted)
Start a read of one range with start and end key.
Definition: partition_handler.cc:2152
int ph_delete_row(const uchar *buf)
Delete an existing row in the partitioned table.
Definition: partition_handler.cc:643
virtual void get_dynamic_partition_info_low(ha_statistics *stat_info, ha_checksum *check_sum, uint part_id)
Functions matching Partition_handler API.
Definition: partition_handler.cc:2858
Partition specific Handler_share.
Definition: partition_handler.h:104
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Definition: partition.h:51
Definition: table.h:47
Definition: dictionary_client.h:149
The class defining a handle to an InnoDB table.
Definition: ha_innodb.h:87
Table_flags table_flags() const override
Get the table flags to use for the statement.
Definition: ha_innodb.cc:6318
void srv_concurrency_exit()
Leave Innodb, if no more tickets are left.
Definition: ha_innodb.cc:2960
row_prebuilt_t * m_prebuilt
Save CPU time with prebuilt/cached data structures.
Definition: ha_innodb.h:645
int srv_concurrency_enter()
Enter InnoDB engine after checking max allowed threads.
Definition: ha_innodb.cc:2953
int info(uint) override
Returns statistics information of the table to the MySQL interpreter, in various fields of the handle...
Definition: ha_innodb.cc:17495
The class defining a partitioning aware handle to an InnoDB table.
Definition: ha_innopart.h:223
bool inplace_alter_partition(Alter_inplace_info *ha_alter_info)
Alter the table structure in-place with operations specified using HA_ALTER_FLAGS and Alter_inplace_i...
Definition: handler0alter.cc:10709
void update_part_elem(partition_element *part_elem, dict_table_t *ib_table, bool display_tablespace)
Fill in data_dir_path and tablespace name from internal data dictionary.
Definition: ha_innopart.cc:2227
void set_range_key_part(KEY_PART_INFO *key_part) override
Definition: ha_innopart.h:1090
int rnd_next(uchar *record) override
Protected handler:: functions specific for native InnoDB partitioning.
Definition: ha_innopart.h:1109
Sql_stat_start_parts m_sql_stat_start_parts
sql_stat_start per partition.
Definition: ha_innopart.h:650
Altered_partitions * m_new_partitions
New partitions during ADD/REORG/... PARTITION.
Definition: ha_innopart.h:668
~ha_innopart() override=default
FT_INFO * ft_init_ext(uint flags, uint inx, String *key) override
Initialize FT index scan.
Definition: ha_innopart.h:506
bool m_reuse_mysql_template
Can reuse the template for the previous partition.
Definition: ha_innopart.h:671
bool can_reuse_mysql_template() const override
Can reuse the template.
Definition: ha_innopart.h:1164
void parallel_scan_end(void *parallel_scan_ctx) override
Run the parallel read of data.
Definition: handler0alter.cc:10066
int check(THD *thd, HA_CHECK_OPT *check_opt) override
Checks a partitioned table.
Definition: ha_innopart.cc:3860
int discard_or_import_tablespace(bool discard, dd::Table *table_def) override
Discards or imports an InnoDB tablespace.
Definition: ha_innopart.cc:2824
int index_read_map(uchar *buf, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in the handle ('active_index').
Definition: ha_innopart.h:1142
int records(ha_rows *num_rows) override
Total number of rows in all used partitions.
Definition: ha_innopart.cc:3179
btr_pcur_t * m_clust_pcur
Original m_prebuilt->clust_pcur.
Definition: ha_innopart.h:665
int index_next_same(uchar *record, const uchar *, uint keylen) override
Reads the next row matching to the key value given as the parameter.
Definition: ha_innopart.h:1121
uint32_t calculate_key_hash_value(Field **field_array) override
Definition: ha_innopart.h:536
int enable_indexes(uint mode) override
Enable indexes.
Definition: ha_innopart.h:497
int innobase_initialize_autoinc()
Internally called for initializing auto increment value.
Definition: ha_innopart.cc:619
void get_dynamic_partition_info(ha_statistics *stat_info, ha_checksum *check_sum, uint part_id) override
Implementing Partition_handler interface.
Definition: ha_innopart.h:552
enum row_type get_partition_row_type(const dd::Table *partition_table, uint part_id) override
Get partition row type from SE.
Definition: ha_innopart.cc:2944
int index_last(uchar *record) override
Positions a cursor on the last record in an index and reads the corresponding row to buf.
Definition: ha_innopart.h:1133
int rename_table(const char *from, const char *to, const dd::Table *from_table, dd::Table *to_table) override
Rename a table.
Definition: ha_innopart.cc:2684
handler * get_handler() override
Return the table handler.
Definition: ha_innopart.h:575
btr_pcur_t * m_pcur_parts
persistent cursors per partition.
Definition: ha_innopart.h:653
void clear_blob_heaps()
Clear the blob heaps for all partitions.
Definition: ha_innopart.cc:4138
int index_read_last_map(uchar *record, const uchar *key, key_part_map keypart_map) override
The following functions works like index_read, but it find the last row with the current key value or...
Definition: ha_innopart.h:1137
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key) override
Estimates the number of index records in a range.
Definition: ha_innopart.cc:3272
static int key_and_rowid_cmp(KEY **key_info, uchar *a, uchar *b)
Compare key and rowid.
Definition: ha_innopart.cc:2881
uint alter_flags(uint flags) const override
Alter flags.
Definition: ha_innopart.h:559
handler * clone(const char *name, MEM_ROOT *mem_root) override
Clone this handler, used when needing more than one cursor to the same table.
Definition: ha_innopart.cc:1150
int delete_table(const char *name, const dd::Table *dd_table) override
Drop a table.
Definition: ha_innopart.cc:2617
bool commit_inplace_alter_partition(TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit, const dd::Table *old_dd_tab, dd::Table *new_dd_tab)
Prepare to commit or roll back ALTER TABLE...ALGORITHM=INPLACE.
Definition: handler0alter.cc:10757
byte * m_bitset
byte array for sql_stat_start bitset
Definition: ha_innopart.h:647
ha_rows estimate_rows_upper_bound() override
Gives an UPPER BOUND to the number of rows in a table.
Definition: ha_innopart.cc:3391
void set_part_info(partition_info *part_info, bool early) override
Set the partition info object to be used by the handler.
Definition: ha_innopart.h:567
ha_innopart(handlerton *hton, TABLE_SHARE *table_arg)
Construct ha_innopart handler.
Definition: ha_innopart.cc:597
int change_active_index(uint part_id, uint keynr)
Changes the active index of a handle.
Definition: ha_innopart.cc:1716
TABLE * get_table() const override
Definition: ha_innopart.h:1084
int index_next(uchar *record) override
Reads the next row from a cursor, which must have previously been positioned using index_read.
Definition: ha_innopart.h:1117
bool get_foreign_dup_key(char *child_table_name, uint child_table_name_len, char *child_key_name, uint child_key_name_len) override
Retrieves the names of the table and the key for which there was a duplicate entry in the case of HA_...
Definition: ha_innopart.h:524
void update_partition(uint part_id)
Update active partition.
Definition: ha_innopart.cc:1316
int read_range_next() override
Read next row between two endpoints.
Definition: ha_innopart.h:532
void set_eq_range(bool eq_range_arg) override
Definition: ha_innopart.h:1088
int disable_indexes(uint mode) override
Disable indexes.
Definition: ha_innopart.h:493
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes) override
Part of old, deprecated in-place ALTER API.
Definition: ha_innopart.h:484
void release_auto_increment() override
Do cleanup for auto increment calculation.
Definition: ha_innopart.h:544
Partition_handler * get_partition_handler() override
Definition: ha_innopart.h:563
int info_low(uint flag, bool is_analyze) override
Updates and return statistics.
Definition: ha_innopart.cc:3484
uint16_t * m_pcur_map
map from part_id to offset in above two arrays.
Definition: ha_innopart.h:659
Table_flags table_flags() const override
Get the table flags to use for the statement.
Definition: ha_innopart.h:540
int index_prev(uchar *record) override
Reads the previous row from a cursor, which must have previously been positioned using index_read.
Definition: ha_innopart.h:1125
btr_pcur_t * m_pcur
Original m_prebuilt->pcur.
Definition: ha_innopart.h:662
THD * get_thd() const override
Access methods to protected areas in handler to avoid adding friend class Partition_helper in class h...
Definition: ha_innopart.h:1082
ut::unique_ptr< saved_prebuilt_t[]> m_parts
Definition: ha_innopart.h:644
void clear_ins_upd_nodes()
Clear used ins_nodes and upd_nodes.
Definition: ha_innopart.cc:1167
int start_stmt(THD *thd, thr_lock_type lock_type) override
Start statement.
Definition: ha_innopart.cc:3958
int read_range_first(const key_range *start_key, const key_range *end_key, bool eq_range_arg, bool sorted) override
Read first row between two ranges.
Definition: ha_innopart.h:473
FT_INFO * ft_init_ext_with_hints(uint inx, String *key, Ft_hints *hints) override
Initialize FT index scan.
Definition: ha_innopart.h:512
dict_index_t * innopart_get_index(uint part_id, uint keynr)
Get the index for a handle.
Definition: ha_innopart.cc:1670
void initialize_partitioning(partition_info *part_info, bool early)
Definition: ha_innopart.h:571
int cmp_ref(const uchar *ref1, const uchar *ref2) const override
Compares two 'refs'.
Definition: ha_innopart.cc:4123
int index_read_idx_map(uchar *buf, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Positions an index cursor to the index specified in argument.
Definition: ha_innopart.h:1148
void set_partition(uint part_id)
Change active partition.
Definition: ha_innopart.cc:1267
void position(const uchar *record) override
Store a reference to the current row to 'ref' field of the handle.
Definition: ha_innopart.h:479
int optimize(THD *thd, HA_CHECK_OPT *check_opt) override
Optimize table.
Definition: ha_innopart.cc:3848
int parallel_scan(void *scan_ctx, void **thread_ctxs, Reader::Init_fn init_fn, Reader::Load_fn load_fn, Reader::End_fn end_fn) override
Start parallel read of data.
Definition: handler0alter.cc:10055
int parallel_scan_init(void *&scan_ctx, size_t *num_threads, bool use_reserved_threads) override
Get number of threads that would be spawned for parallel read.
Definition: handler0alter.cc:9984
dict_index_t * innobase_get_index(uint keynr) override
Get the index for the current partition.
Definition: ha_innopart.cc:1655
int truncate_partition_low(dd::Table *dd_table) override
Delete all rows in the requested partitions.
Definition: ha_innopart.cc:3074
void print_error(int error, myf errflag) override
Print error information.
Definition: ha_innopart.cc:1633
btr_pcur_t * m_clust_pcur_parts
persistent cluster cursors per partition.
Definition: ha_innopart.h:656
int ft_init() override
Initialize FT index scan.
Definition: ha_innopart.h:501
int exchange_partition_low(uint part_id, dd::Table *part_table, dd::Table *swap_table) override
Exchange partition.
Definition: handler0alter.cc:10862
int reset() override
Reset state of file to after 'open'.
Definition: ha_innopart.cc:4160
int ft_read(uchar *buf) override
Fetch next result from the FT result set.
Definition: ha_innopart.h:519
uint alter_table_flags(uint flags)
int extra(enum ha_extra_function operation) override
Extra hints from MySQL.
Definition: ha_innopart.cc:2896
int delete_all_rows() override
Delete all rows from the table.
Definition: ha_innopart.h:491
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info, dd::Table *table_def) override
Creates a new table to an InnoDB database.
Definition: ha_innopart.cc:2400
Ha_innopart_share * m_part_share
Pointer to Ha_innopart_share on the TABLE_SHARE.
Definition: ha_innopart.h:615
bool is_ignorable_error(int error) override
Can error be ignored.
Definition: ha_innopart.cc:1643
int truncate_impl(const char *name, TABLE *form, dd::Table *table_def)
TRUNCATE an InnoDB partitioned table.
Definition: ha_innopart.cc:2981
int next_partition_index()
Move to next partition and set its index.
bool prepare_inplace_alter_partition(TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_dd_tab, dd::Table *new_dd_tab)
Allows InnoDB to update internal structures with concurrent writes blocked (given that check_if_suppo...
Definition: handler0alter.cc:10678
void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values, ulonglong *first_value, ulonglong *nb_reserved_values) override
Get the current auto_increment value.
Definition: ha_innopart.cc:4099
int set_dd_discard_attribute(dd::Table *table_def, bool discard)
Set DD discard attribute for tablespace.
Definition: ha_innopart.cc:2769
int rnd_pos(uchar *record, uchar *pos) override
Get a row from a position.
Definition: ha_innopart.cc:2164
int repair(THD *thd, HA_CHECK_OPT *repair_opt) override
Repair a partitioned table.
Definition: ha_innopart.cc:3905
bool get_eq_range() const override
Definition: ha_innopart.h:1086
void update_create_info(HA_CREATE_INFO *create_info) override
Update create_info.
Definition: ha_innopart.cc:2280
int index_first(uchar *record) override
Positions a cursor on the first record in an index and reads the corresponding row to buf.
Definition: ha_innopart.h:1129
Definition: handler.h:3877
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4412
KEY_PART_INFO * range_key_part
Definition: handler.h:4471
bool eq_range
Definition: handler.h:4472
ulonglong Table_flags
Definition: handler.h:4416
THD * ha_thd() const
Definition: handler.cc:2690
TABLE * table
Definition: handler.h:4420
virtual int delete_all_rows()
Delete all rows in a table.
Definition: handler.h:6703
Definition: partition_element.h:108
Definition: partition_info.h:209
A table definition from the master.
Definition: rpl_utility.h:248
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
bool commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, bool commit, const dd::Table *old_table_def, dd::Table *new_table_def) override
Commit or rollback.
Definition: handler0alter.cc:10468
bool prepare_inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def) override
Prepare in-place ALTER for table.
Definition: handler0alter.cc:10265
bool inplace_alter_table(TABLE *altered_table, Alter_inplace_info *ha_alter_info, const dd::Table *old_table_def, dd::Table *new_table_def) override
Alter the table structure in-place.
Definition: handler0alter.cc:10402
enum_alter_inplace_result check_if_supported_inplace_alter(TABLE *altered_table, Alter_inplace_info *ha_alter_info) override
Check if InnoDB supports a particular alter table in-place.
Definition: handler0alter.cc:10082
int rnd_next_in_part(uint part_id, uchar *buf) override
Get next row during scan of a specific partition.
Definition: ha_innopart.cc:2135
int update_row_in_part(uint part_id, const uchar *old_row, uchar *new_row) override
Update a row in partition.
Definition: ha_innopart.cc:1445
int rnd_end_in_part(uint part_id, bool scan) override
End random read/scan of a specific partition.
Definition: ha_innopart.cc:2128
void destroy_record_priority_queue_for_parts() override
Destroy the ordered record buffer and the priority queue.
Definition: ha_innopart.cc:1606
void copy_cached_row(uchar *buf, const uchar *cached_row) override
Copy a cached MySQL row.
Definition: ha_innopart.cc:113
int index_last_in_part(uint part, uchar *record) override
Return last record in index from a partition.
Definition: ha_innopart.cc:1840
void position_in_last_part(uchar *ref_arg, const uchar *record) override
Return position for cursor in last used partition.
Definition: ha_innopart.cc:2204
void save_auto_increment(ulonglong nr) override
Save currently highest auto increment value.
Definition: ha_innopart.cc:1359
int sample_init(void *&scan_ctx, double sampling_percentage, int sampling_seed, enum_sampling_method sampling_method, const bool tablesample) override
Initialize sampling.
Definition: ha_innopart.cc:2002
int write_row_in_part(uint part_id, uchar *record) override
Write a row in specific partition.
Definition: ha_innopart.cc:1418
int init_record_priority_queue_for_parts(uint used_parts) override
Setup the ordered record buffer and the priority queue.
Definition: ha_innopart.cc:1547
int index_read_map_in_part(uint part, uchar *record, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Start index scan and return first record from a partition.
Definition: ha_innopart.cc:1876
int sample_next(void *scan_ctx, uchar *buf) override
Get the next record for sampling.
Definition: ha_innopart.cc:2082
int initialize_auto_increment(bool no_lock) override
Set the autoinc column max value.
Definition: ha_innopart.cc:624
int write_row_in_new_part(uint new_part) override
write row to new partition.
Definition: handler0alter.cc:10646
int index_next_same_in_part(uint part, uchar *record, const uchar *key, uint length) override
Return next same record in index from a partition.
Definition: ha_innopart.cc:1826
int index_first_in_part(uint part, uchar *record) override
Return first record in index from a partition.
Definition: ha_innopart.cc:1787
int read_range_next_in_part(uint part, uchar *record) override
Return next record in index range scan from a partition.
Definition: ha_innopart.cc:1968
int delete_row_in_part(uint part_id, const uchar *record) override
Deletes a row in partition.
Definition: ha_innopart.cc:1460
int sample_end(void *scan_ctx) override
End sampling.
Definition: ha_innopart.cc:2099
int rnd_pos_by_record(uchar *record) override
Read row using position using given record to find.
Definition: ha_innopart.cc:4176
bool prepare_for_copy_partitions(Alter_inplace_info *ha_alter_info)
Create the Altered_partitoins object.
Definition: handler0alter.cc:10617
int index_read_idx_map_in_part(uint part, uchar *record, uint index, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag) override
Start index scan and return first record from a partition.
Definition: ha_innopart.cc:1898
int rnd_init_in_part(uint part_id, bool scan) override
Initialize random read/scan of a specific partition.
Definition: ha_innopart.cc:2110
int read_range_first_in_part(uint part, uchar *record, const key_range *start_key, const key_range *end_key, bool sorted) override
Start index scan and return first record from a partition.
Definition: ha_innopart.cc:1927
int index_prev_in_part(uint part, uchar *record) override
Return previous record in index from a partition.
Definition: ha_innopart.cc:1853
int index_next_in_part(uint part, uchar *record) override
Return next record in index from a partition.
Definition: ha_innopart.cc:1802
int index_read_last_map_in_part(uint part, uchar *record, const uchar *key, key_part_map keypart_map) override
Return last matching record in index from a partition.
Definition: ha_innopart.cc:1917
int close() override
Closes a handle to an InnoDB table.
Definition: ha_innopart.cc:1217
int rnd_init(bool scan) override
Initialize a table scan.
Definition: ha_innopart.h:1007
double scan_time() override
Time estimate for full table scan.
Definition: ha_innopart.cc:3437
int index_end() override
End index cursor.
Definition: ha_innopart.cc:1524
bool was_semi_consistent_read() override
Was the last returned row semi consistent read.
Definition: ha_innopart.cc:1382
int write_row(uchar *record) override
Stores a row in an InnoDB database, to the table specified in this handle.
Definition: ha_innopart.h:1018
int open(const char *name, int mode, uint test_if_locked, const dd::Table *table_def) override
Open an InnoDB table.
Definition: ha_innopart.cc:781
void unlock_row() override
Removes a lock on a row.
Definition: ha_innopart.cc:1405
int index_init(uint index, bool sorted) override
Initializes a handle to use an index.
Definition: ha_innopart.cc:1476
void try_semi_consistent_read(bool yes) override
Try semi consistent read.
Definition: ha_innopart.cc:1393
int update_row(const uchar *old_record, uchar *new_record) override
Updates a row given as a parameter to a new value.
Definition: ha_innopart.h:1049
THR_LOCK_DATA ** store_lock(THD *thd, THR_LOCK_DATA **to, thr_lock_type lock_type) override
Function to store lock for all partitions in native partitioned table.
Definition: ha_innopart.cc:3984
int rnd_end() override
Ends a table scan.
Definition: ha_innopart.h:1011
int external_lock(THD *thd, int lock_type) override
Lock/prepare to lock table.
Definition: ha_innopart.cc:4014
int delete_row(const uchar *record) override
Deletes a row given as the parameter.
Definition: ha_innopart.h:1053
Bitset Sql_stat_start_parts
Definition: ha_innopart.h:58
const handler::Table_flags HA_INNOPART_DISABLED_TABLE_FLAGS
HA_DUPLICATE_POS and HA_READ_BEFORE_WRITE_REMOVAL is not set from ha_innobase, but cannot yet be supp...
Definition: ha_innopart.h:54
static constexpr auto PARTITION_IN_SHARED_TABLESPACE
Definition: ha_innopart.h:47
const char * partition_get_tablespace(const char *tablespace, const partition_element *part, const partition_element *sub_part)
Get explicit specified tablespace for one (sub)partition, checking from lowest level.
Definition: ha_innopart.cc:566
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
ha_rkey_function
Definition: my_base.h:78
ulong key_part_map
Definition: my_base.h:1007
my_off_t ha_rows
Definition: my_base.h:1140
ha_extra_function
Definition: my_base.h:184
#define HA_ERR_WRONG_COMMAND
Command not supported.
Definition: my_base.h:840
std::uint32_t ha_checksum
Definition: my_checksum.h:106
Header for compiler-dependent features.
int myf
Definition: my_inttypes.h:94
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
static int record
Definition: mysqltest.cc:188
Definition: buf0block_hint.cc:30
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:910
const char * table_name
Definition: rules_table_service.cc:56
mode
Definition: file_handle.h:60
std::conditional_t< !std::is_array< T >::value, std::unique_ptr< T, detail::Deleter< T > >, std::conditional_t< detail::is_unbounded_array_v< T >, std::unique_ptr< T, detail::Array_deleter< std::remove_extent_t< T > > >, void > > unique_ptr
The following is a common type that is returned by all the ut::make_unique (non-aligned) specializati...
Definition: ut0new.h:2439
#define HA_INPLACE_CHANGE_PARTITION
Definition: partition_handler.h:77
#define HA_PARTITION_FUNCTION_SUPPORTED
bits in Partition_handler::alter_flags():
Definition: partition_handler.h:76
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Interface between Innobase row operations and MySQL.
#define COMPATIBLE_DATA_NO
Definition: handler.h:822
#define HA_READ_BEFORE_WRITE_REMOVAL
The handler supports read before write removal optimization.
Definition: handler.h:411
#define HA_CAN_REPAIR
Definition: handler.h:369
enum_alter_inplace_result
Return values for check_if_supported_inplace_alter().
Definition: handler.h:197
#define HA_CAN_GEOMETRY
Definition: handler.h:228
#define HA_CAN_FULLTEXT
Definition: handler.h:305
row_type
Definition: handler.h:676
#define HA_DUPLICATE_POS
Definition: handler.h:251
#define HA_CAN_FULLTEXT_EXT
Definition: handler.h:416
enum_sampling_method
Definition: handler.h:707
static bool commit(THD *thd)
Commit the current statement and transaction.
Definition: sql_cmd_srs.cc:152
case opt name
Definition: sslopt-case.h:33
Definition: ft_global.h:72
Definition: handler.h:3632
Struct to hold information about the table that should be created.
Definition: handler.h:3045
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
This structure is shared between different table objects.
Definition: table.h:690
Definition: table.h:1399
Definition: thr_lock.h:124
Definition: btr0pcur.h:99
Data structure for an index.
Definition: dict0mem.h:1046
Data structure for a database table.
Definition: dict0mem.h:1909
Definition: ha_innopart.h:617
ins_node_t * m_ins_node
saved m_prebuilt->ins_node
Definition: ha_innopart.h:619
mem_heap_t * m_blob_heap
saved m_prebuilt->blob_heap
Definition: ha_innopart.h:625
decltype(row_prebuilt_t::new_rec_lock) m_new_rec_lock
save m_prebuilt->new_rec_lock[] values
Definition: ha_innopart.h:634
ulint m_row_read_type
saved m_prebuilt->row_read_type
Definition: ha_innopart.h:631
upd_node_t * m_upd_node
saved m_prebuilt->upd_node
Definition: ha_innopart.h:622
trx_id_t m_trx_id
saved m_prebuilt->trx_id (which in turn reflects table->def_trx_id)
Definition: ha_innopart.h:628
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
Definition: row0ins.h:162
Definition: my_base.h:1124
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
std::bitset< LOCK_COUNT > new_rec_lock
normally false; if session is using READ COMMITTED or READ UNCOMMITTED isolation level,...
Definition: row0mysql.h:762
trx_t * trx
current transaction handle
Definition: row0mysql.h:523
Definition: row0upd.h:701
thr_lock_type
Definition: thr_lock.h:51
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
unsigned int uint
Definition: uca9-dump.cc:75
unsigned long int ulint
Definition: univ.i:406
Utilities for bitset operations.
#define ut_error
Abort execution.
Definition: ut0dbg.h:65
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:69
#define ut_o(EXPR)
Opposite of ut_d().
Definition: ut0dbg.h:73
#define ut_d(EXPR)
Debug statement.
Definition: ut0dbg.h:71