[MDEV-2492] LP:978146 - my.ini with PBXT=OFF has to be placed in DATADIR to be effective Created: 2012-04-10  Updated: 2012-10-04  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: nbrnhardt (Inactive) Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug978146.xml    

 Description   

According to the documentation on
http://dev.mysql.com/doc/refman/5.5/en/option-files.html
Windows versions of MySQL/MariaDB searches for:

On Windows, MySQL programs read startup options from the following files, in the specified order (top items are used first).
File Name Purpose
WINDIR\my.ini, WINDIR\my.cnf Global options
C:\my.ini, C:\my.cnf Global options
INSTALLDIR\my.ini, INSTALLDIR\my.cnf Global options

Instead, only when my.ini is placed in DATADIR, the PBXT engine is really OFF, and no more PBXT files are created.

Testcase:
=========
Windows XP 32 bit
INSTALLDIR = C:\MariaDB
DATADIR = C:\MariaDB\data

Place my.ini with the following lines in MariaDB INSTALLDIR:
— BEGIN —
[mysqld]
pbxt=OFF
skip-innodb
skip-name-resolve
— END —

The line 'skip-innodb' can be replaced with 'innodb=OFF', the result is the same.

Start the server.

Expected behavior would be:
120410 16:04:45 [Note] Plugin 'PBXT' is disabled.
120410 16:04:45 [Note] Plugin 'InnoDB' is disabled.
120410 16:04:45 [Note] Plugin 'FEEDBACK' is disabled.

But instead, InnoDB/PBXT database and log files are created:
120410 16:01:49 [Note] PrimeBase XT (PBXT) Engine 1.0.11-7 Pre-GA loaded...
120410 16:01:49 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://www.primebase.org
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use Windows interlocked functions
InnoDB: Compressed tables use zlib 1.2.3
120410 16:01:49 InnoDB: Initializing buffer pool, size = 128.0M
120410 16:01:49 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
120410 16:01:49 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120410 16:01:49 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
120410 16:01:50 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created

Stop server.

Copy my.ini from INSTALLDIR to DATADIR.
Delete created ib_logfile0, ib_logfile1, ibdata1, pbxt-lock in DATADIR.

Restart server.

No more ib* and pbxt* files are created.

Checked this behavior on 5.2.12 and 5.3.6. Couldn't check on 5.5.22 due to https://mariadb.atlassian.net/browse/MDEV-208



 Comments   
