--- /dev/null
+# ChangeLog for dev-db/mysql-slotted
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/ChangeLog,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+*mysql-slotted-5.1.15_alpha20061231-r60 (03 Jan 2007)
+*mysql-slotted-5.1.15_alpha-r90 (03 Jan 2007)
+*mysql-slotted-5.0.34_alpha20070101-r60 (03 Jan 2007)
+*mysql-slotted-4.1.23_alpha20070101-r60 (03 Jan 2007)
+
+ 03 Jan 2007; Francesco Riosa <vivo@gentoo.org> +files/my.cnf-4.0.14-r1,
+ +files/mysql-4.0.15.rc6, +files/my.cnf-4.0.24-r1,
+ +files/mysql-4.0.24-r1.rc6, +files/mysql-4.0.24-r2.rc6, +files/my.cnf-4.1,
+ +files/my.cnf-4.1-r1, +files/logrotate-slot.mysql, +files/my.cnf,
+ +files/mysql.init, +files/mysql-slot.conf.d-r1, +files/mysql-slot.rc6-r3,
+ +files/mysqlmanager-slot.conf.d, +files/mysqlmanager-slot.rc6,
+ +metadata.xml, +mysql-slotted-4.1.23_alpha20070101-r60.ebuild,
+ +mysql-slotted-5.0.34_alpha20070101-r60.ebuild,
+ +mysql-slotted-5.1.15_alpha-r90.ebuild,
+ +mysql-slotted-5.1.15_alpha20061231-r60.ebuild:
+ Initial commit, intended for development only.
+
--- /dev/null
+MD5 8e70436fc96eec966d0cf088e915e7ba mysql-4.1.23-bk-20070101.tar.bz2 12171000
+RMD160 3e7abcb4665b55bfe74305484b963a4d1d239a4f mysql-4.1.23-bk-20070101.tar.bz2 12171000
+SHA256 65cd010a75c6bfc006cc3095623edf2d106f0af03154f24bc4fbf711ad2b98ef mysql-4.1.23-bk-20070101.tar.bz2 12171000
+MD5 889650b97f04964a837c9d6f1b0b21d9 mysql-extras-20070103.tar.bz2 49578
+RMD160 4bce7fdaa3c2d425f52f8f05905cf56b5f9ea333 mysql-extras-20070103.tar.bz2 49578
+SHA256 fded30189183e3e3dadd40719264e9f0a125a797e18a5529dcfbc58c3bf8f66b mysql-extras-20070103.tar.bz2 49578
--- /dev/null
+MD5 37b3967f2b54bdb8eee00c3c65adf69b mysql-5.0.34-bk-20070101.tar.bz2 14431547
+RMD160 aab9ce10073c7a70585d041e475b575185e77fb6 mysql-5.0.34-bk-20070101.tar.bz2 14431547
+SHA256 c81687985203537acee8ccfbb4be4cd1dd764c1ac67ebdbb46b3ef00931b243b mysql-5.0.34-bk-20070101.tar.bz2 14431547
+MD5 889650b97f04964a837c9d6f1b0b21d9 mysql-extras-20070103.tar.bz2 49578
+RMD160 4bce7fdaa3c2d425f52f8f05905cf56b5f9ea333 mysql-extras-20070103.tar.bz2 49578
+SHA256 fded30189183e3e3dadd40719264e9f0a125a797e18a5529dcfbc58c3bf8f66b mysql-extras-20070103.tar.bz2 49578
--- /dev/null
+MD5 889650b97f04964a837c9d6f1b0b21d9 mysql-extras-20070103.tar.bz2 49578
+RMD160 4bce7fdaa3c2d425f52f8f05905cf56b5f9ea333 mysql-extras-20070103.tar.bz2 49578
+SHA256 fded30189183e3e3dadd40719264e9f0a125a797e18a5529dcfbc58c3bf8f66b mysql-extras-20070103.tar.bz2 49578
+MD5 1dde707c3f86ecbb4567b8d5de603dc3 pbxt-0.9.73-beta.tar.gz 2706652
+RMD160 a4d974a8519b62868e948966910a84dbded05abe pbxt-0.9.73-beta.tar.gz 2706652
+SHA256 a2176d137138d33028c57499b74a79c5f12dcd958c3e7f1aad67bb4b7b24674d pbxt-0.9.73-beta.tar.gz 2706652
--- /dev/null
+MD5 b231ba7f535806f1cb8d792e4091f1b9 mysql-5.1.15-bk-20061231.tar.bz2 11999404
+RMD160 9a9929d6c2df4e128b3b5259b21fec5e04fe3181 mysql-5.1.15-bk-20061231.tar.bz2 11999404
+SHA256 1e4acc53175af275b48dbab33320d4841c9502c74f283e4f62215f5c2e602f15 mysql-5.1.15-bk-20061231.tar.bz2 11999404
+MD5 889650b97f04964a837c9d6f1b0b21d9 mysql-extras-20070103.tar.bz2 49578
+RMD160 4bce7fdaa3c2d425f52f8f05905cf56b5f9ea333 mysql-extras-20070103.tar.bz2 49578
+SHA256 fded30189183e3e3dadd40719264e9f0a125a797e18a5529dcfbc58c3bf8f66b mysql-extras-20070103.tar.bz2 49578
+MD5 1dde707c3f86ecbb4567b8d5de603dc3 pbxt-0.9.73-beta.tar.gz 2706652
+RMD160 a4d974a8519b62868e948966910a84dbded05abe pbxt-0.9.73-beta.tar.gz 2706652
+SHA256 a2176d137138d33028c57499b74a79c5f12dcd958c3e7f1aad67bb4b7b24674d pbxt-0.9.73-beta.tar.gz 2706652
--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/logrotate-slot.mysql,v 1.1 2007/01/03 15:25:28 vivo Exp $
+/var/log/mysql___MY_SUFFIX___/mysql.err /var/log/mysql___MY_SUFFIX___/mysql.log /var/log/mysql___MY_SUFFIX___/mysqld.err {
+monthly
+create 660 mysql mysql
+notifempty
+size 5M
+sharedscripts
+missingok
+postrotate
+/bin/kill -HUP `cat /var/run/mysqld___MY_SUFFIX___/mysqld.pid`
+endscript
+}
--- /dev/null
+# /etc/mysql/my.cnf: The global mysql configuration file.
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/my.cnf,v 1.1 2007/01/03 15:25:28 vivo Exp $
+#
+# This file can be simultaneously placed in three places:
+# 1. /etc/mysql/my.cnf to set global options.
+# 2. /var/lib/mysql/my.cnf to set server-specific options.
+# 3. ~/.my.cnf to set user-specific options.
+#
+# One can use all long options that the program supports.
+# Run the program with --help to get a list of them.
+#
+# The following values assume you have at least 32M RAM!
+
+[client]
+#password = my_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[safe_mysqld]
+err-log = /var/log/mysql/mysql.err
+
+[mysqld]
+#skip-networking
+skip-innodb
+user = mysql
+pid-file = /var/run/mysqld/mysqld.pid
+socket = /var/run/mysqld/mysqld.sock
+port = 3306
+log = /var/log/mysql/mysql.log
+basedir = /usr
+datadir = /var/lib/mysql
+tmpdir = /tmp
+language = /usr/share/mysql/english
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=128K
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=1M
+
+[mysql]
+#no-auto-rehash # faster start of mysql but no tab completition
+
+[isamchk]
+set-variable = key_buffer=16M
--- /dev/null
+# /etc/mysql/my.cnf: The global mysql configuration file.
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/my.cnf-4.0.14-r1,v 1.1 2007/01/03 15:25:28 vivo Exp $
+#
+# This file can be simultaneously placed in three places:
+# 1. /etc/mysql/my.cnf to set global options.
+# 2. /var/lib/mysql/my.cnf to set server-specific options.
+# 3. ~/.my.cnf to set user-specific options.
+#
+# One can use all long options that the program supports.
+# Run the program with --help to get a list of them.
+#
+# The following values assume you have at least 32M RAM!
+
+[client]
+#password = my_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[safe_mysqld]
+err-log = /var/log/mysql/mysql.err
+
+[mysqld]
+skip-innodb
+user = mysql
+pid-file = /var/run/mysqld/mysqld.pid
+socket = /var/run/mysqld/mysqld.sock
+log-error = /var/log/mysql/mysqld.err
+# If set, mysql logs all queries(general query log). This will be deprecated in
+# 5.0. This logs all queries, even error queries and is slow.
+# log = /var/log/mysql/mysql.log
+#
+# If you really need logging, use rather binary logging. Especially when doing
+# replication. Read
+# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
+# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
+# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
+# running.
+# Before doing that, check which logfile slave curently uses by running
+# mysql> SHOW SLAVE STATUS
+# To list logfiles on master do:
+# mysql> SHOW MASTER LOGS
+# Then use PURGE for those not needed anymore only! Never remove the files
+# manually!
+#
+# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
+# mysql> RESET MASTER - Deletes all binary logs listed in the index
+# file, resetting the binlog index file to be empty.
+# mysql> RESET SLAVE - Makes the slave forget its replication position in
+# the master logs.
+# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only)
+# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only)
+#
+# log-bin
+# set-variable = binlog-do-db=non_existant
+# set-variable = binlog-ignore-db=database_name
+#
+# server-id has to unique for each master or slave in your network,
+# lets use last number from IP address
+# server-id = 207
+basedir = /usr
+datadir = /var/lib/mysql
+tmpdir = /tmp
+language = /usr/share/mysql/english
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=128K
+# keep secure by default!
+bind-address = 127.0.0.1
+port = 3306
+# this can make it even more secure:
+#skip-networking
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=1M
+
+[mysql]
+#no-auto-rehash # faster start of mysql but no tab completition
+
+[isamchk]
+set-variable = key_buffer=16M
--- /dev/null
+# /etc/mysql/my.cnf: The global mysql configuration file.
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/my.cnf-4.0.24-r1,v 1.1 2007/01/03 15:25:28 vivo Exp $
+#
+# This file can be simultaneously placed in three places:
+# 1. /etc/mysql/my.cnf to set global options.
+# 2. /var/lib/mysql/my.cnf to set server-specific options.
+# 3. ~/.my.cnf to set user-specific options.
+#
+# One can use all long options that the program supports.
+# Run the program with --help to get a list of them.
+#
+# The following values assume you have at least 64M RAM!
+
+[client]
+#password = my_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[safe_mysqld]
+err-log = /var/log/mysql/mysql.err
+
+[mysqld]
+user = mysql
+pid-file = /var/run/mysqld/mysqld.pid
+socket = /var/run/mysqld/mysqld.sock
+log-error = /var/log/mysql/mysqld.err
+# If set, mysql logs all queries(general query log). This will be deprecated in
+# 5.0. This logs all queries, even error queries and is slow.
+# log = /var/log/mysql/mysql.log
+#
+# If you really need logging, use rather binary logging. Especially when doing
+# replication. Read
+# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
+# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
+# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
+# running.
+# Before doing that, check which logfile slave curently uses by running
+# mysql> SHOW SLAVE STATUS
+# To list logfiles on master do:
+# mysql> SHOW MASTER LOGS
+# Then use PURGE for those not needed anymore only! Never remove the files
+# manually!
+#
+# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
+# mysql> RESET MASTER - Deletes all binary logs listed in the index
+# file, resetting the binlog index file to be empty.
+# mysql> RESET SLAVE - Makes the slave forget its replication position in
+# the master logs.
+# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only)
+# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only)
+#
+# log-bin
+# set-variable = binlog-do-db=non_existant
+# set-variable = binlog-ignore-db=database_name
+#
+# server-id has to unique for each master or slave in your network,
+# lets use last number from IP address
+# server-id = 207
+basedir = /usr
+datadir = /var/lib/mysql
+tmpdir = /tmp
+language = /usr/share/mysql/english
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=128K
+# keep secure by default!
+bind-address = 127.0.0.1
+port = 3306
+# this can make it even more secure:
+#skip-networking
+#
+# The following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes.
+# you might want to bump this up a bit on boxes with more RAM
+set-variable = innodb_buffer_pool_size=32M
+# this is the default, increase if you have lots of tables
+set-variable = innodb_additional_mem_pool_size=1M
+#
+# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under /var/lib/mysql/, so that's the route
+# we have to take for the moment
+innodb_data_home_dir = /var/lib/mysql/
+innodb_log_arch_dir = /var/lib/mysql/
+innodb_log_group_home_dir = /var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend:max:128M
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+set-variable = innodb_log_file_size=8M
+# this is the default, increase if you have very large transactions.
+set-variable = innodb_log_buffer_size=1M
+# this is the default, and won't hurt you.
+# you shouldn't need to tweak it.
+set-variable = innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit=1
+
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=1M
+
+[mysql]
+#no-auto-rehash # faster start of mysql but no tab completition
+
+[isamchk]
+set-variable = key_buffer=16M
--- /dev/null
+# /etc/mysql/my.cnf: The global mysql configuration file.
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/my.cnf-4.1,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=utf8
+
+[myisampack]
+character-sets-dir=utf8
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = /var/log/mysql/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
+[mysqld]
+character-set-server = utf8
+default-character-set = utf8
+user = mysql
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+pid-file = /var/run/mysqld/mysqld.pid
+log-error = /var/log/mysql/mysqld.err
+basedir = /usr
+datadir = /var/lib/mysql
+skip-locking
+#skip-innodb
+key_buffer = 16M
+max_allowed_packet = 1M
+table_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+language = /usr/share/mysql/english
+
+#security:
+#using "localhost" in connects use sockets by default
+#skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# Point the following paths to different dedicated disks
+tmpdir = /tmp/
+#log-update = /path-to-dedicated-directory/hostname
+
+# you need debug use flag enabled to use this ones.
+# if needed uncomment them, start the server and issue
+# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace
+# this will show you *exactly* what's appening in your server ;)
+
+#log = /tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# Uncomment the following if you are using BDB tables
+#bdb_cache_size = 4M
+#bdb_max_lock = 10000
+
+# The following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes.
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
+# and upstream wants things to be under /var/lib/mysql/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = /var/lib/mysql/
+#innodb_log_arch_dir = /var/lib/mysql/
+#innodb_log_group_home_dir = /var/lib/mysql/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase if you have very large transactions.
+innodb_log_buffer_size = 8M
+# this is the default, and won't hurt you.
+# you shouldn't need to tweak it.
+set-variable = innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
+#vim: set tabstop=4 :
+#vim: set shiftwidth=4 :
+
--- /dev/null
+# /etc/mysql/my.cnf: The global mysql configuration file.
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/my.cnf-4.1-r1,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# The following options will be passed to all MySQL clients
+[client]
+#password = your_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[mysql]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqladmin]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqlcheck]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqldump]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqlimport]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[mysqlshow]
+character-sets-dir=utf8
+default-character-set=utf8
+
+[myisamchk]
+character-sets-dir=utf8
+
+[myisampack]
+character-sets-dir=utf8
+
+# use [safe_mysqld] with mysql-3
+[mysqld_safe]
+err-log = /var/log/mysql@MY_SUFFIX@/mysql.err
+
+# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
+[mysqld]
+character-set-server = utf8
+default-character-set = utf8
+user = mysql
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+pid-file = /var/run/mysqld/mysqld@MY_SUFFIX@.pid
+log-error = /var/log/mysql@MY_SUFFIX@/mysqld.err
+basedir = /usr
+datadir = @DATADIR@
+skip-locking
+#skip-innodb
+key_buffer = 16M
+max_allowed_packet = 1M
+table_cache = 64
+sort_buffer_size = 512K
+net_buffer_length = 8K
+read_buffer_size = 256K
+read_rnd_buffer_size = 512K
+myisam_sort_buffer_size = 8M
+language = /usr/share/mysql@MY_SUFFIX@/english
+
+#security:
+#using "localhost" in connects use sockets by default
+#skip-networking
+bind-address = 127.0.0.1
+
+log-bin
+server-id = 1
+
+# Point the following paths to different dedicated disks
+tmpdir = /tmp/
+#log-update = /path-to-dedicated-directory/hostname
+
+# you need debug use flag enabled to use this ones.
+# if needed uncomment them, start the server and issue
+# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace
+# this will show you *exactly* what's appening in your server ;)
+
+#log = /tmp/mysqld.sql
+#gdb
+#debug = d:t:i:o,/tmp/mysqld.trace
+#one-thread
+
+# Uncomment the following if you are using BDB tables
+#bdb_cache_size = 4M
+#bdb_max_lock = 10000
+
+# The following is the InnoDB configuration
+# if you wish to disable innodb instead
+# uncomment just the next line
+#skip-innodb
+#
+# the rest of the innodb config follows:
+# don't eat too much memory, we're trying to be safe on 64Mb boxes.
+# you might want to bump this up a bit on boxes with more RAM
+innodb_buffer_pool_size = 16M
+# this is the default, increase if you have lots of tables
+innodb_additional_mem_pool_size = 2M
+#
+# i'd like to use /var/lib/mysql@MY_SUFFIX@/innodb, but that is seen as a database :-(
+# and upstream wants things to be under /var/lib/mysql@MY_SUFFIX@/, so that's the route
+# we have to take for the moment
+#innodb_data_home_dir = /var/lib/mysql@MY_SUFFIX@/
+#innodb_log_arch_dir = /var/lib/mysql@MY_SUFFIX@/
+#innodb_log_group_home_dir = /var/lib/mysql@MY_SUFFIX@/
+# you may wish to change this size to be more suitable for your system
+# the max is there to avoid run-away growth on your machine
+innodb_data_file_path = ibdata1:10M:autoextend
+# we keep this at around 25% of of innodb_buffer_pool_size
+# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
+innodb_log_file_size = 5M
+# this is the default, increase if you have very large transactions.
+innodb_log_buffer_size = 8M
+# this is the default, and won't hurt you.
+# you shouldn't need to tweak it.
+set-variable = innodb_log_files_in_group=2
+# see the innodb config docs, the other options are not always safe
+innodb_flush_log_at_trx_commit = 1
+innodb_lock_wait_timeout = 50
+
+
+[mysqldump]
+quick
+max_allowed_packet = 16M
+
+[mysql]
+# Remove the next comment character if you are not familiar with SQL
+#safe-updates
+
+[isamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[myisamchk]
+key_buffer = 20M
+sort_buffer_size = 20M
+read_buffer = 2M
+write_buffer = 2M
+
+[mysqlhotcopy]
+interactive-timeout
+
+#vim: set tabstop=4 :
+#vim: set shiftwidth=4 :
+
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/mysql-4.0.15.rc6,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+depend() {
+ use dns net
+}
+
+checkconfig() {
+ if [ ! -f /etc/mysql/my.cnf ]; then
+ eerror "No /etc/mysql/my.cnf file exists!"
+ fi
+
+ #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'`
+ dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
+
+ if [ -z "$dir" ]; then
+ eerror "Your mysql doesn't have any datadir setting, default or specific"
+ eerror "Please check your my.cnf"
+ return 1
+ fi
+
+ if [ ! -d "$dir/mysql" ]; then
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db to have this done..."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting mysqld"
+ start-stop-daemon --start --quiet --exec /usr/bin/mysqld_safe \
+ --background -- >/dev/null 2>&1
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping mysqld"
+ start-stop-daemon --stop --retry 5 --quiet --pidfile=/var/run/mysqld/mysqld.pid
+ eend $?
+}
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/mysql-4.0.24-r1.rc6,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+depend() {
+ use dns net
+}
+
+
+getconfig() {
+ MY_CNF=${MY_CNF=/etc/mysql/my.cnf}
+ if [ ! -f ${MY_CNF} ]; then
+ eerror "No ${MY_CNF} file exists! Using automatic defaults!"
+ fi
+
+ #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'`
+ #dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
+ local mysqld_cnf="`my_print_defaults --config-file=${MY_CNF} mysqld`"
+ datadir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
+ pidfile=`echo "${mysqld_cnf}" | sed -ne '/pid-file/s|^--pid-file=||p' | tail -n1`
+
+ # push these out to the script
+ export MY_CNF
+ export pidfile
+ export datadir
+}
+
+checkconfig() {
+ getconfig
+ if [ -z "${datadir}" ]; then
+ eerror "Your mysql doesn't have any datadir setting, default or specific"
+ eerror "Please check your my.cnf : ${MY_CNF}"
+ return 1
+ fi
+
+ if [ ! -d "$datadir/mysql" ]; then
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db to have this done..."
+ return 1
+ fi
+}
+
+start() {
+ getconfig
+ checkconfig || return 1
+ ebegin "Starting mysqld (${MY_CNF})"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/bin/mysqld_safe \
+ -- --defaults-file=${MY_CNF} >/dev/null 2>&1
+ eend $?
+}
+
+stop () {
+ getconfig
+ ebegin "Stopping mysqld (${MY_CNF})"
+ start-stop-daemon --stop --retry 5 --quiet --pidfile=${pidfile}
+ eend $?
+}
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/mysql-4.0.24-r2.rc6,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+depend() {
+ use dns net
+}
+
+getconfig() {
+ MY_CNF=${MY_CNF=/etc/mysql/my.cnf}
+ if [ ! -f ${MY_CNF} ]; then
+ eerror "No ${MY_CNF} file exists! Using automatic defaults!"
+ fi
+
+ #dir=`my_print_defaults mysqld | grep -- '^--datadir' | tail -n1 | sed -e 's|^--datadir=||'`
+ #dir=`my_print_defaults mysqld | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
+ local mysqld_cnf="`my_print_defaults --config-file=${MY_CNF} mysqld`"
+ datadir=`echo "${mysqld_cnf}" | sed -ne '/datadir/s|^--datadir=||p' | tail -n1`
+ pidfile=`echo "${mysqld_cnf}" | sed -ne '/pid-file/s|^--pid-file=||p' | tail -n1`
+ basedir=`echo "${mysqld_cnf}" | sed -ne '/basedir/s|^--basedir=||p' | tail -n1`
+ socket=`echo "${mysqld_cnf}" | sed -ne '/socket/s|^--socket=||p' | tail -n1`
+
+ # push these out to the script
+ export MY_CNF
+ export pidfile
+ export datadir
+ export basedir
+ export socket
+}
+
+checkconfig() {
+ getconfig
+ if [ -z "${datadir}" ]; then
+ eerror "Your mysql doesn't have any datadir setting, default or specific"
+ eerror "Please check your my.cnf : ${MY_CNF}"
+ return 1
+ fi
+
+ if [ ! -d "$datadir/mysql" ]; then
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db to have this done..."
+ return 1
+ fi
+}
+
+start() {
+ local retstatus=1
+ local maxtry=5
+ getconfig
+ checkconfig || return 1
+ ebegin "Starting mysqld (${MY_CNF})"
+ start-stop-daemon --start --quiet --background \
+ --exec "${basedir}/bin/mysqld_safe" \
+ -- --defaults-file=${MY_CNF} >/dev/null 2>&1
+ retstatus=$?
+ while ! [[ -S "${socket}" || "${maxtry}" -lt "1" || "${retstatus}" -gt "0" ]] ; do
+ maxtry=$(($maxtry-1))
+ # most people don't like it
+ #echo -n "."
+ sleep 1
+ done
+ ! [[ -S "${socket}" ]] && eerror "MySQL NOT started, proceding anyway"
+ eend $retstatus
+}
+
+stop () {
+ getconfig
+ ebegin "Stopping mysqld (${MY_CNF})"
+ start-stop-daemon --stop --retry 5 --quiet --pidfile=${pidfile}
+ eend $?
+}
--- /dev/null
+# here is where to define which server start.
+#> Additional parameters to be passed to mysqld at startup may be added here,
+#> these one will override the ones in "my.cnf".
+#
+# Below are described some suggested parameters to use
+# The parameters not recognized will be passed through to the mysqld daemon
+# To avoid starting a server just comment it's definition
+# Last but not least, spaces are NOT allowed inside the parameters
+#
+# Parameter : description
+# ----------------+-----------------------------------------------------------
+# nice : integer [-20 .. 19 ] default 0
+# : change the priority of the server -20 (high) to 19 (low)
+# : see "man nice 1" for description
+# ----------------+-----------------------------------------------------------
+# mycnf : string [full path to my.cnf]
+# : specify the path to my.cnf file to be used
+# ----------------+-----------------------------------------------------------
+# startup_timeout : integer [seconds] default 15
+# : time to wait for mysqld up and running, after this it's
+# : marked as failed
+# ----------------+-----------------------------------------------------------
+#
+# Additional parameters
+# Parameter : description
+# ----------------+-----------------------------------------------------------
+# server-id : integer [1 .. 2**32 – 1]
+# : Uniquely identifies the server instance in the community
+# : of replication partners.
+# ----------------+-----------------------------------------------------------
+# port : integer [1025 .. 65535] default 3306
+# : Port number to use for connection.
+# : loose any meaning if skip-networking is set.
+# ----------------+-----------------------------------------------------------
+# skip-networking : NULL, Don't allow connection with TCP/IP.
+# log-bin : string [name of the binlog files]
+# : Log update queries in binary format. Optional (but
+# : strongly recommended to avoid replication problems if
+# : server's hostname changes) argument should be the chosen
+# : location for the binary log files.
+# ----------------+-----------------------------------------------------------
+# Additionally the following variables are recognized:
+#
+# Be more verbose accept values from 1 to 4
+#DEBUG=4
+#
+# The default location for the "master" pid file
+# MYSQL_GLOB_PID_FILE="/var/run/svc-started-mysqld"
+#
+# The timeout for a failed attempt to stop a server
+# STOPTIMEOUT=120
+#
+
+## The parameters are passed in a bash array variable,
+# the variable name is mysql_slot_[server-ver].[server-num]
+# Where "server-ver" and "server-num" are optional.
+# in case are defined "server-num" MUST be of three digits.
+# The first digit is the mayor version, the following two the minor
+# i.e. having installed mysql-5.1.x "server-num" will be "501"
+# "server-num" it's an optional number used mainly to start more servers
+# of the same version.
+#
+# Examples:
+#
+# start a default server with default options:
+#mysql_slot_0=()
+#
+# start MySQL 7.5.x reniced, overriding some start parameters
+#mysql_slot_7_0_5=(
+# "nice=-5"
+# "server-id=123"
+# "log-bin="myhost"
+# "port=3307"
+#)
+#
+# start another server, same version, different my.cnf
+#mysql_slot_7_0_5.1=(
+# "mycnf=/home/test/my.cnf"
+# "server-id=124"
+#)
+#
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/mysql-slot.rc6-r3,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# external binaries used: which, sed, tac
+
+# int in_list(char * elem, char * list)
+function in_list() {
+ local elem=${1:-"none"}
+ local list=${2:-","}
+
+ [[ "${list}" == "${list/,${elem},/}" ]] \
+ && return 1 \
+ || return 0
+}
+
+function wdebug() {
+ if [[ "${DEBUG}" -ge "${1}" ]] ; then
+ shift
+ echo "dbg: ${@}"
+ fi
+}
+
+depend() {
+ use dns net localmount netmount nfsmount
+}
+
+do_escape() {
+ # Ihatethisreallyverymuch
+ #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|"
+ echo "$1"
+}
+
+# int get_slot_config(srv_slot=0, srv_num)
+get_slot_config() {
+ wdebug 4 ">>> get_slot_config()"
+
+ local srv srv_slot srv_num
+ srv_slot="${1:-"0"}"
+ srv_num="${2}"
+ MY_SUFFIX="-${srv_slot}"
+ # srv=array(0 => [srv_slot], 1 => [srv_num] )
+ srv=( ${srv_slot} ${srv_num} )
+
+ local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
+ local conf_d_parameters="${!tmp_eval}"
+ if [[ "${srv_slot}" == "0" ]] ; then
+ MY_SUFFIX=''
+ # try some other default for the default server
+ [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=${mysql_slot[@]}
+ fi
+ [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=( )
+ basedir="" datadir="" pidfile="" socket=""
+ CHROOT="" NICE="" STARTUPTIMEOUT=5 STOPTIMEOUT=120
+
+ wdebug 3 "srv ${srv[@]}"
+ wdebug 3 "srv_slot ${srv_slot}"
+ wdebug 3 "srv_num ${srv_num}"
+ wdebug 3 "tmp_eval ${tmp_eval}"
+ wdebug 3 "conf_d_parameters ${conf_d_parameters[@]}"
+ wdebug 3 "MY_SUFFIX ${MY_SUFFIX}"
+
+ local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
+ local conf_d_parameters="${!tmp_eval}"
+ # collations need to be defined *after* the character sets,
+ # so we will duplicate them
+ local collations=""
+ [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters=''
+
+ MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf"
+ # summa of unmanaged parameters
+ # some parameters may be present multiple times
+ unmanagedparams=""
+
+ # grab the parameters from conf.d/mysql definition
+ for my_default in ${conf_d_parameters[*]} ; do
+ case "${my_default}" in
+ nice=*)
+ NICE="${my_default#nice=}"
+ nice -n $NICE ls /tmp &>/dev/null || NICE=""
+ ;;
+ mycnf=*) MY_CNF="${my_default#mycnf=}" ;;
+ startup_timeout=*)
+ STARTUPTIMEOUT="${my_default#startup_timeout=}" ;;
+ basedir=*) basedir="${my_default#basedir=}" ;;
+ datadir=*) datadir="${my_default#datadir=}" ;;
+ pid-file=*) pidfile="${my_default#pid-file=}" ;;
+ socket=*) socket="${my_default#socket=}" ;;
+ *collation*=)
+ collations="${collations} --$( do_escape "${my_default}" )"
+ ;;
+ *=*)
+ # list of parameters we already have
+ # prepend "--" because my_print_defaults do it
+ unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )"
+ ;;
+ *)
+ unmanagedparams="${unmanagedparams} --${my_default}"
+ ;;
+ esac
+ done
+
+ if [[ ! -r "${MY_CNF}" ]] ; then
+ ewarn "Cannot access ${MY_CNF} !"
+ MY_CNF=""
+ my_defaults=""
+ else
+ local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)"
+ if [[ ! -x "${my_print_defaults}" ]] ; then
+ eerror "my_print_defaults NOT found or not executable"
+ my_defaults=""
+ else
+ my_defaults=$( ${my_print_defaults} \
+ --loose-verbose \
+ --config-file="${MY_CNF}" \
+ mysqld server )
+ fi
+ fi
+
+ # grab needed parameters from my.cnf, don't override the ones from
+ # conf.d mysql
+ for my_default in ${my_defaults} ; do
+ case "${my_default}" in
+ --basedir=*)
+ [[ -z "${basedir}" ]] && basedir="${my_default#--basedir=}" ;;
+ --datadir=*)
+ [[ -z "${datadir}" ]] && datadir="${my_default#--datadir=}" ;;
+ --pid-file=*)
+ [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;;
+ --socket=*)
+ [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;;
+ --*collation*=)
+ # the order is inversed because we want the conf.d ones overriden
+ collations="$( do_escape "${my_default}" ) ${collations}"
+ ;;
+ esac
+ done
+
+ # some parameters
+ basedir="${basedir:-"/usr"}"
+ datadir="${datadir:-"/var/lib/mysql${MY_SUFFIX}"}"
+ pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.pid"}"
+ socket="${socket:-"/var/run/mysqld/mysqld${MY_SUFFIX}.sock"}"
+ unmanagedparams="${unmanagedparams} ${collations}"
+
+ wdebug 3 "chroot dir => ${CHROOT}"
+ wdebug 3 "niceness => ${NICE}"
+ wdebug 3 "basedir => ${basedir}"
+ wdebug 3 "datadir => ${datadir}"
+ wdebug 3 "pidfile => ${pidfile}"
+ wdebug 3 "socket => ${socket}"
+ wdebug 3 "Unamanged => ${unmanagedparams}"
+
+ # extension for sleep tenth of seconds, not very portable so check it before
+ if sleep 0.01 ; then
+ STARTUPTIMEOUT=$(( STARTUPTIMEOUT * 10 ))
+ STOPTIMEOUT=$(( STOPTIMEOUT * 10 ))
+ TIMEUNIT=0.1
+ else
+ TIMEUNIT=1
+ fi
+
+ # push these out to the script
+ export MY_SUFFIX NICE MY_CNF pidfile datadir basedir socket CHROOT
+ export unmanagedparams STARTUPTIMEOUT STOPTIMEOUT TIMEUNIT
+ wdebug 4 "<<< get_slot_config() ok"
+ return 0
+}
+
+checkconfig() {
+ wdebug 4 ">>> checkconfig(\"${1}\")"
+ local datadir="${1}" pidfile="${2}" socket="${3}"
+
+ if [[ -n "${NOCHECK}" ]] ; then
+ rm -f "${pidfile}" "${socket}"
+ return 0
+ fi
+
+ if [[ ! -d "${datadir}" ]] ; then
+ eerror "MySQL datadir is empty or invalid"
+ eerror "Please check your my.cnf : ${MY_CNF}"
+ wdebug 4 "<<< checkconfig() KO"
+ return 1
+ fi
+
+ if [[ ! -d "${datadir}/mysql" ]] ; then
+ eerror "You don't appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db to have this done..."
+ wdebug 4 "<<< checkconfig() KO"
+ return 1
+ fi
+
+ if [[ -f "${pidfile}" ]] ; then
+ kill -15 $(< ${pidfile}) 2>/dev/null
+ if [[ $? -eq 0 ]] ; then
+ # the process exist, we have a problem
+ eerror "\"${pidfile}\" is still present and the process is running."
+ eerror "Please stop it \"kill $(< ${pidfile})\" maybe ?"
+ wdebug 4 "<<< checkconfig() KO"
+ return 1
+ else
+ rm -f "${pidfile}"
+ fi
+ fi
+
+ if [[ -S "${socket}" ]] ; then
+ ewarn "Strange, the socket file already exist in \"${socket}\""
+ ewarn "it will be removed now and re-created by the MySQL server"
+ ewarn "BUT please make your checks."
+ rm -f "${socket}"
+ fi
+
+ wdebug 4 "<<< checkconfig() ok"
+ return 0
+}
+
+start() {
+ wdebug 4 ">>> start()"
+
+ MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"}
+ # servers are defined in /etc/conf.d/mysql
+ local serverlist=${!mysql_slot_*}
+ # provide default for empty conf.d/mysql
+ if [[ -z "${serverlist}" ]] ; then
+ serverlist=0
+ export mysql_slot_0=( )
+ fi
+ local retstatus timeout
+ local globretstatus=1
+ local srv_slot srv_num
+ # server MUST NOT share same location for these
+ local pidfilelist=',' datadirlist=',' socketlist=','
+ local ssd_thing=1
+ local mysqld_thing tmpnice
+
+ ebegin
+ # try to start each server
+ for srv in ${serverlist[*]} ; do
+
+ srv_slot="${srv#mysql_slot_}"
+ if [[ "${srv_slot}" == "${srv_slot#*.}" ]] ; then
+ srv_num=''
+ else
+ srv_num="${srv_slot#*.}"
+ fi
+ srv_slot="${srv_slot%%.*}"
+
+ retstatus=0
+ get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1
+
+ # checks
+ if ! checkconfig "${datadir}" "${pidfile}" "${socket}" ; then
+ retstatus=2 ; continue
+ fi
+ if in_list "${pidfile}" "${pidfilelist}" ; then
+ eerror "Sorry, won't start with same pid-file: ${pidfile}"
+ retstatus=3 ; continue
+ fi
+ if in_list "${datadir}" "${datadirlist}" ; then
+ eerror "Sorry, won't start with same datadir: ${datadir}"
+ retstatus=4 ; continue
+ fi
+ if in_list "${socket}" "${socketlist}" ; then
+ eerror "Sorry, won't start with same socket: ${socket}"
+ retstatus=5 ; continue
+ fi
+
+ einfo "Starting ${myservice} (${MY_CNF})"
+
+ mysqld_thing="${MY_CNF:+"--defaults-file="}${MY_CNF}"
+ mysqld_thing="${mysqld_thing} ${unmanagedparams}"
+ mysqld_thing="${mysqld_thing} --basedir=${basedir}"
+ mysqld_thing="${mysqld_thing} --datadir=${datadir}"
+ mysqld_thing="${mysqld_thing} --pid-file=${pidfile}"
+ mysqld_thing="${mysqld_thing} --socket=${socket}"
+
+ wdebug 2 "starting mysqld with: ${mysqld_thing}"
+
+ if [[ ${ssd_thing} -eq 1 ]] ; then
+ tmpnice="${NICE:+"--nicelevel "}${NICE}"
+ start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --start \
+ --background ${tmpnice} --pidfile ${pidfile} \
+ --exec ${basedir}/sbin/mysqld${MY_SUFFIX} -- ${mysqld_thing}
+ retstatus=$?
+ else
+ tmpnice="${NICE:+"nice -n "}${NICE}"
+ ${tmpnice} ${basedir}/sbin/mysqld${MY_SUFFIX} ${mysqld_thing} &
+ retstatus=0
+ fi
+
+ # only the first run is done by start-stop-daemon
+ ssd_thing=""
+
+ # wait for socket creation
+ wdebug 1
+ while ! [[ -S "${socket}" || "${STARTUPTIMEOUT}" -lt 1 || "${retstatus}" -ne 0 ]] ; do
+ STARTUPTIMEOUT=$(( STARTUPTIMEOUT - 1 ))
+ [[ ${DEBUG} -ge 1 ]] && echo -n "${STARTUPTIMEOUT},"
+ sleep ${TIMEUNIT}
+ done
+ wdebug 1 ""
+ if [[ ! -S "${socket}" ]] ; then
+ eerror "MySQL${MY_SUFFIX} NOT started (${retstatus})"
+ retstatus=1
+ else
+ globretstatus=0
+ pidfilelist="${pidfilelist}${pidfile},"
+ datadirlist="${datadirlist}${datadir},"
+ socketlist="${socketlist}${socket},"
+ echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}"
+ fi
+ done
+ # successfull if at least one mysqld started
+ wdebug 4 "<<< start()"
+ eend $globretstatus
+}
+
+stop() {
+ get_slot_config &> /dev/null
+ MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"}
+ local runwhat pidfile shutdown_elem
+ local PID cnt timeout=${STOPTIMEOUT:-"120"}
+ local retstatus=0
+ local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )"
+
+ ebegin "Stopping ${myservice}"
+ wdebug 5 "MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}"
+ wdebug 5 "shutdown_list: ${shutdown_list}"
+ for shutdown_elem in ${shutdown_list} ; do
+ runwhat=${shutdown_elem%%=*}
+ pidfile=${shutdown_elem#*=}
+ timeout=${STOPTIMEOUT:-"120"}
+ PID=$(< "${pidfile}" )
+ wdebug 3 "runwhat ${runwhat}"
+ wdebug 3 "pidfile ${pidfile}"
+ wdebug 3 "timeout ${timeout}"
+ wdebug 3 "PID ${PID}"
+
+ einfo "Stopping mysqld (${runwhat})"
+
+ start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --stop --pidfile "${pidfile}" &
+ wdebug 1 ""
+ while [[ -n "$PID" ]] \
+ && $( ps -Ao pid | grep -q "^ *$PID$" ) \
+ && [[ "${timeout}" -ge 1 ]]
+ do
+ timeout=$(($timeout - 1))
+ [[ ${DEBUG} -ge 1 ]] && echo -n "$(( $STOPTIMEOUT - $timeout )),"
+ sleep ${TIMEUNIT}
+ done
+ [[ "${timeout}" -lt 1 ]] && retstatus=1
+ done
+ sleep ${TIMEUNIT}
+ [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE"
+ eend ${retstatus}
+}
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/mysql.init,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+depend() {
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f /etc/mysql/my.cnf ] ; then
+ eerror "No /etc/mysql/my.cnf file exists!"
+ fi
+
+ dir=`my_print_defaults mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|"`
+
+ if [ ! -d $dir/mysql ] ; then
+ eerror "You dont appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db to have this done..."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting mysqld"
+ /usr/bin/safe_mysqld >/dev/null 2>&1 &
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping mysqld"
+ start-stop-daemon --stop --quiet \
+ --pidfile=/var/run/mysqld/mysqld.pid --retry 20
+ eend $?
+}
--- /dev/null
+# here is where to define which server start.
+#> Additional parameters to be passed to mysqlmanager at startup may be added here,
+#> these one will override the ones in "my.cnf".
+#
+# To avoid starting a server just comment it's definition
+#> here or it will rant (no default start)
+# Last but not least, spaces are NOT allowed inside the parameters
+#
+# Below are described some suggested parameters to use
+# The parameters not recognized will be passed through to the mysqlmanager
+#
+# Parameter : description
+
+# ----------------+-----------------------------------------------------------
+# mycnf : string [full path to my.cnf]
+# : specify the path to my.cnf file to be used
+# : may contain a [manager] section
+# ----------------+-----------------------------------------------------------
+#
+# easy default
+#
+#mysqlmanager_slot_0=()
+#
+# start MySQL 7.5.x reniced, chrooted and overriding some start parameters
+#mysqlmanager_slot_7_0_5=(
+# "mycnf=/home/test/my.cnf"
+#)
+#
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/files/mysqlmanager-slot.rc6,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# external binaryes used: which, sed, tac
+
+depend() {
+ use dns net localmount netmount nfsmount
+ #provide mysql
+}
+
+# int in_list(char * elem, char * list)
+function in_list() {
+ local elem=${1:-"none"}
+ local list=${2:-","}
+
+ [[ "${list}" == "${list/,${elem},/}" ]] \
+ && return 1 \
+ || return 0
+}
+
+do_escape() {
+ # Ihatethisreallyverymuch
+ #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|"
+ echo "$1"
+}
+
+# int get_slot_config(srv_slot=0, srv_num)
+get_slot_config() {
+ [[ ${DEBUG} -ge 4 ]] && einfo ">>> get_slot_config(\"${1}\", \"${2}\")"
+
+ srv_slot="${1:-"0"}"
+ srv_num="${2}"
+ MY_SUFFIX="-${srv_slot}"
+ [[ "${MY_SUFFIX}" == '-0' ]] && MY_SUFFIX=''
+
+ basedir="" pidfile="" socket=""
+
+ local tmp_eval="mysqlmanager_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]"
+ local conf_d_parameters="${!tmp_eval}"
+ [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters=''
+
+ MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf"
+ # summa of unmanaged parameters
+ # some parameters may be present multiple times
+ unmanagedparams=""
+
+ # grab the parameters from conf.d/mysql definition
+ for my_default in ${conf_d_parameters[*]} ; do
+ case "${my_default}" in
+ mycnf=*) MY_CNF="${my_default#mycnf=}" ;;
+ basedir=*) basedir="${my_default#basedir=}" ;;
+ pid-file=*) pidfile="${my_default#pid-file=}" ;;
+ socket=*) socket="${my_default#socket=}" ;;
+ *=*)
+ # list of parameters we already have
+ # prepend "--" because my_print_defaults do it
+ unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )"
+ ;;
+ *)
+ unmanagedparams="${unmanagedparams} --${my_default}"
+ ;;
+ esac
+ done
+
+ if [[ ! -r "${MY_CNF}" ]] ; then
+ ewarn "Cannot access ${MY_CNF} !"
+ MY_CNF=""
+ my_defaults=""
+ else
+ local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)"
+ if [[ ! -x "${my_print_defaults}" ]] ; then
+ eerror "my_print_defaults NOT found or not executable"
+ my_defaults=""
+ else
+ my_defaults=$( ${my_print_defaults} \
+ --loose-verbose \
+ --config-file="${MY_CNF}" \
+ manager )
+ fi
+ fi
+
+ # grab needed parameters from my.cnf, don't override the ones from
+ # conf.d mysql
+ for my_default in ${my_defaults} ; do
+ case "${my_default}" in
+ --pid-file=*)
+ [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;;
+ --socket=*)
+ [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;;
+ esac
+ done
+
+ # still empty, I'm in doubt if assign a default or break, will see
+ basedir="${basedir:-"/usr"}"
+ pidfile="${pidfile:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.pid"}"
+ socket="${socket:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.sock"}"
+
+ if [[ ${DEBUG} -ge 3 ]] ; then
+ einfo "basedir => ${basedir}"
+ einfo "pidfile => ${pidfile}"
+ einfo "socket => ${socket}"
+ einfo "Unamanged => ${unmanagedparams}"
+ fi
+
+ # push these out to the script
+ export MY_SUFFIX MY_CNF pidfile basedir socket
+ export unmanagedparams
+ [[ ${DEBUG} -ge 4 ]] && einfo "<<< get_slot_config() ok"
+ return 0
+}
+
+start() {
+ [[ ${DEBUG} -ge 4 ]] && einfo ">>> start()"
+ MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"}
+ # servers are defined in /etc/conf.d/mysql
+ local serverlist=${!mysqlmanager_slot_*}
+ # provide default for empty conf.d/mysql
+ if [[ -z "${serverlist}" ]] ; then
+ serverlist=0
+ export mysqlmanager_slot_0=()
+ fi
+ local retstatus timeout
+ local globretstatus=1
+ local srv_slot srv_num
+ # server MUST NOT share same location for these
+ local pidfilelist=',' socketlist=','
+
+ # additional security
+ rm -f "${MYSQL_GLOB_PID_FILE}" ; touch "${MYSQL_GLOB_PID_FILE}"
+ if [[ $? -ne 0 ]] ; then
+ eerror "cannot create MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}"
+ [[ ${DEBUG} -ge 4 ]] && einfo "<<< start() KO"
+ return 1
+ fi
+
+ ebegin
+ # try to start each server
+ for srv in ${serverlist[*]} ; do
+ einfo "working on ${srv}"
+
+ srv_slot="${srv#mysqlmanager_slot_}"
+ if [[ "${srv_slot}" == "${srv_slot#*.}" ]] ; then
+ srv_num=''
+ else
+ srv_num="${srv_slot#*.}"
+ fi
+ srv_slot="${srv_slot%%.*}"
+
+ retstatus=0
+ get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1
+
+ # timeout (seconds) before declare failed the startup
+
+ # pre_run checks
+ if [[ "$retstatus" -eq 0 ]] ; then
+ if in_list "${pidfile}" "${pidfilelist}" ; then
+ retstatus=3
+ eerror "Sorry, won't start with same pid-file: ${pidfile}"
+ fi
+ if in_list "${socket}" "${socketlist}" ; then
+ retstatus=5
+ eerror "Sorry, won't start with same socket: ${socket}"
+ fi
+ fi
+
+ if [[ $retstatus -eq 0 ]] ; then
+ # additional security
+ rm -f ${pidfile} ${socket}
+ einfo "Starting mysqlmanager${MY_SUFFIX:+"_"}${srv_slot}${srv_num:+"_"}${srv_num} (${MY_CNF})"
+
+ [[ ${DEBUG} -ge 2 ]] && echo "starting mysqlmanager with: "${basedir}/sbin/mysqlmanager${MY_SUFFIX} ${unmanagedparams} --pid-file=${pidfile} --socket=${socket}
+
+ start-stop-daemon --quiet --start --background \
+ --pidfile "${pidfile}" \
+ --exec ${basedir}/sbin/mysqlmanager${MY_SUFFIX} \
+ -- \
+ ${MY_CNF:+"--defaults-file="}${MY_CNF} \
+ ${unmanagedparams} \
+ --pid-file=${pidfile} \
+ --socket=${socket}
+
+ retstatus=$?
+
+ if [[ "${retstatus}" -eq 0 ]] ; then
+ pidfilelist="${pidfilelist}${pidfile},"
+ socketlist="${socketlist}${socket},"
+ globretstatus=0
+ echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}"
+ fi
+ fi
+ done
+ # successfull if at least one mysqlmanager started
+ [[ ${DEBUG} -ge 4 ]] && einfo "<<< start()"
+ eend $globretstatus
+}
+
+stop () {
+ MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"}
+ local runwhat pidfile shutdown_elem
+ local PID cnt timeout
+ local retstatus=0
+ local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )"
+
+ # shutdown in reverse order
+ ebegin
+ for shutdown_elem in $shutdown_list; do
+ runwhat=${shutdown_elem%%=*}
+ pidfile=${shutdown_elem#*=}
+ timeout=${STOPTIMEOUT:-"10"}
+
+ einfo "Stopping mysqlmanager (${runwhat})"
+
+ PID=$(cat "${pidfile}" 2>/dev/null)
+ start-stop-daemon --stop --quiet --pidfile="${pidfile}"
+ [[ ${DEBUG} -ge 1 ]] && echo ""
+ while [[ -n "$PID" && $( kill -0 $PID 2>/dev/null ) && "${timeout}" -ge 1 ]] ; do
+ timeout=$(($timeout - 1))
+ [[ ${DEBUG} -ge 1 ]] && echo -n $(( $STOPTIMEOUT - $timeout ))
+ sleep 1
+ done
+ if [[ "${timeout}" -lt 1 ]] ; then
+ retstatus=$(( $retstatus + 1 ))
+ fi
+ done
+
+ [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE"
+ eend $retstatus
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mysql</herd>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/mysql-slotted-4.1.23_alpha20070101-r60.ebuild,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# Leave this empty
+MYSQL_VERSION_ID=""
+SERVER_URI="mirror://gentoo/MySQL-${PV%.*}/mysql-${PV//_alpha/-bk-}.tar.bz2"
+
+inherit mysql
+
+#REMEMBER!!!: update also eclass/mysql*.eclass prior to commit
+KEYWORDS="~amd64 ~x86"
+
+src_test() {
+ cd "${S}"
+ einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
+ make check || die "make check failed"
+ if ! useq "minimal" ; then
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ local retstatus
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ cd mysql-test
+ sed -i -e "s|PORT=3306|PORT=3307|g" mysql-test-run
+ ./mysql-test-run
+ retstatus=$?
+
+ # Just to be sure ;)
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+ [[ $retstatus -eq 0 ]] || die "make test failed"
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/mysql-slotted-5.0.34_alpha20070101-r60.ebuild,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# Leave this empty
+MYSQL_VERSION_ID=""
+SERVER_URI="mirror://gentoo/MySQL-${PV%.*}/mysql-${PV//_alpha/-bk-}.tar.bz2"
+
+inherit mysql
+
+#REMEMBER!!!: update also eclass/mysql*.eclass prior to commit
+KEYWORDS="~amd64 ~x86"
+
+src_test() {
+
+ make check || die "make check failed"
+ if ! useq "minimal" ; then
+ cd "${S}/mysql-test"
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ local retstatus
+ local t
+ local testopts="--force"
+
+ # sandbox make ndbd zombie
+ hasq "sandbox" ${FEATURES} && testopts="${testopts} --skip-ndb"
+
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # mysqladmin start before dir creation
+ mkdir ${S}/mysql-test/var{,/log}
+
+ if [[ ${UID} -eq 0 ]] ; then
+ mysql_disable_test "im_cmd_line" "fail as root"
+ mysql_disable_test "im_daemon_life_cycle" "fail as root"
+ mysql_disable_test "im_instance_conf" "fail as root"
+ mysql_disable_test "im_life_cycle" "fail as root"
+ mysql_disable_test "im_options" "fail as root"
+ mysql_disable_test "im_options_set" "fail as root"
+ mysql_disable_test "im_options_unset" "fail as root"
+ mysql_disable_test "im_utils" "fail as root"
+ mysql_disable_test "trigger" "fail as root"
+ fi
+
+ for t in \
+ loaddata_autocom_ndb \
+ ndb_{alter_table{,2},autodiscover{,2,3},basic,bitfield,blob} \
+ ndb_{cache{,2},cache_multi{,2},charset,condition_pushdown,config} \
+ ndb_{database,gis,index,index_ordered,index_unique,insert,limit} \
+ ndb_{loaddatalocal,lock,minmax,multi,read_multi_range,rename,replace} \
+ ndb_{restore,subquery,transaction,trigger,truncate,types,update} \
+ ps_7ndb rpl_ndb_innodb_trans strict_autoinc_5ndb
+ do
+ mysql_disable_test "${t}" "fail in sandbox"
+ done
+
+ useq "extraengine" && mysql_disable_test "federated" "fail with extraengine"
+
+ mysql_disable_test "view" "FIXME: fail because now we are in year 2007"
+
+ for t in \
+ myisam mysql_upgrade query_cache_notembedded rpl000015 rpl000017
+ do
+ mysql_disable_test "${t}" "FIXME: Im'not supposed to fail"
+ done
+
+ make test-force
+ retstatus=$?
+
+ # Just to be sure ;)
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+ [[ $retstatus -eq 0 ]] || die "make test failed"
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/mysql-slotted-5.1.15_alpha-r90.ebuild,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# Leave this empty
+MYSQL_VERSION_ID=""
+SERVER_URI=""
+PBXT_VERSION="0.9.73-beta"
+
+inherit mysql
+
+#REMEMBER!!!: update also eclass/mysql*.eclass prior to commit
+KEYWORDS="~amd64 ~x86"
+
+src_test() {
+
+ make check || die "make check failed"
+ if ! useq "minimal" ; then
+ cd "${S}/mysql-test"
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ local retstatus
+ local t
+ local testopts="--force"
+
+ # sandbox make ndbd zombie
+ hasq "sandbox" ${FEATURES} && testopts="${testopts} --skip-ndb"
+
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # mysqladmin start before dir creation
+ mkdir ${S}/mysql-test/var{,/log}
+
+ if [[ ${UID} -eq 0 ]] ; then
+ mysql_disable_test "im_cmd_line" "fail as root"
+ mysql_disable_test "im_daemon_life_cycle" "fail as root"
+ mysql_disable_test "im_instance_conf" "fail as root"
+ mysql_disable_test "im_life_cycle" "fail as root"
+ mysql_disable_test "im_options" "fail as root"
+ mysql_disable_test "im_utils" "fail as root"
+ mysql_disable_test "trigger" "fail as root"
+ fi
+
+ useq "extraengine" && mysql_disable_test "federated" "fail with extraengine"
+
+ mysql_disable_test "view" "FIXME: fail because now we are in year 2007"
+
+ # from Makefile.am:
+ retstatus=1
+ ./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=mixed \
+ && ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=row \
+ && ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=mixed \
+ && ./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=row \
+ && retstatus=0
+
+ # Just to be sure ;)
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+ [[ $retstatus -eq 0 ]] || die "make test failed"
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-slotted/mysql-slotted-5.1.15_alpha20061231-r60.ebuild,v 1.1 2007/01/03 15:25:28 vivo Exp $
+
+# Leave this empty
+MYSQL_VERSION_ID=""
+SERVER_URI="mirror://gentoo/MySQL-${PV%.*}/mysql-${PV//_alpha/-bk-}.tar.bz2"
+PBXT_VERSION="0.9.73-beta"
+
+inherit mysql
+
+#REMEMBER!!!: update also eclass/mysql*.eclass prior to commit
+KEYWORDS="~amd64 ~x86"
+
+src_test() {
+
+ make check || die "make check failed"
+ if ! useq "minimal" ; then
+ cd "${S}/mysql-test"
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ local retstatus
+ local t
+ local testopts="--force"
+
+ # sandbox make ndbd zombie
+ hasq "sandbox" ${FEATURES} && testopts="${testopts} --skip-ndb"
+
+ addpredict /this-dir-does-not-exist/t9.MYI
+
+ # mysqladmin start before dir creation
+ mkdir ${S}/mysql-test/var{,/log}
+
+ if [[ ${UID} -eq 0 ]] ; then
+ mysql_disable_test "im_cmd_line" "fail as root"
+ mysql_disable_test "im_daemon_life_cycle" "fail as root"
+ mysql_disable_test "im_instance_conf" "fail as root"
+ mysql_disable_test "im_life_cycle" "fail as root"
+ mysql_disable_test "im_options" "fail as root"
+ mysql_disable_test "im_utils" "fail as root"
+ mysql_disable_test "trigger" "fail as root"
+ fi
+
+ useq "extraengine" && mysql_disable_test "federated" "fail with extraengine"
+
+ mysql_disable_test "view" "FIXME: fail because now we are in year 2007"
+
+ # from Makefile.am:
+ retstatus=1
+ ./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=mixed \
+ && ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=row \
+ && ./mysql-test-run.pl ${testopts} --ps-protocol --mysqld=--binlog-format=mixed \
+ && ./mysql-test-run.pl ${testopts} --mysqld=--binlog-format=row \
+ && retstatus=0
+
+ # Just to be sure ;)
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+ [[ $retstatus -eq 0 ]] || die "make test failed"
+ else
+ einfo "Skipping server tests due to minimal build."
+ fi
+}