The issue of behavioral differences in returned column information when calling TiDB via the C API using C++ code
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
SQL:select ifnull(max(a.make_date),:begin_date) as make_date, ifnull(max(a.fiscal_year),0) as fis_year, ifnull(max(a.fiscal_period),0) as fis_month
from TV_VoucherInventoryState a,
(
select nvl(max(make_date),0) as make_date from TV_VoucherInventoryState where
book_id = :book_id
and make_date <=:trade_date
and inventory_voucher = 1
)b
where a.make_date=b.make_date;
when sql column contaions function,and contains binding variables ,like ifnull(max(a.make_date),:begin_date).tidb will return different results ( vs mysql)
**MySQL:**
**TiDB:**
### 2. What did you expect to see? (Required)
tidb give the same result as mysql. (column info)
### 3. What did you see instead (Required)
tidb give the differt result as mysql.
### 4. What is your TiDB version? (Required)
TiDB v7.5.6
Contributor guide
Assessment
This issue has not been assessed yet.