Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 62197 | Differences between
and this patch

Collapse All | Expand All

(-)../open-xchange-0.8.2-origin/conf/admintools.conf.in (-1 / +1 lines)
Lines 69-73 Link Here
69
DEFAULT_SQL_PASS="@dbpass@"
69
DEFAULT_SQL_PASS="@dbpass@"
70
### if u want to use mysql change to mysql
70
### if u want to use mysql change to mysql
71
SQL_DB_TYPE="pgsql"
71
SQL_DB_TYPE="mysql"
72
72
73
73
(-)../open-xchange-0.8.2-origin/conf/groupware/intranet.conf (-7 / +15 lines)
Lines 130-145 Link Here
130
130
131
# DATABASE identifiert for SYSDATE
131
# DATABASE identifiert for SYSDATE
132
SYSDATE='now'
132
SYSDATE=now()
133
133
134
# DATABASE identifier for CURRENT_DATE
134
# DATABASE identifier for CURRENT_DATE
135
# SQL_TODAY='today'
135
SQL_TODAY=curdate()
136
136
137
# Sequence SQL-String for DATABASE
137
# Sequence SQL-String for DATABASE
138
# Example for POSTGRES
138
# Example for POSTGRES
139
seq-fid=SELECT nextval ('fid')
139
#seq-fid=SELECT nextval ('fid')
140
seq-import_id=SELECT nextval ('import_id')
140
#seq-import_id=SELECT nextval ('import_id')
141
seq-insert_id=SELECT nextval ('insert_id')
141
#seq-insert_id=SELECT nextval ('insert_id')
142
seq-profile_id=SELECT nextval ('profile_id')
142
#seq-profile_id=SELECT nextval ('profile_id')
143
seq-serial_id=SELECT nextval ('serial_id')
143
#seq-serial_id=SELECT nextval ('serial_id')
144
145
# Example for mySQL
146
seq-fid=SELECT select_fid()
147
seq-import_id=SELECT select_import_id()
148
seq-insert_id=SELECT select_insert_id()
149
seq-profile_id=SELECT select_profile_id()
150
seq-serial_id=SELECT select_serial_id()
151
144
# Example for ORACLE
152
# Example for ORACLE
145
#seq-fid="SELECT fid.nextval"
153
#seq-fid="SELECT fid.nextval"
(-)../open-xchange-0.8.2-origin/conf/webmail/system.cfg (-2 / +2 lines)
Lines 167-171 Link Here
167
167
168
# SQL Query to request a new sequence number
168
# SQL Query to request a new sequence number
169
seq-serial_id="SELECT nextval ('serial_id')"
169
seq-serial_id="SELECT select_serial_id()"
170
170
171
# SQL Query field mapping name(s). May needed when having problems with field
171
# SQL Query field mapping name(s). May needed when having problems with field
Lines 175-177 Link Here
175
#								^^^^^^^^^^^^^^^^^^^^^
175
#								^^^^^^^^^^^^^^^^^^^^^
176
# 								usrdata		delete
176
# 								usrdata		delete
177
sql-fieldmapname-usrdata_delete="delete"
177
sql-fieldmapname-usrdata_delete="delete_it"
(-)../open-xchange-0.8.2-origin/configure.in (+1 lines)
Lines 792-795 Link Here
792
conf/admintools.conf 
792
conf/admintools.conf 
793
system/setup/init_ldap.ldif
793
system/setup/init_ldap.ldif
794
system/setup/create_mysql_database.sql
794
src/com/openexchange/server/Version.java )
795
src/com/openexchange/server/Version.java )
795
796
(-)../open-xchange-0.8.2-origin/src/com/openexchange/groupware/InsertHandler.java (-1 / +5 lines)
Lines 245-248 Link Here
245
		    setBinaryStreamFromFile(pst, value, a+1);
245
		    setBinaryStreamFromFile(pst, value, a+1);
246
		 }
246
		 }
