~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Brian Aker
  • Date: 2010-10-11 21:57:03 UTC
  • mto: (1843.8.1 trunk-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1840.
  • Revision ID: brian@tangent.org-20101011215703-2dbld335se88g7u3
Fix variable such that we no longer pass share to varstring on creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1501
1501
  tmp_table.null_row= false;
1502
1502
  tmp_table.maybe_null= false;
1503
1503
 
 
1504
  tmp_table.in_use= session;
 
1505
 
1504
1506
  while ((item=it++))
1505
1507
  {
1506
1508
    CreateField *cr_field;
1507
1509
    Field *field, *def_field;
1508
1510
    if (item->type() == Item::FUNC_ITEM)
 
1511
    {
1509
1512
      if (item->result_type() != STRING_RESULT)
 
1513
      {
1510
1514
        field= item->tmp_table_field(&tmp_table);
 
1515
      }
1511
1516
      else
 
1517
      {
1512
1518
        field= item->tmp_table_field_from_field_type(&tmp_table, 0);
 
1519
      }
 
1520
    }
1513
1521
    else
 
1522
    {
1514
1523
      field= create_tmp_field(session, &tmp_table, item, item->type(),
1515
1524
                              (Item ***) 0, &tmp_field, &def_field, false,
1516
1525
                              false, false, 0);
 
1526
    }
 
1527
 
1517
1528
    if (!field ||
1518
1529
        !(cr_field=new CreateField(field,(item->type() == Item::FIELD_ITEM ?
1519
1530
                                           ((Item_field *)item)->field :
1520
1531
                                           (Field*) 0))))
 
1532
    {
1521
1533
      return NULL;
 
1534
    }
 
1535
 
1522
1536
    if (item->maybe_null)
 
1537
    {
1523
1538
      cr_field->flags &= ~NOT_NULL_FLAG;
 
1539
    }
 
1540
 
1524
1541
    alter_info->create_list.push_back(cr_field);
1525
1542
  }
1526
1543