~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_update.cc

Merged build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <list>
34
34
 
35
35
using namespace std;
36
 
using namespace drizzled;
 
36
 
 
37
namespace drizzled
 
38
{
37
39
 
38
40
/**
39
41
  Re-read record if more columns are needed for error message.
110
112
    fields              fields for update
111
113
    values              values of fields for update
112
114
    conds               WHERE clause expression
113
 
    order_num           number of elemen in order_st BY clause
 
115
    order_num           number of elemen in ORDER BY clause
114
116
    order               order_st BY clause list
115
117
    limit               limit clause
116
118
    handle_duplicates   how to handle duplicates
290
292
      SORT_FIELD  *sortorder;
291
293
      ha_rows examined_rows;
292
294
 
293
 
      table->sort.io_cache = new IO_CACHE;
294
 
      memset(table->sort.io_cache, 0, sizeof(IO_CACHE));
 
295
      table->sort.io_cache = new internal::IO_CACHE;
 
296
      memset(table->sort.io_cache, 0, sizeof(internal::IO_CACHE));
295
297
 
296
298
      if (!(sortorder=make_unireg_sortorder(order, &length, NULL)) ||
297
299
          (table->sort.found_records= filesort(session, table, sortorder, length,
316
318
        update these in a separate loop based on the pointer.
317
319
      */
318
320
 
319
 
      IO_CACHE tempfile;
 
321
      internal::IO_CACHE tempfile;
320
322
      if (open_cached_file(&tempfile, drizzle_tmpdir,TEMP_PREFIX,
321
323
                           DISK_BUFFER_SIZE, MYF(MY_WME)))
322
324
        goto err;
388
390
        select= new optimizer::SqlSelect;
389
391
        select->head=table;
390
392
      }
391
 
      if (reinit_io_cache(&tempfile,READ_CACHE,0L,0,0))
 
393
      if (reinit_io_cache(&tempfile,internal::READ_CACHE,0L,0,0))
392
394
        error=1;
393
395
      // Read row ptrs from this cursor
394
396
      memcpy(select->file, &tempfile, sizeof(tempfile));
578
580
    session                     - thread handler
579
581
    table_list          - global/local table list
580
582
    conds               - conditions
581
 
    order_num           - number of order_st BY list entries
582
 
    order               - order_st BY clause list
 
583
    order_num           - number of ORDER BY list entries
 
584
    order               - ORDER BY clause list
583
585
 
584
586
  RETURN VALUE
585
587
    false OK
616
618
 
617
619
  return false;
618
620
}
 
621
 
 
622
} /* namespace drizzled */