executor, types: ON DUPLICATE UPDATE with bit convert to LittleEndian
- Vorherrschende Sprache
- Go
- Sterne
- 40.5k
- Forks
- 6.2k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
## Bug Report
### 1. Minimal reproduce step (Required)
create table t (id bigint(20) NOT NULL AUTO_INCREMENT, test_bit bit(64) DEFAULT NULL, PRIMARY KEY(id));
insert into t(id,test_bit) values(1,x'AAFF');
insert into t(id,test_bit) values(1,x'AAFF') on duplicate key update `test_bit`=values(`test_bit`);
select hex(test_bit) from t;
### 2. What did you expect to see? (Required)
select hex(test_bit) from t;
+------------------+
| hex(test_bit) |
+------------------+
| AAFF000000000000 |
+------------------+
1 row in set (0.01 sec)
### 3. What did you see instead (Required)
select hex(test_bit) from t;
+------------------+
| hex(test_bit) |
+------------------+
| FFAA000000000000 |
+------------------+
1 row in set (0.01 sec)
### 4. What is your TiDB version? (Required)
version: release-5.0
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.0.0-414-g6ca79c09c3-dirty
Edition: Community
Git Commit Hash: 6ca79c09c34ecbda1a49a961c049b477eb8f6a65
UTC Build Time: 2023-01-10 08:47:50
GoVersion: go1.16.10
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.77 sec)
Beitragsleitfaden
Rechercherichtung
Start by running the reported CREATE TABLE, INSERT, ON DUPLICATE KEY UPDATE, and SELECT HEX statements against the affected TiDB version, then trace the executor/types handling for the duplicate-update assignment of a BIT value. Done means the final HEX output remains AAFF000000000000 rather than reversing the byte order, with regression coverage for this reproduction.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- go, sql
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100