activerecord-tidb-adapter icon indicating copy to clipboard operation
activerecord-tidb-adapter copied to clipboard

Use the original `index` method if TiDB version is 5.2.0 or higher

Open yahonda opened this issue 3 years ago • 1 comments

This pull request uses the original index method if TiDB version is 5.2.0 or higher.

https://github.com/pingcap/tidb/issues/26110 has been fixed since TiDB 5.2.0 or higher via https://github.com/pingcap/tidb/commit/1641b3411d663eb67464a34882a3f222b67cea8d

In future when older version of TiDB support is dropped, we can remove this file entirely.

yahonda avatar Jun 02 '22 08:06 yahonda

Going forward, Most of users will choose newer TiDB versions and the original index method implementation can be changed upstream. So far only https://github.com/rails/rails/commit/819871cc4edb5132039cbc9b86abf6ad914bce06 has been applied like https://github.com/rails/rails/blob/ec0c6c74563177c16c27724e9eab88e7f437208e/activerecord/lib/active_record/connection_adapters/mysql/schema_statements.rb#L60 we can leave as it is.

yahonda avatar Jun 02 '22 08:06 yahonda