summaryrefslogtreecommitdiff
path: root/client/mysqlcheck.c
Commit message (Collapse)AuthorAgeFilesLines
* Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-3/+9
| | | | | | | | | | | | | | | | | | | | | One should not change the program arguments! This change also reduces warnings from the icc compiler. Almost all changes are just syntax changes (adding const to 'get_one_option function' declarations). Other changes: - Added a few cast of 'argument' from 'const char*' to 'char *'. This was mainly in calls to 'external' functions we don't have control of. - Ensure that all reset of 'password command line argument' are similar. (In almost all cases it was just adding a comment and a cast) - In mysqlbinlog.cc and mysqld.cc there was a few cases that changed the command line argument. These places where changed to instead allocate the option in a MEM_ROOT to avoid changing the argument. Some of this code was changed to ensure that different programs did parsing the same way. Added a test case for the changes in mysqlbinlog.cc - Changed a few variables that took their value from command line options from 'char *' to 'const char *'.
* cleanup: PSI key is *always* the first argumentSergei Golubchik2020-03-101-4/+4
|
* perfschema memory related instrumentation changesSergei Golubchik2020-03-101-15/+14
|
* MDEV-12684 Show what config file a sysvar got a value fromSergei Golubchik2019-10-141-3/+3
| | | | | change get_one_option() prototype to pass the filename and not to pass the redundant optid.
* Fixed that mariadb-# binaries reads their corresponding entry from my.cnfMonty2019-07-181-1/+2
| | | | | | | | | | | | - Added mariadb-# to load_default_groups to all mariadb-# scripts and mariadb-binaries. - Added mariadbd and mariadbd-"version" to load_default_groups for the mysqld/mariadb server - Added mariadb-client to load_default_groups for the mysql/mariadb client Other things - Ignored mysql-test/lib/My/SafeProcess/wsrep_check_version - mysql_install_db will now automatically detect if run from srcdir
* Merge 10.3 into 10.4Marko Mäkelä2019-06-191-2/+4
|\
| * Merge 10.2 into 10.3Marko Mäkelä2019-06-191-2/+4
| |\
| | * MDEV-19750 mysql command wrong encodingVladislav Vaintroub2019-06-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the detection of default charset in command line utilities. It worked up to 10.1, but was broken by Connector/C. Moved code for detection of default charset from sql-common/client.c to mysys, and make command line utilities to use this code if charset was not specified on the command line.
* | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\ \ | | |/
| | * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| | |\
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | |\
| | | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-03-201-1/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MDEV-17262 commit 26432e49d37a37d09b862bb49a021e44bdf4789c was skipped. In Galera 4, the implementation would seem to require changes to the streaming replication. In the tests archive.rnd_pos main.profiling, disable_ps_protocol for SHOW STATUS and SHOW PROFILE commands until MDEV-18974 has been fixed.
| * | | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-171-1/+2
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-151-1/+2
| | |\ \ \ | | | |/ /
| | | * | cleanup: miscSergei Golubchik2019-03-121-1/+2
| | | | |
| | | * | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-161-4/+1
| | | | | | | | | | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | | | MDEV-16536 Remove shared memory transportVladislav Vaintroub2018-08-201-11/+2
|/ / / /
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-03-281-4/+1
|\ \ \ \ | |/ / /
| * | | After-merge fix for commit 98eb9518db1da854048b09d94244a982a1d32f9aMarko Mäkelä2018-03-161-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merge only covered 10.1 up to commit 4d248974e00eb915a2fc433cc6b2fb5146281594. Actually merge the changes up to commit 0a534348c75cf435d2017959855de2efa798fd0b. Also, remove the unused InnoDB field trx_t::abort_type.
* | | | 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.
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-041-2/+6
|\ \ \ \
| * \ \ \ Merge remote-tracking branch 'origin/10.2' into bb-10.2-extMonty2018-01-011-2/+6
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/make_dist.cmake.in mysql-test/r/func_json.result mysql-test/r/ps.result mysql-test/t/func_json.test mysql-test/t/ps.test sql/item_cmpfunc.h
| | * | | Merge remote-tracking branch 'origin/10.1' into 10.2Vicențiu Ciorbaru2017-12-221-2/+6
| | |\ \ \ | | | |/ /
| | | * | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2017-12-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_type_or_exit() client helper did exit(1) on error, exit(1) moved to clients. mysql_read_default_options() did exit(1) on error, error is passed through and handled now. my_str_malloc_default() did exit(1) on error, replaced my_str_ allocator functions with normal my_malloc()/my_realloc()/my_free(). sql_connect.cc did many exit(1) on hash initialisation failure. Removed error check since my_hash_init() never fails. my_malloc() did exit(1) on error. Replaced with abort(). my_load_defaults() did exit(1) on error, replaced with return 2. my_load_defaults() still does exit(0) when invoked with --print-defaults.
* | | | | Fix compilation warnings in pluginsSergei Golubchik2017-08-241-2/+0
|/ / / / | | | | | | | | | | | | | | | | | | | | * update cracklib_password_check to match the new prototype * cannot use __attribute__((format)) for my_snprintf, because we support format extensions that the compiler doesn't know about.
* | | | Merge tag 'mariadb-10.2.6' into bb-10.2-extAlexander Barkov2017-05-261-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| | * | Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-1/+1
| | |\ \
| | | * \ Merge branch '5.5' into 10.0Sergei Golubchik2017-04-211-1/+1
| | | |\ \ | | | | |/
| | | | * Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-111-1/+1
| | | | |\
| | | | | * BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING ↵Ramil Kalimullin2017-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
| | | | | * Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-161-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in a lot of code sections spanning across server, client programs, Regex libraries etc. If not handled appropriately, they can cause abnormal behaviour. ANALYSIS ======== The reported casea are the ones which are likely to result in SEGFAULT, MEMORY LEAK etc. FIX === - sprintf() has been replaced by my_snprintf() to avoid buffer overflow. - my_free() is done after checking if the pointer isn't NULL already and setting it to NULL thereafter at few places. - Buffer is ensured to be large enough to hold the data. - 'unsigned int' (aka 'uint') is replaced with 'size_t' to avoid wraparound. - Memory is freed (if not done so) after its alloced and used. - Inserted assert() for size check in InnoDb memcached code (from 5.6 onwards) - Other minor changes
* | | | | | Fixed compiler warnings and warnings from build.tagsMonty2017-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other things - Ensure that ut_d() is set to EXPR if ut_ad() is DEBUG_ASSERT() If not, we will get a crash in purge_sys_t::~purge_sys_t() as this ut_ad() code expect's that the ut_d() codes has been executed
* | | | | | Avoid DBUG_ASSERT in mysqlcheck when working with viewsMonty2017-04-181-2/+17
|/ / / / / | | | | | | | | | | | | | | | | | | | | Remove some DBUG_ASSERT that can happen if mysqlcheck is called with a view as argument
* | | | | Merge branch '10.2' into bb-10.2-connector-c-integ-submSergei Golubchik2016-09-211-40/+27
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-40/+27
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-08-101-40/+27
| | |\ \ \ | | | |/ /
| | | * | MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table namesSergei Golubchik2016-08-081-40/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a correct fix: * store properly quoted table names in tables4repair/etc lists * tell handle_request_for_tables whether the name is aalready properly quoted * test cases for all uses of fix_table_name()
* | | | | MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-251-1/+2
| | | | |
* | | | | Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-2/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* | | | | MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-1/+2
|/ / / /
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-06-281-12/+17
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-211-12/+17
| |\ \ \ | | |/ /
| | * | fix a mysql-5.5.50 merge: mysqlcheckSergei Golubchik2016-06-201-2/+2
| | | | | | | | | | | | | | | | quote identifiers correctly
| | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-06-141-13/+21
| | |\ \
| | | * | Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-161-16/+26
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== Buffer overflow is reported in a lot of code sections spanning across server, client programs, Regex libraries etc. If not handled appropriately, they can cause abnormal behaviour. ANALYSIS ======== The reported casea are the ones which are likely to result in SEGFAULT, MEMORY LEAK etc. FIX === - sprintf() has been replaced by my_snprintf() to avoid buffer overflow. - my_free() is done after checking if the pointer isn't NULL already and setting it to NULL thereafter at few places. - Buffer is ensured to be large enough to hold the data. - 'unsigned int' (aka 'uint') is replaced with 'size_t' to avoid wraparound. - Memory is freed (if not done so) after its alloced and used. - Inserted assert() for size check in InnoDb memcached code (from 5.6 onwards) - Other minor changes (cherry picked from commit 3487e20959c940cbd24429afa795ebfc8a01e94f)
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-05-041-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-04-261-1/+1
| |\ \ \ | | |/ /