user3806586
user3806586

Reputation: 53

MySQL error 1287 - On insert into table show the partition deprecated error

I am trying to use pt-online-schema-change to alter the schema of some tables on my database. The programs crashs with the MySQL error below. I need to not throws this kind of errors. I already tried to put disable-partition-engine-check on the startup of MySQL server. I am using MySQL version 5.7.21

Error:

 Level: Warning
Code: 1287
Message: The partition engine, used by table 'nokia_oss_stats_4g_timbrasil_dum._lte_cell_avail_new', is deprecated and will be removed in a future release. Please use native partitioning instead.
Query: INSERT LOW_PRIORITY IGNORE INTO `nokia_oss_stats_4g_timbrasil_dum`.`_lte_cell_avail_new` (`period_start_time`, `dateday`, `period_duration`, `dn_plmn`, `dn_mrbts`, `dn_lnbts`, `dn_lncel`, `dn_mcc`, `dn_mnc`, `m8020c0`, `m8020c1`, `m8020c10`, `m8020c11`, `m8020c12`, `m8020c2`, `m8020c3`, `m8020c4`, `m8020c5`, `m8020c6`, `m8020c7`, `m8020c8`, `m8020c9`, `netchart_count`) SELECT `period_start_time`, `dateday`, `period_duration`, `dn_plmn`, `dn_mrbts`, `dn_lnbts`, `dn_lncel`, `dn_mcc`, `dn_mnc`, `m8020c0`, `m8020c1`, `m8020c10`, `m8020c11`, `m8020c12`, `m8020c2`, `m8020c3`, `m8020c4`, `m8020c5`, `m8020c6`, `m8020c7`, `m8020c8`, `m8020c9`, `netchart_count` FROM `nokia_oss_stats_4g_timbrasil_dum`.`lte_cell_avail` FORCE INDEX(`PRIMARY`) WHERE ((`dateday` > ?) OR (`dateday` = ? AND `dn_plmn` > ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` > ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` > ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` > ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` = ? AND `dn_mcc` > ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` = ? AND `dn_mcc` = ? AND `dn_mnc` > ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` = ? AND `dn_mcc` = ? AND `dn_mnc` = ? AND `period_start_time` >= ?)) AND ((`dateday` < ?) OR (`dateday` = ? AND `dn_plmn` < ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` < ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` < ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` < ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` = ? AND `dn_mcc` < ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` = ? AND `dn_mcc` = ? AND `dn_mnc` < ?) OR (`dateday` = ? AND `dn_plmn` = ? AND `dn_mrbts` = ? AND `dn_lnbts` = ? AND `dn_lncel` = ? AND `dn_mcc` = ? AND `dn_mnc` = ? AND `period_start_time` <= ?)) LOCK IN SHARE MODE

Upvotes: 0

Views: 2388

Answers (2)

Dileep Yadav
Dileep Yadav

Reputation: 57

You can enable the strict mode using giving query run on terminal or phpmyadmin query-

mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

Upvotes: 0

newman
newman

Reputation: 2719

You can ignore this warnings in your program and not stop it. If this is 3rd part program then you should change settings in MySQL and turn off STRICT mode and disable deprecated messages.

You can edit my.cnf file and add to section mysqld empty value for sql_mode

[mysqld]
sql_mode=

Upvotes: 0

Related Questions