Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create table with column length is too big : Mysql is converting VARBINARY to BLOB and VARCHAR to TEXT , Tidb is resulting error. #30328

Closed
ramanich1 opened this issue Dec 1, 2021 · 2 comments · Fixed by #31974
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. type/compatibility

Comments

@ramanich1
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

SET sql_mode = ‘NO_ENGINE_SUBSTITUTION’;
drop table if exists t1;
CREATE TABLE t1( a varbinary(70000), b varchar(70000000));
desc t1;

2. What did you expect to see? (Required)

mysql> CREATE TABLE t1( a varbinary(70000), b varchar(70000000));
Query OK, 0 rows affected, 2 warnings (0.01 sec)

mysql> desc t1;
+-------+------------+------+-----+---------+-------+
| Field | Type       | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+
| a     | mediumblob | YES  |     | NULL    |       |
| b     | longtext   | YES  |     | NULL    |       |
+-------+------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

3. What did you see instead (Required)

mysql> CREATE TABLE t1( a varbinary(70000), b varchar(70000000));
ERROR 1074 (42000): Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead

4. What is your TiDB version? (Required)

| Release Version: v5.4.0-alpha-264-g6efa36df6
Edition: Community
Git Commit Hash: 6efa36df6cff325106f67ecfe3d79816ba37ca6a
Git Branch: master
UTC Build Time: 2021-11-29 16:57:51
GoVersion: go1.17.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
@djshow832
Copy link
Contributor

/assign unconsolable

@ti-chi-bot
Copy link
Member

@djshow832: GitHub didn't allow me to assign the following users: unconsolable.

Note that only pingcap members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign unconsolable

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@zimulala zimulala added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
6 participants