Bug #97500 mysql - importing large Tablespace: Lost connection during query
Submitted: 6 Nov 8:53 Modified: 6 Nov 15:23
Reporter: Amr Ahmed Email Updates:
Status: Need Feedback Impact on me:
None 
Category:MySQL Server: DDL Severity:S1 (Critical)
Version:5.7.28 OS:Microsoft Windows
Assigned to: Bogdan Kecman CPU Architecture:Any

[6 Nov 8:53] Amr Ahmed
Description:
iam trying to recover innodb table which has 1.5M rows from ibd file ( 5.5 GB )

this is the exact steps i do:

1. getting create table query using mysqlfrm command

2. create the table

3. Alter Table discard tablespace

4. moving the new tablespace to the db directory

5. Alter Table import tablespace;

and i'm getting this error after 5 - 13 minutes :-

ERROR 2013 (HY000): Lost connection to MySQL server during query 

my.cnf:

[client]
port=3307
[mysql]
no-beep

[mysqld]
max_allowed_packet=8M
innodb_buffer_pool_size=511M
innodb_log_file_size=500M
innodb_log_buffer_size=800M
net_read_timeout=28800
net_write_timeout=28800
connect_timeout=28800
wait_timeout=28800
open_files_limit=100000
innodb_open_files=100000
delayed_insert_timeout=28800
innodb_lock_wait_timeout=28800
slave_net_timeout=28800

skip-grant-tables
port=3307
datadir=D:\dbrecover\_home_db_\home\db
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
log-output=FILE
general-log=0
general_log_file="WIN-36LFCDISVVC.log"
slow-query-log=1
slow_query_log_file="WIN-36LFCDISVVC-slow.log"
long_query_time=10
log-error="WIN-36LFCDISVVC.err"
relay_log="WIN-36LFCDISVVC-relay"
server-id=1
report_port=3307
lower_case_table_names=2
secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads"
max_connections=151
table_open_cache=2000
tmp_table_size=123M
thread_cache_size=10
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=236M
key_buffer_size=8M
read_buffer_size=64K
read_rnd_buffer_size=256K
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=9
innodb_autoextend_increment=64
innodb_buffer_pool_instances=8
innodb_concurrency_tickets=5000
innodb_old_blocks_time=1000
innodb_open_files=300
innodb_stats_on_metadata=0
innodb_file_per_table=1
innodb_checksum_algorithm=0
back_log=80
flush_time=0
join_buffer_size=256K
max_connect_errors=100
sort_buffer_size=256K
table_definition_cache=1400
binlog_row_event_max_size=8K
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000

How to repeat:
i tried increasing net_read_timeout , net_write_timeout , connect_timeout , wait_timeout and delayed_insert_timeout , max_allowed_packet but nothing changed
[6 Nov 15:23] Bogdan Kecman
Hi,

This does not look like a bug. If you upload the error log we can confirm that. Our MySQL Support team will be happy to help you recover data or you can get community help on https://forums.mysql.com/

all best