/[smecontribs]/rpms/bandwidthd/contribs10/bandwidthd-2.0.1.1-mariadb.patch
ViewVC logotype

Contents of /rpms/bandwidthd/contribs10/bandwidthd-2.0.1.1-mariadb.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Jun 6 05:07:42 2021 UTC (3 years, 5 months ago) by jpp
Branch: MAIN
CVS Tags: bandwidthd-2_0_1_1-9_el7_sme, bandwidthd-2_0_1_1-8_el7_sme, HEAD
* Sun Jun 06 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-8.sme
- use ENGINE in place of TYPE for mariadb

1 diff -Nur --no-dereference bandwidthd-2.0.1.1.old/bandwidthd.c bandwidthd-2.0.1.1/bandwidthd.c
2 --- bandwidthd-2.0.1.1.old/bandwidthd.c 2021-06-06 00:46:55.812000000 -0400
3 +++ bandwidthd-2.0.1.1/bandwidthd.c 2021-06-06 01:05:27.761000000 -0400
4 @@ -1073,35 +1073,35 @@
5 if (mysql_num_rows(res) != 1) {
6 mysql_free_result(res);
7
8 - ret = mysql_query(conn, "CREATE TABLE bd_rx_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_rx_log_sensors_id_ip_timestamp_idx (sensor_id, ip, timestamp), INDEX bd_rx_log_sensor_id_timestamp_idx (sensor_id, timestamp)) TYPE=innodb");
9 + ret = mysql_query(conn, "CREATE TABLE bd_rx_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_rx_log_sensors_id_ip_timestamp_idx (sensor_id, ip, timestamp), INDEX bd_rx_log_sensor_id_timestamp_idx (sensor_id, timestamp)) ENGINE=innodb");
10 if (ret) {
11 syslog(LOG_ERR, "MySQL CREATE TABLE failed: %s", mysql_error(conn));
12 mysql_close(conn);
13 return(NULL);
14 }
15
16 - ret = mysql_query(conn, "CREATE TABLE bd_tx_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_tx_log_sensors_id_ip_timestamp_idx (sensor_id, ip, timestamp), INDEX bd_tx_log_sensor_id_timestamp_idx (sensor_id, timestamp)) TYPE=innodb");
17 + ret = mysql_query(conn, "CREATE TABLE bd_tx_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_tx_log_sensors_id_ip_timestamp_idx (sensor_id, ip, timestamp), INDEX bd_tx_log_sensor_id_timestamp_idx (sensor_id, timestamp)) ENGINE=innodb");
18 if (ret) {
19 syslog(LOG_ERR, "MySQL CREATE TABLE failed: %s", mysql_error(conn));
20 mysql_close(conn);
21 return(NULL);
22 }
23
24 - ret = mysql_query(conn, "CREATE TABLE bd_rx_total_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_rx_total_log_sensors_id_timestamp_idx (sensor_id, timestamp)) TYPE=innodb");
25 + ret = mysql_query(conn, "CREATE TABLE bd_rx_total_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_rx_total_log_sensors_id_timestamp_idx (sensor_id, timestamp)) ENGINE=innodb");
26 if (ret) {
27 syslog(LOG_ERR, "MySQL CREATE TABLE failed: %s", mysql_error(conn));
28 mysql_close(conn);
29 return(NULL);
30 }
31
32 - ret = mysql_query(conn, "CREATE TABLE bd_tx_total_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_tx_total_log_sensors_id_timestamp_idx (sensor_id, timestamp)) TYPE=innodb");
33 + ret = mysql_query(conn, "CREATE TABLE bd_tx_total_log (sensor_id INT, ip INT UNSIGNED, timestamp TIMESTAMP, sample_duration INT, total INT, icmp INT, udp INT, tcp INT, ftp INT, http INT, p2p INT, INDEX bd_tx_total_log_sensors_id_timestamp_idx (sensor_id, timestamp)) ENGINE=innodb");
34 if (ret) {
35 syslog(LOG_ERR, "MySQL CREATE TABLE failed: %s", mysql_error(conn));
36 mysql_close(conn);
37 return(NULL);
38 }
39
40 - ret = mysql_query(conn, "CREATE TABLE sensors (sensor_id INT PRIMARY KEY AUTO_INCREMENT, sensor_name VARCHAR(255) UNIQUE NOT NULL, last_connection TIMESTAMP) TYPE=innodb");
41 + ret = mysql_query(conn, "CREATE TABLE sensors (sensor_id INT PRIMARY KEY AUTO_INCREMENT, sensor_name VARCHAR(255) UNIQUE NOT NULL, last_connection TIMESTAMP) ENGINE=innodb");
42 if (ret) {
43 syslog(LOG_ERR, "MySQL CREATE TABLE failed: %s", mysql_error(conn));
44 mysql_close(conn);

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed