1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Adding support for auto_increment in the partition engine.

Contains Spiral patches:
022_mariadb-10.2.0.auto_increment.diff               MDEV-7720
030: 030_mariadb-10.2.0.partition_auto_inc_init.diff MDEV-7726

These patches have the following differences compared to the original
patches:
- Added the new #defines for the feature in spd_environ.h instead of in
  handler.h because these #defines are needed by Spider and are not needed
  by the server.
- Cleaned up code related to the removed variable m_need_info_for_auto_inc
. Changed variable assignment in lock_auto_increment() and
  unlock_auto_increment() so that the assignments are done under locks.
- Added a test case.
- Added test result changes resulting from a bug that was fixed by these
  patches.

Original author: Kentoku SHIBA
First reviewer:  Jacob Mathew
Second reviewer: Michael Widenius
This commit is contained in:
Monty
2017-09-27 22:48:05 +03:00
parent 2f09b28e0f
commit dc17ac1638
9 changed files with 532 additions and 29 deletions

View File

@ -3395,6 +3395,8 @@ public:
virtual void try_semi_consistent_read(bool) {}
virtual void unlock_row() {}
virtual int start_stmt(THD *thd, thr_lock_type lock_type) {return 0;}
virtual bool need_info_for_auto_inc() { return 0; }
virtual bool can_use_for_auto_inc_init() { return 1; }
virtual void get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong nb_desired_values,
ulonglong *first_value,