开发者社区> 问答> 正文

mysql 8.0.19版本,为什么数值类型的字段,字段长度无法修改呢,一直是0

B9BDB7F6-B67E-4594-B57E-7718A1DA31E5.png 数值长度一直是0;修改也没用呢

展开
收起
游客thcl7bjhz2v3q 2020-02-26 12:34:42 5998 0
3 条回答
写回答
取消 提交回答
  • 原因分析:

    根据告警的提示信息指出:integer的宽度显示将在未来版本被移除

    查阅官网资料如下: 20200601154759764.png 官网相关资料:

    MySQL Server 8.0.17 deprecated the display width for the TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT data types when the ZEROFILL modifier is not used, and MySQL Server 8.0.19 has removed the display width for those data types from results of SHOW CREATE TABLE, SHOW CREATE FUNCTION, and queries on INFORMATION_SCHEMA.COLUMNS, INFORMATION_SCHEMA.ROUTINES, and INFORMATION_SCHEMA.PARAMETERS (except for the display width for signed TINYINT(1)). This patch adjusts Connector/J to those recent changes of MySQL Server and, as a result, DatabaseMetaData, ParameterMetaData, and ResultSetMetaData now report identical results for all the above-mentioned integer types and also for the FLOAT and DOUBLE data types. (Bug #30477722)
    

    根据官网资料可知:从8.0.17版本开始,TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT类型的显示宽度将失效。

    2020-07-15 19:56:06
    赞同 1 展开评论 打赏
  • 专注于数据库领域技术

    建议 show create table table_name \G 看一下。

    尝试 通过 DDL alter 语句尝试修改下。

    2020-03-10 01:25:44
    赞同 展开评论 打赏
  • 顶一下,期望大神出现

    2020-02-26 12:40:24
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像