Bug #28 Variables are not initialized correctly
Submitted: 13 Jan 2003 15:46 Modified: 28 Jan 2003 16:47
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.9 OS:Linux (linux/ppc64)
Assigned to: CPU Architecture:Any

[13 Jan 2003 15:46] Peter Zaitsev
Description:
It looks like variables are not initialized correctly on startup, not only logging options seems to have weird values at startup:

+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name                   | Value                                                                                                                                                                                                             |
+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| back_log                        | 50                                                                                                                                                                                                                |
| basedir                         | /usr/local/mysql-4.0.9-gamma/                                                                                                                                                                                     |
| binlog_cache_size               | 32768                                                                                                                                                                                                             |
| bulk_insert_buffer_size         | 8388608                                                                                                                                                                                                           |
| character_set                   | win1251                                                                                                                                                                                                           |
| character_sets                  | latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 |
| concurrent_insert               | ON                                                                                                                                                                                                                |
| connect_timeout                 | 5                                                                                                                                                                                                                 |
| convert_character_set           |                                                                                                                                                                                                                   |
| datadir                         | /var/lib/mysql/                                                                                                                                                                                                   |
| delay_key_write                 | ON                                                                                                                                                                                                                |
| delayed_insert_limit            | 100                                                                                                                                                                                                               |
| delayed_insert_timeout          | 300                                                                                                                                                                                                               |
| delayed_queue_size              | 1000                                                                                                                                                                                                              |
| flush                           | OFF                                                                                                                                                                                                               |
| flush_time                      | 0                                                                                                                                                                                                                 |
| ft_min_word_len                 | 4                                                                                                                                                                                                                 |
| ft_max_word_len                 | 254                                                                                                                                                                                                               |
| ft_max_word_len_for_sort        | 20                                                                                                                                                                                                                |
| ft_boolean_syntax               | + -><()~*:""&|                                                                                                                                                                                                    |
| have_bdb                        | NO                                                                                                                                                                                                                |
| have_innodb                     | YES                                                                                                                                                                                                               |
| have_isam                       | NO                                                                                                                                                                                                                |
| have_raid                       | NO                                                                                                                                                                                                                |
| have_symlink                    | DISABLED                                                                                                                                                                                                          |
| have_openssl                    | NO                                                                                                                                                                                                                |
| have_query_cache                | YES                                                                                                                                                                                                               |
| init_file                       |                                                                                                                                                                                                                   |
| innodb_additional_mem_pool_size | 20971520                                                                                                                                                                                                          |
| innodb_buffer_pool_size         | 268435456                                                                                                                                                                                                         |
| innodb_data_file_path           | ibdata1:1500M;ibdata2:1500M;ibdata3:1500M;ibdata4:1500M;ibdata5:1500M:autoextend                                                                                                                                  |
| innodb_data_home_dir            | /var/lib/mysql/                                                                                                                                                                                                   |
| innodb_file_io_threads          | 4                                                                                                                                                                                                                 |
| innodb_force_recovery           | 0                                                                                                                                                                                                                 |
| innodb_thread_concurrency       | 6                                                                                                                                                                                                                 |
| innodb_flush_log_at_trx_commit  | 0                                                                                                                                                                                                                 |
| innodb_fast_shutdown            | ON                                                                                                                                                                                                                |
| innodb_flush_method             |                                                                                                                                                                                                                   |
| innodb_lock_wait_timeout        | 20                                                                                                                                                                                                                |
| innodb_log_arch_dir             | /var/lib/mysql/                                                                                                                                                                                                   |
| innodb_log_archive              | OFF                                                                                                                                                                                                               |
| innodb_log_buffer_size          | 8388608                                                                                                                                                                                                           |
| innodb_log_file_size            | 134217728                                                                                                                                                                                                         |
| innodb_log_files_in_group       | 2                                                                                                                                                                                                                 |
| innodb_log_group_home_dir       | /var/lib/mysql/                                                                                                                                                                                                   |
| innodb_mirrored_log_groups      | 1                                                                                                                                                                                                                 |
| interactive_timeout             | 28800                                                                                                                                                                                                             |
| join_buffer_size                | 131072                                                                                                                                                                                                            |
| key_buffer_size                 | 134217728                                                                                                                                                                                                         |
| language                        | /usr/local/mysql-4.0.9-gamma/share/mysql/english/                                                                                                                                                                 |
| large_files_support             | ON                                                                                                                                                                                                                |
| local_infile                    | ON                                                                                                                                                                                                                |
| locked_in_memory                | OFF                                                                                                                                                                                                               |
| log                             | ON                                                                                                                                                                                                                |
| log_update                      | ON                                                                                                                                                                                                                |
| log_bin                         | ON                                                                                                                                                                                                                |
| log_slave_updates               | OFF                                                                                                                                                                                                               |
| log_slow_queries                | ON                                                                                                                                                                                                                |
| log_warnings                    | OFF                                                                                                                                                                                                               |
| long_query_time                 | 10                                                                                                                                                                                                                |
| low_priority_updates            | OFF                                                                                                                                                                                                               |
| lower_case_table_names          | OFF                                                                                                                                                                                                               |
| max_allowed_packet              | 1047552                                                                                                                                                                                                           |
| max_binlog_cache_size           | 4294967295                                                                                                                                                                                                        |
| max_binlog_size                 | 1073741824                                                                                                                                                                                                        |
| max_connections                 | 600                                                                                                                                                                                                               |
| max_connect_errors              | 1000                                                                                                                                                                                                              |
| max_delayed_threads             | 20                                                                                                                                                                                                                |
| max_heap_table_size             | 16777216                                                                                                                                                                                                          |
| max_join_size                   | 18446744073709551615                                                                                                                                                                                              |
| max_sort_length                 | 1024                                                                                                                                                                                                              |
| max_user_connections            | 0                                                                                                                                                                                                                 |
| max_tmp_tables                  | 32                                                                                                                                                                                                                |
| max_write_lock_count            | 4294967295                                                                                                                                                                                                        |
| myisam_max_extra_sort_file_size | 268435456                                                                                                                                                                                                         |
| myisam_max_sort_file_size       | 9223372036854775807                                                                                                                                                                                               |
| myisam_recover_options          | OFF                                                                                                                                                                                                               |
| myisam_sort_buffer_size         | 67108864                                                                                                                                                                                                          |
| net_buffer_length               | 16384                                                                                                                                                                                                             |
| net_read_timeout                | 30                                                                                                                                                                                                                |
| net_retry_count                 | 10                                                                                                                                                                                                                |
| net_write_timeout               | 60                                                                                                                                                                                                                |
| open_files_limit                | 0                                                                                                                                                                                                                 |
| pid_file                        | /var/lib/mysql/sql3.pid                                                                                                                                                                                           |
| port                            | 3306                                                                                                                                                                                                              |
| protocol_version                | 10                                                                                                                                                                                                                |
| read_buffer_size                | 2093056                                                                                                                                                                                                           |
| read_rnd_buffer_size            | 262144                                                                                                                                                                                                            |
| rpl_recovery_rank               | 0                                                                                                                                                                                                                 |
| query_cache_limit               | 1048576                                                                                                                                                                                                           |
| query_cache_size                | 67108864                                                                                                                                                                                                          |
| query_cache_type                | ON                                                                                                                                                                                                                |
| server_id                       | 1                                                                                                                                                                                                                 |
| slave_net_timeout               | 3600                                                                                                                                                                                                              |
| skip_external_locking           | ON                                                                                                                                                                                                                |
| skip_networking                 | OFF                                                                                                                                                                                                               |
| skip_show_database              | OFF                                                                                                                                                                                                               |
| slow_launch_time                | 2                                                                                                                                                                                                                 |
| socket                          | /var/run/mysqld/mysqld.sock                                                                                                                                                                                       |
| sort_buffer_size                | 2097144                                                                                                                                                                                                           |
| sql_mode                        | 0                                                                                                                                                                                                                 |
| table_cache                     | 512                                                                                                                                                                                                               |
| table_type                      | MYISAM                                                                                                                                                                                                            |
| thread_cache_size               | 12                                                                                                                                                                                                                |
| thread_stack                    | 65536                                                                                                                                                                                                             |
| tx_isolation                    | REPEATABLE-READ                                                                                                                                                                                                   |
| timezone                        | Local time zone must be set--see z                                                                                                                                                                               |
| tmp_table_size                  | 33554432                                                                                                                                                                                                          |
| tmpdir                          | /tmp/                                                                                                                                                                                                             |
| version                         | 4.0.9-gamma-log                                                                                                                                                                                                   |
| wait_timeout                    | 28800                                                                                                                                                                                                             |
+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

How to repeat:
Run mysqld --no-defaults

and make sure logs are created
[28 Jan 2003 16:47] MySQL Developer
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to 'Open'.

Thank you for your interest in PHP.

Not enough information and no way to repeat.
[21 Apr 2003 6:22] Andrey Ignatov
I was reported this bug to Peter and I may provide all needed information. As Peter already said variables initialize even if start mysqld with --no-defaults options.

Andrey
[21 Apr 2003 10:41] Peter Zaitsev
Andrey,

I've discussed this bug with Our CTO and I belive I wrote you 
mail which seems to be lost for some reason :(

It is suspected this is compiler issue as these values should be initialised to zero (off) which happens on all other platforms. 

Could you please try recent compiler version.

So far you can just use =0 for initialising these variables explicitly.