Error inserting into text field, no files in titan directory

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: text字段插入报错, titan目录无文件

| username: h5n1

7.6.0 ARM
Inserting data into the text field reports ERROR 1048 (23000): Column ‘pad’ cannot be null. Additionally, with Titan enabled, after inserting 2 pieces of data, there are no files in the Titan directory.


| username: MrSylar | Original post link

I saw Titan again in a daze.

| username: h5n1 | Original post link

The default storage engine in 7.6.

| username: zhanggame1 | Original post link

In version 7.6.0, fields longer than 32K are placed inside Titan.

| username: lilinghai | Original post link

I just checked.

  1. The reason you don’t see the file in Titan is because the written data is still in the cache and hasn’t actually been flushed to disk. You can write more data to see the effect.

  2. The second issue, ERROR 1048 (23000): Column ‘pd’ cannot be null, still occurs even with Titan disabled. It might be a bug in TiDB, where it cannot handle data exceeding a certain length.

mysql> select lpad('a',6553555,'a');
| lpad('a',6553555,'a') |
| NULL                  |
1 row in set (0.05 sec)
| username: lilinghai | Original post link

I checked that lpad is null, and in MySQL 5.7 it is also null, with a prompt saying “Result of lpad() was larger than max_allowed_packet (4194304) - truncated.” In MySQL 8.0, it can return the expected string. This is a compatibility issue between MySQL and TiDB, and you can file an issue to track it.

| username: h5n1 | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.