| Bug #120482 | Upgrade from 8.0.35 to 8.0.45 or 8.4.9 failed due [ERROR] [MY-013135] and [Warning] [MY-014078] | ||
|---|---|---|---|
| Submitted: | 15 May 10:46 | Modified: | 19 May 8:03 |
| Reporter: | varun shet | Email Updates: | |
| Status: | Open | Impact on me: | |
| Category: | MySQL Server: Data Dictionary | Severity: | S2 (Serious) |
| Version: | 8.4.9 | OS: | Linux (Red Hat Enterprise Linux 9.6 (Plow ) |
| Assigned to: | CPU Architecture: | x86 | |
| Tags: | constraint, partition, virtual columns | ||
[15 May 10:46]
varun shet
[15 May 11:38]
Daniƫl van Eeden
Could you share the frm file and/or the table definition?
[15 May 14:30]
MySQL Verification Team
Can you start server with my.cnf options: [mysqld] log_error_verbosity=3 check_table_functions=WARN
[18 May 17:17]
Gundala Rajasekhar
Table is partitioned by range with to_days function and table doesnt have any virtual columns.
[18 May 17:20]
Gundala Rajasekhar
Current mysql version is 8.0.35, Hence no .frm files and we physically verified and do not see any .frm file exists. We cant share the table definition as of now. We will reproduce it with log verbosity settings and get back to you. Is this error due to any known bug? Please confirm we need to create a plan for future upgrades.
[18 May 17:25]
MySQL Verification Team
Hi, You can anonamize the table, column, and index names, but keep the data types and share the structure like that. Before upgrading, please download MySQL Shell 9.7.0 and run the Upgrade Checker Utility, to help see if it's a known issue: https://dev.mysql.com/doc/mysql-shell/9.7/en/mysql-shell-utilities-upgrade.html
[18 May 17:33]
MySQL Verification Team
I've tried it with the below table structure but couldn't reproduce it, hence we'll need your (anonamized) structure.
drop table if exists t;
CREATE TABLE t (
order_id BIGINT UNSIGNED NOT NULL,
customer_id BIGINT UNSIGNED NOT NULL,
order_date DATE NOT NULL,
amount DECIMAL(10,2) NOT NULL,
PRIMARY KEY (order_id, order_date)
)
ENGINE = InnoDB
PARTITION BY RANGE (TO_DAYS(order_date)) (
PARTITION p2026_01 VALUES LESS THAN (TO_DAYS('2026-02-01')),
PARTITION p2026_02 VALUES LESS THAN (TO_DAYS('2026-03-01')),
PARTITION p2026_03 VALUES LESS THAN (TO_DAYS('2026-04-01')),
PARTITION p2026_04 VALUES LESS THAN (TO_DAYS('2026-05-01')),
PARTITION p_future VALUES LESS THAN MAXVALUE
);
[19 May 7:00]
Gundala Rajasekhar
TABLE : 1 +--------------+------+-----+----------------------+-------------------+ | Type | Null | Key | Default | Extra | +--------------+------+-----+----------------------+-------------------+ | varchar(50) | NO | PRI | NULL | | | varchar(100) | NO | PRI | NULL | | | varchar(200) | YES | MUL | NULL | | | varchar(50) | YES | MUL | NULL | | | datetime(6) | NO | PRI | CURRENT_TIMESTAMP(6) | DEFAULT_GENERATED | | datetime(6) | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | | text | YES | | NULL | | +--------------+------+-----+----------------------+-------------------+ Table : 2 +--------------+------+-----+----------------------+-------------------+ | Type | Null | Key | Default | Extra | +--------------+------+-----+----------------------+-------------------+ | varchar(50) | NO | PRI | NULL | | | varchar(200) | YES | | NULL | | | varchar(20) | YES | MUL | NULL | | | varchar(20) | YES | MUL | NULL | | | varchar(50) | YES | MUL | NULL | | | datetime(6) | NO | PRI | CURRENT_TIMESTAMP(6) | DEFAULT_GENERATED | | datetime(6) | YES | | NULL | | | varchar(200) | NO | PRI | NULL | | | varchar(500) | YES | MUL | NULL | | | varchar(150) | YES | | NULL | | | varchar(255) | YES | | NULL | | | varchar(255) | YES | | NULL | | | varchar(255) | YES | | NULL | | | varchar(255) | YES | | NULL | | | varchar(255) | YES | | NULL | | | varchar(255) | YES | | NULL | | +--------------+------+-----+----------------------+-------------------+ Table 3 : +---------------+------+-----+----------------------+-------------------+ | Type | Null | Key | Default | Extra | +---------------+------+-----+----------------------+-------------------+ | varchar(200) | NO | PRI | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | MUL | NULL | | | varchar(200) | YES | | NULL | | | varchar(50) | YES | | NULL | | | text | YES | | NULL | | | datetime(6) | YES | | NULL | | | datetime(6) | NO | PRI | CURRENT_TIMESTAMP(6) | DEFAULT_GENERATED | | datetime(6) | YES | | NULL | | | varchar(500) | YES | | NULL | | | varchar(50) | YES | | NULL | | | varchar(2000) | YES | | NULL | | | varchar(20) | YES | | NULL | | | varchar(100) | YES | | NULL | | | datetime(6) | YES | | NULL | | | varchar(20) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(250) | YES | | NULL | | | varchar(20) | YES | | ONLINE | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | text | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(2000) | YES | | NULL | | | varchar(2000) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(200) | YES | | NULL | | | varchar(20) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | varchar(100) | YES | | NULL | | | datetime(6) | YES | | NULL | | | varchar(100) | NO | | NULL | | | varchar(50) | YES | | NULL | | | varchar(50) | YES | | NULL | | | varchar(50) | YES | | NULL | | | varchar(50) | YES | | NULL | | | varchar(50) | YES | | NULL | | +---------------+------+-----+----------------------+-------------------+
[19 May 7:47]
Gundala Rajasekhar
Hi Team,
As suggested, We have added below 2 variables in my.cnf and performed upgrade and observed below error and warnings in error log file.
please review and suggest the plan for Production environment.
2026-05-19T13:08:35.195337+05:30 1 [Note] [MY-013327] [Server] MySQL server upgrading from version '80035' to '80409'.
2026-05-19T13:08:35.607098+05:30 1 [Note] [MY-012357] [InnoDB] Reading DD tablespace files
2026-05-19T13:08:36.083766+05:30 1 [Note] [MY-012356] [InnoDB] Scanned 1900 tablespaces. Validated 1900.
2026-05-19T13:08:36.717636+05:30 1 [ERROR] [MY-013135] [Server] Incorrect information in file: './dbname/table1.frm'
2026-05-19T13:08:36.717713+05:30 1 [Warning] [MY-014078] [Server] Can not open table `dbname`.`table1`; functions in constraints, partitions, or virtual columns may have failed.
2026-05-19T13:08:36.717755+05:30 1 [Note] [MY-014079] [Server] TABLE `dbname`.`table1` = { PARTITION = { expr: "to_days(`CREATE_DATE`)"; };DEFAULTS = {{ name: "CREATE_DATE", default: "CURRENT_TIMESTAMP(6)" }}; };
2026-05-19T13:08:36.985828+05:30 1 [ERROR] [MY-013135] [Server] Incorrect information in file: './dbname/table2s.frm'
2026-05-19T13:08:36.985928+05:30 1 [Warning] [MY-014078] [Server] Can not open table `dbname`.`table2s`; functions in constraints, partitions, or virtual columns may have failed.
2026-05-19T13:08:36.985978+05:30 1 [Note] [MY-014079] [Server] TABLE `dbname`.`table2s` = { PARTITION = { expr: "to_days(`CREATE_DATE`)"; };DEFAULTS = {{ name: "CREATE_DATE", default: "CURRENT_TIMESTAMP(6)" }}; };
2026-05-19T13:08:37.059117+05:30 1 [ERROR] [MY-013135] [Server] Incorrect information in file: './dbname/table3.frm'
2026-05-19T13:08:37.059190+05:30 1 [Warning] [MY-014078] [Server] Can not open table `dbname`.`table3`; functions in constraints, partitions, or virtual columns may have failed.
2026-05-19T13:08:37.059230+05:30 1 [Note] [MY-014079] [Server] TABLE `dbname`.`table3` = { PARTITION = { expr: "to_days(`CREATION_DATE`)"; };DEFAULTS = {{ name: "CREATION_DATE", default: "CURRENT_TIMESTAMP(6)" }{ name: "TRANSACTION_MODE", default: "ONLINE" }}; };
2026-05-19T13:08:37.132312+05:30 1 [System] [MY-013413] [Server] Data dictionary upgrade from version '80023' to '80300' completed.
2026-05-19T13:08:37.412802+05:30 1 [Note] [MY-013327] [Server] MySQL server upgrading from version '80035' to '80409'.
2026-05-19T13:08:37.980132+05:30 1 [Note] [MY-010006] [Server] Using data dictionary with version '80300'.
2026-05-19T13:08:37.997575+05:30 2 [Note] [MY-014065] [Server] Upgrading information schema from version 80030 to 80400.
2026-05-19T13:08:38.380477+05:30 3 [Note] [MY-014066] [Server] Upgrading performance schema from version 80033 to 80409.
2026-05-19T13:08:39.948904+05:30 4 [System] [MY-013381] [Server] Server upgrade from '80035' to '80409' started.
2026-05-19T13:08:39.951181+05:30 4 [Note] [MY-013386] [Server] Running queries to upgrade MySQL server.
2026-05-19T13:08:44.025354+05:30 4 [Note] [MY-013387] [Server] Upgrading system table data.
2026-05-19T13:08:45.137577+05:30 4 [Note] [MY-013385] [Server] Upgrading the sys schema.
2026-05-19T13:08:45.851852+05:30 4 [Note] [MY-013400] [Server] Upgrade of help tables started.
2026-05-19T13:08:46.041188+05:30 4 [Note] [MY-013400] [Server] Upgrade of help tables completed.
2026-05-19T13:08:46.041313+05:30 4 [Note] [MY-013394] [Server] Checking 'mysql' schema.
2026-05-19T13:08:46.212598+05:30 4 [Note] [MY-013394] [Server] Checking 'sys' schema.
2026-05-19T13:08:46.251775+05:30 4 [System] [MY-013381] [Server] Server upgrade from '80035' to '80409' completed.
Thanks,
Raj
[20 May 0:26]
Gundala Rajasekhar
Can you please update further action on this? We have multiple tables using this current_timestamp, default generated.
[20 May 5:34]
MySQL Verification Team
Hi!
>
> DB was upgraded to 8.0.35 successfully post release of version
>
In which version were these tables originally created.
I ask because if I create this newly in 8.0.35, the upgrade works fine, however the default is changed silently from CURRENT_TIMESTAMP(6) to NOW(6):
------------
mysql> create table t (
-> order_date datetime(6) not null default (current_timestamp(6)),
-> primary key (order_date)
-> )
-> engine = innodb
-> partition by range (to_days(order_date)) (
-> partition p2026_01 values less than (to_days('2026-02-01')),
-> partition p_future values less than maxvalue
-> );
Query OK, 0 rows affected (0.03 sec)
mysql> show warnings;
Empty set (0.00 sec)
mysql> replace into t values('2026-01-01 00:00:00');
Query OK, 1 row affected (0.01 sec)
mysql> replace into t values('2027-01-01 00:00:00');
Query OK, 1 row affected (0.00 sec)
mysql>
mysql> select * from information_Schema.columns where table_name='t' \G
*************************** 1. row ***************************
TABLE_CATALOG: def
TABLE_SCHEMA: test
TABLE_NAME: t
COLUMN_NAME: order_date
ORDINAL_POSITION: 1
COLUMN_DEFAULT: now(6)
IS_NULLABLE: NO
DATA_TYPE: datetime
CHARACTER_MAXIMUM_LENGTH: NULL
CHARACTER_OCTET_LENGTH: NULL
NUMERIC_PRECISION: NULL
NUMERIC_SCALE: NULL
DATETIME_PRECISION: 6
CHARACTER_SET_NAME: NULL
COLLATION_NAME: NULL
COLUMN_TYPE: datetime(6)
COLUMN_KEY: PRI
EXTRA: DEFAULT_GENERATED
PRIVILEGES: select,insert,update,references
COLUMN_COMMENT:
GENERATION_EXPRESSION:
SRS_ID: NULL
1 row in set (0.00 sec)
mysql> select version();
+-------------------+
| version() |
+-------------------+
| 8.0.35-commercial |
+-------------------+
1 row in set (0.00 sec)
--------------
[20 May 7:08]
Gundala Rajasekhar
These tables were created in 8.0.35 only.
Surprisingly, We could see the column is COLUMN_DEFAULT: CURRENT_TIMESTAMP(6) but not NOW(6).
Please let us know the
*************************** 5. row ***************************
TABLE_CATALOG: def
TABLE_SCHEMA: dbname
TABLE_NAME: table1
COLUMN_NAME: CREATE_DATE
ORDINAL_POSITION: 5
COLUMN_DEFAULT: CURRENT_TIMESTAMP(6)
IS_NULLABLE: NO
DATA_TYPE: datetime
CHARACTER_MAXIMUM_LENGTH: NULL
CHARACTER_OCTET_LENGTH: NULL
NUMERIC_PRECISION: NULL
NUMERIC_SCALE: NULL
DATETIME_PRECISION: 6
CHARACTER_SET_NAME: NULL
COLLATION_NAME: NULL
COLUMN_TYPE: datetime(6)
COLUMN_KEY: PRI
EXTRA: DEFAULT_GENERATED
PRIVILEGES: select,insert,update,references
COLUMN_COMMENT:
GENERATION_EXPRESSION:
[20 May 8:09]
Gundala Rajasekhar
Please let us know how to address this in Production as the table sizes are very big. Does the below option safe in Production ? check_table_functions=WARN
[20 May 8:35]
MySQL Verification Team
Please send us the output of SHOW CREATE TABLE for table1. you can rename columns to something like col1, col2, col3, etc. similarly rename partition names and indexes.
[20 May 8:40]
Gundala Rajasekhar
pfb definition CREATE TABLE `table1` ( col1 varchar(50) NOT NULL, col2 varchar(100) NOT NULL, col3 varchar(200) DEFAULT NULL, col4 varchar(50) DEFAULT NULL, col5 datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), col6 datetime(6) DEFAULT NULL, col7 text, col8 text, col9 text, col10 text, col11 text, col12 text, col13 text, col14 text, PRIMARY KEY (`col1`,`col2`,`col5`), KEY `idx_telcoaddinfo_pgmid` (`col3`), KEY `idx_telcoaddinfo_paymode` (`col4`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci /*!50100 PARTITION BY RANGE (to_days(`col5`)) (PARTITION a20251117 VALUES LESS THAN (739950) ENGINE = InnoDB, PARTITION a20251118 VALUES LESS THAN (739951) ENGINE = InnoDB, PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
[20 May 9:37]
MySQL Verification Team
On my test, that table1 structure created in 8.0.35 upgrades fine to 8.0.46 and to 8.4.9, so I'm unsure what's going on. If you can upload an anonymized my.cnf we can try that.
[20 May 19:57]
Gundala Rajasekhar
[client] port = 3307 [mysqldump] quick max_allowed_packet = 1G [mysql] no-auto-rehash [mysqld] port = 3307 server-id = 3514153307 datadir = /mysqldata/data_3307 basedir = /mysql/mysqlbinary/mysql_8.4.9 socket = /mysqldata/data_3307/mysqld.sock pid-file = /mysqldata/data_3307/NVMBD2S05SIV101.pid log-error = /mysqldata/data_3307/NVMBD2S05SIV101.err tmpdir = /mysqltemp/tmp mysqlx = 0 #default_authentication_plugin=mysql_native_password mysql_native_password=ON ####SKIPS HOSTNAME RESOLUTION##### skip-name-resolve ####Parameters#### max_connections = 1000 max_connect_errors = 100000 wait_timeout = 600 interactive_timeout = 600 thread_cache_size = 250 lower_case_table_names = 1 log_bin_trust_function_creators = 1 max_allowed_packet = 1G table_open_cache = 3000 table_definition_cache = 1500 table_open_cache_instances = 16 log_timestamps = SYSTEM ####SLAVE Parameters#### #slave_rows_search_algorithms = INDEX_SCAN,HASH_SCAN slave-type-conversions = ALL_NON_LOSSY max_relay_log_size = 67108864 relay-log = mysql-relay-bin.log replica_transaction_retries = 50 replica-compressed-protocol = 1 skip_replica_start ####BINLOG#### log-bin = /mysqlbinlog/binlog_3307/mysql-bin binlog_expire_logs_seconds = 345600 max_binlog_size = 1G sync_binlog = 0 ###INNODB PARAMETERS### innodb_flush_log_at_trx_commit = 2 innodb_flush_method = O_DIRECT innodb_buffer_pool_size = 19G innodb_buffer_pool_instances = 16 innodb_read_io_threads = 8 innodb_write_io_threads = 8 innodb_redo_log_capacity = 1G innodb_log_buffer_size = 512M innodb_lock_wait_timeout = 50 innodb_autoextend_increment = 128 innodb_doublewrite = 0 innodb_purge_threads = 4 innodb_open_files = 3000 innodb_buffer_pool_dump_pct = 75 innodb_adaptive_hash_index = OFF innodb_adaptive_hash_index_parts = 128 innodb_change_buffer_max_size = 30 innodb_numa_interleave = ON ####THREAD BUFFERS#### read_buffer_size = 512K join_buffer_size = 512K sort_buffer_size = 512K read_rnd_buffer_size = 1M ####TMP TABLE#### tmp_table_size = 512M max_heap_table_size = 512M ####SLOW QUERY LOG#### long_query_time = 1 slow_query_log = 1 slow_query_log_file = /mysqlbinlog/slowlog/slowquery.log ####File Related#### open-files-limit = 60000 lc_messages = en_US lc_messages_dir = /mysql/mysqlbinary/mysql_8.4.9/share ####SIEM Integration Parameters#### innodb_io_capacity = 20000 innodb_io_capacity_max = 40000 replica_pending_jobs_size_max = 128M log_slow_replica_statements = ON #####MULTI_MASTER_RELATED######## auto-increment-increment = 2 auto-increment-offset = 1 ####MBSS PARAMETERS#### log_error_verbosity = 3 #log-raw = OFF skip-symbolic-links sql_mode=STRICT_ALL_TABLES,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO skip-grant-tables = FALSE # BEGIN validate_password BLOCK validate_password.dictionary_file='/mysql/mysqlbinary/mysql_8.4.9/share/dictionary.txt' validate_password.length=14 validate_password.mixed_case_count=1 validate_password.number_count=1 validate_password.policy=MEDIUM validate_password.special_char_count=1 # END validate_password BLOCK
[20 May 19:59]
Gundala Rajasekhar
i have tried to upload the file but it failed. so i have shared the my.cnf used for 8.0.35 to 8.4.9 upgrade. Please also suggest is this below recommended path? 8.0.35 to 8.0.46 to 8.4.9 ?
[21 May 15:01]
Gundala Rajasekhar
Just an update, We tried to upgrade from 8.0.35 to 8.0.36. We did not face any issue. However, 8.0.35 to 8.0.46 faced same errors. Is this a MySQL version BUG ?
[24 May 15:09]
Gundala Rajasekhar
Pls update
