1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
From: msvensson at mysql dot com
Date: April 10 2006 3:11pm
Subject: bk commit into 5.0 tree (msvensson:1.2086) BUG#15069
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2086 06/04/10 15:11:37 msvensson@shellback.(none) +3 -0
Bug#15069 [patch] my_print_defaults does'nt care --sysconfdir
- Grab the path from "configure --sysconfdir=<path>" and set it as
the first place to look for my.cnf files
Do this both in Makefiles for libmysql and mysys
- Patch provided by Francesco Riosa. Thank you!
mysys/default.c
1.81 06/04/10 15:11:32 msvensson@shellback.(none) +9 -1
Use DEFAULT_SYSCONFDIR as first place to look for my.cnf file if "--sysconfdir=<path>" been specified as argument to configure
mysys/Makefile.am
1.68 06/04/10 15:11:32 msvensson@shellback.(none) +1 -0
Grab the path from "--sysconfdir=<path>" into the defined variable DEFAULT_SYSYCONFDIR
libmysql/Makefile.shared
1.67 06/04/10 15:11:32 msvensson@shellback.(none) +1 -0
Grab the path from "--sysconfdir=<path>" into the defined variable DEFAULT_SYSYCONFDIR
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/bug15069/my50-bug15069
--- 1.67/mysys/Makefile.am 2005-10-14 01:13:55 +02:00
+++ 1.68/mysys/Makefile.am 2006-04-10 15:11:32 +02:00
@@ -70,6 +70,7 @@
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DDEFAULT_HOME_ENV=MYSQL_HOME \
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
+ -DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
@DEFS@
libmysys_a_DEPENDENCIES= @THREAD_LOBJECTS@
--- 1.80/mysys/default.c 2005-09-30 12:25:36 +02:00
+++ 1.81/mysys/default.c 2006-04-10 15:11:32 +02:00
@@ -48,7 +48,7 @@
/* Which directories are searched for options (and in which order) */
-#define MAX_DEFAULT_DIRS 6
+#define MAX_DEFAULT_DIRS 7
const char *default_directories[MAX_DEFAULT_DIRS + 1];
#ifdef __WIN__
@@ -959,11 +959,13 @@
4. getenv(DEFAULT_HOME_ENV)
5. Directory above where the executable is located
6. ""
+ 7. --sysconfdir=<path>
On Novell NetWare, this is:
1. sys:/etc/
2. getenv(DEFAULT_HOME_ENV)
3. ""
+ 4. --sysconfdir=<path>
On OS/2, this is:
1. getenv(ETC)
@@ -971,12 +973,14 @@
3. getenv(DEFAULT_HOME_ENV)
4. ""
5. "~/"
+ 6. --sysconfdir=<path>
Everywhere else, this is:
1. /etc/
2. getenv(DEFAULT_HOME_ENV)
3. ""
4. "~/"
+ 5. --sysconfdir=<path>
*/
@@ -1040,6 +1044,10 @@
}
*ptr++= (char *)&config_dir;
}
+#endif
+#ifdef DEFAULT_SYSCONFDIR
+ if (DEFAULT_SYSCONFDIR != "")
+ *ptr++= DEFAULT_SYSCONFDIR;
#endif
*ptr= 0; /* end marker */
}
--- 1.66/libmysql/Makefile.shared 2006-01-18 13:09:42 +01:00
+++ 1.67/libmysql/Makefile.shared 2006-04-10 15:11:32 +02:00
@@ -85,6 +85,7 @@
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DDEFAULT_HOME_ENV=MYSQL_HOME \
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
+ -DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" $(target_defs)
# The automatic dependencies miss this
|