use test; --disable_warnings drop table if exists t1, t2 ; --enable_warnings create table t1 ( a int, b varchar(30), primary key(a)) ; insert into t1 values (1,'one'); insert into t1 values (2,'two'); commit ; ##### test case derived from client_test.c: test_bug4079() # First variant: --error 1242 select 1 < (select a from t1) ; select 'here comes a static line' as column_name ; # Second Variant: # two times error 1242 --> two additional records with NULL values --error 1242 select 1 < (select a from t1) ; --error 1242 select 1 < (select a from t1) ; select 'here comes a static line' as column_name ; # Third Variant: # one time error 1242 , select on empty table --> 3 additional records create table t2 ( a int, b varchar(30), primary key(a)) ; commit ; --error 1242 select 1 < (select a from t1) ; select a as column_name from t2 ; drop table t1, t2;