~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cursor.cc

  • Committer: Lee Bieber
  • Date: 2011-01-25 02:10:42 UTC
  • mfrom: (2109.1.4 build)
  • Revision ID: kalebral@gmail.com-20110125021042-ocqa0v509ae7fmtz
Need to add a "drop table a" in execute.wait test
Add execute test suite to regular test run
Merge Lee - fix second part of 705699, check for both client and server before building and testing rabbitmq plugin
Merge Shrews - Changes TransactionServices methods to use references to Session objects instead of pointers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
     */
711
711
    Session *const session= getTable()->in_use;
712
712
    TransactionServices &transaction_services= TransactionServices::singleton();
713
 
    transaction_services.truncateTable(session, getTable());
 
713
    transaction_services.truncateTable(*session, *getTable());
714
714
  }
715
715
 
716
716
  return result;
1311
1311
     * CREATE TABLE will commit the transaction containing
1312
1312
     * it).
1313
1313
     */
1314
 
    result= transaction_services.insertRecord(session, table);
 
1314
    result= transaction_services.insertRecord(*session, *table);
1315
1315
    break;
1316
1316
  case SQLCOM_REPLACE:
1317
1317
  case SQLCOM_REPLACE_SELECT:
1340
1340
       * as the row to delete (this is the conflicting row), so
1341
1341
       * we need to notify TransactionService to use that row.
1342
1342
       */
1343
 
      transaction_services.deleteRecord(session, table, true);
 
1343
      transaction_services.deleteRecord(*session, *table, true);
1344
1344
      /* 
1345
1345
       * We set the "current" statement message to NULL.  This triggers
1346
1346
       * the replication services component to generate a new statement
1347
1347
       * message for the inserted record which will come next.
1348
1348
       */
1349
 
      transaction_services.finalizeStatementMessage(*session->getStatementMessage(), session);
 
1349
      transaction_services.finalizeStatementMessage(*session->getStatementMessage(), *session);
1350
1350
    }
1351
1351
    else
1352
1352
    {
1353
1353
      if (before_record == NULL)
1354
 
        result= transaction_services.insertRecord(session, table);
 
1354
        result= transaction_services.insertRecord(*session, *table);
1355
1355
      else
1356
 
        transaction_services.updateRecord(session, table, before_record, after_record);
 
1356
        transaction_services.updateRecord(*session, *table, before_record, after_record);
1357
1357
    }
1358
1358
    break;
1359
1359
  case SQLCOM_INSERT:
1366
1366
     * an update.
1367
1367
     */
1368
1368
    if (before_record == NULL)
1369
 
      result= transaction_services.insertRecord(session, table);
 
1369
      result= transaction_services.insertRecord(*session, *table);
1370
1370
    else
1371
 
      transaction_services.updateRecord(session, table, before_record, after_record);
 
1371
      transaction_services.updateRecord(*session, *table, before_record, after_record);
1372
1372
    break;
1373
1373
 
1374
1374
  case SQLCOM_UPDATE:
1375
 
    transaction_services.updateRecord(session, table, before_record, after_record);
 
1375
    transaction_services.updateRecord(*session, *table, before_record, after_record);
1376
1376
    break;
1377
1377
 
1378
1378
  case SQLCOM_DELETE:
1379
 
    transaction_services.deleteRecord(session, table);
 
1379
    transaction_services.deleteRecord(*session, *table);
1380
1380
    break;
1381
1381
  default:
1382
1382
    break;