View | Details | Raw Unified | Return to bug 235967
Collapse All | Expand All

(-)tuning-primer/Makefile (-1 / +5 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	tuning-primer
4
PORTNAME=	tuning-primer
5
PORTVERSION=	1.6.r1
5
PORTVERSION=	1.6.r1
6
PORTREVISION=	1
6
CATEGORIES=	databases
7
CATEGORIES=	databases
7
MASTER_SITES=	http://launchpad.net/mysql-${PORTNAME}/trunk/1.6-r1/+download/
8
MASTER_SITES=	http://launchpad.net/mysql-${PORTNAME}/trunk/1.6-r1/+download/
8
DISTNAME=	${PORTNAME}.sh
9
DISTNAME=	${PORTNAME}.sh
Lines 17-23 Link Here
17
18
18
NO_BUILD=	yes
19
NO_BUILD=	yes
19
NO_ARCH=	yes
20
NO_ARCH=	yes
20
USE_MYSQL=	yes
21
USES=		mysql
21
22
22
PLIST_FILES=	bin/${PORTNAME}
23
PLIST_FILES=	bin/${PORTNAME}
23
24
Lines 25-28 Link Here
25
	${INSTALL_SCRIPT} ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}.sh \
26
	${INSTALL_SCRIPT} ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}.sh \
26
		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
27
		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
27
28
29
post-install:
30
	@${PATCH} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} files/mariadb_support.patch
31
28
.include <bsd.port.mk>
32
.include <bsd.port.mk>
(-)tuning-primer/files/mariadb_support.patch (+90 lines)
Line 0 Link Here
1
--- tuning-primer.sh.orig	2011-09-02 05:49:10.000000000 +0200
2
+++ tuning-primer.sh	2019-02-23 19:22:30.748493000 +0100
3
@@ -57,7 +57,7 @@
4
 
5
 cecho ()
6
 
7
-## -- Function to easliy print colored text -- ##
8
+## -- Function to easily print colored text -- ##
9
 	
10
 	# Color-echo.
11
 	# Argument $1 = message
12
@@ -115,7 +115,7 @@
13
 
14
 cechon ()		
15
 
16
-## -- Function to easliy print colored text -- ##
17
+## -- Function to easily print colored text -- ##
18
 
19
 	# Color-echo.
20
 	# Argument $1 = message
21
@@ -407,8 +407,9 @@
22
 }
23
 
24
 float2int () {
25
-        local variable=$(echo "$1 / 1" | bc -l)
26
-        export "$2"=$variable
27
+	## "bc -l" returns float on FreeBSD 11.2, use "bc" alone
28
+	local variable=$(echo "$1 / 1" | bc)
29
+	export "$2"=$variable
30
 }
31
 
32
 divide () {
33
@@ -643,7 +644,7 @@
34
 			cecho "See http://dev.mysql.com/doc/refman/$major_version/en/purge-master-logs.html" yellow
35
 		fi
36
 		if [ "$sync_binlog" = 0 ] ; then
37
-			cecho "Binlog sync is not enabled, you could loose binlog records during a server crash" red
38
+			cecho "Binlog sync is not enabled, you could lose binlog records during a server crash" red
39
 		fi
40
 	else
41
 		cechon "The binary update log is "
42
@@ -940,7 +941,9 @@
43
 
44
 	mysql_status \'Select_full_join\' select_full_join
45
 	mysql_status \'Select_range_check\' select_range_check
46
-	mysql_variable \'join_buffer%\' join_buffer_size
47
+	## query for "join_buffer%" returned results for join_buffer_size and join_buffer_space_limit
48
+	## current versions of MySQL uses join_buffer_size, not join_buffer
49
+	mysql_variable \'join_buffer_size\' join_buffer_size
50
 	
51
 	## Some 4K is dropped from join_buffer_size adding it back to make sane ##
52
 	## handling of human-readable conversion ## 
53
@@ -1272,12 +1275,32 @@
54
 		fi
55
 	elif [ "$major_version" = '5.6' ] && [ "$mysql_version_num" -ge 050603 ] ; then
56
 	mysql_variable \'ignore_builtin_innodb\' ignore_builtin_innodb
57
-                if [ "$ignore_builtin_innodb" = "ON" ] ; then
58
-                innodb_enabled=0
59
-                else
60
-                innodb_enabled=1
61
-                fi
62
+		if [ "$ignore_builtin_innodb" = "ON" ] ; then
63
+		innodb_enabled=0
64
+		else
65
+		innodb_enabled=1
66
+		fi
67
+	elif [ "$major_version" = '5.7' ] && [ "$mysql_version_num" -ge 050701 ] ; then
68
+	mysql_variable \'ignore_builtin_innodb\' ignore_builtin_innodb
69
+		if [ "$ignore_builtin_innodb" = "ON" ] ; then
70
+		innodb_enabled=0
71
+		else
72
+		innodb_enabled=1
73
+		fi
74
 	fi
75
+	## MariaDB 10.1+
76
+	case "$major_version" in
77
+		10.[123])
78
+		if [ "$mysql_version_num" -ge 100101 ]; then
79
+			mysql_variable \'ignore_builtin_innodb\' ignore_builtin_innodb
80
+			if [ "$ignore_builtin_innodb" = "ON" ] ; then
81
+			innodb_enabled=0
82
+			else
83
+			innodb_enabled=1
84
+			fi
85
+		fi
86
+		;;
87
+	esac
88
 	if [ "$innodb_enabled" = 1 ] ; then
89
 		mysql_variable \'innodb_buffer_pool_size\' innodb_buffer_pool_size
90
 		mysql_variable \'innodb_additional_mem_pool_size\' innodb_additional_mem_pool_size

Return to bug 235967