• unknown's avatar
    BUG#14480, attempt2: In CREATE ... SELECT ..., don't count the same field twice · 467deb4c
    unknown authored
    when calculating table->null_fields.
    
    
    mysql-test/r/create.result:
      Testcase for BUG#14480
    mysql-test/t/create.test:
      Testcase for BUG#14480
    sql/sql_table.cc:
      BUG#14480: For CREATE ... SELECT ... a field list passed to mysql_prepare_table() contains
      instances of create_field for both create-list and select-list. mysql_prepare_table() 
      matches elements that refer to the same field, and joins them together. When the "join"  
      is performed, both of create_field structures has already been counted in "null_fields". 
      
      This fix makes sure that "null_fields" contains the correct value after two create_field 
      structures have been joined.
    467deb4c
create.test 15.8 KB