247
	    } else if (type.indexOf("TIMESTAMP") != -1 && (value != null && value.equals(GlobalConfig.getParameter("SYSDATE")))) {
248
		    pst.setTimestamp(a+1,new java.sql.Timestamp(System.currentTimeMillis()));
247
		} else if (type.indexOf("TIMESTAMP") != -1 && (value == null  || !value.equals(GlobalConfig.getParameter("SYSDATE")))) {
249
		} else if (type.indexOf("TIMESTAMP") != -1 && (value == null  || !value.equals(GlobalConfig.getParameter("SYSDATE")))) {
248
		if (value == null) {
250
		if (value == null) {
Lines 253-257 Link Here
253
			try {
255
			try {
254
			tsf.setCalendar(value, GlobalConfig.getDateTimePattern("DATABASE"));
256
			tsf.setCalendar(value, GlobalConfig.getDateTimePattern("DATABASE"));
255
			} catch(Exception e) { e.printStackTrace(); }
257
			} catch(Exception e) { 
258
				e.printStackTrace(); 
259
			}
256
		   pst.setTimestamp(a+1,new java.sql.Timestamp(tsf.getDate().getTime()));
260
		   pst.setTimestamp(a+1,new java.sql.Timestamp(tsf.getDate().getTime()));
257
		}
261
		}
(-)../open-xchange-0.8.2-origin/src/com/openexchange/groupware/UpdateHandler.java (+2 lines)
Lines 251-254 Link Here
251
		    setBinaryStreamFromFile(pst, value, a+1);
251
		    setBinaryStreamFromFile(pst, value, a+1);
252
		}
252
		}
