summaryrefslogtreecommitdiff
path: root/databases/msql3/files/patch-am
blob: a10e4099d0b1d99d13f056115608180db85c88ef (plain) (blame)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
--- src/msql/msqldb.c.orig	Fri Aug 28 14:57:51 1998
+++ src/msql/msqldb.c	Fri Aug 28 15:04:11 1998
@@ -136,7 +136,7 @@
 #endif
 
 	msqlTrace(TRACE_IN,"msqlListDBs()");
-	(void)snprintf(path, MAXPATHLEN, "%s/msqldb",msqlHomeDir);
+	(void)snprintf(path, MAXPATHLEN, "var/db/msqldb");
 	dirp = opendir(path);
 	if (!dirp)
 	{
@@ -199,7 +199,7 @@
 #endif
 
 	msqlTrace(TRACE_IN,"msqlListTables()");
-	(void)snprintf(path,MAXPATHLEN,"%s/msqldb/%s",msqlHomeDir,db);
+	(void)snprintf(path,MAXPATHLEN,"/var/db/msqldb/%s");
 	dirp = opendir(path);
 	if (!dirp)
 	{
@@ -1441,7 +1441,7 @@
 	struct	stat buf;
 
 	msqlTrace(TRACE_IN,"msqlInit()");
-	(void)snprintf(path, MAXPATHLEN, "%s/msqldb/%s",msqlHomeDir,db);
+	(void)snprintf(path, MAXPATHLEN, "/var/db/msqldb/%s",db);
 	if (stat(path,&buf) < 0)
 	{
 		snprintf(errMsg, MAX_ERR_MSG, BAD_DB_ERROR,db);
@@ -1479,8 +1479,8 @@
 	/*
 	** Write the catalog entry
 	*/
-	(void)snprintf(defPath, MAXPATHLEN, "%s/msqldb/%s/%s.def",
-		msqlHomeDir,db,table);
+	(void)snprintf(defPath, MAXPATHLEN, "/var/db/msqldb/%s/%s.def",
+		db,table);
 	if (stat(defPath, &sbuf) >= 0)
 	{
 		snprintf(errMsg,MAX_ERR_MSG,TABLE_EXISTS_ERROR,table);
@@ -1531,8 +1531,8 @@
 	** Create an empty table
 	*/
 	
-	(void)snprintf(datPath,MAXPATHLEN, "%s/msqldb/%s/%s.dat",
-		msqlHomeDir,db,table);
+	(void)snprintf(datPath,MAXPATHLEN, "/var/db/msqldb/%s/%s.dat",
+		db,table);
 #ifdef OS2
         fd = _sopen(datPath,O_CREAT | O_WRONLY | O_BINARY, SH_DENYNO, 
 		S_IREAD | S_IWRITE);
@@ -1577,8 +1577,8 @@
 	** 
 	** Create an empty overflow file
 	*/
-	(void)snprintf(oflPath,MAXPATHLEN,"%s/msqldb/%s/%s.ofl",
-		msqlHomeDir,db,table);
+	(void)snprintf(oflPath,MAXPATHLEN,"/var/db/msqldb/%s/%s.ofl",
+		db,table);
 #ifdef OS2
         fd = _sopen(oflPath,O_CREAT | O_WRONLY | O_BINARY, SH_DENYNO, 
 		S_IREAD | S_IWRITE);
@@ -1745,11 +1745,11 @@
 	/*
 	** Can't clash with another index either
 	*/
-	(void)snprintf(defPath,MAXPATHLEN,"%s/msqldb/%s/%s.idx",msqlHomeDir,
+	(void)snprintf(defPath,MAXPATHLEN,"/var/db/msqldb/%s/%s.idx",
 		db, index->table);
 
-	(void)snprintf(idxPath,MAXPATHLEN,"%s/msqldb/%s/%s.idx-%s",
-		msqlHomeDir,db, index->table, index->name);
+	(void)snprintf(idxPath,MAXPATHLEN,"/var/db/msqldb/%s/%s.idx-%s",
+		db, index->table, index->name);
 
 #ifdef OS2
         fd = _sopen(defPath,O_RDWR | O_CREAT | O_BINARY, SH_DENYNO, 
@@ -1989,7 +1989,7 @@
 	/*
 	** Now blow away the table files
 	*/
-	(void)snprintf(path,MAXPATHLEN,"%s/msqldb/%s/%s.def",msqlHomeDir,
+	(void)snprintf(path,MAXPATHLEN,"/var/db/msqldb/%s/%s.def",
 		db,table);
 	cp = (char *)rindex(path,'.');
 #ifdef OS2
@@ -2072,7 +2072,7 @@
 		return(-1);
 	}
 
-	(void)snprintf(defPath,MAXPATHLEN,"%s/msqldb/%s/%s.idx",msqlHomeDir,
+	(void)snprintf(defPath,MAXPATHLEN,"/var/db/msqldb/%s/%s.idx",
 		db, index->table);
 #ifdef OS2
         in = _sopen(defPath,O_RDONLY | O_BINARY, SH_DENYNO, S_IREAD | S_IWRITE);
@@ -2086,8 +2086,8 @@
 		msqlTrace(TRACE_OUT,"msqlDropIndex()");
 		return(-1);
 	}
-	(void)snprintf(tmpPath,MAXPATHLEN,"%s/msqldb/%s/%s.idx-tmp",
-		msqlHomeDir,db, index->table);
+	(void)snprintf(tmpPath,MAXPATHLEN,"/var/db/msqldb/%s/%s.idx-tmp",
+		db, index->table);
 #ifdef OS2
         out = _sopen(tmpPath,O_RDWR | O_CREAT | O_BINARY, SH_DENYNO, 
 		S_IREAD | S_IWRITE);
@@ -2137,7 +2137,7 @@
 	*/
 	unlink(defPath);
 	rename(tmpPath,defPath);
-	snprintf(tmpPath,MAXPATHLEN,"%s/msqldb/%s/%s.idx-%s",msqlHomeDir,db,
+	snprintf(tmpPath,MAXPATHLEN,"/var/db/msqldb/%s/%s.idx-%s",db,
                 index->table, index->name);
 	unlink(tmpPath);
 
@@ -2757,7 +2757,7 @@
 	** See if the directory exists
 	*/
 
-	(void)snprintf(path,MAXPATHLEN,"%s/msqldb/%s", msqlHomeDir, db);
+	(void)snprintf(path,MAXPATHLEN,"/var/db/msqldb/%s", db);
 	dirp = opendir(path);
 	if (dirp)
 	{
@@ -2807,7 +2807,7 @@
 	** See if the "to" directory exists
 	*/
 
-	(void)snprintf(toPath,MAXPATHLEN,"%s/msqldb/%s", msqlHomeDir, toDB);
+	(void)snprintf(toPath,MAXPATHLEN,"/var/db/msqldb/%s", toDB);
 	dirp = opendir(toPath);
 	if (dirp)
 	{
@@ -2822,8 +2822,7 @@
 	** See if the "from" directory exists
 	*/
 
-	(void)snprintf(fromPath,MAXPATHLEN, "%s/msqldb/%s", msqlHomeDir, 
-		fromDB);
+	(void)snprintf(fromPath,MAXPATHLEN, "/var/db/msqldb/%s", fromDB);
 	dirp = opendir(fromPath);
 	if (!dirp)
 	{
@@ -2886,7 +2885,7 @@
 	** See if the "to" directory exists
 	*/
 
-	(void)snprintf(toPath,MAXPATHLEN,"%s/msqldb/%s", msqlHomeDir, toDB);
+	(void)snprintf(toPath,MAXPATHLEN,"/var/db/msqldb/%s", toDB);
 	dirp = opendir(toPath);
 	if (dirp)
 	{
@@ -2901,8 +2900,7 @@
 	** See if the "from" directory exists
 	*/
 
-	(void)snprintf(fromPath,MAXPATHLEN,"%s/msqldb/%s", msqlHomeDir, 
-		fromDB);
+	(void)snprintf(fromPath,MAXPATHLEN,"/var/db/msqldb/%s", fromDB);
 	dirp = opendir(fromPath);
 	if (!dirp)
 	{
@@ -2948,7 +2946,7 @@
 	** See if the directory exists
 	*/
 
-	(void)snprintf(path,MAXPATHLEN,"%s/msqldb/%s", msqlHomeDir, db);
+	(void)snprintf(path,MAXPATHLEN,"/var/db/msqldb/%s", db);
 	dirp = opendir(path);
 	if (!dirp)
 	{