~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to sql/sql_update.cc

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
      matching rows before updating the table!
398
398
    */
399
399
    if (used_index < MAX_KEY && old_covering_keys.is_set(used_index))
400
 
      table->mark_columns_used_by_index(used_index);
 
400
      table->add_read_columns_used_by_index(used_index);
401
401
    else
402
402
    {
403
403
      table->use_all_columns();
425
425
      {
426
426
        goto err;
427
427
      }
 
428
      thd->examined_row_count+= examined_rows;
428
429
      /*
429
430
        Filesort has already found and selected the rows we want to update,
430
431
        so we don't need the where clause
471
472
 
472
473
      while (!(error=info.read_record(&info)) && !thd->killed)
473
474
      {
 
475
        thd->examined_row_count++;
474
476
        if (!(select && select->skip_record()))
475
477
        {
476
478
          if (table->file->was_semi_consistent_read())
577
579
 
578
580
  while (!(error=info.read_record(&info)) && !thd->killed)
579
581
  {
 
582
    thd->examined_row_count++;
580
583
    if (!(select && select->skip_record()))
581
584
    {
582
585
      if (table->file->was_semi_consistent_read())
1050
1053
        correct order of statements. Otherwise, we use a TL_READ lock to
1051
1054
        improve performance.
1052
1055
      */
1053
 
      tl->lock_type= read_lock_type_for_table(thd, table);
 
1056
      tl->lock_type= read_lock_type_for_table(thd, lex, tl);
1054
1057
      tl->updating= 0;
1055
1058
      /* Update TABLE::lock_type accordingly. */
1056
1059
      if (!tl->placeholder() && !using_lock_tables)