--disable_warningsdroptableifexistst1,t2;--enable_warningscreatetablet1(strvarchar(10)default'def',strnullvarchar(10),intgintdefault'10',reldoubledefault'3.14');insertintot1values('','',0,0.0);selectdefault(str),default(strnull),default(intg),default(rel)fromt1;explainextendedselectdefault(str),default(strnull),default(intg),default(rel)fromt1;select*fromt1wherestr<>default(str);explainselect*fromt1wherestr<>default(str);#TODO: uncomment when bug will be fixed#create table t2 select default(str), default(strnull), default(intg), default(rel) from t1;#show create table from t1;#insert into t2 select select default(str), default(strnull), default(intg), default(rel) from t1;droptablet1;# End of 4.1 tests## Bug #11314 (HAVING DEFAULT() hangs)#CREATETABLEt1(idint(11),svarchar(20));INSERTINTOt1VALUES(1,'one'),(2,'two'),(3,'three');--error1364SELECTs,32ASmiFROMt1GROUPBYsHAVINGDEFAULT(mi)ISNULL;DROPTABLEt1;--disable_query_logdropdatabasepbxt;--enable_query_log