summaryrefslogtreecommitdiff
path: root/extra/perror.c
Commit message (Collapse)AuthorAgeFilesLines
* Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | 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 *'.
* Contain AIX perrorEtienne Guesnet2020-12-161-7/+13
|
* Fix build on GCC 5Etienne Guesnet2020-12-161-1/+1
|
* Add build on AIXEtienne Guesnet2020-12-161-1/+6
|
* Merge 10.4 into 10.5Marko Mäkelä2019-11-191-10/+13
|\
| * MDEV-21062 Buildbot, Windows - sporadically missing lines from mtr's "exec"Vladislav Vaintroub2019-11-151-10/+13
| | | | | | | | | | Provide own version of popen/pclose, in attempt to workaround sporadic erratic behavior of UCRT's one.
* | MDEV-12684 Show what config file a sysvar got a value fromSergei Golubchik2019-10-141-3/+4
|/ | | | | change get_one_option() prototype to pass the filename and not to pass the redundant optid.
* 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-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax ↵Sergei Golubchik2013-09-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error in include/my_global.h C++ comments in C files, and a typo in my_global.h
* | | | | Changed some MySQL names in messages to MariaDBMonty2018-12-091-3/+3
|/ / / / | | | | | | | | | | | | | | | | - Remove obsolete documentation files - Removed old obsolete information from some documentation files
* | | | Don't give warnings from perror or resolveip with safemallocMichael Widenius2018-07-291-0/+8
| | | | | | | | | | | | | | | | | | | | - Added my_end(0) before exit - Fixed typo in mysql_install_db
* | | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-1/+1
|/ / / | | | | | | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-1/+1
|\ \ \ | |/ /
| * | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-1/+1
| |\ \ |/ / /
| * | Fixed compiler error and some warnings on windowsMonty2016-08-231-1/+1
| | |
* | | MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)Sergei Golubchik2014-10-111-57/+1
|/ / | | | | | | | | | | | | | | | | | | remove: * NDB from everywhere * IM from mtr-v1 * packaging/rpm-oel and packaging/rpm-uln * few unused spec files * plug.in file * .bzrignore
* | Merge mariadb-5.5 -> 10.0-base.Igor Babaev2012-12-161-2/+3
|\ \ | |/
| * 5.3->5.5 mergeSergei Golubchik2012-11-221-1/+1
| |\
| | * Merge MySQL 5.1.66 -> MariaDB 5.1.65unknown2012-11-061-2/+3
| | |\
| * | \ mysql-5.5.28Sergei Golubchik2012-10-161-1/+2
| |\ \ \
| | * \ \ Merge of patch for Bug#13928675 from mysql-5.1.Nirbhay Choubey2012-08-071-2/+3
| | |\ \ \ | | | | |/ | | | |/|
| | | * | Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUSTNirbhay Choubey2012-08-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Fixes after Serg's review of %M extenstionsMichael Widenius2012-06-171-3/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed output to be error "error-text" instead of error - error-text extra/perror.c: Move my_handler_errors.h into include include/my_handler_errors.h: Move my_handler_errors.h into include mysql-test/r/errors.result: Updated result mysql-test/r/innodb_mysql_sync.result: Updated result mysql-test/r/myisam-system.result: Updated result mysql-test/r/myisampack.result: Updated result mysql-test/r/partition_innodb_plugin.result: Updated result mysql-test/r/ps_1general.result: Updated result mysql-test/r/trigger.result: Updated result mysql-test/r/type_bit.result: Updated result mysql-test/r/type_bit_innodb.result: Updated result mysql-test/r/type_blob.result: Updated result mysql-test/suite/archive/archive.result: Updated result mysql-test/suite/binlog/r/binlog_index.result: Updated result mysql-test/suite/binlog/r/binlog_ioerr.result: Updated result mysql-test/suite/csv/csv.result: Updated result mysql-test/suite/engines/iuds/r/type_bit_iuds.result: Updated result mysql-test/suite/federated/federated_bug_35333.result: Updated result mysql-test/suite/innodb/r/innodb-create-options.result: Updated result mysql-test/suite/innodb/r/innodb-index.result: Updated result mysql-test/suite/innodb/r/innodb-zip.result: Updated result mysql-test/suite/innodb/r/innodb.result: Updated result mysql-test/suite/innodb/r/innodb_bug13635833.result: Updated result mysql-test/suite/innodb/r/innodb_bug21704.result: Updated result mysql-test/suite/innodb/r/innodb_bug46000.result: Updated result mysql-test/suite/parts/r/partition_bit_innodb.result: Updated result mysql-test/suite/parts/r/partition_bit_myisam.result: Updated result mysql-test/suite/percona/percona_innodb_fake_changes.result: Updated result mysql-test/suite/perfschema/r/misc.result: Updated result mysql-test/suite/perfschema/r/privilege.result: Updated result mysql-test/suite/rpl/r/rpl_EE_err.result: Updated result mysql-test/suite/rpl/r/rpl_binlog_errors.result: Updated result mysql-test/suite/rpl/r/rpl_drop_db.result: Updated result sql/share/errmsg-utf8.txt: Removed 'column' from error text that was used in different context strings/my_vsnprintf.c: Move my_handler_errors.h into include Minor cleanups Changed output of %M to be error "error-text" instead of error - error-text unittest/mysys/my_vsnprintf-t.c: Updated error text
* | | | 5.3 mergeSergei Golubchik2012-01-131-1/+1
|\ \ \ \ | | |_|/ | |/| |
| * | | Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-211-2/+4
| |\ \ \ | | | |/ | | |/| | | | | Fixed up copyright messages.
| | * | Updated/added copyright headersKent Boortz2011-07-031-2/+31
| | |\ \ | | |/ / | |/| |
| * | | Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1Magne Mahre2011-03-281-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LGPL license is used in some legacy code, and to adhere to current licensing polity, we remove those files that are no longer used, and reorganize the remaining LGPL code so it will be GPL licensed from now on. Note: This patch only removed LGPL licensed files in MySQL 5.1, and is the second of a set of patches to remove LGPL from all trees. (See Bug# 11840513 for details)
* | | | move safemalloc out of dbug.Sergei Golubchik2011-12-121-0/+2
| |_|/ |/| | | | | | | | | | | | | | remeber a real backtrace for every allocation. make safemalloc to tract C++ new/delete too. collateral fixes to make the test suite pass.
* | | Updated/added copyright headersKent Boortz2011-07-041-2/+6
|\ \ \
| * | | This patch is for 5.5.Guilhem Bichot2011-06-071-3/+6
| | | | | | | | | | | | | | | | | | | | WL#5914 remove option "--all" of the "perror" program. In 5.5 we just give a deprecation warning; in trunk we remove the option.
* | | | Updated/added copyright headersKent Boortz2011-06-301-2/+2
|\ \ \ \ | |/ / / |/| | / | | |/ | |/|
| * | Updated/added copyright headersKent Boortz2011-06-301-2/+4
| |\ \ | | |/ | |/|
| | * Updated/added copyright headersKent Boortz2011-06-301-2/+3
| | |
| | * Fix for BUG#18828 - If InnoDB runs out of undo slots, Satya B2009-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it returns misleading 'table is full' Innodb returns a misleading error message "table is full" when the number of active concurrent transactions is greater than 1024. Fixed by adding errorcode "ER_TOO_MANY_CONCURRENT_TRXS" to the error codes. Innodb should return HA_TOO_MANY_CONCURRENT_TRXS to mysql which is then mapped to ER_TOO_MANY_CONCURRENT_TRXS Note: testcase is not written as this was reproducible only by changing innodb code. extra/perror.c: Add error number and message for HA_ERR_TOO_MANY_CONCURRENT_TRXS include/my_base.h: Add error number and message for HA_ERR_TOO_MANY_CONCURRENT_TRXS sql/ha_innodb.cc: Return HA_ERR_TOO_MANY_CONCURRENT_TRXS to mysql server sql/handler.cc: Add error number and message for HA_ERR_TOO_MANY_CONCURRENT_TRXS sql/share/errmsg.txt: Add error message for ER_TOO_MANY_CONCURRENT_TRXS
| | * Bug#39370: wrong output for error code 153Chad MILLER2009-02-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add all HA error numbers and descriptions to perror. Add reminder to header. This is already fixed in smarter ways in future codebases, and this codebase is unlikely to change, since new development is forbidden here.
* | | Bug#11933945 REMOVE LGPL LICENSED FILES IN MYSQL 5.5Magne Mahre2011-03-291-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LGPL license is used in some legacy code, and to adhere to current licensing polity, we remove those files that are no longer used, and reorganize the remaining LGPL code so it will be GPL licensed from now on. Note: This patch only removed LGPL licensed files in MySQL 5.5 and later, and is the third of a set of patches to remove LGPL from all trees. (See Bug# 11840513 for details)
* | | WL#5486: Remove code for unsupported platformsDavi Arnaut2010-07-151-5/+1
| | | | | | | | | | | | Remove Netware specific code.
* | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-06-101-5/+5
|\ \ \ | |/ /
| * | Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced. client/mysql.cc: Remove now-unnecessary casts. Break up large strings. client/mysql_upgrade.c: Remove now-unnecessary casts. client/mysqladmin.cc: Remove now-unnecessary casts. Break up large strings. client/mysqlbinlog.cc: Remove now-unnecessary casts. client/mysqlcheck.c: Remove now-unnecessary casts. client/mysqldump.c: Remove now-unnecessary casts. client/mysqlimport.c: Remove now-unnecessary casts. client/mysqlshow.c: Remove now-unnecessary casts. client/mysqlslap.c: Remove now-unnecessary casts. client/mysqltest.cc: Remove now-unnecessary casts. extra/comp_err.c: Remove now-unnecessary casts. extra/my_print_defaults.c: Remove now-unnecessary casts. Break up large strings. extra/mysql_waitpid.c: Remove now-unnecessary casts. extra/perror.c: Remove now-unnecessary casts. extra/resolve_stack_dump.c: Remove now-unnecessary casts. extra/resolveip.c: Remove now-unnecessary casts. include/my_getopt.h: Use a void pointer type as the opaque type to avoid problems with type incompatibility -- GCC issues warnings when the type name is not type compatible with a operand. As a side bonus, a explicit cast won't be necessary anymore. include/sslopt-longopts.h: Remove now-unnecessary casts. Break up large strings. mysys/my_getopt.c: Update opaque type and introduce a type definition for the argument to my_getopt_register_get_addr. server-tools/instance-manager/options.cc: Remove now-unnecessary casts. sql/mysqld.cc: Remove now-unnecessary casts. Break up large strings. Update mysql_getopt_value prototype (the old prototype was different from the definition anyway). sql/sql_plugin.cc: The type of a pointer to a function must be compatible with the pointed-to function type, otherwise the behavior is undefined. sql/table.cc: The variable buf pointer to pointer to pointer to constant char could improperly alias a incompatible type in call to fix_type_ pointers. Since this was actually dead code, it is simply removed. sql/unireg.cc: Remove call to get_form_pos. The code creates a new FRM file which is always truncated and writes the form position as 0. Hence, no need to retrieve it, we now for sure it is 0. storage/archive/archive_reader.c: Remove now-unnecessary casts. storage/myisam/ft_nlq_search.c: Read weight directly from the buffer. storage/myisam/fulltext.h: Add explanation about the type duality of a key buffer. Add accessor macro to retrieve a FT float value. storage/myisam/mi_test1.c: Remove now-unnecessary casts. storage/myisam/myisam_ftdump.c: Read weight directly from the buffer. storage/myisam/myisamchk.c: Remove now-unnecessary casts. storage/myisam/myisamlog.c: A pointer to char was used to alias a pointer to pointer to unsigned char, thus violating strict aliasing rules. storage/myisam/myisampack.c: Remove now-unnecessary casts. strings/decimal.c: Remove aliasing violation, printing the value is enough for debugging purposes. tests/mysql_client_test.c: Remove now-unnecessary casts.
* | | Bug #53445 Build with -Wall and fix warnings that it generatesTor Didriksen2010-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add -Wall to gcc/g++ Fix most warnings reported in dbg and opt mode. cmd-line-utils/libedit/filecomplete.c: Remove unused auto variables. configure.cmake: Add -Wall to gcc. extra/comp_err.c: Cast to correct type. extra/perror.c: Fix segfault (but warnings about deprecated features remain) extra/yassl/taocrypt/include/runtime.hpp: Comparing two literals was reported as undefined behaviour. include/my_global.h: Add a template for aligning character buffers. mysys/lf_alloc-pin.c: Initialize pointer. sql/mysqld.cc: Use UNINIT_VAR rather than LINT_INIT. sql/partition_info.cc: Use UNINIT_VAR rather than LINT_INIT. sql/rpl_handler.cc: Use char[] rather than unsigned long[] array for placement buffer. sql/spatial.cc: Use char[] rather than unsigned void*[] array for placement buffer. sql/spatial.h: Use char[] rather than unsigned void*[] array for placement buffer. sql/sql_partition.cc: Initialize auto variable. sql/sql_table.cc: Initialize auto variables. Add parens around assignment within if() sql/sys_vars.cc: Use UNINIT_VAR. storage/innobase/os/os0file.c: Init first slot in auto variable. storage/myisam/mi_create.c: Use UNINIT_VAR rather than LINT_INIT. storage/myisam/mi_open.c: Remove (wrong) casting. storage/myisam/mi_page.c: Remove (wrong) casting. storage/myisam/mi_search.c: Cast to uchar* rather than char*. strings/ctype-ucs2.c: Use UNINIT_VAR rather than LINT_INIT. Add (uchar*) casting.
* | | Bug#10143 Perror not showing error descriptionMarc Alff2010-02-231-0/+48
|/ / | | | | | | | | Backport to 5.5.99
* | Make help text for perror more accurate. (Bug #34574)Jim Winstead2009-04-281-1/+1
| |
* | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-11-271-2/+38
|\ \ | |/
| * Bug#34825 perror on windows doesn't know about win32 error codesSergey Glukhov2008-11-271-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | extended perror to enable printing of Win32 system errors extra/perror.c: extended perror to enable printing of Win32 system errors mysql-test/r/perror-win.result: test result mysql-test/t/perror-win.test: test case
* | perror.c:unknown2008-03-281-0/+1
| | | | | | | | | | | | | | | | fixed warning in 5.1-marvel in fix for bug 25177 extra/perror.c: fixed warning in 5.1-marvel in fix for bug 25177
* | Fixed problem with non-synchronous error listsunknown2008-03-281-49/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in perror and handler descriptors (BUG#25177) Fixed problem of masking mysql error by system error in perror (BUG#23028) extra/perror.c: Used common handlers error list. Fixed BUG#23028 ignoring mysql error in case of OS and mysql error codes overlapping. include/my_base.h: Added errors of maria engine. Fixed incorrect comment in #define (can be cause of seriouse problems) include/my_handler.h: Added ability to be included into C++ code. mysys/my_handler.c: Error texts moved to the separate files. mysys/my_handler_errors.h: New BitKeeper file ``mysys/my_handler_errors.h''