~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Brian Aker
  • Date: 2008-10-11 18:23:34 UTC
  • Revision ID: brian@tangent.org-20081011182334-7cmtytah6rs12e2y
Remove dead slow variable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
495
495
  bool error= 0;
496
496
 
497
497
  thd->command=command;
498
 
  /*
499
 
    Commands which always take a long time are logged into
500
 
    the slow log only if opt_log_slow_admin_statements is set.
501
 
  */
502
 
  thd->enable_slow_log= true;
503
498
  thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
504
499
  thd->set_time();
505
500
  pthread_mutex_lock(&LOCK_thread_count);
758
753
      uint32_t slave_server_id;
759
754
 
760
755
      status_var_increment(thd->status_var.com_other);
761
 
      thd->enable_slow_log= opt_log_slow_admin_statements;
762
756
      /* TODO: The following has to be changed to an 8 byte integer */
763
757
      pos = uint4korr(packet);
764
758
      flags = uint2korr(packet + 4);
1476
1470
    assert(first_table == all_tables && first_table != 0);
1477
1471
    if (end_active_trans(thd))
1478
1472
      goto error;
1479
 
    /*
1480
 
      Currently CREATE INDEX or DROP INDEX cause a full table rebuild
1481
 
      and thus classify as slow administrative statements just like
1482
 
      ALTER TABLE.
1483
 
    */
1484
 
    thd->enable_slow_log= opt_log_slow_admin_statements;
1485
1473
 
1486
1474
    memset(&create_info, 0, sizeof(create_info));
1487
1475
    create_info.db_type= 0;
1573
1561
        break;
1574
1562
      }
1575
1563
 
1576
 
      thd->enable_slow_log= opt_log_slow_admin_statements;
1577
1564
      res= mysql_alter_table(thd, select_lex->db, lex->name.str,
1578
1565
                             &create_info,
1579
1566
                             first_table,
1624
1611
  case SQLCOM_REPAIR:
1625
1612
  {
1626
1613
    assert(first_table == all_tables && first_table != 0);
1627
 
    thd->enable_slow_log= opt_log_slow_admin_statements;
1628
1614
    res= mysql_repair_table(thd, first_table, &lex->check_opt);
1629
1615
    /* ! we write after unlocking the table */
1630
1616
    /*
1638
1624
  case SQLCOM_CHECK:
1639
1625
  {
1640
1626
    assert(first_table == all_tables && first_table != 0);
1641
 
    thd->enable_slow_log= opt_log_slow_admin_statements;
1642
1627
    res = mysql_check_table(thd, first_table, &lex->check_opt);
1643
1628
    select_lex->table_list.first= (unsigned char*) first_table;
1644
1629
    lex->query_tables=all_tables;
1647
1632
  case SQLCOM_ANALYZE:
1648
1633
  {
1649
1634
    assert(first_table == all_tables && first_table != 0);
1650
 
    thd->enable_slow_log= opt_log_slow_admin_statements;
1651
1635
    res= mysql_analyze_table(thd, first_table, &lex->check_opt);
1652
1636
    /* ! we write after unlocking the table */
1653
1637
    write_bin_log(thd, true, thd->query, thd->query_length);
1659
1643
  case SQLCOM_OPTIMIZE:
1660
1644
  {
1661
1645
    assert(first_table == all_tables && first_table != 0);
1662
 
    thd->enable_slow_log= opt_log_slow_admin_statements;
1663
1646
    res= mysql_optimize_table(thd, first_table, &lex->check_opt);
1664
1647
    /* ! we write after unlocking the table */
1665
1648
    write_bin_log(thd, true, thd->query, thd->query_length);