Hi, I’ve been trying to alter a Table named import_permit, adding about 12 new columns for it, using the alter statements:
ALTER TABLE eips2live.import_permit ADD `closed_by_id` bigint(20) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `date_closed` datetime DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `date_disapproved` datetime DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `date_for_cancellation` datetime DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `disapproved_by_id` bigint(20) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `for_cancellation_by_id` bigint(20) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `for_cancellation_by_etrade` varchar(255) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `reason_for_disapproval` varchar(255) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `remarks_for_cancellation` varchar(255) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `remarks_for_close` varchar(255) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `remarks_for_closed` varchar(255) DEFAULT NULL;
ALTER TABLE eips2live.import_permit ADD `date_opened` datetime DEFAULT NULL;
but always ended with Error
Code: 1025. Error on rename of './eips2live/#sql-5e74_42' to './eips2live/import_permit' (errno: -1 - Unknown error -1)
checking my mysql-error.log, I can see this log about the same time the error appears on workbench:
InnoDB: Error: 'eips2live/import_permit' is already in tablespace memory cache
I have been trying to find this errno-1 everywhere but the closest one I got was err 150 which seems to be related to constraints, but I still have to read more of it. Another one was a MySQL Bug, which uses the same errno: -1 and Unknown error -1, but I do not know what to make of it, like how to avoid/resolve this current issue.
Hoping someone can give me a heads up on what to do/where to look for next. thanks.
Here is my my.cnf for reference.
[mysql]
# CLIENT #
#port = 3306
[mysqld]
# GENERAL #
server-id = 2002
user = mysql
default-storage-engine = InnoDB
socket = /srv/data/mysql/mysql.sock
pid-file = /srv/data/mysql/mysql.pid
bind-address = 0.0.0.0
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
#sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE
sysdate-is-now = 1
innodb = FORCE
# DATA STORAGE #
datadir = /srv/data/mysql/
# BINARY LOGGING #
#log-bin = /srv/data/mysql/mysql-bin
binlog-format = row
log-bin = slavedb-bin
expire-logs-days = 14
sync-binlog = 1
# CACHES AND LIMITS #
#tmp-table-size = 32M
#max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
#table-definition-cache = 4096
#table-open-cache = 4096
# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
#innodb-log-file-size = 512M
innodb-log-file-size = 5M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 26G
# LOGGING #
log-error = /srv/data/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /srv/data/mysql/mysql-slow.log