1586
1575
static void sys_var_key_cache_size_update(Session *session, drizzle_sys_var *var, void *, const void *save)
1588
1577
uint32_t tmp= *static_cast<const uint32_t *>(save);
1591
1579
struct option option_limits;
1592
1580
plugin_opt_set_limits(&option_limits, var);
1593
1581
option_limits.name= "myisam_key_cache_size";
1595
if (dflt_key_cache->in_init)
1598
1583
myisam_key_cache_size= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1600
/* If key cache didn't existed initialize it, else resize it */
1601
dflt_key_cache->in_init= 1;
1603
error= ! resize_key_cache(dflt_key_cache,
1604
myisam_key_cache_block_size,
1605
myisam_key_cache_size,
1606
myisam_key_cache_division_limit,
1607
myisam_key_cache_age_threshold);
1608
dflt_key_cache->in_init= 0;
1611
static void sys_var_key_cache_block_size_update(Session *session, drizzle_sys_var *var, void *, const void *save)
1587
static void sys_var_key_cache_block_size_update(Session *, drizzle_sys_var *var, void *, const void *)
1613
uint32_t tmp= *static_cast<const uint32_t *>(save);
1616
1589
struct option option_limits;
1617
1590
plugin_opt_set_limits(&option_limits, var);
1618
1591
option_limits.name= "myisam_key_cache_block_size";
1620
if (dflt_key_cache->in_init)
1623
myisam_key_cache_block_size= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1625
dflt_key_cache->in_init= 1;
1627
error= ! resize_key_cache(dflt_key_cache,
1628
myisam_key_cache_block_size,
1629
myisam_key_cache_size,
1630
myisam_key_cache_division_limit,
1631
myisam_key_cache_age_threshold);
1633
dflt_key_cache->in_init= 0;
1636
static void sys_var_key_cache_division_limit_update(Session *session, drizzle_sys_var *var, void *, const void *save)
1595
static void sys_var_key_cache_division_limit_update(Session *, drizzle_sys_var *var, void *, const void *)
1638
uint32_t tmp= *static_cast<const uint32_t *>(save);
1641
1597
struct option option_limits;
1642
1598
plugin_opt_set_limits(&option_limits, var);
1643
1599
option_limits.name= "myisam_key_cache_division_limit";
1645
if (dflt_key_cache->in_init)
1648
myisam_key_cache_division_limit= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1650
dflt_key_cache->in_init= 1;
1652
error= ! resize_key_cache(dflt_key_cache,
1653
myisam_key_cache_block_size,
1654
myisam_key_cache_size,
1655
myisam_key_cache_division_limit,
1656
myisam_key_cache_age_threshold);
1658
dflt_key_cache->in_init= 0;
1661
static void sys_var_key_cache_age_threshold_update(Session *session, drizzle_sys_var *var, void *, const void *save)
1603
static void sys_var_key_cache_age_threshold_update(Session *, drizzle_sys_var *var, void *, const void *)
1663
uint32_t tmp= *static_cast<const uint32_t *>(save);
1666
struct option option_limits;
1605
struct option option_limits;
1667
1606
plugin_opt_set_limits(&option_limits, var);
1668
option_limits.name= "myisam_key_cache_age_threshold";
1670
if (dflt_key_cache->in_init)
1673
myisam_key_cache_age_threshold= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1675
dflt_key_cache->in_init= 1;
1677
error= ! resize_key_cache(dflt_key_cache,
1678
myisam_key_cache_block_size,
1679
myisam_key_cache_size,
1680
myisam_key_cache_division_limit,
1681
myisam_key_cache_age_threshold);
1683
dflt_key_cache->in_init= 0;
1607
option_limits.name= "myisam_key_cache_age_threshold";
1686
1610
static DRIZZLE_SYSVAR_UINT(key_cache_block_size,