我正在尝试使用pt-online-schema-change来改变数据库中某些表的模式。程序崩溃,下面是MySQL错误。 我不需要抛出这种错误。 我已经尝试在MySQL服务器启动时加上disable-partition-engine-check。 我使用的是MySQL 5.7.21版本
错误:
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
答案 0 :(得分:0)
您可以在程序中忽略此警告而不是停止它。如果这是第三方程序,那么您应该更改MySQL中的设置并关闭STRICT模式并禁用已弃用的消息。
您可以编辑my.cnf文件并添加到sq_mode
的mysqld空值部分[mysqld]
sql_mode=
答案 1 :(得分:0)
您可以使用在终端或phpmyadmin查询上运行查询来启用严格模式 -
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';