1 |
< |
### RPM external mysql 5.0.18-XXXX |
1 |
> |
### RPM external mysql 5.1.35 |
2 |
|
## INITENV +PATH LD_LIBRARY_PATH %i/lib/mysql |
3 |
+ |
## INITENV SET MYSQL_HOME $MYSQL_ROOT |
4 |
|
|
5 |
|
#Different download locations according to the version. |
6 |
|
|
7 |
|
%if "%(echo %realversion | cut -d. -f1)" == "4" |
8 |
|
%define source http://downloads.mysql.com/archives/mysql-4.0/%n-%realversion.tar.gz |
9 |
|
%else |
10 |
< |
%define source http://mysql.belnet.be/Downloads/MySQL-5.0/mysql-%realversion.tar.gz |
10 |
> |
#%define source http://mirror.provenscaling.com/mysql/community/source/5.0/mysql-%realversion.tar.gz |
11 |
> |
%define source http://opensource.become.com/mysql/Downloads/MySQL-5.1/mysql-%realversion.tar.gz |
12 |
|
%endif |
13 |
|
|
14 |
|
Source: %source |
26 |
|
%build |
27 |
|
CFLAGS=-O3 CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \ |
28 |
|
./configure --prefix=%i --with-extra-charsets=complex \ |
29 |
< |
--enable-thread-safe-client --enable-local-infile |
29 |
> |
--enable-thread-safe-client --enable-local-infile \ |
30 |
> |
--with-plugins=innobase |
31 |
|
make %makeprocesses |
32 |
+ |
|
33 |
|
%install |
34 |
|
make install |
35 |
|
perl -p -i -e "s|^#!.*perl(.*)|#!/usr/bin/env perl$1|" $(grep -r -e "^#!.*perl.*" %i | cut -d: -f1) |
36 |
+ |
rm -fR %i/mysql-test |
37 |
+ |
|
38 |
+ |
mkdir -p %i/etc |
39 |
+ |
cat << \EOF > %i/etc/my.cnf |
40 |
+ |
[mysqld] |
41 |
+ |
max_allowed_packet=128M |
42 |
+ |
|
43 |
+ |
max_connections = 1000 |
44 |
+ |
connect_timeout = 60 |
45 |
+ |
|
46 |
+ |
set-variable = innodb_log_file_size=512M |
47 |
+ |
set-variable = innodb_log_buffer_size=8M |
48 |
+ |
set-variable = innodb_buffer_pool_size=2G |
49 |
+ |
set-variable = innodb_additional_mem_pool_size=50M |
50 |
+ |
|
51 |
+ |
key_buffer=512M |
52 |
+ |
|
53 |
+ |
query_cache_type=1 |
54 |
+ |
query_cache_limit=10M |
55 |
+ |
query_cache_size=128M |
56 |
+ |
|
57 |
+ |
innodb_thread_concurrency=0 |
58 |
+ |
innodb_concurrency_tickets=10000 |
59 |
+ |
innodb_commit_concurrency=0 |
60 |
+ |
innodb_flush_logs_at_trx_commit=0 |
61 |
+ |
innodb_flush_method=O_DIRECT |
62 |
+ |
innodb_file_io_threads = 4 |
63 |
+ |
innodb_checksums=0 |
64 |
+ |
innodb_doublewrite=0 |
65 |
+ |
innodb_data_file_path = ibdata1:2047M;ibdata2:2000M:autoextend |
66 |
+ |
|
67 |
+ |
max_heap_table_size=1024M |
68 |
+ |
tmp_table_size=1024M |
69 |
+ |
|
70 |
+ |
long_query_time=5 |
71 |
+ |
innodb_sync_spin_loops=60 |
72 |
+ |
|
73 |
+ |
innodb_force_recovery = 0 |
74 |
+ |
innodb_lock_wait_timeout = 100 |
75 |
+ |
innodb_autoinc_lock_mode = 2 |
76 |
+ |
|
77 |
+ |
|
78 |
+ |
[mysql.server] |
79 |
+ |
STRICT_TRANS_TABLES=1 |
80 |
+ |
transaction-isolation = READ-COMMITTED |
81 |
+ |
EOF |
82 |
+ |
|
83 |
+ |
|
84 |
|
%post |
85 |
|
%{relocateConfig}bin/msql2mysql |
86 |
|
%{relocateConfig}bin/mysqlaccess |
91 |
|
%{relocateConfig}bin/mysql_fix_privilege_tables |
92 |
|
%{relocateConfig}bin/mysql_install_db |
93 |
|
|
42 |
– |
|