Bug #81191 CREATE TABLE ... SELECT caused ERROR 1114 while destination reached over 4 Gb

Submitted: 25 Apr 2016 11:10 Modified: 26 Apr 2016 12:25
Reporter: Владислав Сокол Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:5.7.11 OS:Windows
Assigned to: CPU Architecture:Any

[25 Apr 2016 11:10] Владислав Сокол
Description:
Server OS:
a) MS Windows 7 Max SP1 32-bit
b) MS Windows 2003 EE SP2 32-bit
free space on drive C: - over 700 Gbytes

MySQL Server version: 5.7.11-log MySQL Community Server (GPL) x86
(default) Storage engine = InnoDB. 
innodb_autoextend_increment=64
innodb_data_home_dir=
innodb_data_file_path=ibdata1:64M:autoextend
innodb_file_per_table=1
innodb_tmpdir=C:\ProgramData\MySQL\MySQL Server 5.7\Tmp
tmpdir=C:\ProgramData\MySQL\MySQL Server 5.7\Tmp
======

I try to make a copy of existing table from 'MySQL 5.7 Unicode Command-Line Client' using

CREATE TABLE db2.table2 AS SELECT * FROM db1.table1 [LIMIT XXXXX];

If destination table file (table2.MYD) is NOT reached 4 Gbytes (source table size is small or LIMIT clause value is small), the copying process performed normally. But if the destination table file size reached over 4 Gbytes, the copying process is terminated immediately with error message

ERROR 1114 (HY000): The table 'table2' is full

While creating table copy using another technique:

CREATE TABLE db2.table2 LIKE db1.table1;
INSERT INTO db2.table2 SELECT * FROM db1.table1 [LIMIT XXXXX];

the destination table is always created/filled normally even destination table filesize is over 4 Gbytes.

How to repeat:
Make a copy of huge (over 4 Gbytes) table using CREATE TABLE ... SELECT.
[25 Apr 2016 11:27] Shane Bester
looks like a duplicate of 
http://bugs.mysql.com/bug.php?id=80149 ?
[25 Apr 2016 12:26] MySQL Verification Team
Duplicate of bug pointed by Shane.
[25 Apr 2016 15:12] Владислав Сокол
This is NOT a duplicate. Maybe addition only...

While copying huge data into existing (both empty and contained data) table using INSERT .. SELECT there is NO any problems, unlike reported in http://bugs.mysql.com/bug.php?id=80149. Only CREATE TABLE .. SELECT caused an error.

Of course, the error source can be the same...
[26 Apr 2016 12:25] MySQL Verification Team
Hi,

I'd say it is a duplicate since it looks the source issue is the same - creating temp table > 4G on 32bit windows.

Anyhow reproduced/verified as described

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.