1577
1575
static void sys_var_key_cache_size_update(Session *session, drizzle_sys_var *var, void *, const void *save)
1579
1577
uint32_t tmp= *static_cast<const uint32_t *>(save);
1582
1579
struct option option_limits;
1583
1580
plugin_opt_set_limits(&option_limits, var);
1584
1581
option_limits.name= "myisam_key_cache_size";
1586
if (dflt_key_cache->in_init)
1589
1583
myisam_key_cache_size= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1591
/* If key cache didn't existed initialize it, else resize it */
1592
dflt_key_cache->in_init= 1;
1594
error= ! resize_key_cache(dflt_key_cache,
1595
myisam_key_cache_block_size,
1596
myisam_key_cache_size,
1597
myisam_key_cache_division_limit,
1598
myisam_key_cache_age_threshold);
1599
dflt_key_cache->in_init= 0;
1602
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 *)
1604
uint32_t tmp= *static_cast<const uint32_t *>(save);
1607
1589
struct option option_limits;
1608
1590
plugin_opt_set_limits(&option_limits, var);
1609
1591
option_limits.name= "myisam_key_cache_block_size";
1611
if (dflt_key_cache->in_init)
1614
myisam_key_cache_block_size= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1616
dflt_key_cache->in_init= 1;
1618
error= ! resize_key_cache(dflt_key_cache,
1619
myisam_key_cache_block_size,
1620
myisam_key_cache_size,
1621
myisam_key_cache_division_limit,
1622
myisam_key_cache_age_threshold);
1624
dflt_key_cache->in_init= 0;
1627
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 *)
1629
uint32_t tmp= *static_cast<const uint32_t *>(save);
1632
1597
struct option option_limits;
1633
1598
plugin_opt_set_limits(&option_limits, var);
1634
1599
option_limits.name= "myisam_key_cache_division_limit";
1636
if (dflt_key_cache->in_init)
1639
myisam_key_cache_division_limit= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1641
dflt_key_cache->in_init= 1;
1643
error= ! resize_key_cache(dflt_key_cache,
1644
myisam_key_cache_block_size,
1645
myisam_key_cache_size,
1646
myisam_key_cache_division_limit,
1647
myisam_key_cache_age_threshold);
1649
dflt_key_cache->in_init= 0;
1652
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 *)
1654
uint32_t tmp= *static_cast<const uint32_t *>(save);
1657
struct option option_limits;
1605
struct option option_limits;
1658
1606
plugin_opt_set_limits(&option_limits, var);
1659
option_limits.name= "myisam_key_cache_age_threshold";
1661
if (dflt_key_cache->in_init)
1664
myisam_key_cache_age_threshold= static_cast<uint32_t>(fix_unsigned(session, static_cast<uint64_t>(tmp), &option_limits));
1666
dflt_key_cache->in_init= 1;
1668
error= ! resize_key_cache(dflt_key_cache,
1669
myisam_key_cache_block_size,
1670
myisam_key_cache_size,
1671
myisam_key_cache_division_limit,
1672
myisam_key_cache_age_threshold);
1674
dflt_key_cache->in_init= 0;
1607
option_limits.name= "myisam_key_cache_age_threshold";
1677
1610
static DRIZZLE_SYSVAR_UINT(key_cache_block_size,