MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Alexander Barkov 4703638775 MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert
Type_handler::partition_field_append_value() erroneously
passed the address of my_collation_contextually_typed_binary
to conversion functions copy_and_convert() and my_convert().

This happened because generate_partition_syntax_for_frm()
was called from mysql_create_frm_image() in the stage when
the fields in List<Create_field> can still contain unresolved
contextual collations, like "binary" in the reported crash scenario:

  ALTER TABLE t CHANGE COLUMN a a CHAR BINARY;

Fix:

1. Splitting mysql_prepare_create_table() into two parts:
   - mysql_prepare_create_table_stage1() interates through
     List<Create_field> and calls Create_field::prepare_stage1(),
     which performs basic attribute initialization, including
     context collation resolution.
   - mysql_prepare_create_table_finalize() - the rest of the
     old mysql_prepare_create_table() code.

2. Changing mysql_create_frm_image():
   It now calls:
   - mysql_prepare_create_table_stage1() in the very
     beginning, before the partition related code.
   - mysql_prepare_create_table_finalize() in the end,
    instead of the old mysql_prepare_create_table() call

3. Adding mysql_prepare_create_table() as a wrapper
   for two calls:
     mysql_prepare_create_table_stage1() ||
     mysql_prepare_create_table_finalize()
   so the code stays unchanged in the other places
   where mysql_prepare_create_table() was used.

4. Changing prototype for Type_handler::Column_definition_prepare_stage1()
   Removing arguments:
   - handler *file
   - ulonglong table_flags
   Adding a new argument instead:
   - column_definition_type_t type
   This allows to call Column_definition_prepare_stage1() and
   therefore to call mysql_prepare_create_table_stage1()
   before instantiation of a handler.
   This simplifies the code, because in case of a partitioned table,
   mysql_create_frm_image() creates a handler of the underlying
   partition first, the frees it and created a ha_partition
   instance instead.
   mysql_prepare_create_table() before the fix was called with the final
   (ha_partition) handler.

5. Moving parts of Column_definition_prepare_stage1() which
   need a pointer to handler and table_flags to
   Column_definition_prepare_stage2().
2023-03-14 11:50:52 +04:00
.github Modify PR template to encourage contribution of automated tests 2021-11-17 23:11:45 +02:00
BUILD Added detection of memory overwrite with multi_malloc 2023-02-27 19:25:44 +02:00
client Merge 10.8 into 10.9 2023-02-16 10:25:34 +02:00
cmake Merge branch '10.8' into 10.9 2023-01-31 10:37:31 +01:00
dbug Merge 10.6 into 10.8 2023-02-10 13:43:53 +02:00
debian Merge 10.8 into 10.9 2023-02-16 10:25:34 +02:00
Docs Merge 10.4 into 10.5 2022-09-26 13:34:38 +03:00
extra Merge 10.8 into 10.9 2023-02-16 10:25:34 +02:00
include Merge 10.8 into 10.9 2023-02-16 10:25:34 +02:00
libmariadb@12bd1d5511 CONC-637 Build fails when specifying -DPLUGIN_AUTH_GSSAPI_CLIENT=OFF 2023-02-28 20:15:56 +01:00
libmysqld Merge 10.8 into 10.9 2022-12-13 18:24:51 +02:00
libservices MDEV-12933 sort out the compression library chaos 2021-10-27 15:55:14 +02:00
man Merge 10.8 into 10.9 2022-11-30 12:21:10 +02:00
mysql-test MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert 2023-03-14 11:50:52 +04:00
mysys Merge 10.8 into 10.9 2023-03-06 13:38:16 +02:00
mysys_ssl Merge 10.4 into 10.5 2023-02-10 12:02:11 +02:00
plugin Merge 10.8 into 10.9 2023-02-16 10:25:34 +02:00
randgen/conf Group commit for maria engine. 2010-02-12 15:12:28 +02:00
scripts Update 10.5 HELP tables 2023-01-24 11:28:37 +11:00
sql MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert 2023-03-14 11:50:52 +04:00
sql-bench MDEV-24854: Change innodb_flush_method=O_DIRECT by default 2021-02-20 11:58:58 +02:00
sql-common Merge branch '10.6' into 10.7 2022-05-11 11:25:33 +02:00
storage Merge 10.8 into 10.9 2023-03-06 13:38:16 +02:00
strings Merge 10.8 into 10.9 2023-02-28 10:37:11 +02:00
support-files Merge branch 10.5 into 10.6 2022-12-15 09:32:54 +11:00
tests Merge branch '10.6' into 10.7 2022-10-29 19:22:04 +02:00
tpool Merge 10.6 into 10.8 2023-02-10 13:43:53 +02:00
unittest Merge 10.8 into 10.9 2022-12-07 09:43:38 +02:00
vio Merge branch '10.5' into 10.6 2022-11-02 14:33:20 +01:00
win Merge 10.6 into 10.8 2023-02-10 13:43:53 +02:00
wsrep-lib@275a0af8c5 MDEV-30419 Fix unhandled exception thrown from wsrep-lib 2023-01-19 14:55:50 +02:00
zlib zlib: remove redundant and generated files 2022-07-26 16:46:27 +02:00
.clang-format Merge 10.4 into 10.5 2019-12-27 21:17:16 +02:00
.gitattributes Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
.gitignore Merge branch '10.7' into 10.8 2022-05-11 12:21:36 +02:00
.gitlab-ci.yml Merge 10.7 into 10.8 2023-01-10 14:42:50 +02:00
.gitmodules Merge 10.4 into 10.5 2023-01-03 17:08:42 +02:00
appveyor.yml Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
BUILD-CMAKE Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
CMakeLists.txt Merge 10.6 into 10.7 2023-01-04 14:52:25 +02:00
config.h.cmake Merge 10.6 into 10.7 2022-10-13 10:05:29 +03:00
configure.cmake Merge 10.6 into 10.7 2022-10-13 10:05:29 +03:00
CONTRIBUTING.md Remove mention of Freenode 2021-09-22 07:15:08 +02:00
COPYING Update FSF Address 2019-05-11 21:29:06 +03:00
CREDITS CREDITS: re-instate Tencent Cloud 2023-01-25 16:44:26 +11:00
INSTALL-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
INSTALL-WIN-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
KNOWN_BUGS.txt Changed some MySQL names in messages to MariaDB 2018-12-09 20:49:05 +02:00
README.md Remove mention of Freenode 2021-09-22 07:15:08 +02:00
THIRDPARTY Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
VERSION bump the VERSION 2023-02-06 10:50:17 -05:00

Code status:

  • Appveyor CI status ci.appveyor.com

MariaDB: The open source relational database

MariaDB was designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

MariaDB is brought to you by the MariaDB Foundation and the MariaDB Corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.

MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.

MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.

A description of the MariaDB project and a manual can be found at:

https://mariadb.org

https://mariadb.com/kb/en/

https://mariadb.com/kb/en/mariadb-vs-mysql-features/

https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

https://mariadb.com/kb/en/new-and-old-releases/

Help

More help is available from the Maria Discuss mailing list https://launchpad.net/~maria-discuss, MariaDB's Zulip instance, https://mariadb.zulipchat.com/

Live QA for beginner contributors

MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip. From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays, anyone can ask any questions theyd like, and a live developer will be available to assist.

New contributors can ask questions any time, but we will provide immediate feedback during that interval.

Licensing


NOTE:

MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.

License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.


Bug Reports

Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org

For reporting security vulnerabilities see: https://mariadb.org/about/security-policy/

The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server