Bug #1688 CREATE TABLE ... SELECT with default()
Submitted: 28 Oct 2003 4:16 Modified: 9 Dec 2003 2:28
Reporter: Oleksandr Byelkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1 OS:
Assigned to: Bugs System CPU Architecture:Any

[28 Oct 2003 4:16] Oleksandr Byelkin
Description:
CREATE TABLE ... SELECT with default() respond nothing to client. 

How to repeat:
--disable_warnings 
drop table if exists t1,t2; 
--enable_warnings 
 
create table t1(str varchar(10) default 'def',strnull varchar(10),intg int 
default '10',rel double default '3.14'); 
 
insert into t1 values ('','',0,0.0); 
create table t2 select default(str), default(strnull), default(intg), 
default(rel) from t1; 
drop table t1,t2;
[31 Oct 2003 4:34] Victor Vagin
bk commit - 4.0 tree (1.1582)
ChangeSet
  1.1582 03/10/23 13:29:21 vva@eagle.mysql.r18.ru +3 -0
  fixed Item_func_min_max::val_int() for 'real_result' arguments (bug #1601)

or, would you like to get right default parameter of created fields?
[3 Nov 2003 5:22] Victor Vagin
I'm sorry, it was a erratum above, correct changeset is:

bk commit - 4.1 tree (1.1590)

ChangeSet
  1.1590 03/10/31 16:24:55 vva@eagle.mysql.r18.ru +3 -0
  fixed bug #1688 "CREATE TABLE ... SELECT with default()"
[9 Dec 2003 2:28] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html