~posulliv/drizzle/memcached_applier

« back to all changes in this revision

Viewing changes to plugin/myisam/ha_myisam.cc

  • Committer: Brian Aker
  • Date: 2009-08-03 19:04:48 UTC
  • mto: (1039.102.2 merge)
  • mto: This revision was merged to the branch mainline in revision 1081.
  • Revision ID: brian@gaz-20090803190448-3arnzjk5v1takajm
Remove Insane Clown Posse (AKA... ICP...just generates bugs).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1278
1278
  return mi_delete(file,buf);
1279
1279
}
1280
1280
 
1281
 
#ifdef __cplusplus
1282
 
extern "C" {
1283
 
#endif
1284
 
 
1285
 
bool index_cond_func_myisam(void *arg)
1286
 
{
1287
 
  ha_myisam *h= (ha_myisam*)arg;
1288
 
  /*if (h->in_range_read)*/
1289
 
  if (h->end_range)
1290
 
  {
1291
 
    if (h->compare_key2(h->end_range) > 0)
1292
 
      return 2; /* caller should return HA_ERR_END_OF_FILE already */
1293
 
  }
1294
 
  return (bool)h->pushed_idx_cond->val_int();
1295
 
}
1296
 
 
1297
 
#ifdef __cplusplus
1298
 
}
1299
 
#endif
1300
 
 
1301
1281
 
1302
1282
int ha_myisam::index_init(uint32_t idx, bool )
1303
1283
{
1304
1284
  active_index=idx;
1305
1285
  //in_range_read= false;
1306
 
  if (pushed_idx_cond_keyno == idx)
1307
 
    mi_set_index_cond_func(file, index_cond_func_myisam, this);
1308
1286
  return 0;
1309
1287
}
1310
1288
 
1312
1290
int ha_myisam::index_end()
1313
1291
{
1314
1292
  active_index=MAX_KEY;
1315
 
  //pushed_idx_cond_keyno= MAX_KEY;
1316
 
  mi_set_index_cond_func(file, NULL, 0);
1317
 
  in_range_check_pushed_down= false;
1318
1293
  return 0;
1319
1294
}
1320
1295
 
1547
1522
 
1548
1523
int ha_myisam::reset(void)
1549
1524
{
1550
 
  pushed_idx_cond= NULL;
1551
 
  pushed_idx_cond_keyno= MAX_KEY;
1552
 
  mi_set_index_cond_func(file, NULL, 0);
1553
1525
  return mi_reset(file);
1554
1526
}
1555
1527
 
1780
1752
  return mi_panic(HA_PANIC_CLOSE);
1781
1753
}
1782
1754
 
1783
 
 
1784
 
/* Index condition pushdown implementation*/
1785
 
 
1786
 
 
1787
 
Item *ha_myisam::idx_cond_push(uint32_t keyno_arg, Item* idx_cond_arg)
1788
 
{
1789
 
  pushed_idx_cond_keyno= keyno_arg;
1790
 
  pushed_idx_cond= idx_cond_arg;
1791
 
  in_range_check_pushed_down= true;
1792
 
  if (active_index == pushed_idx_cond_keyno)
1793
 
    mi_set_index_cond_func(file, index_cond_func_myisam, this);
1794
 
  return NULL;
1795
 
}
1796
 
 
1797
1755
static DRIZZLE_SYSVAR_UINT(block_size, block_size,
1798
1756
                           PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
1799
1757
                           N_("Block size to be used for MyISAM index pages."),