Comment by Elena Stepanova [ 2012-04-10 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
Hi,

Are you using zip or msi packages?
I've just tried 5.3.6 zip, works fine for me.

What I do is

  • unpack zip in directory <my basedir>;
  • create <my basedir>\my.ini file which contains skip-pbxt;
  • start server as <my basedir>\bin\mysqld --console;
  • see PBXT disabled;
  • stop server;
  • remove skip-pbxt line from <my basedir>\my.ini;
  • start server the same way;
  • see PBXT started.

Is there anything you do differently?

Thanks.

Comment by nbrnhardt (Inactive) [ 2012-04-17 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
It seems to be dependent on the server-id. The Master server doesn't have this issue, but both slaves. Before resyncing one slave (Win 08 64bit), I changed the id from 2 to 1 testwise, and voila, this bug didn't occur.

So it seems this bug only occurs when

server-id > 1

in my.ini

Comment by Elena Stepanova [ 2012-04-17 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
Hi,

I've now tried with server-id=2, (on another flavor of Windows, though), still works all right. I'll try Win 2008 64bit later.

Meanwhile, where do you place your server-id? Do you mean it's in the same ini file, and it's only PBXT/InnoDB options that are ignored, the rest of the ini file is read and recognized?

If so, could you please do the following:

1. Set server-id to something definitely unique (some 9288320), start server, run
SELECT @@server_id;
SHOW ENGINES;

and paste here the output;

2. Run mysql.exe --help (from the same installation), find in its output
Default options are read from the following files in the given order:
<the list of files to read>

and paste them here;

3. Attach the whole ini file with which you observe the problem.

Thanks.

Comment by nbrnhardt (Inactive) [ 2012-04-17 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
my.ini located in INSTALLDIR (and nowhere else) looks like:

[mysqld]

back_log = 50

character_set_server = utf8

concurrent_insert = 2

connect_timeout = 10

datadir=C:/mariadb/data

default-storage-engine = MyISAM

delay-key-write = ALL

group_concat_max_len = 65535

innodb=OFF

interactive_timeout = 3600

join_buffer_size = 4M

key_buffer_size = 384M

key_cache_segments = 32

log-bin=mysql-bin

max_allowed_packet = 16M

max_connect_errors = 100000

max_connections = 60

max_heap_table_size = 256M

max_seeks_for_key = 100

#myisam-recover=BACKUP,FORCE

myisam_max_sort_file_size = 256M

myisam_sort_buffer_size = 256M

net_buffer_length = 16384

pbxt=OFF

port = 3306

query_alloc_block_size = 65536

query_cache_limit = 2M

query_cache_size = 32M

query_prealloc_size = 262144

range_alloc_block_size = 4096

read_buffer_size = 2M

read_rnd_buffer_size = 8M

server-id = 2345678

skip-external-locking

skip-innodb

skip-pbxt

skip-name-resolve

sort_buffer_size = 4M

table_definition_cache = 2048

table_open_cache = 1024

thread_cache_size = 8

thread_concurrency = 32

thread_stack = 1M

tmp_table_size = 256M

transaction_alloc_block_size = 8192

transaction_prealloc_size = 4096

wait_timeout = 60

[client]

port=3306

[mysqldump]

quick

max_allowed_packet = 16M

[myisamchk]

key_buffer_size = 256M

sort_buffer_size = 32M

read_buffer_size = 32M

write_buffer_size = 32M

[mysqlhotcopy]

interactive-timeout

When I start mysql (as service), the following files are created in DATADIR:

17.04.2012 16:52 10.485.760 ibdata1

17.04.2012 16:52 5.242.880 ib_logfile0

17.04.2012 16:52 5.242.880 ib_logfile1

17.04.2012 16:52 24.576 tc.log

The first 3 are obviously PBXT files. What is tc.log for?

1) SELECT @@server_id outputs:

@@server_id

0

2) Default options are read from the following files in the given order:

C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf

C:\mariadb\my.ini C:\mariadb\my.cnf

The following groups are read:

mysql client client-server client-mariadb

Comment by nbrnhardt (Inactive) [ 2012-04-17 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
pbxt-lock is also created, besides Maria log and error log file.

Comment by nbrnhardt (Inactive) [ 2012-04-17 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
SHOW STATUS

Variable_name;Value

Aborted_clients;0

Aborted_connects;0

Access_denied_errors;0

Aria_pagecache_blocks_not_flushed;0

Aria_pagecache_blocks_unused;15737

Aria_pagecache_blocks_used;1598

Aria_pagecache_reads;1607

Aria_pagecache_read_requests;1624

Aria_pagecache_writes;1597

Aria_pagecache_write_requests;14

Aria_transaction_log_syncs;2

Binlog_bytes_written;0

Binlog_cache_disk_use;0

Binlog_cache_use;0

binlog_commits;0

binlog_group_commits;0

binlog_snapshot_file;

binlog_snapshot_position;0

Busy_time;0.000000

Bytes_received;1047

Bytes_sent;24553

Compression;ON

Com_admin_commands;17

Com_alter_db;0

Com_alter_db_upgrade;0

Com_alter_event;0

Com_alter_function;0

Com_alter_procedure;0

Com_alter_server;0

Com_alter_table;0

Com_alter_tablespace;0

Com_analyze;0

Com_assign_to_keycache;0

Com_backup_table;0

Com_begin;0

Com_binlog;0

Com_call_procedure;0

Com_change_db;0

Com_change_master;0

Com_check;0

Com_checksum;0

Com_commit;0

Com_create_db;0

Com_create_event;0

Com_create_function;0

Com_create_index;0

Com_create_procedure;0

Com_create_server;0

Com_create_table;0

Com_create_trigger;0

Com_create_udf;0

Com_create_user;0

Com_create_view;0

Com_dealloc_sql;0

Com_delete;0

Com_delete_multi;0

Com_do;0

Com_drop_db;0

Com_drop_event;0

Com_drop_function;0

Com_drop_index;0

Com_drop_procedure;0

Com_drop_server;0

Com_drop_table;0

Com_drop_trigger;0

Com_drop_user;0

Com_drop_view;0

Com_empty_query;0

Com_execute_sql;0

Com_flush;0

Com_grant;0

Com_ha_close;0

Com_ha_open;0

Com_ha_read;0

Com_help;0

Com_insert;0

Com_insert_select;0

Com_install_plugin;0

Com_kill;0

Com_load;0

Com_load_master_data;0

Com_load_master_table;0

Com_lock_tables;0

Com_optimize;0

Com_preload_keys;0

Com_prepare_sql;0

Com_purge;0

Com_purge_before_date;0

Com_release_savepoint;0

Com_rename_table;0

Com_rename_user;0

Com_repair;0

Com_replace;0

Com_replace_select;0

Com_reset;0

Com_restore_table;0

Com_revoke;0

Com_revoke_all;0

Com_rollback;0

Com_rollback_to_savepoint;0

Com_savepoint;0

Com_select;2

Com_set_option;1

Com_show_authors;0

Com_show_binlogs;0

Com_show_binlog_events;0

Com_show_charsets;0

Com_show_client_statistics;0

Com_show_collations;0

Com_show_column_types;0

Com_show_contributors;0

Com_show_create_db;0

Com_show_create_event;0

Com_show_create_func;0

Com_show_create_proc;0

Com_show_create_table;0

Com_show_create_trigger;0

Com_show_databases;1

Com_show_engine_logs;0

Com_show_engine_mutex;0

Com_show_engine_status;0

Com_show_errors;0

Com_show_events;1

Com_show_fields;0

Com_show_function_status;1

Com_show_grants;0

Com_show_index_statistics;0

Com_show_keys;0

Com_show_master_status;0

Com_show_new_master;0

Com_show_open_tables;0

Com_show_plugins;0

Com_show_privileges;0

Com_show_procedure_status;1

Com_show_processlist;0

Com_show_profile;0

Com_show_profiles;0

Com_show_slave_hosts;0

Com_show_slave_status;0

Com_show_status;5

Com_show_storage_engines;0

Com_show_tables;0

Com_show_table_statistics;0

Com_show_table_status;1

Com_show_triggers;1

Com_show_user_statistics;0

Com_show_variables;2

Com_show_warnings;0

Com_slave_start;0

Com_slave_stop;0

Com_stmt_close;0

Com_stmt_execute;0

Com_stmt_fetch;0

Com_stmt_prepare;0

Com_stmt_reprepare;0

Com_stmt_reset;0

Com_stmt_send_long_data;0

Com_truncate;0

Com_uninstall_plugin;0

Com_unlock_tables;0

Com_update;0

Com_update_multi;0

Com_xa_commit;0

Com_xa_end;0

Com_xa_prepare;0

Com_xa_recover;0

Com_xa_rollback;0

Com_xa_start;0

Connections;3

Cpu_time;0.000000

Created_tmp_disk_tables;21

Created_tmp_files;5

Created_tmp_tables;114

Delayed_errors;0

Delayed_insert_threads;0

Delayed_writes;0

Empty_queries;4

Flush_commands;1

Handler_commit;0

Handler_delete;0

Handler_discover;0

Handler_icp_attempts ;0

Handler_icp_match;0

Handler_mrr_init;0

Handler_mrr_key_refills;0

Handler_mrr_rowid_refills;0

Handler_prepare;0

Handler_read_first;2

Handler_read_key;1

Handler_read_next;4

Handler_read_prev;0

Handler_read_rnd;0

Handler_read_rnd_deleted;0

Handler_read_rnd_next;861

Handler_rollback;0

Handler_savepoint;0

Handler_savepoint_rollback;0

Handler_tmp_update;0

Handler_tmp_write;851

Handler_update;0

Handler_write;0

Innodb_buffer_pool_pages_data;179

Innodb_buffer_pool_pages_dirty;0

Innodb_buffer_pool_pages_flushed;190

Innodb_buffer_pool_pages_free;8011

Innodb_buffer_pool_pages_misc;1

Innodb_buffer_pool_pages_total;8191

Innodb_buffer_pool_reads;0

Innodb_buffer_pool_read_ahead;0

Innodb_buffer_pool_read_ahead_evicted;0

Innodb_buffer_pool_read_ahead_rnd;0

Innodb_buffer_pool_read_requests;1533

Innodb_buffer_pool_wait_free;0

Innodb_buffer_pool_write_requests;1186

Innodb_data_fsyncs;16

Innodb_data_pending_fsyncs;0

Innodb_data_pending_reads;0

Innodb_data_pending_writes;0

Innodb_data_read;0

Innodb_data_reads;0

Innodb_data_writes;222

Innodb_data_written;3417600

Innodb_dblwr_pages_written;16

Innodb_dblwr_writes;1

Innodb_deadlocks;0

Innodb_dict_tables;8

Innodb_have_atomic_builtins;ON

Innodb_log_waits;0

Innodb_log_writes;4

Innodb_log_write_requests;79

Innodb_os_log_fsyncs;10

Innodb_os_log_pending_fsyncs;0

Innodb_os_log_pending_writes;0

Innodb_os_log_written;38912

Innodb_pages_created;179

Innodb_pages_read;0

Innodb_pages_written;190

Innodb_page_size;16384

Innodb_rows_deleted;0

Innodb_rows_inserted;0

Innodb_rows_read;0

Innodb_rows_updated;0

Innodb_row_lock_current_waits;0

Innodb_row_lock_time;0

Innodb_row_lock_time_avg;0

Innodb_row_lock_time_max;0

Innodb_row_lock_waits;0

Key_blocks_not_flushed;0

Key_blocks_unused;107165

Key_blocks_used;2

Key_blocks_warm;0

Key_reads;2

Key_read_requests;16

Key_writes;0

Key_write_requests;0

Last_query_cost;10.499000

Max_used_connections;1

Not_flushed_delayed_rows;0

Opened_files;332

Opened_tables;0

Opened_table_definitions;0

Open_files;100

Open_streams;0

Open_tables;51

Open_table_definitions;75

Prepared_stmt_count;0

Qcache_free_blocks;0

Qcache_free_memory;0

Qcache_hits;0

Qcache_inserts;0

Qcache_lowmem_prunes;0

Qcache_not_cached;0

Qcache_queries_in_cache;0

Qcache_total_blocks;0

Queries;28

Questions;15

Rows_read;4

Rows_sent;849

Rows_tmp_read;1659

Rpl_status;NULL

Select_full_join;0

Select_full_range_join;0

Select_range;0

Select_range_check;0

Select_scan;10

Slave_open_temp_tables;0

Slave_retried_transactions;0

Slave_running;OFF

Slow_launch_threads;0

Slow_queries;0

Sort_merge_passes;0

Sort_range;0

Sort_rows;0

Sort_scan;0

Ssl_accepts;0

Ssl_accept_renegotiates;0

Ssl_callback_cache_hits;0

Ssl_cipher;

Ssl_cipher_list;

Ssl_client_connects;0

Ssl_connect_renegotiates;0

Ssl_ctx_verify_depth;0

Ssl_ctx_verify_mode;0

Ssl_default_timeout;0

Ssl_finished_accepts;0

Ssl_finished_connects;0

Ssl_sessions_reused;0

Ssl_session_cache_hits;0

Ssl_session_cache_misses;0

Ssl_session_cache_mode;NONE

Ssl_session_cache_overflows;0

Ssl_session_cache_size;0

Ssl_session_cache_timeouts;0

Ssl_used_session_cache_entries;0

Ssl_verify_depth;0

Ssl_verify_mode;0

Ssl_version;

Subquery_cache_hit;0

Subquery_cache_miss;0

Syncs;8

Table_locks_immediate;24

Table_locks_waited;0

Tc_log_max_pages_used;0

Tc_log_page_size;4096

Tc_log_page_waits;0

Threads_cached;0

Threads_connected;1

Threads_created;2

Threads_running;1

Uptime;1816

Uptime_since_flush_status;1816

Comment by Elena Stepanova [ 2012-04-17 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
Hi,

If you are running the server as a service, it makes the difference.
Did you configure the service manually, or got it while using MSI?
If you got it automatically, or followed instructions on configuring it, in all likelihood it is run with --defaults-file=<file name> as a single command-line parameter. Providing explicit defaults-file on the command line means that options are to be read from this file only.
Please check your service properties.

Comment by nbrnhardt (Inactive) [ 2012-04-18 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
WMIC shows there is a --defaults-file parameter indeed:

mysqld.exe "C:\mariadb\bin\mysqld.exe" "--defaults-file=C:\mariadb\data\my.ini" "MySQL"

Yes, I used the installer when I installed MySQL/MariaDB for the first time.

The only documentation of this parameter I found is in the MySQL Reference at

http://dev.mysql.com/doc/refman/5.5/en/option-files.html#option_general_defaults-file

which states:
--defaults-file=file_name

Use only the given option file. If the file does not exist or is otherwise inaccessible, the program exits with an error. Before MySQL 5.5.8, file_name must be the full path name to the file. As of MySQL 5.5.8, the name is interpreted relative to the current directory if given as a relative path name.

But then, contary to the documentation, MariaDB 5.2/5.3 does not exit when the file is missing.

Comment by Elena Stepanova [ 2012-04-18 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
>> contary to the documentation, MariaDB 5.2/5.3 does not exit when the file is missing.

This is true, we have a bug report about this: bug #916922. It equally concerns MySQL 5.1 and MariaDB versions based on it (5.1, 5.2, 5.3), but not MySQL 5.5 or MariaDB 5.5 (at least it wasn't observed on 5.5 when the bug was reported).

Comment by Rasmus Johansson (Inactive) [ 2012-05-02 ]

Launchpad bug id: 978146

Comment by Elena Stepanova [ 2012-05-02 ]

Re: my.ini with PBXT=OFF has to be placed in DATADIR to be effective
Set to 'Invalid' since the initial problem turned out to be a configuration issue.
The second reported problem (comment #8) is real, but it's a duplicate of bug #916922.

Generated at Thu Feb 08 06:42:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.