cigamit
fb0274f09e
Resolving Issue #891
...
lib/database.php unable to connecto to MySQL when using port different
than 3306
2017-08-05 10:50:18 -05:00
cigamit
678716ae35
Optimize lib/database.php for readability
2017-05-15 17:56:18 -05:00
Tony Roman
8a179d7d7f
Fix up to move if elseif else blocks to PSR
2017-05-07 19:57:36 -04:00
cigamit
e1f010f241
Resolving Issue #622
...
Can not connec to MySQL over a socket
2017-04-26 06:03:07 -05:00
Patrick
97b666f724
Update database.php
...
Restoring db_add_index()
2017-04-22 15:16:36 +02:00
Patrick
aea4b7c40b
Database optimisations
...
- Removed unused functions
- Double check of !is_object() optimised
- Resolved some alignment issues
2017-04-16 11:51:51 +02:00
patrick
467ab201aa
executing 4x1 str_replace() instead of 4x3
2017-04-06 18:05:33 +02:00
cigamit
8c2150c7aa
Log full database errors in LOW or higher logging mode
...
Makes debugging easier
2017-02-18 13:20:21 -06:00
cigamit
06de177235
Add DB Query count for debugging purposes
2017-02-05 13:04:04 -06:00
cigamit
485a3b3be8
Make the db_add_index safer from reserved words
2017-02-04 14:02:02 -06:00
cigamit
3ab2feaedf
add db_add_index() function to core
...
Was included in the installer, but not in the core api.
2017-02-04 13:55:56 -06:00
cigamit
e4c27e4555
Another check to prevent invalid date format errors
...
This is related to Issue #227
2017-01-23 17:10:59 -06:00
cigamit
2376e9d48b
Remove STRICT mode
2017-01-22 17:14:45 -06:00
cigamit
8e239faa74
Add comment field to db functions
2017-01-14 00:07:21 -06:00
cigamit
636e68a336
Ensure we are doing a proper comparison for columns
2017-01-11 21:58:04 -06:00
cigamit
c25065ede7
Fix two database issues
...
The issue with the CURRENT_TIMESTAMP being applied to the various
columns does not make sense. In the code the $column['default'] == 0 is
also equating to 'CURRENT_TIMESTAMP'
2017-01-11 19:52:07 -06:00
cigamit
c59c2f9443
Resolving issues #149
2017-01-05 17:27:45 -06:00
cigamit
790f6a2199
Fix undefined variable error in cacti_log()
2017-01-02 13:12:08 -06:00
Tony Roman
35a5988f41
Update source code files copyright to new year
2017-01-01 13:45:29 -05:00
cigamit
e9a8a5b555
Fixing database.php db_add_column to handle CURRENT_TIMESTAMP
2016-12-29 14:58:01 -06:00
cigamit
762e1ffd96
Add 'on_update' to rest of DB functions
2016-12-28 23:06:54 -06:00
cigamit
41dda1654c
Add new option 'on_update' to db_add_column
...
This fixes 'duplicate column' errors when upgrading
2016-12-28 22:24:38 -06:00
cigamit
473aa93c5e
Correct issues with remote connections.
...
This is part of remote poller install testing. Finding a few
regressions.
2016-12-26 22:27:28 -06:00
cigamit
0054f1d7e9
Correct logic when openning connection to 2nd DB
...
Since we aren't passing a connection id (and its not even saved to the
db session yet), we need to utilize the PDO functions directly instead
of db_execute, otherwise these commands just get ran on the default
connection again, not the new one.
2016-10-26 00:27:13 -05:00
cigamit
2e7d0df40f
more logging and remove removed mysql_error() call
2016-09-21 09:44:27 -05:00
cigamit
4a53491b6b
taking a more conservative approach until we can do a full check on the code
2016-09-20 19:52:20 -05:00
cigamit
8b770c8337
another change to database.php to account for auto_increment integers
2016-09-20 17:19:04 -05:00
cigamit
6a2d6c7429
more precise handling of integers
2016-09-19 16:37:33 -05:00
cigamit
e1b06a5c9a
partial resolution of bug#1042
...
this change will allow logging by file. it's not quite by device and
plugin, but it is a start.
2016-09-16 22:03:36 -05:00
cigamit
71483fb020
adding one more mode to exception list
2016-09-05 09:10:31 -05:00
cigamit
9561b97528
disable magic_quotes_gpc forced emulation
...
this is a significant change that may impact plugins. please report
bugs if you find tham.
2016-08-28 15:28:42 -05:00
cigamit
97880fce15
Installer cleanup
...
Remove need to specify the Cacti Version on every function call
Add new functions for adding / dropping columns
Add new functions for renaming / dropping tables
Lots of error checking (stops most SQL errors when re-upgrading)
General Cleanup
2016-08-22 16:48:34 -05:00
cigamit
ef6c9ec217
additional mysql 5.7 compatibility
2016-07-11 19:23:56 -05:00
cigamit
00f0d0af45
Truncate SQL Error message for "Got a packet bigger than 'max_allowed_packet' bytes"
...
This is stop the error log from skyrocketing in size because of the
resource cache
2016-06-26 23:22:44 -05:00
cigamit
9cbb202198
mysql 5.7 testing
2016-06-18 09:44:39 -05:00
cigamit
b068b29251
additional change for mysql 5.7
2016-05-31 20:29:56 -05:00
cigamit
e6337e28f6
allow Cacti to work with MySQL 5.7
...
this is the first of likely a few patches on this subject. testing by
debian.org is ongoing.
2016-05-31 19:26:06 -05:00
cigamit
a325c33d60
enhance support for uninitialized database or invalid connection
2016-05-29 14:21:33 -05:00
cigamit
dbcccece45
problems saving to other databases
2016-04-03 14:22:20 -05:00
cigamit
cecccddc76
properly handle resource and qstr() function call issues
2016-03-29 19:44:48 -05:00
Browniebraun
0c58b9b6b7
revert last commitment
2016-03-29 13:41:03 +02:00
cigamit
cdae56d257
fixin db_qstr function
2016-03-28 21:30:27 -05:00
Micke2k
d188f1631d
Change Copyright year 2015 -> 2016
2016-01-29 21:46:02 +04:00
cigamit
4b11861226
Beef up validation logging
...
Make html validation logging similar to SQL logging.
2015-08-02 14:02:32 -05:00
cigamit
b64c2b6ac5
Rolling back undone changes
...
Changes were undone in prior commit
2015-08-02 12:28:01 -05:00
cigamit
e432dbc0b1
Update db_update_table and db_table_create
...
Allow columns in and primary/keys to be an array
2015-05-27 01:19:13 -05:00
cigamit
6dc209a842
add a few more db functions
...
add db_update_table, same syntax as the create function, but will
automatically update the table to match (may rename)
add db_remove_column
add db_column_exists
2015-05-05 00:55:28 -05:00
cigamit
7e5175501e
Add db_table_create
2015-05-04 22:18:23 -05:00
cigamit
8b95856d07
Move db_table_exists from installer to lib/database
2015-05-04 21:36:17 -05:00
cigamit
d7aef458c0
Fix function db_add_column
2015-05-04 21:28:25 -05:00