summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_mysql.cpp
AgeCommit message (Collapse)Author
2021-06-07Migrate Windows builds to installing their dependencies via Conan.Sadie Powell
2020-04-24Update copyright headers.InspIRCd Robot
2020-04-21Fixes by misspell-fixerInspIRCd Robot
2020-04-10Fix an oversight in mkversions that caused it to not update extras.Sadie Powell
2020-01-11Update copyright headers.InspIRCd Robot
2019-11-16Refactor the MySQL code slightly.Peter Powell
2019-11-13Refactor the MySQL query and result queue classes.Peter Powell
2019-11-13Get rid of some dead code in the MySQL module.Peter Powell
2019-11-13Improve the logic around connecting to a MySQL server.Peter Powell
- The connection timeout can now be customised with <database:timeout>. - <database:port> is now limited to the 1-65535 range. - The MySQL library will now not install a SIGPIPE handler as it would override the default InspIRCd ignore behavopur. - Errors caused by setting the default character set and executing the initial query are now no longer ignored.
2019-11-13Add GetId() to the SQL::Provider class.Peter Powell
2019-08-20Improve escaping strings in the MySQL module.Peter Powell
2019-08-20Initialise and deallocate the MySQL library correctly.Peter Powell
2019-07-16Add package names for ArchLinux.Peter Powell
2019-06-24Reset diagnostic pragmas after including external headers (#1661).linuxdaemon
2019-06-14Log SQL queries at the debug log level.Peter Powell
This makes debugging issues easier.
2019-06-07Replace all abstract usages of his/he/her with they/their/it.Peter Powell
2019-04-28Textual improvements and fixes such as typos, casing, etc. (#1612)Robby
2018-09-27Fix SQL modules using "provider" in <database> instead of "module".Peter Powell
This fixes a regression introduced in 97a1d642.
2018-08-21Fix a few things that should be marked as override but aren't.Peter Powell
2018-07-24Make more config stuff case insensitive.Peter Powell
2018-07-15Use mysql_real_escape_string instead of mysql_escape string.Peter Powell
This is not exploitable as far as I know but it is probably best that we use the newer function just in case. Closes #649 (although the attack mentioned in that issue was not feasible).
2018-04-16Add ConfigTag::getUInt for reading unsigned config values.Peter Powell
2018-04-16Remove the default value in ConfigTag::get{Duration,Float,Int}.Peter Powell
2018-04-07SQL: Add HasColumn() to check if a result contains a named column.Daniel Vassdal
2018-02-17Fix building on Windows (mostly).Peter Powell
2017-12-22Improve and modernize the SQL system API.Peter Powell
- Move everything into the SQL namespace and drop the SQL prefix. - Move SQLProvider::PopulateUserInfo to SQL::PopulateUserInfo. - Rename SQLEntry to SQL::Field and clean up. - Rename SQLEntries to SQL::Row. - Rename SQLerror to SQL::Error and clean up. - Rename SQLerrorNum to SQL::ErrorCode and drop the SQL_ prefix. - Rename ParamL to SQL::ParamList. - Rename ParamM to SQL::ParamMap; - Make implementing SQLQuery::OnError mandatory. - Redo most of the documentation in the sql header.
2017-11-21Add the override keyword in places that it is missing.Peter Powell
GCCs warnings for this are much better than Clangs.
2017-11-12Merge tag 'v2.0.25' into master.Peter Powell
2017-10-21Add PackageInfo directives for Debian.Peter Powell
2017-10-15Update wiki links to use HTTPS and point to the correct pages.Peter Powell
When we release 3.0 these links will break as they will point to the pages for 3.0 rather than 2.0.
2016-09-16Add CentOS PackageInfoAdam
2016-09-16Rewrite the build system directive parser.Peter Powell
2016-08-19Fix m_mysql warning about use of C++11 features on C++03.Peter Powell
NO_CLIENT_LONG_LONG was removed in a recent version of MySQL.
2015-02-06m_mysql Add charset config optionFlorian Praden
2014-12-15Change type of some associative containers to their flat versions, including ↵Attila Molnar
Extensible storage
2014-07-25Merge insp20Attila Molnar
2014-06-13Change allocation of InspIRCd::Threads to be physically part of the object ↵Attila Molnar
containing it
2014-04-13Change Windows libraries to be dynamically linkedAdam
2013-08-30Replace OnRehash() with ReadConfig() that is called on boot, on module load ↵attilamolnar
and on rehash This eliminates the need for calling OnRehash() in init()
2013-08-04Automatically attach modules to eventsattilamolnar
2013-07-04Remove $Core and $Mod* comments apart from $ModDep.Peter Powell
2013-06-06Merge insp20attilamolnar
2013-06-05Remove unnecessary string copies and dead codeattilamolnar
2013-06-01m_mysql Fix escaping strings longer than MAXBUF/2attilamolnar
Quotes from the documentation: "You must allocate the to buffer to be at least length*2+1 bytes long. (In the worst case, each character may need to be encoded as using two bytes, and you need room for the terminating null byte.)" "The return value is the length of the encoded string, not including the terminating null character." http://dev.mysql.com/doc/refman/5.6/en/mysql-real-escape-string.html
2013-05-22m_mysql Fix crash on rehash when the database tags have been changed in the ↵attilamolnar
config
2013-05-15Tidy up keywords on module methods.Peter Powell
- Remove virtual keyword from a ton of methods which don't need it. - Add override keyword to a ton of methods which do need it.
2013-04-12Tidy up source files:Peter Powell
- Use #pragma once instead of include guards. - Move header files in src/modules to include/modules. - Fixed various spacing issues.
2013-04-01Whitespace and empty destructor removal, minor coding style changesattilamolnar
2012-12-02Dynamically determine the size of the eventlist[] passed to Attach()attilamolnar
m_sqlauth was attached to I_OnUserDisconnect but didn't provide a handler for it, remove
2012-10-12Windows: In-depth cleanup (see details)ChrisTX
-Fix x64 builds for Windows. Now all configurations compile. -Remove the non-working rebase stuff. -Remove the Windows fork hack and instead use FreeConsole() to emulate the behavior. This directly allows us to compile with ASLR, which is turned on now. -Remove the old IPC mechanism for the removed GUI. This is not needed anymore as the GUI wasn't ever supported on anything newer than 1.2 -Remove the WIN32/WINDOWS macros. _WIN32 is supported on all x86-based VC++ targets, so that's what we need. -Enable optimizations for release builds. -De-duplicate printf_c(), it was previously copy-pasted into colors.h for configure -Add the VC++ specific bad files in .gitignore -Disable PID writing on Windows. This is only making sense for *nix builds. -Replace the CPU usage retrieval with an algorithm analogous to the *nix behavior. Also supports separated now/total values. (Tested with a dummy busy loop - seems working) -Removed certain unused functions and variables -Remove stdint defines from the windows wrapper -Remove CRT debug alloc. This is a bad idea as it would define a macro to replace free which breaks builds. -Re-evaluated the warnings list, commented it. -Moved inspircd_config/_version to include/ to match *nix -Removed the creation of inspircd_se_config, as it isn't used at all. -Made non-git builds show as "r0" instead of "r" (thanks to @SaberUK for pointing this out) -Fixed up m_spanningtree's project paths. Now all configurations (debug/release x86/x64) have been tested and build properly. -Moved FindDNS out of the wrapper and matched its log behavior with *nix. (It's pointless having it in the wrapper after the recent slimming down) -Replaced random/srandom wrappers with a mechanism that tries to use Windows' Random API first is no SSL module is loaded. -Removed more old junk from support for compilers older than VC++ 2010 (we don't have project files for these, so compiling them would be hard anyways) -Removed the unused ClearConsole() -Removed unused includes from the wrapper. Also, do not include psapi.h here if we don't link psapi.lib. This should be done where appropriate. -Made inet_aton an inline function for increased performance -C4800, performance warning about bool forcing, resolved at all occurrences. -C4701, uninitialized variable 'cached', resolved at all occurrences. -dlerror() was migrated out of the wrapper for more thread safety (no global buffer being shared) and increased performance. -Removed the wrong CRT debug flags. This drains a lot of performance. -Removed the clock_gettime/gettimeofday wrappers -Replaced all TCHAR/ANSI mix-ups of functions with the correct respective function. -Added a block of C4355 for < VS2012 -Update project files for c870714