Commit graph

112 commits

Author SHA1 Message Date
Oleksandr Byelkin
6197e6abc4 Merge branch '10.11' into 11.2 2024-08-21 07:58:46 +02:00
Vladislav Vaintroub
e997bf58fb MDEV-34714 perror-win test failure on localized Windows
Let perror produce OS error messages in English
2024-08-09 01:15:45 +02:00
Oleksandr Byelkin
2447dda2c0 Merge branch '10.11' into 11.1 2024-07-08 22:40:16 +02:00
Souradeep Saha
10fbd1ce51 MDEV-34168: Extend perror utility to print link to KB page
As all MariaDB Server errors now have a dedicated web page, the
perror utility is extended to include a link to the KB page of
the corresponding error code.

All new code of the whole pull request, including one or several
files that are either new files or modified ones, are contributed
under the BSD-new license. I am contributing on behalf of my
employer Amazon Web Services, Inc.
2024-06-18 13:25:39 +10:00
Sergei Golubchik
eb26bf6e09 unify client/tool version string
it should now always be

/path/to/exe Ver <tool version> Distrib <server version> for <OS> (<ARCH>)

in all tools and clients
2023-01-19 12:39:28 +01:00
Monty
5d6ad2ad66 Added 'const' to arguments in get_one_option and find_typeset()
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 *'.
2021-02-08 12:16:29 +02:00
Etienne Guesnet
6bb3949eb3 Contain AIX perror 2020-12-16 08:07:04 +11:00
Etienne Guesnet
2ce48f0678 Fix build on GCC 5 2020-12-16 08:07:04 +11:00
Etienne Guesnet
2f5d372444 Add build on AIX 2020-12-16 08:07:04 +11:00
Marko Mäkelä
a9846f3299 Merge 10.4 into 10.5 2019-11-19 10:45:28 +08:00
Vladislav Vaintroub
6df0bb7d38 MDEV-21062 Buildbot, Windows - sporadically missing lines from mtr's "exec"
Provide own version of popen/pclose, in attempt to workaround
sporadic erratic behavior of UCRT's one.
2019-11-15 15:39:31 +01:00
Sergei Golubchik
f217612fad MDEV-12684 Show what config file a sysvar got a value from
change get_one_option() prototype to pass the filename and
not to pass the redundant optid.
2019-10-14 10:29:30 +02:00
Oleksandr Byelkin
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Monty
c82855d882 Changed some MySQL names in messages to MariaDB
- Remove obsolete documentation files
- Removed old obsolete information from some documentation files
2018-12-09 20:49:05 +02:00
Michael Widenius
0c745c743c Don't give warnings from perror or resolveip with safemalloc
- Added my_end(0) before exit
- Fixed typo in mysql_install_db
2018-07-29 10:56:11 +03:00
Vladislav Vaintroub
56e7b7eaed Make possible to use clang on Windows (clang-cl)
-DWITH_ASAN can be used as well now, on x64

Fix many clang-cl warnings.
2018-02-20 21:17:36 +00:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Sergei Golubchik
6b1863b830 Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
Monty
4da2b83af7 Fixed compiler error and some warnings on windows 2016-08-23 15:03:31 +03:00
Sergei Golubchik
7f5e51b940 MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove:
* NDB from everywhere
* IM from mtr-v1
* packaging/rpm-oel and packaging/rpm-uln
* few unused spec files
* plug.in file
* .bzrignore
2014-10-11 18:53:06 +02:00
Sergei Golubchik
42f56557f5 MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax error in include/my_global.h
C++ comments in C files, and a typo in my_global.h
2013-09-09 19:31:29 +02:00
Igor Babaev
7760efad74 Merge mariadb-5.5 -> 10.0-base. 2012-12-16 16:49:19 -08:00
Sergei Golubchik
a48a91d90f 5.3->5.5 merge 2012-11-22 10:19:31 +01:00
unknown
7c23d6d0c6 Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
Sergei Golubchik
ee9afef271 mysql-5.5.28 2012-10-16 13:04:42 +02:00
Nirbhay Choubey
ffdc4bc8cd Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
Nirbhay Choubey
5ad8292c63 Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST
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.
2012-08-07 18:58:19 +05:30
Michael Widenius
9ebda8764d Fixes after Serg's review of %M extenstions
- 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
2012-06-17 15:34:39 +03:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Sergei Golubchik
6cc9d0ffa0 move safemalloc out of dbug.
remeber a real backtrace for every allocation.
make safemalloc to tract C++ new/delete too.
collateral fixes to make the test suite pass.
2011-12-12 22:58:24 +01:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
Kent Boortz
027b5f1ed4 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
68f00a5686 Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
44135d4725 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Kent Boortz
789aa8c485 Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Guilhem Bichot
af5c95c299 This patch is for 5.5.
WL#5914 remove option "--all" of the "perror" program.
In 5.5 we just give a deprecation warning; in trunk we remove the option.
2011-06-07 09:53:37 +02:00
Magne Mahre
517c5c247c Bug#11933945 REMOVE LGPL LICENSED FILES IN MYSQL 5.5
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)
2011-03-29 14:43:49 +02:00
Magne Mahre
9ff72a1acf Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1
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)
2011-03-28 10:47:30 +02:00
Davi Arnaut
07e7b4d6fe WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
db2fe44c84 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-10 22:30:49 -03:00
Davi Arnaut
6f3a540c37 Bug#42733: Type-punning warnings when compiling MySQL --
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.
2010-06-10 17:16:43 -03:00
Tor Didriksen
85da8956e6 Bug #53445 Build with -Wall and fix warnings that it generates
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.
2010-05-26 16:12:23 +02:00
Marc Alff
c7fa0c1b34 Bug#10143 Perror not showing error description
Backport to 5.5.99
2010-02-23 17:45:49 -07:00
Satya B
342553252f Fix for BUG#18828 - If InnoDB runs out of undo slots,
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
2009-07-17 14:13:53 +05:30
Jim Winstead
46154071c4 Make help text for perror more accurate. (Bug #34574) 2009-04-28 11:16:44 -07:00