253
            } else if (type.indexOf("TIMESTAMP") != -1 && (value != null && value.equals(GlobalConfig.getParameter("SYSDATE")))) {
254
                pst.setTimestamp(a+1,new java.sql.Timestamp(System.currentTimeMillis()));
253
		} else if (type.indexOf("TIMESTAMP") != -1 && (value == null || !value.equals(GlobalConfig.getParameter("SYSDATE")))) {
255
		} else if (type.indexOf("TIMESTAMP") != -1 && (value == null || !value.equals(GlobalConfig.getParameter("SYSDATE")))) {
254
		if (value == null) {
256
		if (value == null) {
(-)../open-xchange-0.8.2-origin/system/setup/create_mysql_database.sql.in (+117 lines)
Line 0 Link Here
1
DROP DATABASE IF EXISTS @dbname@;
2
3
CREATE DATABASE @dbname@ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
4
5
GRANT ALL PRIVILEGES ON @dbname@.* TO '@dbuser@'@'localhost' IDENTIFIED BY '@dbpass@' WITH GRANT OPTION;
6
GRANT ALL PRIVILEGES ON @dbname@.* TO '@dbuser@'@'%' IDENTIFIED BY '@dbpass@';
7
8
USE @dbname@;
9
10
DROP TABLE IF EXISTS table_fid;
11
12
CREATE TABLE table_fid (
13
        id INT  NOT NULL AUTO_INCREMENT,
14
        primary key (id)
15
);
16
17
DROP FUNCTION IF EXISTS select_fid;
18
19
DELIMITER //
20
21
CREATE FUNCTION select_fid () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
22
BEGIN
23
  DECLARE xid INT;
24
  INSERT into table_fid VALUES();
25
  SELECT last_insert_id() into xid;
26
  RETURN xid;
27
END //
28
29
DELIMITER ;
30
31
DROP TABLE IF EXISTS table_serial_id;
32
33
CREATE TABLE table_serial_id (
34
        id INT  NOT NULL AUTO_INCREMENT,
35
        primary key (id)
36
) AUTO_INCREMENT = 10;
37
38
DROP FUNCTION IF EXISTS select_serial_id;
39
40
DELIMITER //
41
42
CREATE FUNCTION select_serial_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
43
BEGIN
44
  DECLARE xid INT;
45
  INSERT into table_serial_id VALUES();
46
  SELECT last_insert_id() into xid;
47
  RETURN xid;
48
END //
49
50
DELIMITER ;
51
52
53
DROP TABLE IF EXISTS table_import_id;
54
55
CREATE TABLE table_import_id (
56
        id INT  NOT NULL AUTO_INCREMENT,
57
        primary key (id)
58
);
59
60
DROP FUNCTION IF EXISTS select_import_id;
61
62
DELIMITER //
63
64
CREATE FUNCTION select_import_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
65
BEGIN
66
  DECLARE xid INT;
67
  INSERT into table_import_id VALUES();
68
  SELECT last_insert_id() into xid;
69
  RETURN xid;
70
END //
71
72
DELIMITER ;
73
74
75
DROP TABLE IF EXISTS table_insert_id;
76
77
CREATE TABLE table_insert_id (
78
        id INT  NOT NULL AUTO_INCREMENT,
79
        primary key (id)
80
) AUTO_INCREMENT = 101;
81
82
DROP FUNCTION IF EXISTS select_insert_id;
83
84
DELIMITER //
85
86
CREATE FUNCTION select_insert_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
87
BEGIN
88
  DECLARE xid INT;
89
  INSERT into table_insert_id VALUES();
90
  SELECT last_insert_id() into xid;
91
  RETURN xid;
92
END //
93
94
DELIMITER ;
95
96
DROP TABLE IF EXISTS table_profile_id;
97
98
CREATE TABLE table_profile_id (
99
        id INT  NOT NULL AUTO_INCREMENT,
100
        primary key (id)
101
);
102
103
DROP FUNCTION IF EXISTS select_profile_id;
104
105
DELIMITER //
106
107
CREATE FUNCTION select_profile_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
108
BEGIN
109
  DECLARE xid INT;
110
  INSERT into table_profile_id VALUES();
111
  SELECT last_insert_id() into xid;
112
  RETURN xid;
113
END //
114
115
116
DELIMITER ;
117
(-)../open-xchange-0.8.2-origin/system/setup/init_mysql_database.sql (-105 / +110 lines)
Lines 1-110 Link Here
1
 
1
 
2
DROP TABLE IF EXISTS table_fid;
3
2
4
CREATE TABLE table_fid (
5
	id INT  NOT NULL AUTO_INCREMENT,
6
	primary key (id)
7
);
8
9
DROP FUNCTION IF EXISTS select_fid;
10
11
DELIMITER //
12
13
CREATE FUNCTION select_fid () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
14
BEGIN
15
  DECLARE xid INT;
16
  INSERT into table_fid VALUES();
17
  SELECT last_insert_id() into xid;
18
  RETURN xid;
19
END //
20
21
DELIMITER ;
22
 
23
DROP TABLE IF EXISTS table_serial_id;
24
25
CREATE TABLE table_serial_id (
26
	id INT  NOT NULL AUTO_INCREMENT,
27
	primary key (id)
28
) AUTO_INCREMENT = 9;
29
30
DROP FUNCTION IF EXISTS select_serial_id;
31
32
DELIMITER //
33
34
CREATE FUNCTION select_serial_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
35
BEGIN
36
  DECLARE xid INT;
37
  INSERT into table_serial_id VALUES();
38
  SELECT last_insert_id() into xid;
39
  RETURN xid;
40
END //
41
42
DELIMITER ;
43
44
 
45
DROP TABLE IF EXISTS table_import_id;
46
47
CREATE TABLE table_import_id (
48
	id INT  NOT NULL AUTO_INCREMENT,
49
	primary key (id)
50
);
51
3
52
DROP FUNCTION IF EXISTS select_import_id;
53
4
54
DELIMITER //
55
5
56
CREATE FUNCTION select_import_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
57
BEGIN
58
  DECLARE xid INT;
59
  INSERT into table_import_id VALUES();
60
  SELECT last_insert_id() into xid;
61
  RETURN xid;
62
END //
63
6
64
DELIMITER ;
65
7
66
 
8
 
67
DROP TABLE IF EXISTS table_insert_id;
68
9
69
CREATE TABLE table_insert_id (
70
	id INT  NOT NULL AUTO_INCREMENT,
71
	primary key (id)
72
) AUTO_INCREMENT = 101;
73
10
74
DROP FUNCTION IF EXISTS select_insert_id;
75
76
DELIMITER //
77
78
CREATE FUNCTION select_insert_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
79
BEGIN
80
  DECLARE xid INT;
81
  INSERT into table_insert_id VALUES();
82
  SELECT last_insert_id() into xid;
83
  RETURN xid;
84
END //
85
86
DELIMITER ;
87
88
DROP TABLE IF EXISTS table_profile_id;
89
90
CREATE TABLE table_profile_id (
91
	id INT  NOT NULL AUTO_INCREMENT,
92
	primary key (id)
93
);
94
95
DROP FUNCTION IF EXISTS select_profile_id;
96
97
DELIMITER //
98
99
CREATE FUNCTION select_profile_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA
100
BEGIN
101
  DECLARE xid INT;
102
  INSERT into table_profile_id VALUES();
103
  SELECT last_insert_id() into xid;
104
  RETURN xid;
105
END //
106
107
108
DELIMITER ;
109
11
110
CREATE TABLE prg_dlist (
12
CREATE TABLE prg_dlist (
Lines 309-313 Link Here
309
	changing_date timestamp ,
211
	changing_date timestamp ,
310
	changed_from text,
212
	changed_from text,
311
	login text PRIMARY KEY,
213
	login varchar(255) PRIMARY KEY,
312
	addr_u text,
214
	addr_u text,
313
	addr_r text,
215
	addr_r text,
Lines 446-450 Link Here
446
	timestampfield01 timestamp ,
348
	timestampfield01 timestamp ,
447
	timestampfield02 timestamp ,
349
	timestampfield02 timestamp ,
448
	intfield01 int NOT NULL,
350
	intfield01 int PRIMARY KEY,
449
	intfield02 int,
351
	intfield02 int,
450
	intfield03 int,
352
	intfield03 int,
Lines 1328-1332 Link Here
1328
	timestampfield01 timestamp ,
1230
	timestampfield01 timestamp ,
1329
	timestampfield02 timestamp ,
1231
	timestampfield02 timestamp ,
1330
	intfield01 int NOT NULL,
1232
	intfield01 int PRIMARY KEY,
1233
	intfield02 int,
1234
	intfield03 int,
1235
	intfield04 int,
1236
	intfield05 int,
1237
	intfield06 int,
1238
	field01 text NOT NULL,
1239
	field02 text,
1240
	field03 text,
1241
	field04 text,
1242
	field05 text,
1243
	field06 text,
1244
	field07 text,
1245
	field08 text,
1246
	field09 text,
1247
	field10 text
1248
);
1249
1250
CREATE TABLE del_docufolders (
1251
	creating_date timestamp NOT NULL,
1252
	created_from text NOT NULL,
1253
	changing_date timestamp,
1254
	changed_from text,
1255
	user_right text NOT NULL,
1256
	group_right text NOT NULL,
1257
	sid text NOT NULL,
1258
	tid text,
1259
	order_crit text,
1260
	timestampfield01 timestamp,
1261
	timestampfield02 timestamp,
1262
	intfield01 int PRIMARY KEY,
1331
	intfield02 int,
1263
	intfield02 int,
1332
	intfield03 int,
1264
	intfield03 int,
Lines 1358-1362 Link Here
1358
	timestampfield01 timestamp ,
1290
	timestampfield01 timestamp ,
1359
	timestampfield02 timestamp ,
1291
	timestampfield02 timestamp ,
1360
	intfield01 int NOT NULL,
1292
	intfield01 int PRIMARY KEY,
1293
	intfield02 int NOT NULL,
1294
	intfield03 int,
1295
	intfield04 int,
1296
	intfield05 int,
1297
	intfield06 int,
1298
	field01 text NOT NULL,
1299
	field02 text,
1300
	field03 text,
1301
	field04 text,
1302
	field05 text,
1303
	field06 text,
1304
	field07 text,
1305
	field08 text,
1306
	field09 text,
1307
	field10 text
1308
);
1309
1310
CREATE TABLE del_documents (
1311
	creating_date timestamp NOT NULL,
1312
	created_from text NOT NULL,
1313
	changing_date timestamp,
1314
	changed_from text,
1315
	user_right text NOT NULL,
1316
	group_right text NOT NULL,
1317
	sid text NOT NULL,
1318
	tid text,
1319
	order_crit text,
1320
	timestampfield01 timestamp,
1321
	timestampfield02 timestamp,
1322
	intfield01 int PRIMARY KEY,
1361
	intfield02 int NOT NULL,
1323
	intfield02 int NOT NULL,
1362
	intfield03 int,
1324
	intfield03 int,
Lines 1388-1392 Link Here
1388
	timestampfield01 timestamp ,
1350
	timestampfield01 timestamp ,
1389
	timestampfield02 timestamp ,
1351
	timestampfield02 timestamp ,
1390
	intfield01 int NOT NULL,
1352
	intfield01 int PRIMARY KEY,
1353
	intfield02 int NOT NULL,
1354
	intfield03 int NOT NULL,
1355
	intfield04 int,
1356
	intfield05 int,
1357
	intfield06 int,
1358
	field01 text NOT NULL,
1359
	field02 text,
1360
	field03 text NOT NULL,
1361
	field04 text NOT NULL,
1362
	field05 text,
1363
	field06 text,
1364
	field07 text,
1365
	field08 text,
1366
	field09 text,
1367
	field10 text
1368
);
1369
1370
CREATE TABLE del_documents_files (
1371
	creating_date timestamp NOT NULL,
1372
	created_from text,
1373
	changing_date timestamp,
1374
	changed_from text,
1375
	user_right text,
1376
	group_right text,
1377
	sid text NOT NULL,
1378
	tid text,
1379
	order_crit text,
1380
	timestampfield01 timestamp,
1381
	timestampfield02 timestamp,
1382
	intfield01 int PRIMARY KEY,
1391
	intfield02 int NOT NULL,
1383
	intfield02 int NOT NULL,
1392
	intfield03 int NOT NULL,
1384
	intfield03 int NOT NULL,
Lines 1972-1976 Link Here
1972
CREATE TABLE sys_linkage (
1964
CREATE TABLE sys_linkage (
1973
	changing_date timestamp  NOT NULL,
1965
	changing_date timestamp  NOT NULL,
1974
	luid int NOT NULL,
1966
	luid int PRIMARY KEY,
1975
	source_id int NOT NULL,
1967
	source_id int NOT NULL,
1976
	src_table text NOT NULL,
1968
	src_table text NOT NULL,
Lines 1992-1996 Link Here
1992
CREATE TABLE del_linkage (
1984
CREATE TABLE del_linkage (
1993
	changing_date timestamp  NOT NULL,
1985
	changing_date timestamp  NOT NULL,
1994
	luid int NOT NULL,
1986
	luid int PRIMARY KEY,
1995
	source_id int NOT NULL,
1987
	source_id int NOT NULL,
1996
	src_table text NOT NULL,
1988
	src_table text NOT NULL,
Lines 2046-2049 Link Here
2046
);
2038
);
2047
2039
2040
CREATE TABLE oxfolder_userfolders_standardfolders (
2041
        owner text,
2042
        module text,
2043
        fuid int
2044
);
2045
2048
CREATE TABLE del_oxfolder_tree (
2046
CREATE TABLE del_oxfolder_tree (
2049
        fuid int,
2047
        fuid int,
Lines 2110-2113 Link Here
2110
);
2108
);
2111
2109
2110
CREATE TABLE del_system_objects (
2111
		object_type int,
2112
		object_id text,
2113
		deleting_date timestamp
2114
);
2115
2112
INSERT INTO oxfolder_tree VALUES (1, 0, 'private', 'system', 'system','system', 'system', now(), 'System', null, null);
2116
INSERT INTO oxfolder_tree VALUES (1, 0, 'private', 'system', 'system','system', 'system', now(), 'System', null, null);
2113
INSERT INTO oxfolder_tree VALUES (2, 0, 'public', 'system', 'system','system', 'system', now(), 'System', null, null);
2117
INSERT INTO oxfolder_tree VALUES (2, 0, 'public', 'system', 'system','system', 'system', now(), 'System', null, null);
Lines 2127-2130 Link Here
2127
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 7, 512, 'all_ox_users_and_ox_groups', 0, 2, 0, 0, 0);
2131
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 7, 512, 'all_ox_users_and_ox_groups', 0, 2, 0, 0, 0);
2128
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 8, 512, 'all_ox_users_and_ox_groups', 0, 8, 4, 2, 2);
2132
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 8, 512, 'all_ox_users_and_ox_groups', 0, 8, 4, 2, 2);
2133
INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 9, 32768, 'mailadmin', 0, 128, 128, 128, 128);
2129
2134
2130
INSERT INTO oxfolder_specialfolders VALUES ('private', 1);
2135
INSERT INTO oxfolder_specialfolders VALUES ('private', 1);

Return to bug 62197