summaryrefslogtreecommitdiff
path: root/plugin/feedback
Commit message (Collapse)AuthorAgeFilesLines
* Fix of feedback plugin.Oleksandr Byelkin2018-07-061-1/+2
| | | | Assign "SELECT" to the table before it usage.
* Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-2/+6
| | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* Windows, compiling : reenable warning C4996 (deprecated functions)Vladislav Vaintroub2018-02-071-0/+3
| | | | | | | | | | | But set _CRT_NONSTDC_NO_WARNINGS to silence silly warnings about ANSI C function being non-standard Remove now deprecated GetVersion()/GetVersionEx(),except single case where where it is really needed, in feedback plugin. Remove checks for Windows NT. Avoid old IPv4-only inet_aton, which generated the warning.
* Windows : reenable warning C4805 (unsafe mix of types in bool operations)Vladislav Vaintroub2018-02-071-2/+2
|
* MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-4/+4
| | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* Changed database, tablename and alias to be LEX_CSTRINGMonty2018-01-302-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
* Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-043-9/+9
|\
| * Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-023-9/+9
| |\
| | * MDEV-13384 - misc Windows warnings fixedVladislav Vaintroub2017-09-283-9/+9
| | |
* | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-06-191-1/+1
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-06-151-1/+1
| |\ \ | | |/
| | * Merge 10.1 into 10.2Marko Mäkelä2017-05-231-1/+1
| | |\
| | | * Merge 10.0 into 10.1Marko Mäkelä2017-05-231-1/+1
| | | |\
| | | | * MDEV-6262 analyze the coverity report on mariadbSergei Golubchik2017-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | uploaded 10.0, analyzed everything with the Impact=High (and a couple of Medium)
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-04-241-2/+2
|\ \ \ \ \ | |/ / / /
| * | | | Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-231-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits of this patch: - Removed a lot of calls to strlen(), especially for field_string - Strings generated by parser are now const strings, less chance of accidently changing a string - Removed a lot of calls with LEX_STRING as parameter (changed to pointer) - More uniform code - Item::name_length was not kept up to date. Now fixed - Several bugs found and fixed (Access to null pointers, access of freed memory, wrong arguments to printf like functions) - Removed a lot of casts from (const char*) to (char*) Changes: - This caused some ABI changes - lex_string_set now uses LEX_CSTRING - Some fucntions are now taking const char* instead of char* - Create_field::change and after changed to LEX_CSTRING - handler::connect_string, comment and engine_name() changed to LEX_CSTRING - Checked printf() related calls to find bugs. Found and fixed several errors in old code. - A lot of changes from LEX_STRING to LEX_CSTRING, especially related to parsing and events. - Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING* - Some changes for char* to const char* - Added printf argument checking for my_snprintf() - Introduced null_clex_str, star_clex_string, temp_lex_str to simplify code - Added item_empty_name and item_used_name to be able to distingush between items that was given an empty name and items that was not given a name This is used in sql_yacc.yy to know when to give an item a name. - select table_name."*' is not anymore same as table_name.* - removed not used function Item::rename() - Added comparision of item->name_length before some calls to my_strcasecmp() to speed up comparison - Moved Item_sp_variable::make_field() from item.h to item.cc - Some minimal code changes to avoid copying to const char * - Fixed wrong error message in wsrep_mysql_parse() - Fixed wrong code in find_field_in_natural_join() where real_item() was set when it shouldn't - ER_ERROR_ON_RENAME was used with extra arguments. - Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already give the error. TODO: - Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c - Change code to not modify LEX_CSTRING for database name (as part of lower_case_table_names)
* | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-04-036-11/+8
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-306-11/+8
| |\ \ \ | | |/ /
| | * | Correct FSF addressiangilfillan2017-03-106-6/+6
| | | |
| | * | base64 serviceSergei Golubchik2017-03-101-2/+0
| | | |
| | * | cleanup: generalize my_sha1.ccSergei Golubchik2017-03-101-3/+2
| | | | | | | | | | | | | | | | | | | | move most of the code into my_sha.ic, making it independent from the actual SHAx variant.
* | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2016-12-302-3/+12
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-292-3/+12
| |\ \ \ | | |/ /
| | * | Merge branch '10.0' into 10.1Sergei Golubchik2016-09-291-2/+11
| | |\ \ | | | |/
| | | * Merge branch '5.5' into 10.0Sergei Golubchik2016-09-291-2/+11
| | | |\
| | | | * Feedback plugin : add support for Windows 10 / Server 2016.Vladislav Vaintroub2016-09-281-2/+11
| | | | | | | | | | | | | | | | | | | | Also add fallback version string for unknown future versions.
| | * | | Make sure to recompile the feedback plugin for EMBEDDEDVicențiu Ciorbaru2016-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OS X with clang 7.3.0 running any test as embedded crashes. As libfeedback was not compiled with embedded, we had 2 notions of THD, with different number of members. When calling inline functions defined in sql_class.h, the functions were defined for 1 THD but called on an object that is different. This resulted in erroneous data being returned and shortly after, a crash within the alloc_query() function. Recompile the feedback plugin for the embedded server specifically to not have such symbol conflicts.
* | | | | MDEV-11212 - Clean-up MariaDB atomic operationsSergey Vojtovich2016-12-131-2/+0
|/ / / / | | | | | | | | | | | | Removed my_atomic_initialize(): it doesn't make sense anymore.
* | | | name clash with gnutls on on base64_encodeSergei Golubchik2016-09-121-2/+2
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-0/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-06-281-0/+1
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-211-0/+1
| | |\ \ | | | |/
| | | * MDEV-9749 InnoDB receives 'Bad file descriptor' error, possibly related to ↵Sergei Golubchik2016-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feedback plugin and MDEV-10250 InnoDB: Error: File (unknown): 'close' returned OS error 209. Cannot continue operation" after a failed connect() feedback plugin was continuing with the file descriptor, trying to send the data (which failed) and closing it at the end. Even though this fd might've been reused for something else already.
* | | | cleanup: thread_countSergei Golubchik2016-06-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move thread_count handling into THD: * increment thread_count in THD constructor * decrement thread_count in THD destructor * never modify thread_count directly!
* | | | Reuse THD for new user connectionsMonty2016-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
* | | | Fixed plugins.feedback_plugin_send failureSergey Vojtovich2016-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | Fixed assertion failure introduced along with MDEV-6150 (thd must be unlinked before calling "delete thd").
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-02-252-2/+0
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-232-2/+0
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2016-02-154-13/+99
| | |\ \ | | | |/
| | | * MDEV-9438 backport feedback-http-proxy to 5.5 and 10.0.Alexey Botchkov2016-02-094-13/+99
| | | | | | | | | | | | | | | | The http-proxy option to the FEEDBACK plugin backported.
* | | | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-071-3/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a CONNECT object on client connect and pass this to the working thread which creates the THD. Split LOCK_thread_count to different mutexes Added LOCK_thread_start to syncronize threads Moved most usage of LOCK_thread_count to dedicated functions Use next_thread_id() instead of thread_id++ Other things: - Thread id now starts from 1 instead of 2 - Added cast for thread_id as thread id is now of type my_thread_id - Made THD->host const (To ensure it's not changed) - Removed some DBUG_PRINT() about entering/exiting mutex as these was already logged by mutex code - Fixed that aborted_connects and connection_errors_internal are counted in all cases - Don't take locks for current_linfo when we set it (not needed as it was 0 before)
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-213-7/+8
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-133-7/+8
| |\ \ | | |/
| | * MDEV-9161 feedback_plugin_send in debug buildsSergei Golubchik2015-12-081-0/+1
| | | | | | | | | | | | | | | | | | thd->cleanup_after_query() is needed to destroy all Items created for this query (and Item destructors free allocated Strings).
| | * feedback plugin compilation warningsSergei Golubchik2015-12-083-7/+7
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-11-193-4/+42
|\ \ \ | |/ /
| * | fix feedback plugin not to crash in debug buildsSergei Golubchik2015-11-191-1/+1
| | | | | | | | | | | | | | | feedback was bzero-ing thd->status_vars.memory_used, but server was asserting the correct value of it
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-11-183-3/+41
| |\ \ | | |/
| | * MDEV-9051 mysqld got signal 11, after upgrade to 10.1.8Sergei Golubchik2015-11-181-0/+1
| | | | | | | | | | | | feedback plugin needs to set tables->select_lex properly