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
Sachin d00f19e832 MDEV-371 Unique Index for long columns
This patch implements engine independent unique hash index.

Usage:- Unique HASH index can be created automatically for blob/varchar/test column whose key
 length > handler->max_key_length()
or it can be explicitly specified.

  Automatic Creation:-
   Create TABLE t1 (a blob unique);
  Explicit Creation:-
   Create TABLE t1 (a int , unique(a) using HASH);

Internal KEY_PART Representations:-
 Long unique key_info will have 2 representations.
 (lets understand this with an example create table t1(a blob, b blob , unique(a, b)); )

 1. User Given Representation:- key_info->key_part array will be similar to what user has defined.
 So in case of example it will have 2 key_parts (a, b)

 2. Storage Engine Representation:- In this case there will be only one key_part and it will point to
 HASH_FIELD. This key_part will be always after user defined key_parts.

 So:- User Given Representation          [a] [b] [hash_key_part]
                  key_info->key_part ----^
  Storage Engine Representation          [a] [b] [hash_key_part]
                  key_info->key_part ------------^

 Table->s->key_info will have User Given Representation, While table->key_info will have Storage Engine
 Representation.Representation can be changed into each other by calling re/setup_keyinfo_hash function.

Working:-

1. So when user specifies HASH_INDEX or key_length is > handler->max_key_length(), In mysql_prepare_create_table
One extra vfield is added (for each long unique key). And key_info->algorithm is set to HA_KEY_ALG_LONG_HASH.

2. In init_from_binary_frm_image values for hash_keypart is set (like fieldnr , field and flags)

3. In parse_vcol_defs, HASH_FIELD->vcol_info is created. Item_func_hash is used with list of Item_fields,
   When Explicit length is given by user then Item_left is used to concatenate Item_field values.

4. In ha_write_row/ha_update_row check_duplicate_long_entry_key is called which will create the hash key from
table->record[0] and then call ha_index_read_map , if we found duplicated hash , we will compare the result
field by field.
2019-02-22 00:35:40 +01:00
BUILD Backport BUILD scripts from 10.4 2019-02-06 22:18:20 +02:00
client MDEV-7597 Expiration of user passwords 2019-02-21 15:04:03 +01:00
cmake try harder to link unix_socket plugin statically 2019-02-21 15:04:03 +01:00
dbug Misc. typos 2018-04-05 15:26:57 +04:00
debian MDEV-12484 Enable unix socket authentication by default 2019-02-21 15:04:03 +01:00
Docs Merge 10.3 into 10.4 2019-01-06 17:43:02 +02:00
extra move aws_sdk to extra/ 2019-02-21 14:48:04 +01:00
include MDEV-371 Unique Index for long columns 2019-02-22 00:35:40 +01:00
libmariadb@4aad20db15 update C/C 2019-02-21 15:04:03 +01:00
libmysqld Merge branch '10.4' into bb-10.4-mdev16188 2019-02-15 20:31:58 +01:00
libservices MDEV-5313 Improving audit api. 2018-12-12 01:49:39 +04:00
man Merge 10.3 into 10.4 2019-01-24 22:42:35 +02:00
mysql-test MDEV-371 Unique Index for long columns 2019-02-22 00:35:40 +01:00
mysys Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
mysys_ssl Windows : fix broken build with OpenSSL 2018-09-08 20:36:31 +01:00
pcre fix bundled pcre unit tests 2018-08-13 12:14:56 +02:00
plugin try harder to link unix_socket plugin statically 2019-02-21 15:04:03 +01:00
randgen/conf Group commit for maria engine. 2010-02-12 15:12:28 +02:00
scripts mysql_install_db: make sure the variable's value is visible 2019-02-21 16:54:31 +01:00
sql MDEV-371 Unique Index for long columns 2019-02-22 00:35:40 +01:00
sql-bench Added more test to sql-bench 2018-04-30 14:05:27 +03:00
sql-common Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
storage MDEV-371 Unique Index for long columns 2019-02-22 00:35:40 +01:00
strings MDEV-5313 Improving audit API. 2019-01-18 03:18:02 +04:00
support-files Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
tests Merge branch '10.4' into bb-10.4-mdev16188 2019-02-03 18:41:18 -08:00
unittest Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
vio MDEV-17926 FederatedX TODO is obsolete 2018-12-12 00:31:04 +01:00
win Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
wsrep-lib@0b09871ad5 Fixed replaying bugs found with multimaster load 2019-02-19 17:09:19 +02:00
zlib postmerge rollbacks and fixes 2019-01-31 19:28:38 +01:00
.gitattributes Merge branch '10.0' into 10.1 2018-05-05 14:01:59 +02:00
.gitignore Added generated wsrep_xxx files to .gitignore 2019-02-06 22:18:20 +02:00
.gitmodules Galera4 2019-01-23 15:30:00 +04:00
.travis.compiler.sh travis: upgrade Ubuntu target dist to 16.04 Xenial 2018-12-26 16:26:36 +00:00
.travis.yml Merge 10.3 into 10.4 2019-01-14 09:40:12 +02:00
appveyor.yml Appveyor configuration and addition of badge 2019-01-10 11:58:02 +01:00
BUILD-CMAKE Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
CMakeLists.txt move aws_sdk to extra/ 2019-02-21 14:48:04 +01:00
config.h.cmake Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
configure.cmake Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
CONTRIBUTING.md Add CONTRIBUTING file and modify README file about live QA regarding new contributors 2018-12-04 23:15:33 +04:00
COPYING Use a new version of "COPYING", the GPL text. 2010-03-04 14:26:27 +01:00
COPYING.thirdparty Correct FSF address 2017-03-10 18:21:29 +01:00
CREDITS Update contributors 2018-09-10 16:47:44 +04:00
EXCEPTIONS-CLIENT MDEV-5645 MariaDB-5.5.35 - references are made to an "EXCEPTIONS-CLIENT" file but it does not exist 2014-05-31 13:18:56 +02: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 Merge 10.3 into 10.4 2019-01-14 09:40:12 +02:00
VERSION bump the VERSION 2019-02-11 10:43:57 -05:00

Code status:

  • Travis CI status travis-ci.org (10.4 branch)
  • Appveyor CI status ci.appveyor.com

MariaDB: drop-in replacement for MySQL

MariaDB is 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.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/library/new-and-old-releases/

https://mariadb.org/

As MariaDB is a full replacement of MySQL, the MySQL manual at http://dev.mysql.com/doc is generally applicable.

Help

More help is available from the Maria Discuss mailing list https://launchpad.net/~maria-discuss and the #maria IRC channel on Freenode.

Live QA for beginner contributors

MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip and IRC. 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.

License


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, COPYING.LESSER, and COPYING.thirdparty files.


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/

Bugs in the MySQL code can also be submitted at: https://bugs.mysql.com

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