Hi, Sergey! On Nov 17, Sergey Vojtovich wrote:
I think the preferred way is the one for tdc_size:
... read the options ... if (IS_SYSVAR_AUTOSIZE(&tdc_size)) SYSVAR_AUTOSIZE(tdc_size, MY_MIN(400 + tdc_size / 2, 2000));
if you'd like you can fix tc_log_size too :)
Oh, you're right. I still have pre-origin image of sys_vars in my mind. Though I wonder what's the role of default value for autosized vars now?
Not much. It might be used in SET @@var=default (I didn't test that :). It is surely visible in I_S.SYSTEM_VARIABLES. That's all. Auto-value is a function of the environment (and, in theory, all other variables). We could make that a default value, indeed. But then it'll need to be re-calculated for every SELECT * FROM I_S.SYSTEM_VARIABLES. This can be done consistently for all auto-sized variables, But it's more work than simply setting the default to the auto-value in mysqld.cc. Regards, Sergei Chief Architect MariaDB and security@mariadb.org