summaryrefslogtreecommitdiff
path: root/client/mysqlshow.c
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-26713 set console codepage to what user set in --default-character-setVladislav Vaintroub2021-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | If someone on whatever reasons uses --default-character-set=cp850, this will avoid incorrect display, and inserting incorrect data. Adjusting console codepage sometimes also needs to happen with --default-charset=auto, on older Windows. This is because autodetection is not always exact. For example, console codepage on US editions of Windows is 437. Client autodetects it as cp850, a rather loose approximation, given 46 code point differences. We change the console codepage to cp850, so that there is no discrepancy. That fix is currently Windows-only, and serves people who used combination of chcp to achieve WYSIWYG effect (although, this would mostly likely used with utf8 in the past) Now, --default-character-set would be a replacement for that. Fix fs_character_set() detection of current codepage.
* MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-2/+2
| | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* MDEV-14974: --port ignored for --host=localhostBrandon Nesterenko2021-05-111-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= MariaDB's command line utilities (e.g., mysql, mysqldump, etc) silently ignore connection property options (e.g., --port and --socket) when protocol is not explicitly set via the command-line for localhost connections. Fix: === If connection properties are specified without a protocol, override the protocol to be consistent. For example, if --port is specified, automatically set protocol=tcp. Caveats: ======= * When multiple connection properties are specified, nothing is overridden * If protocol is is set via the command-line, its value is used Reviewers: ======== Sergei Golubchik <serg@mariadb.com> Vladislav Vaintroub <wlad@mariadb.com>
* Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-3/+8
| | | | | | | | | | | | | | | | | | | | | 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 *'.
* perfschema memory related instrumentation changesSergei Golubchik2020-03-101-1/+1
|
* 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-1/+3
|\
| * Merge 10.2 into 10.3Marko Mäkelä2019-06-191-0/+2
| |\
| | * MDEV-19750 mysql command wrong encodingVladislav Vaintroub2019-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MDEV-14101 Provide an option to select TLS protocol versionGeorg Richter2019-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Server and command line tools now support option --tls_version to specify the TLS version between client and server. Valid values are TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3 or a combination of them. E.g. --tls_version=TLSv1.3 --tls_version=TLSv1.2,TLSv1.3 In case there is a gap between versions, the lowest version will be used: --tls_version=TLSv1.1,TLSv1.3 -> Only TLSv1.1 will be available. If the used TLS library doesn't support the specified TLS version, it will use the default configuration. Limitations: SSLv3 is not supported. The default configuration doesn't support TLSv1.0 anymore. TLSv1.3 protocol currently is only supported by OpenSSL 1.1.0 (client and server) and GnuTLS 3.6.5 (client only). Overview of TLS implementations and protocols Server: +-----------+-----------------------------------------+ | Library | Supported TLS versions | +-----------+-----------------------------------------+ | WolfSSL | TLSv1.1, TLSv1,2 | +-----------+-----------------------------------------+ | OpenSSL | (TLSv1.0), TLSv1.1, TLSv1,2, TLSv1.3 | +-----------+-----------------------------------------+ | LibreSSL | (TLSv1.0), TLSv1.1, TLSv1,2, TLSv1.3 | +-----------+-----------------------------------------+ Client (MariaDB Connector/C) +-----------+-----------------------------------------+ | Library | Supported TLS versions | +-----------+-----------------------------------------+ | GnuTLS | (TLSv1.0), TLSv1.1, TLSv1.2, TLSv1.3 | +-----------+-----------------------------------------+ | Schannel | (TLSv1.0), TLSv1.1, TLSv1.2 | +-----------+-----------------------------------------+ | OpenSSL | (TLSv1.0), TLSv1.1, TLSv1,2, TLSv1.3 | +-----------+-----------------------------------------+ | LibreSSL | (TLSv1.0), TLSv1.1, TLSv1,2, TLSv1.3 | +-----------+-----------------------------------------+
* | | 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
| | | * | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-161-2/+1
| | | | | | | | | | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | | | Changed some MySQL names in messages to MariaDBMonty2018-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | - Remove obsolete documentation files - Removed old obsolete information from some documentation files
* | | | | MDEV-16536 Remove shared memory transportVladislav Vaintroub2018-08-201-17/+2
|/ / / /
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-03-281-2/+1
|\ \ \ \ | |/ / /
| * | | After-merge fix for commit 98eb9518db1da854048b09d94244a982a1d32f9aMarko Mäkelä2018-03-161-2/+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-3/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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 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.
* | | 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 '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-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | MDEV-9293 - Use MariaDB's Connector/C in serverVladislav Vaintroub2016-08-251-1/+3
| | | |
* | | | Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-191-3/+1
| | | | | | | | | | | | | | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* | | | MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-191-1/+3
|/ / /
* | | Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-211-20/+22
|\ \ \ | |/ /
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-06-141-20/+22
| |\ \
| | * | Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUESShishir Jaiswal2016-05-161-17/+19
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * Bug#21973610Harin Vadodaria2016-04-291-3/+3
| | | | | | | | | | | | Post push fix : Fixing i_main.mysqlshow failure.
* | | Merge branch '5.5' into 10.0Sergei Golubchik2016-04-261-1/+1
|\ \ \ | |/ /
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-04-201-1/+1
| |\ \ | | |/
| | * WL#9072: Backport WL#8785 to 5.5Ramil Kalimullin2016-02-191-5/+5
| | |
* | | Merge branch '5.5' into 10.0Sergei Golubchik2015-12-131-16/+23
|\ \ \ | |/ /
| * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2015-12-091-16/+23
| |\ \ | | |/
| | * Bug#21973610: BUFFER OVERFLOW ISSUESHarin Vadodaria2015-11-061-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Reviewed-By : Venkata S Murthy Sidagam <venkata.sidagam@oracle.com>
| | * Bug #21235226 : THE --ENABLE-CLEARTEXT-PLUGIN IS NOTArun Kuruvila2015-10-141-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMPLEMENTED IN ALL CLIENT PROGRAMS Description: Option "enable-cleartext-plugin" is not available for the following client utilities:- mysqldump mysqlimport mysqlshow mysqlcheck Analysis: The unavailability of this option limits the features like PAM authentication from using the above mentioned utilities. Fix: Option "enable-cleartext-plugin" is implemented in the above mentioned client utilities.
| | * Merge of patch for Bug#13928675 from mysql-5.1.Nirbhay Choubey2012-08-071-2/+2
| | |\
| | | * Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUSTNirbhay Choubey2012-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHOW 2012 INSTEAD OF 2011 * Added a new macro to hold the current year : COPYRIGHT_NOTICE_CURRENT_YEAR * Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro to take the initial year as parameter and pick current year from the above mentioned macro.
| | * | Manual merge from mysql-5.1.Alexander Nozdrin2011-07-221-1/+1
| | |\ \ | | | |/
| | | * Manual merge from mysql-5.0.Alexander Nozdrin2011-07-221-3/+3
| | | |\
| | | | * For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENTAlexander Nozdrin2011-07-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TOOLS Backport a fix for Bug 57094 from 5.5. The following revision was backported: # revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c # parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48 # committer: Alexander Nozdrin <alexander.nozdrin@oracle.com> # branch nick: mysql-5.5-bugteam-bug57094 # timestamp: Wed 2010-10-06 19:06:13 +0400 # message: # Fix for Bug 57094 (Copyright notice incorrect?). # # The fix is to: # - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place # to specify copyright notice; # - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE # in programs.
| | * | | Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | |\ \ \ | | | |/ /
| | | * | Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | | |\ \ | | | | |/