# storage

value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbufferdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of background batchesdzfxux0dzfxuxbuffer_flush_backgrounddzfxuxset_memberqjzxq


value:
  qvvbq dzfxuxOFFdzfxuxOFF,ONdzfxuxONdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxONdzfxuxIf set to 0, MariaDB will not perform large SELECTs. See max_join_size for details. If max_join_size is set to anything but DEFAULT, sql_big_selects is automatically set to 0. If sql_big_selects is again set, max_join_size will be ignored.dzfxuxSQL_BIG_SELECTSdzfxuxSESSIONdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxuxmax_rows=3484dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16770645dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux4815dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxREFERENTIAL_CONSTRAINTSdzfxuxYdzfxux11qjzxq


value:
  qvvbqCONSTRAINT_CATALOGdzfxuxvarchar(512)qjzxqqvvbqCONSTRAINT_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqCONSTRAINT_NAMEdzfxuxvarchar(64)qjzxqqvvbqTABLE_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqTABLE_NAMEdzfxuxvarchar(64)qjzxqqvvbqCONSTRAINT_TYPEdzfxuxvarchar(64)qjzxq


value:
  qvvbqREQUIREDdzfxux8388608dzfxux dzfxux8388608dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux9223372036854775807dzfxux0dzfxux8388608dzfxuxThe size of the buffers used [NOT] IN evaluation via partial matchingdzfxuxROWID_MERGE_BUFF_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqOPTIONALdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxdzfxuxUser supplied stopword table name, effective in the session level.dzfxuxINNODB_FT_USER_STOPWORD_TABLEdzfxuxSESSIONdzfxuxVARCHARdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux dzfxuxOpenSSL 1.1.1n  15 Mar 2022dzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxVersion of the used SSL librarydzfxuxVERSION_SSL_LIBRARYdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq dzfxuxmax_rows=3056627021327183 transactional=0dzfxux2025-11-30 21:50:20dzfxux0dzfxux8192dzfxux8192dzfxux4503599627288576dzfxux137438945280dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux2025-11-30 21:50:20dzfxux dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxCOLUMNSdzfxuxYdzfxux11qjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbuffer_page_iodzfxux dzfxux dzfxux dzfxux dzfxuxNumber of Insert Buffer Bitmap Pages writtendzfxux0dzfxuxbuffer_page_written_ibuf_bitmapdzfxuxcounterqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxevents_statements_summary_by_digestdzfxuxNdzfxux10qjzxq


value:
  qvvbq0dzfxux1dzfxux0dzfxux2949124dzfxux11dzfxuxIDqjzxqqvvbq0dzfxux1dzfxux1dzfxux2949124dzfxux11dzfxuxFOR_NAMEqjzxqqvvbq0dzfxux1dzfxux2dzfxux2949124dzfxux11dzfxuxREF_NAMEqjzxqqvvbq4dzfxux6dzfxux3dzfxux0dzfxux11dzfxuxN_COLSqjzxqqvvbq0dzfxux1dzfxux0dzfxux2949124dzfxux12dzfxuxIDqjzxqqvvbq4dzfxux6dzfxux1dzfxux0dzfxux12dzfxuxPOSqjzxqqvvbq0dzfxux1dzfxux2dzfxux2949124dzfxux12dzfxuxFOR_COL_NAMEqjzxqqvvbq0dzfxux1dzfxux3dzfxux2949124dzfxux12dzfxuxREF_COL_NAMEqjzxqqvvbq4dzfxux6dzfxux0dzfxux0dzfxux13dzfxuxSPACEqjzxqqvvbq0dzfxux1dzfxux1dzfxux2949124dzfxux13dzfxuxNAMEqjzxqqvvbq4dzfxux6dzfxux2dzfxux0dzfxux13dzfxuxFLAGSqjzxqqvvbq4dzfxux6dzfxux0dzfxux0dzfxux14dzfxuxSPACEqjzxqqvvbq0dzfxux1dzfxux1dzfxux2949124dzfxux14dzfxuxPATHqjzxqqvvbq8dzfxux6dzfxux0dzfxux0dzfxux15dzfxuxTABLE_IDqjzxqqvvbq4dzfxux6dzfxux1dzfxux0dzfxux15dzfxuxPOSqjzxqqvvbq4dzfxux6dzfxux2dzfxux0dzfxux15dzfxuxBASE_POSqjzxqqvvbq192dzfxux12dzfxux0dzfxux5439759dzfxux16dzfxuxdatabase_nameqjzxqqvvbq597dzfxux12dzfxux1dzfxux5443855dzfxux16dzfxuxtable_nameqjzxqqvvbq4dzfxux3dzfxux2dzfxux526087dzfxux16dzfxuxlast_updateqjzxqqvvbq8dzfxux6dzfxux3dzfxux1800dzfxux16dzfxuxn_rowsqjzxqqvvbq8dzfxux6dzfxux4dzfxux1800dzfxux16dzfxuxclustered_index_sizeqjzxqqvvbq8dzfxux6dzfxux5dzfxux1800dzfxux16dzfxuxsum_of_other_index_sizesqjzxqqvvbq192dzfxux12dzfxux0dzfxux5439759dzfxux17dzfxuxdatabase_nameqjzxqqvvbq597dzfxux12dzfxux1dzfxux5443855dzfxux17dzfxuxtable_nameqjzxqqvvbq192dzfxux12dzfxux2dzfxux5439759dzfxux17dzfxuxindex_nameqjzxqqvvbq4dzfxux3dzfxux3dzfxux526087dzfxux17dzfxuxlast_updateqjzxqqvvbq192dzfxux12dzfxux4dzfxux5439759dzfxux17dzfxuxstat_nameqjzxqqvvbq8dzfxux6dzfxux5dzfxux1800dzfxux17dzfxuxstat_valueqjzxqqvvbq8dzfxux6dzfxux6dzfxux1544dzfxux17dzfxuxsample_sizeqjzxqqvvbq3072dzfxux12dzfxux7dzfxux5443855dzfxux17dzfxuxstat_descriptionqjzxqqvvbq8dzfxux6dzfxux0dzfxux1800dzfxux18dzfxuxtransaction_idqjzxqqvvbq8dzfxux6dzfxux1dzfxux1800dzfxux18dzfxuxcommit_idqjzxqqvvbq7dzfxux3dzfxux2dzfxux526087dzfxux18dzfxuxbegin_timestampqjzxqqvvbq7dzfxux3dzfxux3dzfxux526087dzfxux18dzfxuxcommit_timestampqjzxqqvvbq1dzfxux6dzfxux4dzfxux1022dzfxux18dzfxuxisolation_levelqjzxqqvvbq4dzfxux6dzfxux0dzfxux1795dzfxux19dzfxuxdomain_idqjzxqqvvbq8dzfxux6dzfxux1dzfxux1800dzfxux19dzfxuxsub_idqjzxqqvvbq4dzfxux6dzfxux2dzfxux1795dzfxux19dzfxuxserver_idqjzxqqvvbq8dzfxux6dzfxux3dzfxux1800dzfxux19dzfxuxseq_noqjzxq


value:
  qvvbqREQUIREDdzfxux262144dzfxux dzfxux262144dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux2147483647dzfxux1dzfxux262144dzfxuxWhen reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeksdzfxuxREAD_RND_BUFFER_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxevents_stages_historydzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxuxadd_drop_reorderdzfxuxnever,add_last,add_drop_reorderdzfxuxadd_drop_reorderdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxFile format constraint for ALTER TABLEdzfxuxINNODB_INSTANT_ALTER_COLUMN_ALLOWEDdzfxuxGLOBALdzfxuxENUMdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux8192dzfxux dzfxux8192dzfxuxCOMPILE-TIMEdzfxux dzfxux512dzfxux16384dzfxux512dzfxux dzfxuxRedo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO sizedzfxuxINNODB_LOG_WRITE_AHEAD_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq0dzfxux dzfxux0dzfxux1dzfxux0dzfxux0dzfxux dzfxux dzfxuxchange_bufferdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of insert merged operations discardeddzfxux0dzfxuxibuf_merges_discard_insertdzfxuxstatus_counterqjzxq


value:
  qvvbqPLUGIN_NAMEdzfxuxvarchar(64)qjzxqqvvbqPLUGIN_VERSIONdzfxuxvarchar(20)qjzxqqvvbqPLUGIN_STATUSdzfxuxvarchar(16)qjzxqqvvbqPLUGIN_TYPEdzfxuxvarchar(80)qjzxqqvvbqPLUGIN_TYPE_VERSIONdzfxuxvarchar(20)qjzxqqvvbqPLUGIN_LIBRARYdzfxuxvarchar(64)qjzxqqvvbqPLUGIN_LIBRARY_VERSIONdzfxuxvarchar(20)qjzxqqvvbqPLUGIN_AUTHORdzfxuxvarchar(64)qjzxqqvvbqPLUGIN_DESCRIPTIONdzfxuxlongtextqjzxqqvvbqPLUGIN_LICENSEdzfxuxvarchar(80)qjzxqqvvbqLOAD_OPTIONdzfxuxvarchar(64)qjzxqqvvbqPLUGIN_MATURITYdzfxuxvarchar(12)qjzxqqvvbqPLUGIN_AUTH_VERSIONdzfxuxvarchar(80)qjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxTurn on a monitor counterdzfxuxINNODB_MONITOR_ENABLEdzfxuxGLOBALdzfxuxVARCHARdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxdzfxuxWSREP_NOTIFY_CMDdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq dzfxuxmax_rows=16739332190299048 transactional=0dzfxux2025-11-30 21:50:20dzfxux0dzfxux8192dzfxux8192dzfxux4503599627288576dzfxux137438945280dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux2025-11-30 21:50:20dzfxux dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxPROCESSLISTdzfxuxYdzfxux11qjzxq


value:
  qvvbqGROUP_IDdzfxuxint(6)qjzxqqvvbqTHREAD_CREATIONSdzfxuxbigint(19)qjzxqqvvbqTHREAD_CREATIONS_DUE_TO_STALLdzfxuxbigint(19)qjzxqqvvbqWAKESdzfxuxbigint(19)qjzxqqvvbqWAKES_DUE_TO_STALLdzfxuxbigint(19)qjzxqqvvbqTHROTTLESdzfxuxbigint(19)qjzxqqvvbqSTALLSdzfxuxbigint(19)qjzxqqvvbqPOLLS_BY_LISTENERdzfxuxbigint(19)qjzxqqvvbqPOLLS_BY_WORKERdzfxuxbigint(19)qjzxqqvvbqDEQUEUES_BY_LISTENERdzfxuxbigint(19)qjzxqqvvbqDEQUEUES_BY_WORKERdzfxuxbigint(19)qjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxWhether the binary log can be compresseddzfxuxLOG_BIN_COMPRESSdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux dzfxux10.5.15-MariaDB-0+deb11u1dzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxServer version number. It may also include a suffix with configuration or build information. -debug indicates debugging support was enabled on the server, and -log indicates at least one of the binary log, general log or slow query log are enabled, for example 10.1.1-MariaDB-mariadb1precise-log.dzfxuxVERSIONdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqOBJECT_TYPEdzfxuxvarchar(64)qjzxqqvvbqOBJECT_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqOBJECT_NAMEdzfxuxvarchar(64)qjzxqqvvbqOBJECT_INSTANCE_BEGINdzfxuxbigint(20) unsignedqjzxqqvvbqLOCK_TYPEdzfxuxvarchar(32)qjzxqqvvbqLOCK_DURATIONdzfxuxvarchar(32)qjzxqqvvbqLOCK_STATUSdzfxuxvarchar(32)qjzxqqvvbqSOURCEdzfxuxvarchar(64)qjzxqqvvbqOWNER_THREAD_IDdzfxuxbigint(20) unsignedqjzxqqvvbqOWNER_EVENT_IDdzfxuxbigint(20) unsignedqjzxq


value:
  qvvbq0dzfxux dzfxux0dzfxux1dzfxux0dzfxux0dzfxux dzfxux dzfxuxserverdzfxux dzfxux3098dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of rwlock spin loop rounds due to sx latch requestdzfxux0dzfxuxinnodb_rwlock_sx_spin_roundsdzfxuxstatus_counterqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux2147483dzfxux0dzfxux dzfxuxThe interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received.If set to 0, system dependent default is used.dzfxuxTCP_KEEPALIVE_INTERVALdzfxuxGLOBALdzfxuxINTdzfxuxNOqjzxq


value:
  qvvbq0dzfxux5dzfxuxSystemdzfxux14dzfxux0dzfxuxSYS_DATAFILESdzfxuxRedundantdzfxux0qjzxqqvvbq0dzfxux7dzfxuxSystemdzfxux11dzfxux0dzfxuxSYS_FOREIGNdzfxuxRedundantdzfxux0qjzxqqvvbq0dzfxux7dzfxuxSystemdzfxux12dzfxux0dzfxuxSYS_FOREIGN_COLSdzfxuxRedundantdzfxux0qjzxqqvvbq0dzfxux6dzfxuxSystemdzfxux13dzfxux0dzfxuxSYS_TABLESPACESdzfxuxRedundantdzfxux0qjzxqqvvbq0dzfxux6dzfxuxSystemdzfxux15dzfxux0dzfxuxSYS_VIRTUALdzfxuxRedundantdzfxux0qjzxqqvvbq33dzfxux7dzfxuxSingledzfxux19dzfxux0dzfxuxmysql/gtid_slave_posdzfxuxDynamicdzfxux4qjzxqqvvbq33dzfxux11dzfxuxSingledzfxux17dzfxux0dzfxuxmysql/innodb_index_statsdzfxuxDynamicdzfxux2qjzxqqvvbq33dzfxux9dzfxuxSingledzfxux16dzfxux0dzfxuxmysql/innodb_table_statsdzfxuxDynamicdzfxux1qjzxqqvvbq33dzfxux8dzfxuxSingledzfxux18dzfxux0dzfxuxmysql/transaction_registrydzfxuxDynamicdzfxux3qjzxq


value:
  qvvbqREQUIREDdzfxux8dzfxux dzfxux8dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux64dzfxux1dzfxux dzfxuxMaximum number of table cache instancesdzfxuxTABLE_OPEN_CACHE_INSTANCESdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux8192dzfxux dzfxux8192dzfxuxCOMPILE-TIMEdzfxux dzfxux1024dzfxux32768dzfxux4096dzfxux dzfxuxBlock size to be used for Aria index pages.dzfxuxARIA_BLOCK_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbq0dzfxux dzfxux0dzfxux1dzfxux0dzfxux0dzfxux dzfxux dzfxuxlockdzfxux dzfxux3098dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of row locks currently being waited for (innodb_row_lock_current_waits)dzfxux0dzfxuxlock_row_lock_current_waitsdzfxuxstatus_counterqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxevents_waits_summary_by_thread_by_event_namedzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxux2dzfxux dzfxux2dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux8dzfxux0dzfxux2dzfxuxControls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffersdzfxuxJOIN_CACHE_LEVELdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxevents_transactions_summary_global_by_event_namedzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxux3a45bbb77fd0-slow.logdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxLog slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log optionsdzfxuxSLOW_QUERY_LOG_FILEdzfxuxGLOBALdzfxuxVARCHARdzfxuxNOqjzxq


value:
  qvvbq dzfxuxmax_rows=2915dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16755648dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux5754dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxSTATISTICSdzfxuxYdzfxux11qjzxq


value:
  qvvbqREQUIREDdzfxux100dzfxux dzfxux100dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux4294967295dzfxux1dzfxux dzfxuxIf there is more than this number of interrupted connections from a host this host will be blocked from further connectionsdzfxuxMAX_CONNECT_ERRORSdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxDon't resolve hostnames. All hostnames are IP's or 'localhost'.dzfxuxSKIP_NAME_RESOLVEdzfxuxGLOBALdzfxuxBOOLEANdzfxuxYESqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxrecoverydzfxux dzfxux dzfxux dzfxux dzfxuxCurrent LSN valuedzfxux0dzfxuxlog_lsn_currentdzfxuxvalueqjzxq


value:
  qvvbqREQUIREDdzfxuxOFFdzfxuxOFF,ON,DEMANDdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxOFFdzfxuxOFF = Don't cache or retrieve results. ON = Cache all results except SELECT SQL_NO_CACHE ... queries. DEMAND = Cache only SELECT SQL_CACHE ... queriesdzfxuxQUERY_CACHE_TYPEdzfxuxSESSIONdzfxuxENUMdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux6dzfxux1dzfxux6dzfxux6dzfxux6dzfxux6dzfxuxfile_systemdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of files currently open (innodb_num_open_files)dzfxux6dzfxuxfile_num_open_filesdzfxuxvalueqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbufferdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of times a wait happens due to sync flushingdzfxux0dzfxuxbuffer_flush_sync_waitsdzfxuxcounterqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxserverdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of times master thread performs its tasks when server is idledzfxux0dzfxuxinnodb_master_idle_loopsdzfxuxcounterqjzxq


value:
  qvvbqREQUIREDdzfxux200dzfxux dzfxux200dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux4294967295dzfxux0dzfxux200dzfxuxThe optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.dzfxuxEQ_RANGE_INDEX_DIVE_LIMITdzfxuxSESSIONdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbuffer_page_iodzfxux dzfxux dzfxux dzfxux dzfxuxNumber of Transaction System Pages readdzfxux0dzfxuxbuffer_page_read_trx_systemdzfxuxcounterqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbufferdzfxux dzfxux dzfxux dzfxux dzfxuxPages scanned per LRU batch calldzfxux0dzfxuxbuffer_LRU_batch_scanned_per_calldzfxuxset_memberqjzxq


value:
  qvvbq dzfxux0dzfxux dzfxux dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux0dzfxux0dzfxuxSynonym for the last_insert_id variabledzfxuxIDENTITYdzfxuxSESSION ONLYdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqOBJECT_INSTANCE_BEGINdzfxuxbigint(20) unsignedqjzxqqvvbqSTATEMENT_IDdzfxuxbigint(20) unsignedqjzxqqvvbqSTATEMENT_NAMEdzfxuxvarchar(64)qjzxqqvvbqSQL_TEXTdzfxuxlongtextqjzxqqvvbqOWNER_THREAD_IDdzfxuxbigint(20) unsignedqjzxqqvvbqOWNER_EVENT_IDdzfxuxbigint(20) unsignedqjzxqqvvbqOWNER_OBJECT_TYPEdzfxuxenum('EVENT','FUNCTION','PROCEDURE','TABLE','TRIGGER')qjzxqqvvbqOWNER_OBJECT_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqOWNER_OBJECT_NAMEdzfxuxvarchar(64)qjzxqqvvbqTIMER_PREPAREdzfxuxbigint(20) unsignedqjzxqqvvbqCOUNT_REPREPAREdzfxuxbigint(20) unsignedqjzxqqvvbqCOUNT_EXECUTEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_EXECUTEdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_EXECUTEdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_EXECUTEdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_EXECUTEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_LOCK_TIMEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ERRORSdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_WARNINGSdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ROWS_AFFECTEDdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ROWS_SENTdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ROWS_EXAMINEDdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_CREATED_TMP_DISK_TABLESdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_CREATED_TMP_TABLESdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_FULL_JOINdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_FULL_RANGE_JOINdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_RANGEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_RANGE_CHECKdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_SCANdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_MERGE_PASSESdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_RANGEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_ROWSdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_SCANdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_NO_INDEX_USEDdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_NO_GOOD_INDEX_USEDdzfxuxbigint(20) unsignedqjzxq


value:
  qvvbqREQUIREDdzfxux160dzfxux dzfxux160dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux256dzfxux0dzfxux dzfxuxMaximum number of stage instruments.dzfxuxPERFORMANCE_SCHEMA_MAX_STAGE_CLASSESdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux-1dzfxux dzfxux-1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux1048576dzfxux-1dzfxux dzfxuxNumber of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.dzfxuxPERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZEdzfxuxGLOBALdzfxuxBIGINTdzfxuxYESqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxWhether to disable OS system file cache for sort I/OdzfxuxINNODB_DISABLE_SORT_FILE_CACHEdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxuxtransactional=1dzfxux2022-09-13 10:03:16dzfxux0dzfxux16384dzfxux16384dzfxux17592186011648dzfxux2305843009213685760dzfxuxdefdzfxuxutf8_general_cidzfxuxStored Proceduresdzfxux2dzfxuxmysqldzfxuxBASE TABLEdzfxux2022-09-13 10:03:16dzfxux dzfxux8192dzfxux dzfxuxAriadzfxuxPagedzfxuxprocdzfxuxNdzfxux10qjzxq


value:
  gAJjbGliLmNvcmUuZGF0YXR5cGUKQXR0cmliRGljdApxACmBcQEoWAkAAABkZWxpbWl0ZXJxAlgGAAAAZHpmeHV4cQNYBQAAAHN0YXJ0cQRYBQAAAHF2dmJxcQVYBAAAAHN0b3BxBlgFAAAAcWp6eHFxB1gCAAAAYXRxCFgDAAAAcWpxcQlYBQAAAHNwYWNlcQpYAwAAAHF1cXELWAYAAABkb2xsYXJxDFgDAAAAcXJxcQ1YBQAAAGhhc2hfcQ5YAwAAAHFpcXEPdX1xEChYCQAAAGF0dHJpYnV0ZXERTlgIAAAAa2V5Y2hlY2txEohYGAAAAF9BdHRyaWJEaWN0X19pbml0aWFsaXNlZHETiHViLg==


value:
  qvvbqREQUIREDdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux1dzfxux1dzfxuxIf larger than 1, when repairing a MyISAM table all indexes will be created in parallel, with one thread per index. The value of 1 disables parallel repairdzfxuxMYISAM_REPAIR_THREADSdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux600dzfxux dzfxux600dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux4294967295dzfxux1dzfxux dzfxuxMaximum number of seconds that semaphore times out in InnoDB.dzfxuxINNODB_FATAL_SEMAPHORE_WAIT_THRESHOLDdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqTABLE_CATALOGdzfxuxvarchar(512)qjzxqqvvbqTABLE_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqTABLE_NAMEdzfxuxvarchar(64)qjzxqqvvbqCOLUMN_NAMEdzfxuxvarchar(64)qjzxqqvvbqORDINAL_POSITIONdzfxuxbigint(21) unsignedqjzxqqvvbqCOLUMN_DEFAULTdzfxuxlongtextqjzxqqvvbqIS_NULLABLEdzfxuxvarchar(3)qjzxqqvvbqDATA_TYPEdzfxuxvarchar(64)qjzxqqvvbqCHARACTER_MAXIMUM_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqCHARACTER_OCTET_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqNUMERIC_PRECISIONdzfxuxbigint(21) unsignedqjzxqqvvbqNUMERIC_SCALEdzfxuxbigint(21) unsignedqjzxqqvvbqDATETIME_PRECISIONdzfxuxbigint(21) unsignedqjzxqqvvbqCHARACTER_SET_NAMEdzfxuxvarchar(32)qjzxqqvvbqCOLLATION_NAMEdzfxuxvarchar(32)qjzxqqvvbqCOLUMN_TYPEdzfxuxlongtextqjzxqqvvbqCOLUMN_KEYdzfxuxvarchar(3)qjzxqqvvbqEXTRAdzfxuxvarchar(30)qjzxqqvvbqPRIVILEGESdzfxuxvarchar(80)qjzxqqvvbqCOLUMN_COMMENTdzfxuxvarchar(1024)qjzxqqvvbqIS_GENERATEDdzfxuxvarchar(6)qjzxqqvvbqGENERATION_EXPRESSIONdzfxuxlongtextqjzxq


value:
  qvvbq dzfxuxmax_rows=22919dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16685940dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux732dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxENGINESdzfxuxYdzfxux11qjzxq


value:
  qvvbq0.00129116dzfxux dzfxux4dzfxux1dzfxux4dzfxux4dzfxux dzfxux dzfxuxrecoverydzfxux dzfxux3098dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of log writes (innodb_log_writes)dzfxux4dzfxuxlog_writesdzfxuxstatus_counterqjzxq


value:
  qvvbqOPTIONALdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux255dzfxux0dzfxux0dzfxuxMaximum stored procedure recursion depthdzfxuxMAX_SP_RECURSION_DEPTHdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxux/usrdzfxuxCOMMAND-LINEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxPath to installation directory. All paths are usually resolved relative to thisdzfxuxBASEDIRdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxuxfull_crc32dzfxuxcrc32,strict_crc32,innodb,strict_innodb,none,strict_none,full_crc32,strict_full_crc32dzfxuxfull_crc32dzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxThe algorithm InnoDB uses for page checksumming. Possible values are FULL_CRC32 for new files, always use CRC-32C; for old, see CRC32 below; STRICT_FULL_CRC32 for new files, always use CRC-32C; for old, see STRICT_CRC32 below; CRC32 write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MariaDB versions older than 10.0.4; new files created with full_crc32 are readable by MariaDB 10.4.3+dzfxuxINNODB_CHECKSUM_ALGORITHMdzfxuxGLOBALdzfxuxENUMdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux64dzfxux0dzfxux dzfxuxDeprecated parameter with no effect.dzfxuxINNODB_PAGE_CLEANERSdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux100663296dzfxux dzfxux100663296dzfxuxCOMPILE-TIMEdzfxux dzfxux65536dzfxux18446744073709551615dzfxux1048576dzfxux dzfxuxSize of each log file in a log group.dzfxuxINNODB_LOG_FILE_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqhelp_topic_iddzfxuxint(10) unsignedqjzxqqvvbqnamedzfxuxchar(64)qjzxqqvvbqhelp_category_iddzfxuxsmallint(5) unsignedqjzxqqvvbqdescriptiondzfxuxtextqjzxqqvvbqexampledzfxuxtextqjzxqqvvbqurldzfxuxtextqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxDeprecated parameter with no effect.dzfxuxINNODB_BACKGROUND_SCRUB_DATA_UNCOMPRESSEDdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux60dzfxux dzfxux60dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux4294967295dzfxux1dzfxux dzfxuxTimeout in seconds for an idle thread in the thread pool.Worker thread will be shut down after timeoutdzfxuxTHREAD_POOL_IDLE_TIMEOUTdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqOPTIONALdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux65535dzfxux1dzfxux1dzfxuxOffset added to Auto-increment columns. Used when auto-increment-increment != 1dzfxuxAUTO_INCREMENT_OFFSETdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux dzfxux dzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxdzfxuxThe proxy user account name used when logging indzfxuxPROXY_USERdzfxuxSESSION ONLYdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq dzfxuxmax_rows=27962dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16556400dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux600dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxINNODB_CMP_PER_INDEX_RESETdzfxuxYdzfxux11qjzxq


value:
  qvvbqUSERdzfxuxvarchar(128)qjzxqqvvbqTOTAL_CONNECTIONSdzfxuxint(11)qjzxqqvvbqCONCURRENT_CONNECTIONSdzfxuxint(11)qjzxqqvvbqCONNECTED_TIMEdzfxuxint(11)qjzxqqvvbqBUSY_TIMEdzfxuxdoubleqjzxqqvvbqCPU_TIMEdzfxuxdoubleqjzxqqvvbqBYTES_RECEIVEDdzfxuxbigint(21)qjzxqqvvbqBYTES_SENTdzfxuxbigint(21)qjzxqqvvbqBINLOG_BYTES_WRITTENdzfxuxbigint(21)qjzxqqvvbqROWS_READdzfxuxbigint(21)qjzxqqvvbqROWS_SENTdzfxuxbigint(21)qjzxqqvvbqROWS_DELETEDdzfxuxbigint(21)qjzxqqvvbqROWS_INSERTEDdzfxuxbigint(21)qjzxqqvvbqROWS_UPDATEDdzfxuxbigint(21)qjzxqqvvbqSELECT_COMMANDSdzfxuxbigint(21)qjzxqqvvbqUPDATE_COMMANDSdzfxuxbigint(21)qjzxqqvvbqOTHER_COMMANDSdzfxuxbigint(21)qjzxqqvvbqCOMMIT_TRANSACTIONSdzfxuxbigint(21)qjzxqqvvbqROLLBACK_TRANSACTIONSdzfxuxbigint(21)qjzxqqvvbqDENIED_CONNECTIONSdzfxuxbigint(21)qjzxqqvvbqLOST_CONNECTIONSdzfxuxbigint(21)qjzxqqvvbqACCESS_DENIEDdzfxuxbigint(21)qjzxqqvvbqEMPTY_QUERIESdzfxuxbigint(21)qjzxqqvvbqTOTAL_SSL_CONNECTIONSdzfxuxbigint(21) unsignedqjzxqqvvbqMAX_STATEMENT_TIME_EXCEEDEDdzfxuxbigint(21)qjzxq


value:
  qvvbqREQUIREDdzfxux80dzfxux dzfxux80dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux256dzfxux0dzfxux dzfxuxMaximum number of file instruments.dzfxuxPERFORMANCE_SCHEMA_MAX_FILE_CLASSESdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux4dzfxux dzfxux4dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux64dzfxux2dzfxux dzfxuxNumber of background write I/O threads in InnoDB.dzfxuxINNODB_WRITE_IO_THREADSdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxTo enable myisam replicationdzfxuxWSREP_REPLICATE_MYISAMdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxlockdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of record locks removed from the lock queuedzfxux0dzfxuxlock_rec_lock_removeddzfxuxcounterqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxFixeddzfxuxaccountsdzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxux28800dzfxux dzfxux28800dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux31536000dzfxux1dzfxux28800dzfxuxThe number of seconds the server waits for activity on an interactive connection before closing itdzfxuxINTERACTIVE_TIMEOUTdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux50dzfxux dzfxux50dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux1073741824dzfxux0dzfxux50dzfxuxTimeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.dzfxuxINNODB_LOCK_WAIT_TIMEOUTdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxX509 key in PEM format (implies --ssl)dzfxuxSSL_KEYdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqVARIABLE_NAMEdzfxuxvarchar(64)qjzxqqvvbqSESSION_VALUEdzfxuxvarchar(2048)qjzxqqvvbqGLOBAL_VALUEdzfxuxvarchar(2048)qjzxqqvvbqGLOBAL_VALUE_ORIGINdzfxuxvarchar(64)qjzxqqvvbqDEFAULT_VALUEdzfxuxvarchar(2048)qjzxqqvvbqVARIABLE_SCOPEdzfxuxvarchar(64)qjzxqqvvbqVARIABLE_TYPEdzfxuxvarchar(64)qjzxqqvvbqVARIABLE_COMMENTdzfxuxvarchar(2048)qjzxqqvvbqNUMERIC_MIN_VALUEdzfxuxvarchar(21)qjzxqqvvbqNUMERIC_MAX_VALUEdzfxuxvarchar(21)qjzxqqvvbqNUMERIC_BLOCK_SIZEdzfxuxvarchar(21)qjzxqqvvbqENUM_VALUE_LISTdzfxuxlongtextqjzxqqvvbqREAD_ONLYdzfxuxvarchar(3)qjzxqqvvbqCOMMAND_LINE_ARGUMENTdzfxuxvarchar(64)qjzxqqvvbqGLOBAL_VALUE_PATHdzfxuxvarchar(2048)qjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbufferdzfxux dzfxux dzfxux dzfxux dzfxuxTotal pages flushed as part of sync batchesdzfxux0dzfxuxbuffer_flush_sync_total_pagesdzfxuxset_ownerqjzxq


value:
  qvvbqREQUIREDdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxTrigger an immediate dump of the buffer pool into a file named @@innodb_buffer_pool_filenamedzfxuxINNODB_BUFFER_POOL_DUMP_NOWdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux134217728dzfxux dzfxux134217728dzfxuxCOMPILE-TIMEdzfxux dzfxux4096dzfxux18446744073709551615dzfxux0dzfxux dzfxuxThe size of the buffer used for index blocks for MyISAM tables. Increase this to get better index handling (for all reads and multiple writes) to as much as you can afforddzfxuxKEY_BUFFER_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux00000000-0000-0000-0000-000000000000:-1dzfxux dzfxux00000000-0000-0000-0000-000000000000:-1dzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxglobal transaction position to start from dzfxuxWSREP_START_POSITIONdzfxuxGLOBALdzfxuxVARCHARdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxux(built-in)dzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxUse stopwords from this file instead of built-in listdzfxuxFT_STOPWORD_FILEdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux6dzfxux dzfxux6dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux7dzfxux2dzfxux dzfxuxDefault pointer size to be used for MyISAM tablesdzfxuxMYISAM_DATA_POINTER_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqTABLE_CATALOGdzfxuxvarchar(512)qjzxqqvvbqTABLE_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqTABLE_NAMEdzfxuxvarchar(64)qjzxqqvvbqPARTITION_NAMEdzfxuxvarchar(64)qjzxqqvvbqSUBPARTITION_NAMEdzfxuxvarchar(64)qjzxqqvvbqPARTITION_ORDINAL_POSITIONdzfxuxbigint(21) unsignedqjzxqqvvbqSUBPARTITION_ORDINAL_POSITIONdzfxuxbigint(21) unsignedqjzxqqvvbqPARTITION_METHODdzfxuxvarchar(18)qjzxqqvvbqSUBPARTITION_METHODdzfxuxvarchar(12)qjzxqqvvbqPARTITION_EXPRESSIONdzfxuxlongtextqjzxqqvvbqSUBPARTITION_EXPRESSIONdzfxuxlongtextqjzxqqvvbqPARTITION_DESCRIPTIONdzfxuxlongtextqjzxqqvvbqTABLE_ROWSdzfxuxbigint(21) unsignedqjzxqqvvbqAVG_ROW_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqDATA_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqMAX_DATA_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqINDEX_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqDATA_FREEdzfxuxbigint(21) unsignedqjzxqqvvbqCREATE_TIMEdzfxuxdatetimeqjzxqqvvbqUPDATE_TIMEdzfxuxdatetimeqjzxqqvvbqCHECK_TIMEdzfxuxdatetimeqjzxqqvvbqCHECKSUMdzfxuxbigint(21) unsignedqjzxqqvvbqPARTITION_COMMENTdzfxuxvarchar(80)qjzxqqvvbqNODEGROUPdzfxuxvarchar(12)qjzxqqvvbqTABLESPACE_NAMEdzfxuxvarchar(64)qjzxq


value:
  qvvbqREQUIREDdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux10000dzfxux0dzfxux1dzfxuxMax number of times to retry a failed autocommit statementdzfxuxWSREP_RETRY_AUTOCOMMITdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxrecoverydzfxux dzfxux dzfxux dzfxux dzfxuxPending log flushesdzfxux0dzfxuxlog_pending_log_flushesdzfxuxvalueqjzxq


value:
  qvvbq dzfxuxmax_rows=10380835156842741 transactional=0dzfxux2025-11-30 21:50:20dzfxux0dzfxux8192dzfxux8192dzfxux4503599627288576dzfxux137438945280dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux2025-11-30 21:50:20dzfxux dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxPLUGINSdzfxuxYdzfxux11qjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux32186dzfxuxAUTOdzfxux dzfxux1dzfxux4294967295dzfxux0dzfxux dzfxuxIf this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 or autoset then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptorsdzfxuxOPEN_FILES_LIMITdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxEnable a workaround to handle the cases where inserting a DEFAULT value into an auto-increment column could fail with duplicate key errordzfxuxWSREP_DRUPAL_282555_WORKAROUNDdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqOPTIONALdzfxux16384dzfxux dzfxux16384dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux65536dzfxux4096dzfxux dzfxuxPage size to use for all InnoDB tablespaces.dzfxuxINNODB_PAGE_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux18446744073709551615dzfxux dzfxux18446744073709551615dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux1024dzfxux18446744073709551615dzfxuxMax size for data for an internal temporary on-disk MyISAM or Aria table.dzfxuxTMP_DISK_TABLE_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxmax_rows=2646dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16762960dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux6340dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxSESSION_STATUSdzfxuxYdzfxux11qjzxq


value:
  qvvbqtrx_iddzfxuxbigint(21) unsignedqjzxqqvvbqtrx_statedzfxuxvarchar(13)qjzxqqvvbqtrx_starteddzfxuxdatetimeqjzxqqvvbqtrx_requested_lock_iddzfxuxvarchar(81)qjzxqqvvbqtrx_wait_starteddzfxuxdatetimeqjzxqqvvbqtrx_weightdzfxuxbigint(21) unsignedqjzxqqvvbqtrx_mysql_thread_iddzfxuxbigint(21) unsignedqjzxqqvvbqtrx_querydzfxuxvarchar(1024)qjzxqqvvbqtrx_operation_statedzfxuxvarchar(64)qjzxqqvvbqtrx_tables_in_usedzfxuxbigint(21) unsignedqjzxqqvvbqtrx_tables_lockeddzfxuxbigint(21) unsignedqjzxqqvvbqtrx_lock_structsdzfxuxbigint(21) unsignedqjzxqqvvbqtrx_lock_memory_bytesdzfxuxbigint(21) unsignedqjzxqqvvbqtrx_rows_lockeddzfxuxbigint(21) unsignedqjzxqqvvbqtrx_rows_modifieddzfxuxbigint(21) unsignedqjzxqqvvbqtrx_concurrency_ticketsdzfxuxbigint(21) unsignedqjzxqqvvbqtrx_isolation_leveldzfxuxenum('READ UNCOMMITTED','READ COMMITTED','REPEATABLE READ','SERIALIZABLE')qjzxqqvvbqtrx_unique_checksdzfxuxint(1)qjzxqqvvbqtrx_foreign_key_checksdzfxuxint(1)qjzxqqvvbqtrx_last_foreign_key_errordzfxuxvarchar(256)qjzxqqvvbqtrx_is_read_onlydzfxuxint(1)qjzxqqvvbqtrx_autocommit_non_lockingdzfxuxint(1)qjzxq


value:
  qvvbqEVENT_NAMEdzfxuxvarchar(128)qjzxqqvvbqCOUNT_STARdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_WAITdzfxuxbigint(20) unsignedqjzxq


value:
  qvvbq dzfxuxtransactional=1dzfxux2022-09-13 10:03:16dzfxux0dzfxux8192dzfxux8192dzfxux17592186011648dzfxux2305843009213685760dzfxuxdefdzfxuxutf8_bindzfxuxColumn privilegesdzfxux0dzfxuxmysqldzfxuxBASE TABLEdzfxux2022-09-13 10:03:16dzfxux dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxcolumns_privdzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux4294967295dzfxux1dzfxux1dzfxuxUniquely identifies the server instance in the community of replication partnersdzfxuxSERVER_IDdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux50dzfxux dzfxux50dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux256dzfxux0dzfxux dzfxuxMaximum number of rwlock instruments.dzfxuxPERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSESdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbq dzfxux dzfxux dzfxuxGPLdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxThe type of license the server hasdzfxuxLICENSEdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqUSERdzfxuxchar(32)qjzxqqvvbqEVENT_NAMEdzfxuxvarchar(128)qjzxqqvvbqCOUNT_STARdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqCOUNT_READ_WRITEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_READ_WRITEdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_READ_WRITEdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_READ_WRITEdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_READ_WRITEdzfxuxbigint(20) unsignedqjzxqqvvbqCOUNT_READ_ONLYdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_READ_ONLYdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_READ_ONLYdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_READ_ONLYdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_READ_ONLYdzfxuxbigint(20) unsignedqjzxq


value:
  qvvbqOPTIONALdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux3dzfxux0dzfxux dzfxuxSpeeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster), 2 (crash-like), 3 (fastest clean).dzfxuxINNODB_FAST_SHUTDOWNdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux9223372036854775807dzfxux dzfxux9223372036854775807dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux8192dzfxux9223372036854775807dzfxuxAmount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USEDdzfxuxMAX_SESSION_MEM_USEDdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux6dzfxux dzfxux6dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux9dzfxux0dzfxux dzfxuxCompression level used for zlib compression.  0 is no compression, 1 is fastest, 9 is best compression and default is 6.dzfxuxINNODB_COMPRESSION_LEVELdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux1dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxreplication_applier_status_by_coordinatordzfxuxNdzfxux10qjzxq


value:
  qvvbq dzfxux0dzfxux dzfxux dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux0dzfxux602054458dzfxuxSets the internal state of the RAND() generator for replication purposesdzfxuxRAND_SEED1dzfxuxSESSION ONLYdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxSSL cipher to use (implies --ssl)dzfxuxSSL_CIPHERdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqNAMEdzfxuxvarchar(193)qjzxqqvvbqSUBSYSTEMdzfxuxvarchar(193)qjzxqqvvbqCOUNTdzfxuxbigint(21)qjzxqqvvbqMAX_COUNTdzfxuxbigint(21)qjzxqqvvbqMIN_COUNTdzfxuxbigint(21)qjzxqqvvbqAVG_COUNTdzfxuxfloatqjzxqqvvbqCOUNT_RESETdzfxuxbigint(21)qjzxqqvvbqMAX_COUNT_RESETdzfxuxbigint(21)qjzxqqvvbqMIN_COUNT_RESETdzfxuxbigint(21)qjzxqqvvbqAVG_COUNT_RESETdzfxuxfloatqjzxqqvvbqTIME_ENABLEDdzfxuxdatetimeqjzxqqvvbqTIME_DISABLEDdzfxuxdatetimeqjzxqqvvbqTIME_ELAPSEDdzfxuxbigint(21)qjzxqqvvbqTIME_RESETdzfxuxdatetimeqjzxqqvvbqENABLEDdzfxuxint(1)qjzxqqvvbqTYPEdzfxuxenum('value','status_counter','set_owner','set_member','counter')qjzxqqvvbqCOMMENTdzfxuxvarchar(193)qjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxRoll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)dzfxuxINNODB_ROLLBACK_ON_TIMEOUTdzfxuxGLOBALdzfxuxBOOLEANdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxuxnulls_unequaldzfxuxnulls_unequal,nulls_equal,nulls_ignoreddzfxuxnulls_unequaldzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxnulls_unequaldzfxuxSpecifies how Aria index statistics collection code should treat NULLsdzfxuxARIA_STATS_METHODdzfxuxSESSIONdzfxuxENUMdzfxuxNOqjzxq


value:
  qvvbqTHREAD_IDdzfxuxbigint(20) unsignedqjzxqqvvbqEVENT_NAMEdzfxuxvarchar(128)qjzxqqvvbqCOUNT_STARdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_LOCK_TIMEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ERRORSdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_WARNINGSdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ROWS_AFFECTEDdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ROWS_SENTdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_ROWS_EXAMINEDdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_CREATED_TMP_DISK_TABLESdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_CREATED_TMP_TABLESdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_FULL_JOINdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_FULL_RANGE_JOINdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_RANGEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_RANGE_CHECKdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SELECT_SCANdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_MERGE_PASSESdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_RANGEdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_ROWSdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_SORT_SCANdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_NO_INDEX_USEDdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_NO_GOOD_INDEX_USEDdzfxuxbigint(20) unsignedqjzxq


value:
  qvvbq dzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxOFFdzfxuxDefault transaction access mode. If set to OFF, the default, access is read/write. If set to ON, access is read-only. The SET TRANSACTION statement can also change the value of this variable. See SET TRANSACTION and START TRANSACTION.dzfxuxTX_READ_ONLYdzfxuxSESSIONdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux24576dzfxux dzfxux24576dzfxuxCOMPILE-TIMEdzfxux dzfxux1024dzfxux4294967295dzfxux1024dzfxux24576dzfxuxPersistent buffer for query parsing and executiondzfxuxQUERY_PREALLOC_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqUSERdzfxuxchar(128)qjzxqqvvbqEVENT_NAMEdzfxuxvarchar(128)qjzxqqvvbqCOUNT_STARdzfxuxbigint(20) unsignedqjzxqqvvbqSUM_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMIN_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqAVG_TIMER_WAITdzfxuxbigint(20) unsignedqjzxqqvvbqMAX_TIMER_WAITdzfxuxbigint(20) unsignedqjzxq


value:
  qvvbqOPTIONALdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux2dzfxux0dzfxux dzfxuxSet to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a blockdzfxuxINNODB_FLUSH_NEIGHBORSdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxcompressiondzfxux dzfxux dzfxux dzfxux dzfxuxNumber of page compression errorsdzfxux0dzfxuxcompress_pages_page_compression_errordzfxuxcounterqjzxq


value:
  qvvbq dzfxuxtransactional=1dzfxux2022-09-13 10:03:16dzfxux0dzfxux8192dzfxux8192dzfxux17592186011648dzfxux2305843009213685760dzfxuxdefdzfxuxutf8_general_cidzfxuxEventsdzfxux0dzfxuxmysqldzfxuxBASE TABLEdzfxux2022-09-13 10:03:16dzfxux dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxeventdzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxux1dzfxux dzfxux1dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux4294967295dzfxux0dzfxux dzfxuxKey rotation - re-encrypt in background all pages that were encrypted with a key that many (or more) versions behind. Value 0 indicates that key rotation is disabled.dzfxuxINNODB_ENCRYPTION_ROTATE_KEY_AGEdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux1000dzfxux0dzfxux dzfxuxDeprecated parameter with no effect.dzfxuxINNODB_THREAD_CONCURRENCYdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxtransactional=0dzfxux2022-09-13 10:03:16dzfxux0dzfxux1531904dzfxux40960dzfxux17592186011648dzfxux2305843009213685760dzfxuxdefdzfxuxutf8_general_cidzfxuxhelp topicsdzfxux735dzfxuxmysqldzfxuxBASE TABLEdzfxux2022-09-13 10:03:16dzfxux dzfxux2084dzfxux dzfxuxAriadzfxuxPagedzfxuxhelp_topicdzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxux-1dzfxux dzfxux-1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux1048576dzfxux-1dzfxux dzfxuxMaximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.dzfxuxPERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCESdzfxuxGLOBALdzfxuxBIGINTdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxuxNO_LOGdzfxuxNO_LOG,MINIMAL,FULLdzfxuxNO_LOGdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxControls whether metadata is logged using FULL , MINIMAL format and NO_LOG.FULL causes all metadata to be logged; MINIMAL means that only metadata actually required by slave is logged; NO_LOG NO metadata will be logged.Default: NO_LOG.dzfxuxBINLOG_ROW_METADATAdzfxuxGLOBALdzfxuxENUMdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux16383dzfxux0dzfxux dzfxuxAlias for slave_parallel_threadsdzfxuxSLAVE_PARALLEL_WORKERSdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxOFFdzfxuxUse compatible behavior from previous MariaDB version. See also --old-modedzfxuxOLDdzfxuxSESSIONdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqINNODB_LOG_CHECKSUMSdzfxuxONqjzxqqvvbqPERFORMANCE_SCHEMAdzfxuxOFFqjzxqqvvbqSQL_MODEdzfxuxSTRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIONqjzxqqvvbqSYSTEM_VERSIONING_ALTER_HISTORYdzfxuxERRORqjzxqqvvbqUNIQUE_CHECKSdzfxuxONqjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZEdzfxux-1qjzxqqvvbqMAX_RELAY_LOG_SIZEdzfxux1073741824qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_COND_CLASSESdzfxux90qjzxqqvvbqHAVE_RTREE_KEYSdzfxuxYESqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_COND_INSTANCESdzfxux-1qjzxqqvvbqINNODB_FLUSH_LOG_AT_TIMEOUTdzfxux1qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCESdzfxux-1qjzxqqvvbqINNODB_ENCRYPT_TEMPORARY_TABLESdzfxuxOFFqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_PREPARED_STATEMENTS_INSTANCESdzfxux-1qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_THREAD_CLASSESdzfxux50qjzxqqvvbqRPL_SEMI_SYNC_SLAVE_TRACE_LEVELdzfxux32qjzxqqvvbqSSL_CAPATHdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCESdzfxux-1qjzxqqvvbqCORE_FILEdzfxuxOFFqjzxqqvvbqEVENT_SCHEDULERdzfxuxOFFqjzxqqvvbqINNODB_STATS_TRANSIENT_SAMPLE_PAGESdzfxux8qjzxqqvvbqGTID_IGNORE_DUPLICATESdzfxuxOFFqjzxqqvvbqSLOW_LAUNCH_TIMEdzfxux2qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSESdzfxux50qjzxqqvvbqOPTIMIZER_SELECTIVITY_SAMPLING_LIMITdzfxux100qjzxqqvvbqRPL_SEMI_SYNC_SLAVE_KILL_CONN_TIMEOUTdzfxux5qjzxqqvvbqINNODB_ADAPTIVE_HASH_INDEX_PARTSdzfxux8qjzxqqvvbqPERFORMANCE_SCHEMA_ACCOUNTS_SIZEdzfxux-1qjzxqqvvbqTHREAD_POOL_OVERSUBSCRIBEdzfxux3qjzxqqvvbqPERFORMANCE_SCHEMA_SETUP_OBJECTS_SIZEdzfxux-1qjzxqqvvbqARIA_RECOVER_OPTIONSdzfxuxBACKUP,QUICKqjzxqqvvbqMAX_SP_RECURSION_DEPTHdzfxux0qjzxqqvvbqINNODB_FT_NUM_WORD_OPTIMIZEdzfxux2000qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_INDEX_STATdzfxux-1qjzxqqvvbqWSREP_DRUPAL_282555_WORKAROUNDdzfxuxOFFqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_MUTEX_CLASSESdzfxux210qjzxqqvvbqTMP_MEMORY_TABLE_SIZEdzfxux16777216qjzxqqvvbqMAX_LENGTH_FOR_SORT_DATAdzfxux1024qjzxqqvvbqREPORT_HOSTdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_SIZEdzfxux-1qjzxqqvvbqINNODB_SORT_BUFFER_SIZEdzfxux1048576qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_STAGE_CLASSESdzfxux160qjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_SIZEdzfxux-1qjzxqqvvbqSLAVE_TRANSACTION_RETRY_ERRORSdzfxux1158,1159,1160,1161,1205,1213,1429,2013,12701qjzxqqvvbqLARGE_FILES_SUPPORTdzfxuxONqjzxqqvvbqPERFORMANCE_SCHEMA_SETUP_ACTORS_SIZEdzfxux-1qjzxqqvvbqARIA_PAGECACHE_AGE_THRESHOLDdzfxux300qjzxqqvvbqPERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZEdzfxux-1qjzxqqvvbqWSREP_AUTO_INCREMENT_CONTROLdzfxuxONqjzxqqvvbqDEFAULT_STORAGE_ENGINEdzfxuxInnoDBqjzxqqvvbqINNODB_BACKGROUND_SCRUB_DATA_COMPRESSEDdzfxuxOFFqjzxqqvvbqDELAYED_INSERT_LIMITdzfxux100qjzxqqvvbqGROUP_CONCAT_MAX_LENdzfxux1048576qjzxqqvvbqBINLOG_FILE_CACHE_SIZEdzfxux16384qjzxqqvvbqRANGE_ALLOC_BLOCK_SIZEdzfxux4096qjzxqqvvbqSLOW_QUERY_LOGdzfxuxOFFqjzxqqvvbqVERSION_COMMENTdzfxuxDebian 11qjzxqqvvbqBIND_ADDRESSdzfxux127.0.0.1qjzxqqvvbqINNODB_TMPDIRdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_SIZEdzfxux-1qjzxqqvvbqINNODB_ENCRYPTION_THREADSdzfxux0qjzxqqvvbqLC_MESSAGES_DIRdzfxux/usr/share/mysqlqjzxqqvvbqMYISAM_RECOVER_OPTIONSdzfxuxBACKUP,QUICKqjzxqqvvbqCOLUMN_COMPRESSION_ZLIB_LEVELdzfxux6qjzxqqvvbqRPL_SEMI_SYNC_MASTER_TIMEOUTdzfxux10000qjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_STAGES_HISTORY_LONG_SIZEdzfxux-1qjzxqqvvbqLOW_PRIORITY_UPDATESdzfxuxOFFqjzxqqvvbqCHARACTER_SET_RESULTSdzfxuxutf8mb4qjzxqqvvbqREPORT_PASSWORDdzfxuxqjzxqqvvbqARIA_FORCE_START_AFTER_RECOVERY_FAILURESdzfxux0qjzxqqvvbqWSREP_DBUG_OPTIONdzfxuxqjzxqqvvbqCHARACTER_SET_CONNECTIONdzfxuxutf8mb4qjzxqqvvbqSQL_BIG_SELECTSdzfxuxONqjzxqqvvbqJOIN_BUFFER_SIZEdzfxux262144qjzxqqvvbqTRANSACTION_ALLOC_BLOCK_SIZEdzfxux8192qjzxqqvvbqOPTIMIZER_PRUNE_LEVELdzfxux1qjzxqqvvbqINNODB_FLUSHING_AVG_LOOPSdzfxux30qjzxqqvvbqEXPLICIT_DEFAULTS_FOR_TIMESTAMPdzfxuxOFFqjzxqqvvbqSYNC_FRMdzfxuxONqjzxqqvvbqCOMPLETION_TYPEdzfxuxNO_CHAINqjzxqqvvbqBINLOG_ROW_METADATAdzfxuxNO_LOGqjzxqqvvbqDATADIRdzfxux/var/lib/mysql/qjzxqqvvbqINNODB_SCRUB_LOGdzfxuxOFFqjzxqqvvbqKEY_CACHE_AGE_THRESHOLDdzfxux300qjzxqqvvbqINNODB_IO_CAPACITY_MAXdzfxux2000qjzxqqvvbqCHECK_CONSTRAINT_CHECKSdzfxuxONqjzxqqvvbqINNODB_IO_CAPACITYdzfxux200qjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_TRANSACTIONS_HISTORY_LONG_SIZEdzfxux-1qjzxqqvvbqWSREP_CLUSTER_ADDRESSdzfxuxqjzxqqvvbqLOG_BIN_COMPRESS_MIN_LENdzfxux256qjzxqqvvbqINNODB_LOG_GROUP_HOME_DIRdzfxux./qjzxqqvvbqPERFORMANCE_SCHEMA_DIGESTS_SIZEdzfxux-1qjzxqqvvbqQUERY_CACHE_LIMITdzfxux1048576qjzxqqvvbqWSREP_START_POSITIONdzfxux00000000-0000-0000-0000-000000000000:-1qjzxqqvvbqINNODB_COMPRESSION_DEFAULTdzfxuxOFFqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_THREAD_INSTANCESdzfxux-1qjzxqqvvbqINNODB_AUTOEXTEND_INCREMENTdzfxux64qjzxqqvvbqAUTO_INCREMENT_OFFSETdzfxux1qjzxqqvvbqMYISAM_DATA_POINTER_SIZEdzfxux6qjzxqqvvbqTMP_TABLE_SIZEdzfxux16777216qjzxqqvvbqRPL_SEMI_SYNC_SLAVE_DELAY_MASTERdzfxuxOFFqjzxqqvvbqAUTOMATIC_SP_PRIVILEGESdzfxuxONqjzxqqvvbqSQL_AUTO_IS_NULLdzfxuxOFFqjzxqqvvbqCONCURRENT_INSERTdzfxuxAUTOqjzxqqvvbqARIA_USED_FOR_TEMP_TABLESdzfxuxONqjzxqqvvbqFT_QUERY_EXPANSION_LIMITdzfxux20qjzxqqvvbqHAVE_GEOMETRYdzfxuxYESqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_PROGRAM_INSTANCESdzfxux-1qjzxqqvvbqWSREP_RETRY_AUTOCOMMITdzfxux1qjzxqqvvbqKEY_CACHE_FILE_HASH_SIZEdzfxux512qjzxqqvvbqINNODB_STATUS_OUTPUT_LOCKSdzfxuxOFFqjzxqqvvbqLOCK_WAIT_TIMEOUTdzfxux86400qjzxqqvvbqQUERY_PREALLOC_SIZEdzfxux24576qjzxqqvvbqMAX_USER_CONNECTIONSdzfxux0qjzxqqvvbqSORT_BUFFER_SIZEdzfxux2097152qjzxqqvvbqMAX_BINLOG_SIZEdzfxux1073741824qjzxqqvvbqINNODB_ROLLBACK_ON_TIMEOUTdzfxuxOFFqjzxqqvvbqDELAY_KEY_WRITEdzfxuxONqjzxqqvvbqSTANDARD_COMPLIANT_CTEdzfxuxONqjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZEdzfxux-1qjzxqqvvbqARIA_REPAIR_THREADSdzfxux1qjzxqqvvbqMAX_STATEMENT_TIMEdzfxux0.000000qjzxqqvvbqJOIN_BUFFER_SPACE_LIMITdzfxux2097152qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_STATEMENT_STACKdzfxux10qjzxqqvvbqINNODB_FILE_FORMATdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_TABLE_INSTANCESdzfxux-1qjzxqqvvbqPROGRESS_REPORT_TIMEdzfxux5qjzxqqvvbqRELAY_LOG_PURGEdzfxuxONqjzxqqvvbqREPLICATE_WILD_DO_TABLEdzfxuxqjzxqqvvbqCOLUMN_COMPRESSION_ZLIB_WRAPdzfxuxOFFqjzxqqvvbqMAX_ALLOWED_PACKETdzfxux16777216qjzxqqvvbqCHARACTER_SET_SYSTEMdzfxuxutf8qjzxqqvvbqCHARACTER_SET_SERVERdzfxuxutf8mb4qjzxqqvvbqSLAVE_MAX_ALLOWED_PACKETdzfxux1073741824qjzxqqvvbqRAND_SEED1dzfxux439255852qjzxqqvvbqMAX_CONNECT_ERRORSdzfxux100qjzxqqvvbqINNODB_TABLE_LOCKSdzfxuxONqjzxqqvvbqCHARACTER_SETS_DIRdzfxux/usr/share/mysql/charsets/qjzxqqvvbqREPLICATE_IGNORE_TABLEdzfxuxqjzxqqvvbqSYSTEM_TIME_ZONEdzfxuxUTCqjzxqqvvbqBINLOG_DIRECT_NON_TRANSACTIONAL_UPDATESdzfxuxOFFqjzxqqvvbqMAX_CONNECTIONSdzfxux151qjzxqqvvbqINNODB_STRICT_MODEdzfxuxONqjzxqqvvbqCONNECT_TIMEOUTdzfxux10qjzxqqvvbqARIA_PAGE_CHECKSUMdzfxuxONqjzxqqvvbqMAX_HEAP_TABLE_SIZEdzfxux16777216qjzxqqvvbqWSREP_REJECT_QUERIESdzfxuxNONEqjzxqqvvbqFT_STOPWORD_FILEdzfxux(built-in)qjzxqqvvbqIDLE_TRANSACTION_TIMEOUTdzfxux0qjzxqqvvbqEXPIRE_LOGS_DAYSdzfxux10qjzxqqvvbqLOG_SLOW_VERBOSITYdzfxuxqjzxqqvvbqDELAYED_QUEUE_SIZEdzfxux1000qjzxqqvvbqTHREAD_POOL_IDLE_TIMEOUTdzfxux60qjzxqqvvbqFT_MAX_WORD_LENdzfxux84qjzxqqvvbqINNODB_LOCK_SCHEDULE_ALGORITHMdzfxuxfcfsqjzxqqvvbqMAX_DIGEST_LENGTHdzfxux1024qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STATdzfxux-1qjzxqqvvbqDISCONNECT_ON_EXPIRED_PASSWORDdzfxuxOFFqjzxqqvvbqTABLE_OPEN_CACHE_INSTANCESdzfxux8qjzxqqvvbqTX_ISOLATIONdzfxuxREPEATABLE-READqjzxqqvvbqRELAY_LOG_INFO_FILEdzfxuxrelay-log.infoqjzxqqvvbqSYSTEM_VERSIONING_ASOFdzfxuxDEFAULTqjzxqqvvbqINNODB_AUTOINC_LOCK_MODEdzfxux1qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_MEMORY_CLASSESdzfxux320qjzxqqvvbqLC_MESSAGESdzfxuxen_USqjzxqqvvbqLOG_SLOW_ADMIN_STATEMENTSdzfxuxONqjzxqqvvbqINNODB_MAX_PURGE_LAG_WAITdzfxux4294967295qjzxqqvvbqLOWER_CASE_FILE_SYSTEMdzfxuxOFFqjzxqqvvbqINNODB_BUFFER_POOL_FILENAMEdzfxuxib_buffer_poolqjzxqqvvbqSLAVE_PARALLEL_THREADSdzfxux0qjzxqqvvbqINNODB_MAX_PURGE_LAG_DELAYdzfxux0qjzxqqvvbqWSREP_FORCED_BINLOG_FORMATdzfxuxNONEqjzxqqvvbqINNODB_BUFFER_POOL_DUMP_NOWdzfxuxOFFqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_SOCKET_CLASSESdzfxux10qjzxqqvvbqINNODB_BACKGROUND_SCRUB_DATA_INTERVALdzfxux0qjzxqqvvbqTHREAD_HANDLINGdzfxuxone-thread-per-connectionqjzxqqvvbqINNODB_STATUS_OUTPUTdzfxuxOFFqjzxqqvvbqNET_RETRY_COUNTdzfxux10qjzxqqvvbqINNODB_UNDO_LOG_TRUNCATEdzfxuxOFFqjzxqqvvbqCHARACTER_SET_CLIENTdzfxuxutf8mb4qjzxqqvvbqINNODB_ADAPTIVE_HASH_INDEXdzfxuxOFFqjzxqqvvbqMAX_PASSWORD_ERRORSdzfxux4294967295qjzxqqvvbqINNODB_ENCRYPT_LOGdzfxuxOFFqjzxqqvvbqPSEUDO_THREAD_IDdzfxux5360qjzxqqvvbqSOCKETdzfxux/run/mysqld/mysqld.sockqjzxqqvvbqVERSION_SSL_LIBRARYdzfxuxOpenSSL 1.1.1n  15 Mar 2022qjzxqqvvbqSTORED_PROGRAM_CACHEdzfxux256qjzxqqvvbqFLUSHdzfxuxOFFqjzxqqvvbqSSL_CRLdzfxuxqjzxqqvvbqINIT_SLAVEdzfxuxqjzxqqvvbqAUTO_INCREMENT_INCREMENTdzfxux1qjzxqqvvbqBINLOG_STMT_CACHE_SIZEdzfxux32768qjzxqqvvbqMAX_SESSION_MEM_USEDdzfxux9223372036854775807qjzxqqvvbqLOG_BIN_COMPRESSdzfxuxOFFqjzxqqvvbqWSREP_DATA_HOME_DIRdzfxux/var/lib/mysql/qjzxqqvvbqRELAY_LOG_RECOVERYdzfxuxOFFqjzxqqvvbqINNODB_LOG_COMPRESSED_PAGESdzfxuxONqjzxqqvvbqLONG_QUERY_TIMEdzfxux10.000000qjzxqqvvbqINNODB_DISABLE_SORT_FILE_CACHEdzfxuxOFFqjzxqqvvbqMYISAM_MMAP_SIZEdzfxux18446744073709551615qjzxqqvvbqINNODB_ENCRYPTION_ROTATION_IOPSdzfxux100qjzxqqvvbqPROXY_USERdzfxuxqjzxqqvvbqHAVE_DYNAMIC_LOADINGdzfxuxYESqjzxqqvvbqCOLLATION_CONNECTIONdzfxuxutf8mb4_general_ciqjzxqqvvbqWSREP_SST_METHODdzfxuxrsyncqjzxqqvvbqLOG_WARNINGSdzfxux2qjzxqqvvbqINNODB_PRINT_ALL_DEADLOCKSdzfxuxOFFqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSESdzfxux222qjzxqqvvbqINNODB_STATS_TRADITIONALdzfxuxONqjzxqqvvbqMAX_BINLOG_CACHE_SIZEdzfxux18446744073709547520qjzxqqvvbqLOG_SLOW_DISABLED_STATEMENTSdzfxuxspqjzxqqvvbqOLD_PASSWORDSdzfxuxOFFqjzxqqvvbqINNODB_MAX_DIRTY_PAGES_PCTdzfxux90.000000qjzxqqvvbqNET_WRITE_TIMEOUTdzfxux60qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_METADATA_LOCKSdzfxux-1qjzxqqvvbqPERFORMANCE_SCHEMA_HOSTS_SIZEdzfxux-1qjzxqqvvbqKEY_BUFFER_SIZEdzfxux134217728qjzxqqvvbqMAX_SORT_LENGTHdzfxux1024qjzxqqvvbqINNODB_INSTANT_ALTER_COLUMN_ALLOWEDdzfxuxadd_drop_reorderqjzxqqvvbqWSREP_MYSQL_REPLICATION_BUNDLEdzfxux0qjzxqqvvbqPSEUDO_SLAVE_MODEdzfxuxOFFqjzxqqvvbqCOLUMN_COMPRESSION_ZLIB_STRATEGYdzfxuxDEFAULT_STRATEGYqjzxqqvvbqSYNC_RELAY_LOGdzfxux10000qjzxqqvvbqMAX_WRITE_LOCK_COUNTdzfxux4294967295qjzxqqvvbqINNODB_DEFAULT_ENCRYPTION_KEY_IDdzfxux1qjzxqqvvbqLARGE_PAGESdzfxuxOFFqjzxqqvvbqINNODB_MAX_UNDO_LOG_SIZEdzfxux10485760qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_SQL_TEXT_LENGTHdzfxux1024qjzxqqvvbqMAX_ROWID_FILTER_SIZEdzfxux131072qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_FILE_INSTANCESdzfxux-1qjzxqqvvbqSLAVE_NET_TIMEOUTdzfxux60qjzxqqvvbqBULK_INSERT_BUFFER_SIZEdzfxux8388608qjzxqqvvbqPLUGIN_DIRdzfxux/usr/lib/mysql/plugin/qjzxqqvvbqOPTIMIZER_TRACE_MAX_MEM_SIZEdzfxux1048576qjzxqqvvbqTHREAD_POOL_PRIORITYdzfxuxautoqjzxqqvvbqKEY_CACHE_DIVISION_LIMITdzfxux100qjzxqqvvbqLICENSEdzfxuxGPLqjzxqqvvbqRPL_SEMI_SYNC_MASTER_ENABLEDdzfxuxOFFqjzxqqvvbqINNODB_ADAPTIVE_FLUSHING_LWMdzfxux10.000000qjzxqqvvbqQUERY_CACHE_SIZEdzfxux1048576qjzxqqvvbqINNODB_DEFRAGMENT_FREQUENCYdzfxux40qjzxqqvvbqGTID_SLAVE_POSdzfxuxqjzxqqvvbqSQL_WARNINGSdzfxuxOFFqjzxqqvvbqWSREP_SLAVE_UK_CHECKSdzfxuxOFFqjzxqqvvbqSTRICT_PASSWORD_VALIDATIONdzfxuxONqjzxqqvvbqMETADATA_LOCKS_HASH_INSTANCESdzfxux8qjzxqqvvbqINNODB_SYNC_ARRAY_SIZEdzfxux1qjzxqqvvbqBINLOG_COMMIT_WAIT_USECdzfxux100000qjzxqqvvbqWSREP_GTID_DOMAIN_IDdzfxux0qjzxqqvvbqREAD_BUFFER_SIZEdzfxux131072qjzxqqvvbqTHREAD_POOL_STALL_LIMITdzfxux500qjzxqqvvbqWSREP_STRICT_DDLdzfxuxOFFqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_SOCKET_INSTANCESdzfxux-1qjzxqqvvbqPID_FILEdzfxux/run/mysqld/mysqld.pidqjzxqqvvbqTX_READ_ONLYdzfxuxOFFqjzxqqvvbqTLS_VERSIONdzfxuxTLSv1.1,TLSv1.2,TLSv1.3qjzxqqvvbqINNODB_RANDOM_READ_AHEADdzfxuxOFFqjzxqqvvbqMIN_EXAMINED_ROW_LIMITdzfxux0qjzxqqvvbqINNODB_UNDO_LOGSdzfxux128qjzxqqvvbqINNODB_STATS_PERSISTENT_SAMPLE_PAGESdzfxux20qjzxqqvvbqPORTdzfxux3306qjzxqqvvbqFLUSH_TIMEdzfxux0qjzxqqvvbqQUERY_CACHE_WLOCK_INVALIDATEdzfxuxOFFqjzxqqvvbqGTID_BINLOG_STATEdzfxuxqjzxqqvvbqLOG_BIN_TRUST_FUNCTION_CREATORSdzfxuxOFFqjzxqqvvbqRPL_SEMI_SYNC_MASTER_TRACE_LEVELdzfxux32qjzxqqvvbqINNODB_MONITOR_DISABLEdzfxuxqjzxqqvvbqTHREAD_POOL_MAX_THREADSdzfxux65536qjzxqqvvbqMYISAM_BLOCK_SIZEdzfxux1024qjzxqqvvbqSYNC_BINLOGdzfxux0qjzxqqvvbqMAX_BINLOG_STMT_CACHE_SIZEdzfxux18446744073709547520qjzxqqvvbqOLD_ALTER_TABLEdzfxuxDEFAULTqjzxqqvvbqENCRYPT_TMP_FILESdzfxuxOFFqjzxqqvvbqLOG_OUTPUTdzfxuxFILEqjzxqqvvbqINNODB_SPIN_WAIT_DELAYdzfxux4qjzxqqvvbqQUERY_CACHE_TYPEdzfxuxOFFqjzxqqvvbqINNODB_STATS_INCLUDE_DELETE_MARKEDdzfxuxOFFqjzxqqvvbqWSREP_NODE_INCOMING_ADDRESSdzfxuxAUTOqjzxqqvvbqINNODB_DEFRAGMENT_STATS_ACCURACYdzfxux0qjzxqqvvbqLC_TIME_NAMESdzfxuxen_USqjzxqqvvbqINNODB_LOCK_WAIT_TIMEOUTdzfxux50qjzxqqvvbqMAX_INSERT_DELAYED_THREADSdzfxux20qjzxqqvvbqINNODB_OLD_BLOCKS_TIMEdzfxux1000qjzxqqvvbqRPL_SEMI_SYNC_MASTER_WAIT_NO_SLAVEdzfxuxONqjzxqqvvbqWSREP_GTID_SEQ_NOdzfxux0qjzxqqvvbqBINLOG_CACHE_SIZEdzfxux32768qjzxqqvvbqDEFAULT_MASTER_CONNECTIONdzfxuxqjzxqqvvbqTHREAD_POOL_DEDICATED_LISTENERdzfxuxOFFqjzxqqvvbqINNODB_COMPRESSION_FAILURE_THRESHOLD_PCTdzfxux5qjzxqqvvbqMYSQL56_TEMPORAL_FORMATdzfxuxONqjzxqqvvbqLOCKED_IN_MEMORYdzfxuxOFFqjzxqqvvbqLOG_QUERIES_NOT_USING_INDEXESdzfxuxOFFqjzxqqvvbqINNODB_LRU_FLUSH_SIZEdzfxux32qjzxqqvvbqINNODB_LOG_OPTIMIZE_DDLdzfxuxOFFqjzxqqvvbqINNODB_DISALLOW_WRITESdzfxuxOFFqjzxqqvvbqEXTERNAL_USERdzfxuxqjzxqqvvbqINNODB_PREFIX_INDEX_CLUSTER_OPTIMIZATIONdzfxuxOFFqjzxqqvvbqVERSION_MALLOC_LIBRARYdzfxuxsystemqjzxqqvvbqREPLICATE_DO_TABLEdzfxuxqjzxqqvvbqSKIP_EXTERNAL_LOCKINGdzfxuxONqjzxqqvvbqSLAVE_SKIP_ERRORSdzfxuxOFFqjzxqqvvbqSKIP_NETWORKINGdzfxuxOFFqjzxqqvvbqINNODB_BUFFER_POOL_DUMP_PCTdzfxux25qjzxqqvvbqWSREP_NOTIFY_CMDdzfxuxqjzxqqvvbqINNODB_ENCRYPT_TABLESdzfxuxOFFqjzxqqvvbqINIT_CONNECTdzfxuxqjzxqqvvbqCOLLATION_DATABASEdzfxuxlatin1_swedish_ciqjzxqqvvbqTABLE_DEFINITION_CACHEdzfxux400qjzxqqvvbqINNODB_MONITOR_ENABLEdzfxuxqjzxqqvvbqARIA_GROUP_COMMITdzfxuxnoneqjzxqqvvbqINNODB_LOG_BUFFER_SIZEdzfxux16777216qjzxqqvvbqSLAVE_RUN_TRIGGERS_FOR_RBRdzfxuxNOqjzxqqvvbqHOST_CACHE_SIZEdzfxux279qjzxqqvvbqSLAVE_PARALLEL_WORKERSdzfxux0qjzxqqvvbqINNODB_MAX_PURGE_LAGdzfxux0qjzxqqvvbqMAX_DELAYED_THREADSdzfxux20qjzxqqvvbqMYISAM_MAX_SORT_FILE_SIZEdzfxux9223372036853727232qjzxqqvvbqMETADATA_LOCKS_CACHE_SIZEdzfxux1024qjzxqqvvbqINNODB_LRU_SCAN_DEPTHdzfxux1536qjzxqqvvbqLAST_INSERT_IDdzfxux0qjzxqqvvbqWSREP_LOG_CONFLICTSdzfxuxOFFqjzxqqvvbqHOSTNAMEdzfxux3a45bbb77fd0qjzxqqvvbqOLD_MODEdzfxuxqjzxqqvvbqDEFAULT_PASSWORD_LIFETIMEdzfxux0qjzxqqvvbqDEFAULT_REGEX_FLAGSdzfxuxqjzxqqvvbqOLDdzfxuxOFFqjzxqqvvbqHISTOGRAM_TYPEdzfxuxDOUBLE_PREC_HBqjzxqqvvbqTHREAD_CACHE_SIZEdzfxux151qjzxqqvvbqHAVE_COMPRESSdzfxuxYESqjzxqqvvbqTCP_KEEPALIVE_INTERVALdzfxux0qjzxqqvvbqINNODB_USE_ATOMIC_WRITESdzfxuxONqjzxqqvvbqMASTER_VERIFY_CHECKSUMdzfxuxOFFqjzxqqvvbqPROXY_PROTOCOL_NETWORKSdzfxuxqjzxqqvvbqGTID_CURRENT_POSdzfxuxqjzxqqvvbqINNODB_DOUBLEWRITEdzfxuxONqjzxqqvvbqBINLOG_FORMATdzfxuxMIXEDqjzxqqvvbqINNODB_STATS_PERSISTENTdzfxuxONqjzxqqvvbqANALYZE_SAMPLE_PERCENTAGEdzfxux100.000000qjzxqqvvbqDEFAULT_WEEK_FORMATdzfxux0qjzxqqvvbqKEEP_FILES_ON_CREATEdzfxuxOFFqjzxqqvvbqINNODB_CHANGE_BUFFER_MAX_SIZEdzfxux25qjzxqqvvbqFT_BOOLEAN_SYNTAXdzfxux+ -><()~*:""&|qjzxqqvvbqINNODB_DEFAULT_ROW_FORMATdzfxuxdynamicqjzxqqvvbqSLAVE_DDL_EXEC_MODEdzfxuxIDEMPOTENTqjzxqqvvbqINNODB_USE_NATIVE_AIOdzfxuxONqjzxqqvvbqCHARACTER_SET_DATABASEdzfxuxlatin1qjzxqqvvbqHAVE_PROFILINGdzfxuxYESqjzxqqvvbqDATE_FORMATdzfxux%Y-%m-%dqjzxqqvvbqINNODB_UNDO_TABLESPACESdzfxux0qjzxqqvvbqGTID_DOMAIN_IDdzfxux0qjzxqqvvbqINNODB_BUF_DUMP_STATUS_FREQUENCYdzfxux0qjzxqqvvbqTIMESTAMPdzfxux1764539108.420784qjzxqqvvbqDEADLOCK_SEARCH_DEPTH_SHORTdzfxux4qjzxqqvvbqSLAVE_COMPRESSED_PROTOCOLdzfxuxOFFqjzxqqvvbqINNODB_FT_MIN_TOKEN_SIZEdzfxux3qjzxqqvvbqPERFORMANCE_SCHEMA_MAX_FILE_CLASSESdzfxux80qjzxqqvvbqINNODB_FT_USER_STOPWORD_TABLEdzfxuxqjzxqqvvbqWSREP_SLAVE_FK_CHECKSdzfxuxONqjzxqqvvbqSERVER_IDdzfxux1qjzxqqvvbqHAVE_QUERY_CACHEdzfxuxYESqjzxqqvvbqARIA_MAX_SORT_FILE_SIZEdzfxux9223372036853727232qjzxqqvvbqSLAVE_TRANSACTION_RETRIESdzfxux10qjzxqqvvbqINNODB_TEMP_DATA_FILE_PATHdzfxuxibtmp1:12M:autoextendqjzxqqvvbqMAX_RECURSIVE_ITERATIONSdzfxux4294967295qjzxqqvvbqINNODB_SCRUB_LOG_SPEEDdzfxux256qjzxqqvvbqLOG_ERRORdzfxuxqjzxqqvvbqARIA_SYNC_LOG_DIRdzfxuxNEWFILEqjzxqqvvbqSECURE_FILE_PRIVdzfxuxqjzxqqvvbqINNODB_FT_ENABLE_STOPWORDdzfxuxONqjzxqqvvbqMYISAM_REPAIR_THREADSdzfxux1qjzxqqvvbqINNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVALdzfxux0qjzxqqvvbqTMP_DISK_TABLE_SIZEdzfxux18446744073709551615qjzxqqvvbqARIA_GROUP_COMMIT_INTERVALdzfxux0qjzxqqvvbqOPEN_FILES_LIMITdzfxux32186qjzxqqvvbqPROFILING_HISTORY_SIZEdzfxux15qjzxqqvvbqINNODB_LOG_FILES_IN_GROUPdzfxux1qjzxqqvvbqINNODB_CHANGE_BUFFERINGdzfxuxnoneqjzxqqvvbqTIME_FORMATdzfxux%H:%i:%sqjzxqqvvbqINNODB_STATS_MODIFIED_COUNTERdzfxux0qjzxqqvvbqPROTOCOL_VERSIONdzfxux10qjzxqqvvbqBINLOG_OPTIMIZE_THREAD_SCHEDULINGdzfxuxONqjzxqqvvbqCHARACTER_SET_FILESYSTEMdzfxuxbinaryqjzxqqvvbqENCRYPT_BINLOGdzfxuxOFFqjzxqqvvbqRELAY_LOGdzfxuxqjzxqqvvbqSQL_SELECT_LIMITdzfxux18446744073709551615qjzxqqvvbqGENERAL_LOGdzfxuxOFFqjzxqqvvbqARIA_STATS_METHODdzfxuxnulls_unequalqjzxqqvvbqWSREP_DEBUGdzfxuxNONEqjzxqqvvbqNET_BUFFER_LENGTHdzfxux16384qjzxqqvvbqSLAVE_SQL_VERIFY_CHECKSUMdzfxuxONqjzxqqvvbqINNODB_COMPRESSION_ALGORITHMdzfxuxzlibqjzxqqvvbqSLAVE_TRANSACTION_RETRY_INTERVALdzfxux0qjzxqqvvbqPLUGIN_MATURITYdzfxuxgammaqjzxqqvvbqHAVE_CRYPTdzfxuxYESqjzxqqvvbqINNODB_PURGE_THREADSdzfxux4qjzxqqvvbqWSREP_SLAVE_THREADSdzfxux1qjzxqqvvbqPROFILINGdzfxuxOFFqjzxqqvvbqHAVE_OPENSSLdzfxuxYESqjzxqqvvbqARIA_PAGECACHE_BUFFER_SIZEdzfxux134217728qjzxqqvvbqWSREP_ONdzfxuxOFFqjzxqqvvbqEXPENSIVE_SUBQUERY_LIMITdzfxux100qjzxqqvvbqWAIT_TIMEOUTdzfxux28800qjzxqqvvbqINNODB_BUFFER_POOL_DUMP_AT_SHUTDOWNdzfxuxONqjzxqqvvbqOPTIMIZER_MAX_SEL_ARG_WEIGHTdzfxux32000qjzxqqvvbqSSL_CRLPATHdzfxuxqjzxqqvvbqSSL_CAdzfxuxqjzxqqvvbqDEADLOCK_SEARCH_DEPTH_LONGdzfxux15qjzxqqvvbqSESSION_TRACK_SCHEMAdzfxuxONqjzxqqvvbqMRR_BUFFER_SIZEdzfxux262144qjzxqqvvbqINNODB_LOG_FILE_SIZEdzfxux100663296qjzxqqvvbqINNODB_MAX_DIRTY_PAGES_PCT_LWMdzfxux0.000000qjzxqqvvbqSQL_NOTESdzfxuxONqjzxqqvvbqIDLE_WRITE_TRANSACTION_TIMEOUTdzfxux0qjzxqqvvbqWSREP_MAX_WS_SIZEdzfxux2147483647qjzxqqvvbqFOREIGN_KEY_CHECKSdzfxuxONqjzxqqvvbqGTID_SEQ_NOdzfxux0qjzxqqvvbqINNODB_MONITOR_RESETdzfxuxqjzxqqvvbqSQL_BUFFER_RESULTdzfxuxOFFqjzxqqvvbqINNODB_STATS_AUTO_RECALCdzfxuxONqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_DIGEST_LENGTHdzfxux1024qjzxqqvvbqINNODB_COMMIT_CONCURRENCYdzfxux0qjzxqqvvbqOPTIMIZER_SWITCHdzfxuxindex_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=offqjzxqqvvbqINNODB_CONCURRENCY_TICKETSdzfxux0qjzxqqvvbqBINLOG_COMMIT_WAIT_COUNTdzfxux0qjzxqqvvbqINNODB_FATAL_SEMAPHORE_WAIT_THRESHOLDdzfxux600qjzxqqvvbqCOLLATION_SERVERdzfxuxutf8mb4_general_ciqjzxqqvvbqINNODB_PAGE_CLEANERSdzfxux1qjzxqqvvbqRELAY_LOG_BASENAMEdzfxuxqjzxqqvvbqINNODB_FT_SORT_PLL_DEGREEdzfxux2qjzxqqvvbqWSREP_CLUSTER_NAMEdzfxuxmy_wsrep_clusterqjzxqqvvbqSESSION_TRACK_TRANSACTION_INFOdzfxuxOFFqjzxqqvvbqLOG_BIN_INDEXdzfxuxqjzxqqvvbqINNODB_FILL_FACTORdzfxux100qjzxqqvvbqNET_READ_TIMEOUTdzfxux30qjzxqqvvbqINNODB_ADAPTIVE_FLUSHINGdzfxuxONqjzxqqvvbqLOG_BIN_BASENAMEdzfxuxqjzxqqvvbqINNODB_FILE_PER_TABLEdzfxuxONqjzxqqvvbqMAX_JOIN_SIZEdzfxux18446744073709551615qjzxqqvvbqEXTRA_PORTdzfxux0qjzxqqvvbqGTID_STRICT_MODEdzfxuxOFFqjzxqqvvbqARIA_BLOCK_SIZEdzfxux8192qjzxqqvvbqSLAVE_PARALLEL_MAX_QUEUEDdzfxux131072qjzxqqvvbqTHREAD_POOL_PRIO_KICKUP_TIMERdzfxux1000qjzxqqvvbqSECURE_AUTHdzfxuxONqjzxqqvvbqINNODB_DATA_HOME_DIRdzfxuxqjzxqqvvbqWSREP_PATCH_VERSIONdzfxuxwsrep_26.22qjzxqqvvbqINNODB_READ_IO_THREADSdzfxux4qjzxqqvvbqREPLICATE_IGNORE_DBdzfxuxqjzxqqvvbqINNODB_WRITE_IO_THREADSdzfxux4qjzxqqvvbqIGNORE_BUILTIN_INNODBdzfxuxOFFqjzxqqvvbqINNODB_BUFFER_POOL_INSTANCESdzfxux1qjzxqqvvbqPRELOAD_BUFFER_SIZEdzfxux32768qjzxqqvvbqINNODB_UNDO_DIRECTORYdzfxux./qjzxqqvvbqTHREAD_POOL_EXACT_STATSdzfxuxOFFqjzxqqvvbqBIG_TABLESdzfxuxOFFqjzxqqvvbqSYNC_RELAY_LOG_INFOdzfxux10000qjzxqqvvbqINNODB_FT_RESULT_CACHE_LIMITdzfxux2000000000qjzxqqvvbqREPORT_PORTdzfxux3306qjzxqqvvbqWSREP_SYNC_WAITdzfxux0qjzxqqvvbqTCP_KEEPALIVE_PROBESdzfxux0qjzxqqvvbqWSREP_IGNORE_APPLY_ERRORSdzfxux7qjzxqqvvbqJOIN_CACHE_LEVELdzfxux2qjzxqqvvbqINNODB_ENCRYPTION_ROTATE_KEY_AGEdzfxux1qjzxqqvvbqWSREP_RESTART_SLAVEdzfxuxOFFqjzxqqvvbqOPTIMIZER_TRACEdzfxuxenabled=offqjzxqqvvbqVERSION_SOURCE_REVISIONdzfxux9aa3564e8a06c3d2027fc514213ecf42b049b06eqjzxqqvvbqREQUIRE_SECURE_TRANSPORTdzfxuxOFFqjzxqqvvbqWSREP_PROVIDERdzfxuxnoneqjzxqqvvbqINNODB_READ_AHEAD_THRESHOLDdzfxux56qjzxqqvvbqEXTRA_MAX_CONNECTIONSdzfxux1qjzxqqvvbqINNODB_READ_ONLYdzfxuxOFFqjzxqqvvbqSQL_SLAVE_SKIP_COUNTERdzfxux0qjzxqqvvbqINNODB_IMMEDIATE_SCRUB_DATA_UNCOMPRESSEDdzfxuxOFFqjzxqqvvbqSKIP_PARALLEL_REPLICATIONdzfxuxOFFqjzxqqvvbqINNODB_MONITOR_RESET_ALLdzfxuxqjzxqqvvbqTABLE_OPEN_CACHEdzfxux2000qjzxqqvvbqINNODB_OPTIMIZE_FULLTEXT_ONLYdzfxuxOFFqjzxqqvvbqLOWER_CASE_TABLE_NAMESdzfxux0qjzxqqvvbqINNODB_STATS_METHODdzfxuxnulls_equalqjzxqqvvbqVERSION_COMPILE_MACHINEdzfxuxx86_64qjzxqqvvbqSSL_CIPHERdzfxuxqjzxqqvvbqHAVE_SSLdzfxuxDISABLEDqjzxqqvvbqLOG_SLOW_RATE_LIMITdzfxux1qjzxqqvvbqWSREP_CERTIFY_NONPKdzfxuxONqjzxqqvvbqINNODB_THREAD_CONCURRENCYdzfxux0qjzxqqvvbqTHREAD_POOL_SIZEdzfxux4qjzxqqvvbqINNODB_BACKGROUND_SCRUB_DATA_UNCOMPRESSEDdzfxuxOFFqjzxqqvvbqWSREP_MAX_WS_ROWSdzfxux0qjzxqqvvbqINNODB_BUFFER_POOL_SIZEdzfxux134217728qjzxqqvvbqLOG_DISABLED_STATEMENTSdzfxuxspqjzxqqvvbqLOCAL_INFILEdzfxuxONqjzxqqvvbqDIV_PRECISION_INCREMENTdzfxux4qjzxqqvvbqINNODB_BUFFER_POOL_LOAD_NOWdzfxuxOFFqjzxqqvvbqDATETIME_FORMATdzfxux%Y-%m-%d %H:%i:%sqjzxqqvvbqIGNORE_DB_DIRSdzfxuxqjzxqqvvbqREPORT_USERdzfxuxqjzxqqvvbqBINLOG_CHECKSUMdzfxuxCRC32qjzxqqvvbqQUERY_CACHE_STRIP_COMMENTSdzfxuxOFFqjzxqqvvbqINNODB_PAGE_SIZEdzfxux16384qjzxqqvvbqWSREP_TRX_FRAGMENT_SIZEdzfxux0qjzxqqvvbqARIA_ENCRYPT_TABLESdzfxuxOFFqjzxqqvvbqDEFAULT_TMP_STORAGE_ENGINEdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_EVENTS_STATEMENTS_HISTORY_LONG_SIZEdzfxux-1qjzxqqvvbqBINLOG_ANNOTATE_ROW_EVENTSdzfxuxONqjzxqqvvbqRPL_SEMI_SYNC_MASTER_WAIT_POINTdzfxuxAFTER_COMMITqjzxqqvvbqLOG_SLOW_SLAVE_STATEMENTSdzfxuxONqjzxqqvvbqARIA_CHECKPOINT_LOG_ACTIVITYdzfxux1048576qjzxqqvvbqSQL_IF_EXISTSdzfxuxOFFqjzxqqvvbqINNODB_FLUSH_LOG_AT_TRX_COMMITdzfxux1qjzxqqvvbqSSL_CERTdzfxuxqjzxqqvvbqWSREP_PROVIDER_OPTIONSdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_FILE_HANDLESdzfxux32768qjzxqqvvbqMAX_PREPARED_STMT_COUNTdzfxux16382qjzxqqvvbqWSREP_CONVERT_LOCK_TO_TRXdzfxuxOFFqjzxqqvvbqWSREP_SST_DONORdzfxuxqjzxqqvvbqWSREP_NODE_NAMEdzfxux3a45bbb77fd0qjzxqqvvbqINNODB_COMPRESSION_PAD_PCT_MAXdzfxux50qjzxqqvvbqWSREP_LOAD_DATA_SPLITTINGdzfxuxOFFqjzxqqvvbqGENERAL_LOG_FILEdzfxux3a45bbb77fd0.logqjzxqqvvbqINSERT_IDdzfxux0qjzxqqvvbqSKIP_REPLICATIONdzfxuxOFFqjzxqqvvbqDEADLOCK_TIMEOUT_SHORTdzfxux10000qjzxqqvvbqWSREP_GTID_MODEdzfxuxOFFqjzxqqvvbqROWID_MERGE_BUFF_SIZEdzfxux8388608qjzxqqvvbqDELAYED_INSERT_TIMEOUTdzfxux300qjzxqqvvbqWSREP_CAUSAL_READSdzfxuxOFFqjzxqqvvbqCOLUMN_COMPRESSION_THRESHOLDdzfxux100qjzxqqvvbqLAST_GTIDdzfxuxqjzxqqvvbqINNODB_CMP_PER_INDEX_ENABLEDdzfxuxOFFqjzxqqvvbqSLAVE_TYPE_CONVERSIONSdzfxuxqjzxqqvvbqINNODB_ONLINE_ALTER_LOG_MAX_SIZEdzfxux134217728qjzxqqvvbqARIA_PAGECACHE_DIVISION_LIMITdzfxux100qjzxqqvvbqUPDATABLE_VIEWS_WITH_LIMITdzfxuxYESqjzxqqvvbqIDENTITYdzfxux0qjzxqqvvbqINNODB_DEFRAGMENTdzfxuxOFFqjzxqqvvbqMAX_TMP_TABLESdzfxux32qjzxqqvvbqIN_PREDICATE_CONVERSION_THRESHOLDdzfxux1000qjzxqqvvbqQUERY_ALLOC_BLOCK_SIZEdzfxux16384qjzxqqvvbqWSREP_REPLICATE_MYISAMdzfxuxOFFqjzxqqvvbqSQL_LOG_OFFdzfxuxOFFqjzxqqvvbqSQL_QUOTE_SHOW_CREATEdzfxuxONqjzxqqvvbqINNODB_BUFFER_POOL_CHUNK_SIZEdzfxux134217728qjzxqqvvbqWSREP_NODE_ADDRESSdzfxuxqjzxqqvvbqSLOW_QUERY_LOG_FILEdzfxux3a45bbb77fd0-slow.logqjzxqqvvbqWSREP_CERTIFICATION_RULESdzfxuxstrictqjzxqqvvbqREPLICATE_DO_DBdzfxuxqjzxqqvvbqPERFORMANCE_SCHEMA_MAX_TABLE_HANDLESdzfxux-1qjzxqqvvbqINNODB_BUFFER_POOL_LOAD_ABORTdzfxuxOFFqjzxqqvvbqSLAVE_EXEC_MODEdzfxuxSTRICTqjzxqqvvbqWARNING_COUNTdzfxux0qjzxqqvvbqMYISAM_STATS_METHODdzfxuxNULLS_UNEQUALqjzxqqvvbqINIT_FILEdzfxuxqjzxqqvvbqMYISAM_SORT_BUFFER_SIZEdzfxux134216704qjzxqqvvbqINTERACTIVE_TIMEOUTdzfxux28800qjzxqqvvbqINNODB_OLD_BLOCKS_PCTdzfxux37qjzxqqvvbqERROR_COUNTdzfxux0qjzxqqvvbqMAX_ERROR_COUNTdzfxux64qjzxqqvvbqSLAVE_LOAD_TMPDIRdzfxux/tmpqjzxqqvvbqFT_MIN_WORD_LENdzfxux4qjzxqqvvbqLOG_TC_SIZEdzfxux24576qjzxqqvvbqSLAVE_PARALLEL_MODEdzfxuxoptimisticqjzxqqvvbqINNODB_FT_TOTAL_CACHE_SIZEdzfxux640000000qjzxqqvvbqSKIP_SHOW_DATABASEdzfxuxOFFqjzxqqvvbqRELAY_LOG_INDEXdzfxuxqjzxqqvvbqAUTOCOMMITdzfxuxONqjzxqqvvbqWSREP_SST_DONOR_REJECTS_QUERIESdzfxuxOFFqjzxqqvvbqEQ_RANGE_INDEX_DIVE_LIMITdzfxux200qjzxqqvvbqWSREP_SST_AUTHdzfxuxqjzxqqvvbqKEY_CACHE_BLOCK_SIZEdzfxux1024qjzxqqvvbqSTORAGE_ENGINEdzfxuxInnoDBqjzxqqvvbqARIA_CHECKPOINT_INTERVALdzfxux30qjzxqqvvbqINNODB_FLUSH_METHODdzfxuxfsyncqjzxqqvvbqTRANSACTION_PREALLOC_SIZEdzfxux4096qjzxqqvvbqSQL_SAFE_UPDATESdzfxuxOFFqjzxqqvvbqVERSION_COMPILE_OSdzfxuxdebian-linux-gnuqjzxqqvvbqRPL_SEMI_SYNC_SLAVE_ENABLEDdzfxuxOFFqjzxqqvvbqBINLOG_ROW_IMAGEdzfxuxFULLqjzxqqvvbqMYISAM_USE_MMAPdzfxuxOFFqjzxqqvvbqENCRYPT_TMP_DISK_TABLESdzfxuxOFFqjzxqqvvbqINNODB_BUFFER_POOL_LOAD_AT_STARTUPdzfxuxONqjzxqqvvbqINNODB_FT_CACHE_SIZEdzfxux8000000qjzxqqvvbqVERSIONdzfxux10.5.15-MariaDB-0+deb11u1qjzxqqvvbqIDLE_READONLY_TRANSACTION_TIMEOUTdzfxux0qjzxqqvvbqGTID_BINLOG_POSdzfxuxqjzxqqvvbqREPLICATE_EVENTS_MARKED_FOR_SKIPdzfxuxREPLICATEqjzxqqvvbqLOG_SLAVE_UPDATESdzfxuxOFFqjzxqqvvbqINNODB_FLUSH_SYNCdzfxuxONqjzxqqvvbqDEADLOCK_TIMEOUT_LONGdzfxux50000000qjzxqqvvbqWSREP_OSU_METHODdzfxuxTOIqjzxqqvvbqRELAY_LOG_SPACE_LIMITdzfxux0qjzxqqvvbqINNODB_OPEN_FILESdzfxux2000qjzxqqvvbqDEBUG_NO_THREAD_ALARMdzfxuxOFFqjzxqqvvbqTCP_NODELAYdzfxuxONqjzxqqvvbqSYNC_MASTER_INFOdzfxux10000qjzxqqvvbqSKIP_NAME_RESOLVEdzfxuxOFFqjzxqqvvbqINNODB_DEADLOCK_DETECTdzfxuxONqjzxqqvvbqSLAVE_DOMAIN_PARALLEL_THREADSdzfxux0qjzxqqvvbqINNODB_FT_MAX_TOKEN_SIZEdzfxux84qjzxqqvvbqENFORCE_STORAGE_ENGINEdzfxuxqjzxqqvvbqINNODB_FT_SERVER_STOPWORD_TABLEdzfxuxqjzxqqvvbqINNODB_FT_ENABLE_DIAG_PRINTdzfxuxOFFqjzxqqvvbqINNODB_DEFRAGMENT_FILL_FACTOR_N_RECSdzfxux20qjzxqqvvbqHAVE_SYMLINKdzfxuxYESqjzxqqvvbqKEY_CACHE_SEGMENTSdzfxux0qjzxqqvvbqINNODB_LARGE_PREFIXdzfxuxqjzxqqvvbqINNODB_DEFRAGMENT_N_PAGESdzfxux7qjzxqqvvbqINNODB_FLUSH_NEIGHBORSdzfxux1qjzxqqvvbqLOG_SLOW_FILTERdzfxuxadmin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_diskqjzxqqvvbqSECURE_TIMESTAMPdzfxuxNOqjzxqqvvbqBASEDIRdzfxux/usrqjzxqqvvbqARIA_SORT_BUFFER_SIZEdzfxux268434432qjzxqqvvbqINNODB_DATA_FILE_PATHdzfxuxibdata1:12M:autoextendqjzxqqvvbqINNODB_THREAD_SLEEP_DELAYdzfxux0qjzxqqvvbqSSL_KEYdzfxuxqjzxqqvvbqWSREP_RECOVERdzfxuxOFFqjzxqqvvbqOPTIMIZER_USE_CONDITION_SELECTIVITYdzfxux4qjzxqqvvbqGTID_CLEANUP_BATCH_SIZEdzfxux64qjzxqqvvbqGTID_POS_AUTO_ENGINESdzfxuxqjzxqqvvbqINNODB_FT_AUX_TABLEdzfxuxqjzxqqvvbqARIA_PAGECACHE_FILE_HASH_SIZEdzfxux512qjzxqqvvbqMAX_SEEKS_FOR_KEYdzfxux4294967295qjzxqqvvbqINNODB_LOG_WRITE_AHEAD_SIZEdzfxux8192qjzxqqvvbqINNODB_REPLICATION_DELAYdzfxux0qjzxqqvvbqWSREP_TRX_FRAGMENT_UNITdzfxuxbytesqjzxqqvvbqQUERY_CACHE_MIN_RES_UNITdzfxux4096qjzxqqvvbqREAD_BINLOG_SPEED_LIMITdzfxux0qjzxqqvvbqINNODB_STATS_ON_METADATAdzfxuxOFFqjzxqqvvbqTHREAD_STACKdzfxux299008qjzxqqvvbqINNODB_CHECKSUM_ALGORITHMdzfxuxfull_crc32qjzxqqvvbqINNODB_FORCE_LOAD_CORRUPTEDdzfxuxOFFqjzxqqvvbqARIA_LOG_PURGE_TYPEdzfxuximmediateqjzxqqvvbqLOG_BINdzfxuxOFFqjzxqqvvbqLARGE_PAGE_SIZEdzfxux0qjzxqqvvbqREPLICATE_WILD_IGNORE_TABLEdzfxuxqjzxqqvvbqREAD_RND_BUFFER_SIZEdzfxux262144qjzxqqvvbqWSREP_SR_STOREdzfxuxtableqjzxqqvvbqIN_TRANSACTIONdzfxux0qjzxqqvvbqWSREP_SST_RECEIVE_ADDRESSdzfxuxAUTOqjzxqqvvbqARIA_LOG_FILE_SIZEdzfxux1073741824qjzxqqvvbqWSREP_DESYNCdzfxuxOFFqjzxqqvvbqOPTIMIZER_SEARCH_DEPTHdzfxux62qjzxqqvvbqSESSION_TRACK_STATE_CHANGEdzfxuxOFFqjzxqqvvbqTCP_KEEPALIVE_TIMEdzfxux0qjzxqqvvbqTIME_ZONEdzfxuxSYSTEMqjzxqqvvbqREAD_ONLYdzfxuxOFFqjzxqqvvbqUSERSTATdzfxuxOFFqjzxqqvvbqINNODB_VERSIONdzfxux10.5.15qjzxqqvvbqSESSION_TRACK_SYSTEM_VARIABLESdzfxuxautocommit,character_set_client,character_set_connection,character_set_results,time_zoneqjzxqqvvbqINNODB_ADAPTIVE_MAX_SLEEP_DELAYdzfxux0qjzxqqvvbqINNODB_PURGE_BATCH_SIZEdzfxux300qjzxqqvvbqINNODB_FORCE_PRIMARY_KEYdzfxuxOFFqjzxqqvvbqHISTOGRAM_SIZEdzfxux254qjzxqqvvbqWSREP_DIRTY_READSdzfxuxOFFqjzxqqvvbqINNODB_FORCE_RECOVERYdzfxux0qjzxqqvvbqINNODB_DEFRAGMENT_FILL_FACTORdzfxux0.900000qjzxqqvvbqREPLICATE_ANNOTATE_ROW_EVENTSdzfxuxONqjzxqqvvbqALTER_ALGORITHMdzfxuxDEFAULTqjzxqqvvbqUSE_STAT_TABLESdzfxuxPREFERABLY_FOR_QUERIESqjzxqqvvbqSQL_LOG_BINdzfxuxONqjzxqqvvbqINNODB_FAST_SHUTDOWNdzfxux1qjzxqqvvbqPERFORMANCE_SCHEMA_USERS_SIZEdzfxux-1qjzxqqvvbqINNODB_PURGE_RSEG_TRUNCATE_FREQUENCYdzfxux128qjzxqqvvbqBACK_LOGdzfxux80qjzxqqvvbqINNODB_SYNC_SPIN_LOOPSdzfxux30qjzxqqvvbqTMPDIRdzfxux/tmpqjzxqqvvbqRAND_SEED2dzfxux184452512qjzxqqvvbqINNODB_COMPRESSION_LEVELdzfxux6qjzxq


value:
  qvvbqOPTIONALdzfxuxBACKUP,QUICKdzfxuxDEFAULT,BACKUP,FORCE,QUICK,BACKUP_ALL,OFFdzfxuxBACKUP,QUICKdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxSpecifies how corrupted tables should be automatically repaireddzfxuxMYISAM_RECOVER_OPTIONSdzfxuxGLOBALdzfxuxSETdzfxuxYESqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxEnable redo log encryptiondzfxuxINNODB_ENCRYPT_LOGdzfxuxGLOBALdzfxuxBOOLEANdzfxuxYESqjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxOFFdzfxuxIs compression the default for new tablesdzfxuxINNODB_COMPRESSION_DEFAULTdzfxuxSESSIONdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxCA file in PEM format (check OpenSSL docs, implies --ssl)dzfxuxSSL_CAdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxevents_statements_summary_by_user_by_event_namedzfxuxNdzfxux10qjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux4294967295dzfxux0dzfxux dzfxuxExtra port number to use for tcp connections in a one-thread-per-connection manner. 0 means don't use another portdzfxuxEXTRA_PORTdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxtransactiondzfxux dzfxux dzfxux dzfxux dzfxuxNumber of non-locking auto-commit read-only transactions committeddzfxux0dzfxuxtrx_nl_ro_commitsdzfxuxcounterqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxlockdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of times enqueued into table lock wait queuedzfxux0dzfxuxlock_table_lock_waitsdzfxuxcounterqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxtransactiondzfxux dzfxux dzfxux dzfxux dzfxuxCurrent rollback segment size in pagesdzfxux0dzfxuxtrx_rseg_current_sizedzfxuxvalueqjzxq


value:
  qvvbqTRIGGER_CATALOGdzfxuxvarchar(512)qjzxqqvvbqTRIGGER_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqTRIGGER_NAMEdzfxuxvarchar(64)qjzxqqvvbqEVENT_MANIPULATIONdzfxuxvarchar(6)qjzxqqvvbqEVENT_OBJECT_CATALOGdzfxuxvarchar(512)qjzxqqvvbqEVENT_OBJECT_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqEVENT_OBJECT_TABLEdzfxuxvarchar(64)qjzxqqvvbqACTION_ORDERdzfxuxbigint(4)qjzxqqvvbqACTION_CONDITIONdzfxuxlongtextqjzxqqvvbqACTION_STATEMENTdzfxuxlongtextqjzxqqvvbqACTION_ORIENTATIONdzfxuxvarchar(9)qjzxqqvvbqACTION_TIMINGdzfxuxvarchar(6)qjzxqqvvbqACTION_REFERENCE_OLD_TABLEdzfxuxvarchar(64)qjzxqqvvbqACTION_REFERENCE_NEW_TABLEdzfxuxvarchar(64)qjzxqqvvbqACTION_REFERENCE_OLD_ROWdzfxuxvarchar(3)qjzxqqvvbqACTION_REFERENCE_NEW_ROWdzfxuxvarchar(3)qjzxqqvvbqCREATEDdzfxuxdatetime(2)qjzxqqvvbqSQL_MODEdzfxuxvarchar(8192)qjzxqqvvbqDEFINERdzfxuxvarchar(189)qjzxqqvvbqCHARACTER_SET_CLIENTdzfxuxvarchar(32)qjzxqqvvbqCOLLATION_CONNECTIONdzfxuxvarchar(32)qjzxqqvvbqDATABASE_COLLATIONdzfxuxvarchar(32)qjzxq


value:
  qvvbqREQUIREDdzfxux16777216dzfxux dzfxux16777216dzfxuxCOMPILE-TIMEdzfxux dzfxux1024dzfxux1073741824dzfxux1024dzfxux16777216dzfxuxMax packet length to send to or receive from the serverdzfxuxMAX_ALLOWED_PACKETdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux1dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxreplication_connection_configurationdzfxuxNdzfxux10qjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxUse compression on master/slave protocoldzfxuxSLAVE_COMPRESSED_PROTOCOLdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux dzfxux dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux1dzfxux0dzfxux0dzfxuxWhether there is an active transactiondzfxuxIN_TRANSACTIONdzfxuxSESSION ONLYdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbq0dzfxux dzfxux0dzfxux1dzfxux0dzfxux0dzfxux dzfxux dzfxuxchange_bufferdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of deleted merged operations discardeddzfxux0dzfxuxibuf_merges_discard_delete_markdzfxuxstatus_counterqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxcompressiondzfxux dzfxux dzfxux dzfxux dzfxuxNumber of pages decompresseddzfxux0dzfxuxcompress_pages_decompresseddzfxuxcounterqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxCA directory (check OpenSSL docs, implies --ssl)dzfxuxSSL_CAPATHdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbuffer_page_iodzfxux dzfxux dzfxux dzfxux dzfxuxNumber of Insert Buffer Free List Pages readdzfxux0dzfxuxbuffer_page_read_ibuf_free_listdzfxuxcounterqjzxq


value:
  qvvbq dzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxOFFdzfxuxIf set to 1, the query SELECT * FROM table_name WHERE auto_increment_column IS NULL will return an auto-increment that has just been successfully inserted, the same as the LAST_INSERT_ID() function. Some ODBC programs make use of this IS NULL comparison.dzfxuxSQL_AUTO_IS_NULLdzfxuxSESSIONdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux0dzfxux0dzfxux dzfxuxDeprecated parameter with no effect.dzfxuxINNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVALdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxmax_rows=9625dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16765917dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux1743dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxINDEX_STATISTICSdzfxuxYdzfxux11qjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxrecoverydzfxux dzfxux dzfxux dzfxux dzfxuxNumber of checkpointsdzfxux0dzfxuxlog_checkpointsdzfxuxcounterqjzxq


value:
  qvvbq0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux14dzfxuxSYS_DATAFILESqjzxqqvvbq0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux11dzfxuxSYS_FOREIGNqjzxqqvvbq0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux12dzfxuxSYS_FOREIGN_COLSqjzxqqvvbq0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux13dzfxuxSYS_TABLESPACESqjzxqqvvbq0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxux15dzfxuxSYS_VIRTUALqjzxqqvvbq0dzfxux1dzfxux0dzfxux0dzfxux0dzfxux1dzfxux1dzfxux19dzfxuxmysql/gtid_slave_posqjzxqqvvbq0dzfxux1dzfxux0dzfxux4dzfxux0dzfxux1dzfxux1dzfxux17dzfxuxmysql/innodb_index_statsqjzxqqvvbq0dzfxux1dzfxux0dzfxux1dzfxux0dzfxux1dzfxux1dzfxux16dzfxuxmysql/innodb_table_statsqjzxqqvvbq0dzfxux1dzfxux0dzfxux0dzfxux3dzfxux1dzfxux1dzfxux18dzfxuxmysql/transaction_registryqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux3306dzfxuxAUTOdzfxux dzfxux1dzfxux4294967295dzfxux0dzfxux dzfxuxPort for connecting to slave reported to the master during slave registration. Set it only if the slave is listening on a non-default port or if you have a special tunnel from the master or other clients to the slave. If not sure, leave this option unsetdzfxuxREPORT_PORTdzfxuxGLOBALdzfxuxINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux-1dzfxux dzfxux-1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux1048576dzfxux-1dzfxux dzfxuxMaximum number of lock statistics for instrumented tables. Use 0 to disable, -1 for automated scaling.dzfxuxPERFORMANCE_SCHEMA_MAX_TABLE_LOCK_STATdzfxuxGLOBALdzfxuxBIGINTdzfxuxYESqjzxq


value:
  qvvbqTABLE_CATALOGdzfxuxvarchar(512)qjzxqqvvbqTABLE_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqTABLE_NAMEdzfxuxvarchar(64)qjzxqqvvbqTABLE_TYPEdzfxuxvarchar(64)qjzxqqvvbqENGINEdzfxuxvarchar(64)qjzxqqvvbqVERSIONdzfxuxbigint(21) unsignedqjzxqqvvbqROW_FORMATdzfxuxvarchar(10)qjzxqqvvbqTABLE_ROWSdzfxuxbigint(21) unsignedqjzxqqvvbqAVG_ROW_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqDATA_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqMAX_DATA_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqINDEX_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqDATA_FREEdzfxuxbigint(21) unsignedqjzxqqvvbqAUTO_INCREMENTdzfxuxbigint(21) unsignedqjzxqqvvbqCREATE_TIMEdzfxuxdatetimeqjzxqqvvbqUPDATE_TIMEdzfxuxdatetimeqjzxqqvvbqCHECK_TIMEdzfxuxdatetimeqjzxqqvvbqTABLE_COLLATIONdzfxuxvarchar(32)qjzxqqvvbqCHECKSUMdzfxuxbigint(21) unsignedqjzxqqvvbqCREATE_OPTIONSdzfxuxvarchar(2048)qjzxqqvvbqTABLE_COMMENTdzfxuxvarchar(2048)qjzxqqvvbqMAX_INDEX_LENGTHdzfxuxbigint(21) unsignedqjzxqqvvbqTEMPORARYdzfxuxvarchar(1)qjzxq


value:
  qvvbq dzfxux dzfxux dzfxuxDISABLEDdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxIf the server supports secure connections, will be set to YES, otherwise will be set to NO. If set to DISABLED, the server was compiled with TLS support, but was not started with TLS support (see the mysqld options). See also have_openssl.dzfxuxHAVE_SSLdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq0.0568292dzfxux dzfxux176dzfxux1dzfxux176dzfxux176dzfxux dzfxux dzfxuxbufferdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of pages read (innodb_pages_read)dzfxux176dzfxuxbuffer_pages_readdzfxuxstatus_counterqjzxq


value:
  qvvbqREQUIREDdzfxux0dzfxux dzfxux0dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux31536000dzfxux0dzfxux dzfxuxA dedicated thread is created to flush all tables at the given intervaldzfxuxFLUSH_TIMEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux1024dzfxux dzfxux1024dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux1048576dzfxux1dzfxux dzfxuxUnuseddzfxuxMETADATA_LOCKS_CACHE_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux268434432dzfxux dzfxux268434432dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux9223372036854775807dzfxux4096dzfxux268434432dzfxuxThe buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE.dzfxuxARIA_SORT_BUFFER_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxmax_rows=10380835156842741 transactional=0dzfxux2025-11-30 21:50:20dzfxux0dzfxux8192dzfxux8192dzfxux4503599627288576dzfxux137438945280dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux2025-11-30 21:50:20dzfxux dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxALL_PLUGINSdzfxuxYdzfxux11qjzxq


value:
  qvvbq dzfxux dzfxux dzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxdefdzfxux dzfxuxVIEWdzfxux dzfxuxmysqldzfxuxVIEWdzfxux dzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxuserdzfxux dzfxux qjzxq


value:
  qvvbqENGINEdzfxuxvarchar(64)qjzxqqvvbqSUPPORTdzfxuxvarchar(8)qjzxqqvvbqCOMMENTdzfxuxvarchar(160)qjzxqqvvbqTRANSACTIONSdzfxuxvarchar(3)qjzxqqvvbqXAdzfxuxvarchar(3)qjzxqqvvbqSAVEPOINTSdzfxuxvarchar(3)qjzxq


value:
  qvvbqOPTIONALdzfxux2000dzfxux dzfxux2000dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux10000dzfxux1000dzfxux dzfxuxInnoDB Fulltext search number of words to optimize for each optimize table call dzfxuxINNODB_FT_NUM_WORD_OPTIMIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxuxoptimisticdzfxuxnone,minimal,conservative,optimistic,aggressivedzfxuxoptimisticdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxControls what transactions are applied in parallel when using --slave-parallel-threads. Possible values: "optimistic" tries to apply most transactional DML in parallel, and handles any conflicts with rollback and retry. "conservative" limits parallelism in an effort to avoid any conflicts. "aggressive" tries to maximise the parallelism, possibly at the cost of increased conflict rate. "minimal" only parallelizes the commit steps of transactions. "none" disables parallel apply completely.dzfxuxSLAVE_PARALLEL_MODEdzfxuxGLOBALdzfxuxENUMdzfxuxNOqjzxq


value:
  qvvbq0.16629dzfxux dzfxux515dzfxux1dzfxux515dzfxux515dzfxux dzfxux dzfxuxbufferdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of write requests (innodb_buffer_pool_write_requests)dzfxux515dzfxuxbuffer_pool_write_requestsdzfxuxstatus_counterqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxddldzfxux dzfxux dzfxux dzfxux dzfxuxNumber of log files created during alter tabledzfxux0dzfxuxddl_log_file_alter_tabledzfxuxcounterqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxevents_statements_summary_global_by_event_namedzfxuxNdzfxux10qjzxq


value:
  qvvbqPROCESSLIST_IDdzfxuxint(11)qjzxqqvvbqATTR_NAMEdzfxuxvarchar(32)qjzxqqvvbqATTR_VALUEdzfxuxvarchar(1024)qjzxqqvvbqORDINAL_POSITIONdzfxuxint(11)qjzxq


value:
  qvvbq dzfxux dzfxux dzfxuxYESdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxIf statement profiling is available, will be set to YES, otherwise will be set to NO. See SHOW PROFILES and SHOW PROFILE.dzfxuxHAVE_PROFILINGdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbqREQUIREDdzfxux131072dzfxux dzfxux131072dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux1024dzfxux131072dzfxuxThe maximum size of the container of a rowid filterdzfxuxMAX_ROWID_FILTER_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxux1048576dzfxux dzfxux1048576dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux0dzfxux1048576dzfxuxMaximum allowed size of an optimizer tracedzfxuxOPTIMIZER_TRACE_MAX_MEM_SIZEdzfxuxSESSIONdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxlockdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of times enqueued into record lock wait queuedzfxux0dzfxuxlock_rec_lock_waitsdzfxuxcounterqjzxq


value:
  qvvbqREQUIREDdzfxux-1dzfxux dzfxux-1dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux1048576dzfxux-1dzfxux dzfxuxSize of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.dzfxuxPERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZEdzfxuxGLOBALdzfxuxBIGINTdzfxuxYESqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxbufferdzfxux dzfxux dzfxux dzfxux dzfxuxPage scanned per single LRU unzip searchdzfxux0dzfxuxbuffer_LRU_unzip_search_scanned_per_calldzfxuxset_memberqjzxq


value:
  qvvbqTABLE_IDdzfxuxbigint(21) unsignedqjzxqqvvbqNAMEdzfxuxvarchar(655)qjzxqqvvbqFLAGdzfxuxint(11)qjzxqqvvbqN_COLSdzfxuxint(11) unsignedqjzxqqvvbqSPACEdzfxuxint(11) unsignedqjzxqqvvbqROW_FORMATdzfxuxenum('Redundant','Compact','Compressed','Dynamic')qjzxqqvvbqZIP_PAGE_SIZEdzfxuxint(11) unsignedqjzxqqvvbqSPACE_TYPEdzfxuxenum('Single','System')qjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxEncrypt temporary on-disk tables (created as part of query execution)dzfxuxENCRYPT_TMP_DISK_TABLESdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxtransactiondzfxux dzfxux dzfxux dzfxux dzfxuxNumber of active transactionsdzfxux0dzfxuxtrx_active_transactionsdzfxuxcounterqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxux0dzfxux0dzfxux0dzfxux0dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux0dzfxuxperformance_schemadzfxuxBASE TABLEdzfxux dzfxux dzfxux0dzfxux dzfxuxPERFORMANCE_SCHEMAdzfxuxDynamicdzfxuxstatus_by_userdzfxuxNdzfxux10qjzxq


value:
  qvvbqTABLE_IDdzfxuxbigint(21) unsignedqjzxqqvvbqNAMEdzfxuxvarchar(64)qjzxqqvvbqSTATS_INITIALIZEDdzfxuxint(1)qjzxqqvvbqNUM_ROWSdzfxuxbigint(21) unsignedqjzxqqvvbqCLUST_INDEX_SIZEdzfxuxbigint(21) unsignedqjzxqqvvbqOTHER_INDEX_SIZEdzfxuxbigint(21) unsignedqjzxqqvvbqMODIFIED_COUNTERdzfxuxbigint(21) unsignedqjzxqqvvbqAUTOINCdzfxuxbigint(21) unsignedqjzxqqvvbqREF_COUNTdzfxuxint(11)qjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxDeprecated parameter with no effect.dzfxuxINNODB_LARGE_PREFIXdzfxuxGLOBALdzfxuxVARCHARdzfxuxYESqjzxq


value:
  qvvbq dzfxux0dzfxux dzfxux dzfxuxCOMPILE-TIMEdzfxux dzfxux1dzfxux18446744073709551615dzfxux0dzfxux457116233dzfxuxSets the internal state of the RAND() generator for replication purposesdzfxuxRAND_SEED2dzfxuxSESSION ONLYdzfxuxBIGINT UNSIGNEDdzfxuxNOqjzxq


value:
  qvvbq0dzfxux dzfxux0dzfxux1dzfxux0dzfxux0dzfxux dzfxux dzfxuxbufferdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxNumber of secondary record reads avoided triggering cluster readdzfxux0dzfxuxbuffer_index_sec_rec_cluster_reads_avoideddzfxuxstatus_counterqjzxq


value:
  qvvbqREQUIREDdzfxux84dzfxux dzfxux84dzfxuxCOMPILE-TIMEdzfxux dzfxux0dzfxux84dzfxux10dzfxux dzfxuxInnoDB Fulltext search maximum token size in charactersdzfxuxINNODB_FT_MAX_TOKEN_SIZEdzfxuxGLOBALdzfxuxBIGINT UNSIGNEDdzfxuxYESqjzxq


value:
  qvvbq dzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxTell the slave to restrict replication to updates of tables whose names do not appear in the comma-separated list. For statement-based replication, only the default database (that is, the one selected by USE) is considered, not any explicitly mentioned tables in the query. For row-based replication, the actual names of table(s) being updated are checked.dzfxuxREPLICATE_IGNORE_DBdzfxuxGLOBALdzfxuxVARCHARdzfxuxNOqjzxq


value:
  qvvbq dzfxuxtransactional=1dzfxux2022-09-13 10:03:16dzfxux0dzfxux8192dzfxux8192dzfxux17592186011648dzfxux9007199254732800dzfxuxdefdzfxuxutf8_general_cidzfxuxTime zonesdzfxux0dzfxuxmysqldzfxuxBASE TABLEdzfxux2022-09-13 10:03:16dzfxux1dzfxux0dzfxux dzfxuxAriadzfxuxPagedzfxuxtime_zonedzfxuxNdzfxux10qjzxq


value:
  qvvbq dzfxuxONdzfxuxOFF,ONdzfxuxONdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxuxONdzfxuxIf set to 1, the default, warning_count is incremented each time a Note warning is encountered. If set to 0, Note warnings are not recorded. mysqldump has outputs to set this variable to 0 so that no unnecessary increments occur when data is reloaded.dzfxuxSQL_NOTESdzfxuxSESSIONdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxindexdzfxux dzfxux dzfxux dzfxux dzfxuxNumber of index page merge attemptsdzfxux0dzfxuxindex_page_merge_attemptsdzfxuxcounterqjzxq


value:
  qvvbq dzfxuxmax_rows=29589dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16747479dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux567dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxUSER_STATISTICSdzfxuxYdzfxux11qjzxq


value:
  qvvbq0.000322893dzfxux dzfxux1dzfxux1dzfxux1dzfxux1dzfxux dzfxux dzfxuxchange_bufferdzfxux dzfxux3097dzfxux2025-11-30 20:51:49dzfxux dzfxuxChange buffer size in pagesdzfxux1dzfxuxibuf_sizedzfxuxstatus_counterqjzxq


value:
  qvvbqREQUIREDdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxEnable/disable InnoDB defragmentation (default FALSE). When set to FALSE, all existing defragmentation will be paused. And new defragmentation command will fail.Paused defragmentation commands will resume when this variable is set to true again.dzfxuxINNODB_DEFRAGMENTdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqHOSTdzfxuxchar(60)qjzxqqvvbqUSERdzfxuxchar(128)qjzxqqvvbqROLEdzfxuxchar(128)qjzxqqvvbqENABLEDdzfxuxenum('YES','NO')qjzxqqvvbqHISTORYdzfxuxenum('YES','NO')qjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxEnforce strict seq_no ordering of events in the binary log. Slave stops with an error if it encounters an event that would cause it to generate an out-of-order binlog if executed.dzfxuxGTID_STRICT_MODEdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqdbdzfxuxchar(64)qjzxqqvvbqnamedzfxuxchar(64)qjzxqqvvbqtypedzfxuxenum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY')qjzxqqvvbqspecific_namedzfxuxchar(64)qjzxqqvvbqlanguagedzfxuxenum('SQL')qjzxqqvvbqsql_data_accessdzfxuxenum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')qjzxqqvvbqis_deterministicdzfxuxenum('YES','NO')qjzxqqvvbqsecurity_typedzfxuxenum('INVOKER','DEFINER')qjzxqqvvbqparam_listdzfxuxblobqjzxqqvvbqreturnsdzfxuxlongblobqjzxqqvvbqbodydzfxuxlongblobqjzxqqvvbqdefinerdzfxuxchar(141)qjzxqqvvbqcreateddzfxuxtimestampqjzxqqvvbqmodifieddzfxuxtimestampqjzxqqvvbqsql_modedzfxuxset('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH','EMPTY_STRING_IS_NULL','SIMULTANEOUS_ASSIGNMENT','TIME_ROUND_FRACTIONAL')qjzxqqvvbqcommentdzfxuxtextqjzxqqvvbqcharacter_set_clientdzfxuxchar(32)qjzxqqvvbqcollation_connectiondzfxuxchar(32)qjzxqqvvbqdb_collationdzfxuxchar(32)qjzxqqvvbqbody_utf8dzfxuxlongblobqjzxqqvvbqaggregatedzfxuxenum('NONE','GROUP')qjzxq


value:
  qvvbqOPTIONALdzfxuxONdzfxuxOFF,ONdzfxuxONdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxForce checksum verification of replication events after reading them from relay log. Note: Events are always checksum-verified by slave on receiving them from the network before writing them to the relay logdzfxuxSLAVE_SQL_VERIFY_CHECKSUMdzfxuxGLOBALdzfxuxBOOLEANdzfxuxNOqjzxq


value:
  qvvbqREQUIREDdzfxuxdzfxux dzfxuxdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxSemicolon (;) separated list of wsrep options (see wsrep_provider_options documentation).dzfxuxWSREP_PROVIDER_OPTIONSdzfxuxGLOBALdzfxuxVARCHARdzfxuxNOqjzxq


value:
  qvvbqHostdzfxuxchar(60)qjzxqqvvbqDbdzfxuxchar(64)qjzxqqvvbqUserdzfxuxchar(80)qjzxqqvvbqRoutine_namedzfxuxchar(64)qjzxqqvvbqRoutine_typedzfxuxenum('FUNCTION','PROCEDURE','PACKAGE','PACKAGE BODY')qjzxqqvvbqGrantordzfxuxchar(141)qjzxqqvvbqProc_privdzfxuxset('Execute','Alter Routine','Grant')qjzxqqvvbqTimestampdzfxuxtimestampqjzxq


value:
  qvvbq dzfxuxmax_rows=541dzfxux2025-11-30 21:50:21dzfxux0dzfxux0dzfxux0dzfxux16767754dzfxux0dzfxuxdefdzfxuxutf8_general_cidzfxuxdzfxux dzfxuxinformation_schemadzfxuxSYSTEM VIEWdzfxux dzfxux dzfxux30994dzfxux dzfxuxMEMORYdzfxuxFixeddzfxuxINNODB_LOCKSdzfxuxYdzfxux11qjzxq


value:
  qvvbq dzfxuxtransactional=0dzfxux2022-09-13 10:03:16dzfxux0dzfxux16384dzfxux24576dzfxux17592186011648dzfxux2305843009213685760dzfxuxdefdzfxuxutf8_general_cidzfxuxhelp categoriesdzfxux44dzfxuxmysqldzfxuxBASE TABLEdzfxux2022-09-13 10:03:16dzfxux dzfxux372dzfxux dzfxuxAriadzfxuxPagedzfxuxhelp_categorydzfxuxNdzfxux10qjzxq


value:
  qvvbqOPTIONALdzfxuxOFFdzfxuxOFF,ONdzfxuxOFFdzfxuxCOMPILE-TIMEdzfxux dzfxux dzfxux dzfxux dzfxux dzfxuxStart InnoDB in read only mode (off by default)dzfxuxINNODB_READ_ONLYdzfxuxGLOBALdzfxuxBOOLEANdzfxuxYESqjzxq


value:
  qvvbq dzfxux dzfxux0dzfxux0dzfxux dzfxux dzfxux dzfxux dzfxuxcompressiondzfxux dzfxux dzfxux dzfxux dzfxuxNumber of bytes saved by page compressiondzfxux0dzfxuxcompress_saveddzfxuxcounterqjzxq


value:
  qvvbqGRANTEEdzfxuxvarchar(190)qjzxqqvvbqTABLE_CATALOGdzfxuxvarchar(512)qjzxqqvvbqTABLE_SCHEMAdzfxuxvarchar(64)qjzxqqvvbqTABLE_NAMEdzfxuxvarchar(64)qjzxqqvvbqPRIVILEGE_TYPEdzfxuxvarchar(64)qjzxqqvvbqIS_GRANTABLEdzfxuxvarchar(3)qjzxq


value:
  qvvbqThis help information was generated from the MariaDB Knowledge Base
  on 22 July 2019.dzfxuxHELP_DATEdzfxuxdzfxuxdzfxux9dzfxux1qjzxqqvvbqA synonym for ST_AREA.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/polygon-properties-area/dzfxuxAREAdzfxuxhttps://mariadb.com/kb/en/library/polygon-properties-area/dzfxuxdzfxux2dzfxux2qjzxqqvvbqA synonym for ST_CENTROID.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/centroid/dzfxuxCENTROIDdzfxuxhttps://mariadb.com/kb/en/library/centroid/dzfxuxdzfxux2dzfxux3qjzxqqvvbqA synonym for ST_ExteriorRing.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/polygon-properties-exteriorring/dzfxuxExteriorRingdzfxuxhttps://mariadb.com/kb/en/library/polygon-properties-exteriorring/dzfxuxdzfxux2dzfxux4qjzxqqvvbqA synonym for ST_InteriorRingN.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/polygon-properties-interiorringn/dzfxuxInteriorRingNdzfxuxhttps://mariadb.com/kb/en/library/polygon-properties-interiorringn/dzfxuxdzfxux2dzfxux5qjzxqqvvbqA synonym for ST_NumInteriorRings.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/polygon-properties-numinteriorrings/dzfxuxNumInteriorRingsdzfxuxhttps://mariadb.com/kb/en/library/polygon-properties-numinteriorrings/dzfxuxdzfxux2dzfxux6qjzxqqvvbqSyntax
  ------ 
  ST_Area(poly)
  Area(poly)
   
  Description
  ----------- 
  Returns as a double-precision number the area of the Polygon
  value poly, as measured in its spatial reference system.
   
  ST_Area() and Area() are synonyms.
   
  Examples
  -------- 
  SET @poly = 'Polygon((0 0,0 3,3 0,0 0),(1 1,1 2,2 1,1
  1))';
   
  SELECT Area(GeomFromText(@poly));
  +---------------------------+
  | Area(GeomFromText(@poly)) |
  +---------------------------+
  | 4 |
  +---------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_area/dzfxuxST_AREAdzfxuxhttps://mariadb.com/kb/en/library/st_area/dzfxuxdzfxux2dzfxux7qjzxqqvvbqSyntax
  ------ 
  ST_Centroid(mpoly)
  Centroid(mpoly)
   
  Description
  ----------- 
  Returns a point reflecting the mathematical centroid
  (geometric center) for the MultiPolygon mpoly. The resulting
  point will not necessarily be on the MultiPolygon. 
   
  ST_Centroid() and Centroid() are synonyms.
   
  Examples
  -------- 
  SET @poly = ST_GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0
  0))');
  SELECT ST_AsText(ST_Centroid(@poly)) AS center;
   
  +--------------+
  | center |
  +--------------+
  | POINT(10 10) |
  +--------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_centroid/dzfxuxST_CENTROIDdzfxuxhttps://mariadb.com/kb/en/library/st_centroid/dzfxuxdzfxux2dzfxux8qjzxqqvvbqSyntax
  ------ 
  ST_ExteriorRing(poly)
  ExteriorRing(poly)
   
  Description
  ----------- 
  Returns the exterior ring of the Polygon value poly as a
  LineString.
   
  ST_ExteriorRing() and ExteriorRing() are synonyms.
   
  Examples
  -------- 
  SET @poly = 'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2
  1,1 1))';
   
  SELECT AsText(ExteriorRing(GeomFromText(@poly)));
  +-------------------------------------------+
  | AsText(ExteriorRing(GeomFromText(@poly))) |
  +-------------------------------------------+
  | LINESTRING(0 0,0 3,3 3,3 0,0 0) |
  +-------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_exteriorring/dzfxuxST_ExteriorRingdzfxuxhttps://mariadb.com/kb/en/library/st_exteriorring/dzfxuxdzfxux2dzfxux9qjzxqqvvbqSyntax
  ------ 
  ST_InteriorRingN(poly,N)
  InteriorRingN(poly,N)
   
  Description
  ----------- 
  Returns the N-th interior ring for the Polygon value poly as
  a LineString. Rings are numbered beginning with 1.
   
  ST_InteriorRingN() and InteriorRingN() are synonyms.
   
  Examples
  -------- 
  SET @poly = 'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2
  1,1 1))';
   
  SELECT AsText(InteriorRingN(GeomFromText(@poly),1));
  +----------------------------------------------+
  | AsText(InteriorRingN(GeomFromText(@poly),1)) |
  +----------------------------------------------+
  | LINESTRING(1 1,1 2,2 2,2 1,1 1) |
  +----------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_interiorringn/dzfxuxST_InteriorRingNdzfxuxhttps://mariadb.com/kb/en/library/st_interiorringn/dzfxuxdzfxux2dzfxux10qjzxqqvvbqSyntax
  ------ 
  ST_NumInteriorRings(poly)
  NumInteriorRings(poly)
   
  Description
  ----------- 
  Returns an integer containing the number of interior rings
  in the Polygon value poly.
   
  Note that according the the OpenGIS standard, a POLYGON
  should have exactly one ExteriorRing and all other rings
  should lie within that ExteriorRing and thus be the
  InteriorRings. Practically, however, some systems, including
  MariaDB's, permit polygons to have several
  'ExteriorRings'. In the case of there being multiple,
  non-overlapping exterior rings ST_NumInteriorRings() will
  return 1.
   
  ST_NumInteriorRings() and NumInteriorRings() are synonyms.
   
  Examples
  -------- 
  SET @poly = 'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2
  1,1 1))';
   
  SELECT NumInteriorRings(GeomFromText(@poly));
  +---------------------------------------+
  | NumInteriorRings(GeomFromText(@poly)) |
  +---------------------------------------+
  | 1 |
  +---------------------------------------+
   
  Non-overlapping 'polygon':
   
  SELECT ST_NumInteriorRings(ST_PolyFromText('POLYGON((0 0,10
  0,10 10,0 10,0 0),
   (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))')) AS NumInteriorRings;
   
  +------------------+
  | NumInteriorRings |
  +------------------+
  | 1 |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_numinteriorrings/dzfxuxST_NumInteriorRingsdzfxuxhttps://mariadb.com/kb/en/library/st_numinteriorrings/dzfxuxdzfxux2dzfxux11qjzxqqvvbqDescription
  ----------- 
  The Well-Known Text (WKT) representation of Geometry is
  designed to exchange geometry data in ASCII form. Examples
  of the basic geometry types include:
   
  Geometry Types | 
   
  POINT | 
   
  LINESTRING | 
   
  POLYGON | 
   
  MULTIPOINT | 
   
  MULTILINESTRING | 
   
  MULTIPOLYGON | 
   
  GEOMETRYCOLLECTION | 
   
  GEOMETRY | 
   


  URL: https://mariadb.com/kb/en/library/wkt-definition/dzfxuxWKT Definitiondzfxuxhttps://mariadb.com/kb/en/library/wkt-definition/dzfxuxdzfxux3dzfxux12qjzxqqvvbqA synonym for ST_AsText().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-astext/dzfxuxAsTextdzfxuxhttps://mariadb.com/kb/en/library/wkt-astext/dzfxuxdzfxux3dzfxux13qjzxqqvvbqA synonym for ST_AsText().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-aswkt/dzfxuxAsWKTdzfxuxhttps://mariadb.com/kb/en/library/wkt-aswkt/dzfxuxdzfxux3dzfxux14qjzxqqvvbqA synonym for ST_GeomCollFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-geomcollfromtext/dzfxuxGeomCollFromTextdzfxuxhttps://mariadb.com/kb/en/library/wkt-geomcollfromtext/dzfxuxdzfxux3dzfxux15qjzxqqvvbqA synonym for ST_GeomCollFromText.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometrycollectionfromtext/dzfxuxGeometryCollectionFromTextdzfxuxhttps://mariadb.com/kb/en/library/geometrycollectionfromtext/dzfxuxdzfxux3dzfxux16qjzxqqvvbqA synonym for ST_GeomFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/geometryfromtext/dzfxuxGeometryFromTextdzfxuxhttps://mariadb.com/kb/en/library/geometryfromtext/dzfxuxdzfxux3dzfxux17qjzxqqvvbqA synonym for ST_GeomFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-geomfromtext/dzfxuxGeomFromTextdzfxuxhttps://mariadb.com/kb/en/library/wkt-geomfromtext/dzfxuxdzfxux3dzfxux18qjzxqqvvbqA synonym for ST_LineFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-linefromtext/dzfxuxLineFromTextdzfxuxhttps://mariadb.com/kb/en/library/wkt-linefromtext/dzfxuxdzfxux3dzfxux19qjzxqqvvbqA synonym for ST_LineFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/linestringfromtext/dzfxuxLineStringFromTextdzfxuxhttps://mariadb.com/kb/en/library/linestringfromtext/dzfxuxdzfxux3dzfxux20qjzxqqvvbqSyntax
  ------ 
  MLineFromText(wkt[,srid])
  MultiLineStringFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a MULTILINESTRING value using its WKT
  representation and SRID.
   
  MLineFromText() and MultiLineStringFromText() are synonyms.
   
  Examples
  -------- 
  CREATE TABLE gis_multi_line (g MULTILINESTRING);
  SHOW FIELDS FROM gis_multi_line;
   
  INSERT INTO gis_multi_line VALUES
   (MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10
  0),(16 0,16 23,16 48))')),
   (MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
   (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),
  Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21,
  7))))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mlinefromtext/dzfxuxMLineFromTextdzfxuxhttps://mariadb.com/kb/en/library/mlinefromtext/dzfxuxdzfxux3dzfxux21qjzxqqvvbqSyntax
  ------ 
  MPointFromText(wkt[,srid])
  MultiPointFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a MULTIPOINT value using its WKT representation
  and SRID.
   
  MPointFromText() and MultiPointFromText() are synonyms.
   
  Examples
  -------- 
  CREATE TABLE gis_multi_point (g MULTIPOINT);
  SHOW FIELDS FROM gis_multi_point;
   
  INSERT INTO gis_multi_point VALUES
   (MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20
  20)')),
   (MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
   (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,
  10)))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mpointfromtext/dzfxuxMPointFromTextdzfxuxhttps://mariadb.com/kb/en/library/mpointfromtext/dzfxuxdzfxux3dzfxux22qjzxqqvvbqSyntax
  ------ 
  MPolyFromText(wkt[,srid])
  MultiPolygonFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a MULTIPOLYGON value using its WKT representation
  and SRID.
   
  MPolyFromText() and MultiPolygonFromText() are synonyms.
   
  Examples
  -------- 
  CREATE TABLE gis_multi_polygon (g MULTIPOLYGON);
  SHOW FIELDS FROM gis_multi_polygon;
   
  INSERT INTO gis_multi_polygon VALUES
   (MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84
  42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67
  13,59 13,59 18)))')),
   (MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28
  26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59
  13,59 18)))')),
   (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,
  3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mpolyfromtext/dzfxuxMPolyFromTextdzfxuxhttps://mariadb.com/kb/en/library/mpolyfromtext/dzfxuxdzfxux3dzfxux23qjzxqqvvbqA synonym for MLineFromText.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/multilinestringfromtext/dzfxuxMultiLineStringFromTextdzfxuxhttps://mariadb.com/kb/en/library/multilinestringfromtext/dzfxuxdzfxux3dzfxux24qjzxqqvvbqA synonym for MPointFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multipointfromtext/dzfxuxMultiPointFromTextdzfxuxhttps://mariadb.com/kb/en/library/multipointfromtext/dzfxuxdzfxux3dzfxux25qjzxqqvvbqA synonym for MPolyFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multipolygonfromtext/dzfxuxMultiPolygonFromTextdzfxuxhttps://mariadb.com/kb/en/library/multipolygonfromtext/dzfxuxdzfxux3dzfxux26qjzxqqvvbqA synonym for ST_PointFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-pointfromtext/dzfxuxPointFromTextdzfxuxhttps://mariadb.com/kb/en/library/wkt-pointfromtext/dzfxuxdzfxux3dzfxux27qjzxqqvvbqA synonym for ST_PolyFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkt-polyfromtext/dzfxuxPolyFromTextdzfxuxhttps://mariadb.com/kb/en/library/wkt-polyfromtext/dzfxuxdzfxux3dzfxux28qjzxqqvvbqA synonym for ST_PolyFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/polygonfromtext/dzfxuxPolygonFromTextdzfxuxhttps://mariadb.com/kb/en/library/polygonfromtext/dzfxuxdzfxux3dzfxux29qjzxqqvvbqSyntax
  ------ 
  ST_AsText(g)
  AsText(g)
  ST_AsWKT(g)
  AsWKT(g)
   
  Description
  ----------- 
  Converts a value in internal geometry format to its WKT
  representation and returns the string result.
   
  ST_AsText(), AsText(), ST_AsWKT() and AsWKT() are all
  synonyms.
   
  Examples
  -------- 
  SET @g = 'LineString(1 1,4 4,6 6)';
   
  SELECT ST_AsText(ST_GeomFromText(@g));
  +--------------------------------+
  | ST_AsText(ST_GeomFromText(@g)) |
  +--------------------------------+
  | LINESTRING(1 1,4 4,6 6) |
  +--------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_astext/dzfxuxST_AsTextdzfxuxhttps://mariadb.com/kb/en/library/st_astext/dzfxuxdzfxux3dzfxux30qjzxqqvvbqA synonym for ST_ASTEXT().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_aswkt/dzfxuxST_ASWKTdzfxuxhttps://mariadb.com/kb/en/library/st_aswkt/dzfxuxdzfxux3dzfxux31qjzxqqvvbqSyntax
  ------ 
  ST_GeomCollFromText(wkt[,srid])
  ST_GeometryCollectionFromText(wkt[,srid])
  GeomCollFromText(wkt[,srid])
  GeometryCollectionFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a GEOMETRYCOLLECTION value using its WKT 
  representation and SRID.
   
  ST_GeomCollFromText(), ST_GeometryCollectionFromText(),
  GeomCollFromText() and GeometryCollectionFromText() are all
  synonyms.
   
  Example
   
  CREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);
  SHOW FIELDS FROM gis_geometrycollection;
   
  INSERT INTO gis_geometrycollection VALUES
   (GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0),
  LINESTRING(0 0,10 10))')),
   (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),
  LineString(Point(3, 6), Point(7, 9)))))),
   (GeomFromText('GeometryCollection()')),
   (GeomFromText('GeometryCollection EMPTY'));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geomcollfromtext/dzfxuxST_GeomCollFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_geomcollfromtext/dzfxuxdzfxux3dzfxux32qjzxqqvvbqA synonym for ST_GeomCollFromText.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/st_geometrycollectionfromtext/dzfxuxST_GeometryCollectionFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_geometrycollectionfromtext/dzfxuxdzfxux3dzfxux33qjzxqqvvbqA synonym for ST_GeomFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geometryfromtext/dzfxuxST_GeometryFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_geometryfromtext/dzfxuxdzfxux3dzfxux34qjzxqqvvbqSyntax
  ------ 
  ST_GeomFromText(wkt[,srid])
  ST_GeometryFromText(wkt[,srid])
  GeomFromText(wkt[,srid])
  GeometryFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a geometry value of any type using its WKT
  representation and SRID.
   
  GeomFromText(), GeometryFromText(), ST_GeomFromText() and
  ST_GeometryFromText() are all synonyms.
   
  Example
   
  SET @g = ST_GEOMFROMTEXT('POLYGON((1 1,1 5,4 9,6 9,9 3,7
  2,1 1))');
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geomfromtext/dzfxuxST_GeomFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_geomfromtext/dzfxuxdzfxux3dzfxux35qjzxqqvvbqSyntax
  ------ 
  ST_LineFromText(wkt[,srid])
  ST_LineStringFromText(wkt[,srid])
  LineFromText(wkt[,srid])
  LineStringFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a LINESTRING value using its WKT representation
  and SRID.
   
  ST_LineFromText(), ST_LineStringFromText(),
  ST_LineFromText() and ST_LineStringFromText() are all
  synonyms.
   
  Examples
  -------- 
  CREATE TABLE gis_line (g LINESTRING);
  SHOW FIELDS FROM gis_line;
   
  INSERT INTO gis_line VALUES
   (LineFromText('LINESTRING(0 0,0 10,10 0)')),
   (LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10
  10)')),
   (LineStringFromWKB(AsWKB(LineString(Point(10, 10),
  Point(40, 10)))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_linefromtext/dzfxuxST_LineFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_linefromtext/dzfxuxdzfxux3dzfxux36qjzxqqvvbqA synonym for ST_LineFromText.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/st_linestringfromtext/dzfxuxST_LineStringFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_linestringfromtext/dzfxuxdzfxux3dzfxux37qjzxqqvvbqSyntax
  ------ 
  ST_PointFromText(wkt[,srid])
  PointFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a POINT value using its WKT representation and
  SRID.
   
  ST_PointFromText() and PointFromText() are synonyms.
   
  Examples
  -------- 
  CREATE TABLE gis_point (g POINT);
  SHOW FIELDS FROM gis_point;
   
  INSERT INTO gis_point VALUES
   (PointFromText('POINT(10 10)')),
   (PointFromText('POINT(20 10)')),
   (PointFromText('POINT(20 20)')),
   (PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_pointfromtext/dzfxuxST_PointFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_pointfromtext/dzfxuxdzfxux3dzfxux38qjzxqqvvbqSyntax
  ------ 
  ST_PolyFromText(wkt[,srid])
  ST_PolygonFromText(wkt[,srid])
  PolyFromText(wkt[,srid])
  PolygonFromText(wkt[,srid])
   
  Description
  ----------- 
  Constructs a POLYGON value using its WKT representation and
  SRID.
   
  ST_PolyFromText(), ST_PolygonFromText(), PolyFromText() and
  ST_PolygonFromText() are all synonyms.
   
  Examples
  -------- 
  CREATE TABLE gis_polygon (g POLYGON);
  INSERT INTO gis_polygon VALUES
   (PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10
  10))')),
   (PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10
  10,20 10,20 20,10 20,10 10))'));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_polyfromtext/dzfxuxST_PolyFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_polyfromtext/dzfxuxdzfxux3dzfxux39qjzxqqvvbqA synonym for ST_PolyFromText.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_polygonfromtext/dzfxuxST_PolygonFromTextdzfxuxhttps://mariadb.com/kb/en/library/st_polygonfromtext/dzfxuxdzfxux3dzfxux40qjzxqqvvbqSyntax
  ------ 
  +
   
  Description
  ----------- 
  Addition.
   
  If both operands are integers, the result is calculated with
  BIGINT precision. If either integer is unsigned, the result
  is also an unsigned integer.
   
  For real or string operands, the operand with the highest
  precision determines the result precision.
   
  Examples
  -------- 
  SELECT 3+5;
   
  +-----+
  | 3+5 |
  +-----+
  | 8 |
  +-----+
   


  URL: https://mariadb.com/kb/en/library/addition-operator/dzfxuxAddition Operator (+)dzfxuxhttps://mariadb.com/kb/en/library/addition-operator/dzfxuxdzfxux4dzfxux41qjzxqqvvbqSyntax
  ------ 
  -
   
  Description
  ----------- 
  Subtraction. The operator is also used as the unary minus
  for changing sign.
   
  If both operands are integers, the result is calculated with
  BIGINT precision. If either integer is unsigned, the result
  is also an unsigned integer, unless the
  NO_UNSIGNED_SUBTRACTION SQL_MODE is enabled, in which case
  the result is always signed.
   
  For real or string operands, the operand with the highest
  precision determines the result precision.
   
  Examples
  -------- 
  SELECT 96-9;
   
  +------+
  | 96-9 |
  +------+
  | 87 |
  +------+
   
  SELECT 15-17;
   
  +-------+
  | 15-17 |
  +-------+
  | -2 |
  +-------+
   
  SELECT 3.66 + 1.333;
   
  +--------------+
  | 3.66 + 1.333 |
  +--------------+
  | 4.993 |
  +--------------+
   
  Unary minus:
   
   SELECT - (3+5);
  +---------+
  | - (3+5) |
  +---------+
  | -8 |
  +---------+
   


  URL:
  https://mariadb.com/kb/en/library/subtraction-operator-/dzfxuxSubtraction Operator (-)dzfxuxhttps://mariadb.com/kb/en/library/subtraction-operator-/dzfxuxdzfxux4dzfxux42qjzxqqvvbqSyntax
  ------ 
  /
   
  Description
  ----------- 
  Division operator. Dividing by zero will return NULL. By
  default, returns four digits after the decimal. This is
  determined by the server system variable
  div_precision_increment which by default is four. It can be
  set from 0 to 30.
   
  Dividing by zero returns NULL. If the
  ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used (the default
  since MariaDB 10.2.4), a division by zero also produces a
  warning.
   
  Examples
  -------- 
  SELECT 4/5;
   
  +--------+
  | 4/5 |
  +--------+
  | 0.8000 |
  +--------+
   
  SELECT 300/(2-2);
  +-----------+
  | 300/(2-2) |
  +-----------+
  | NULL |
  +-----------+
   
  SELECT 300/7;
   
  +---------+
  | 300/7 |
  +---------+
  | 42.8571 |
  +---------+
   
  Changing div_precision_increment for the session from the
  default of four to six:
   
  SET div_precision_increment = 6;
   
  SELECT 300/7;
   
  +-----------+
  | 300/7 |
  +-----------+
  | 42.857143 |
  +-----------+
   
  SELECT 300/7;
   
  +-----------+
  | 300/7 |
  +-----------+
  | 42.857143 |
  +-----------+
   


  URL: https://mariadb.com/kb/en/library/division-operator/dzfxuxDivision Operator (/)dzfxuxhttps://mariadb.com/kb/en/library/division-operator/dzfxuxdzfxux4dzfxux43qjzxqqvvbqSyntax
  ------ 
  *
   
  Description
  ----------- 
  Multiplication operator.
   
  Examples
  -------- 
  SELECT 7*6;
   
  +-----+
  | 7*6 |
  +-----+
  | 42 |
  +-----+
   
  SELECT 1234567890*9876543210;
   
  +-----------------------+
  | 1234567890*9876543210 |
  +-----------------------+
  | -6253480962446024716 |
  +-----------------------+
   
  SELECT 18014398509481984*18014398509481984.0;
   
  +---------------------------------------+
  | 18014398509481984*18014398509481984.0 |
  +---------------------------------------+
  | 324518553658426726783156020576256.0 |
  +---------------------------------------+
   
  SELECT 18014398509481984*18014398509481984;
   
  +-------------------------------------+
  | 18014398509481984*18014398509481984 |
  +-------------------------------------+
  | 0 |
  +-------------------------------------+
   


  URL:
  https://mariadb.com/kb/en/library/multiplication-operator/dzfxuxMultiplication Operator (*)dzfxuxhttps://mariadb.com/kb/en/library/multiplication-operator/dzfxuxdzfxux4dzfxux44qjzxqqvvbqSyntax
  ------ 
  N % M
   
  Description
  ----------- 
  Modulo operator. Returns the remainder of N divided by M.
  See also MOD.
   
  Examples
  -------- 
  SELECT 1042 % 50;
   
  +-----------+
  | 1042 % 50 |
  +-----------+
  | 42 |
  +-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/modulo-operator/dzfxuxModulo Operator (%)dzfxuxhttps://mariadb.com/kb/en/library/modulo-operator/dzfxuxdzfxux4dzfxux45qjzxqqvvbqSyntax
  ------ 
  DIV
   
  Description
  ----------- 
  Integer division. Similar to FLOOR(), but is safe with
  BIGINT values.
  Incorrect results may occur for non-integer operands that
  exceed BIGINT range.
   
  If the ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used, a
  division by zero produces an error. Otherwise, it returns
  NULL.
   
  The remainder of a division can be obtained using the MOD
  operator.
   
  Examples
  -------- 
  SELECT 300 DIV 7;
   
  +-----------+
  | 300 DIV 7 |
  +-----------+
  | 42 |
  +-----------+
   
  SELECT 300 DIV 0;
   
  +-----------+
  | 300 DIV 0 |
  +-----------+
  | NULL |
  +-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/div/dzfxuxDIVdzfxuxhttps://mariadb.com/kb/en/library/div/dzfxuxdzfxux4dzfxux46qjzxqqvvbqSyntax
  ------ 
  ABS(X)
   
  Description
  ----------- 
  Returns the absolute (non-negative) value of X. If X is not
  a number, it is converted to a numeric type.
   
  Examples
  -------- 
  SELECT ABS(42);
  +---------+
  | ABS(42) |
  +---------+
  | 42 |
  +---------+
   
  SELECT ABS(-42);
  +----------+
  | ABS(-42) |
  +----------+
  | 42 |
  +----------+
   
  SELECT ABS(DATE '1994-01-01');
  +------------------------+
  | ABS(DATE '1994-01-01') |
  +------------------------+
  | 19940101 |
  +------------------------+
   


  URL: https://mariadb.com/kb/en/library/abs/dzfxuxABSdzfxuxhttps://mariadb.com/kb/en/library/abs/dzfxuxdzfxux4dzfxux47qjzxqqvvbqSyntax
  ------ 
  ACOS(X)
   
  Description
  ----------- 
  Returns the arc cosine of X, that is, the value whose cosine
  is X.
  Returns NULL if X is not in the range -1 to 1.
   
  Examples
  -------- 
  SELECT ACOS(1);
  +---------+
  | ACOS(1) |
  +---------+
  | 0 |
  +---------+
   
  SELECT ACOS(1.0001);
  +--------------+
  | ACOS(1.0001) |
  +--------------+
  | NULL |
  +--------------+
   
  SELECT ACOS(0);
  +-----------------+
  | ACOS(0) |
  +-----------------+
  | 1.5707963267949 |
  +-----------------+
   
  SELECT ACOS(0.234);
  +------------------+
  | ACOS(0.234) |
  +------------------+
  | 1.33460644244679 |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/acos/dzfxuxACOSdzfxuxhttps://mariadb.com/kb/en/library/acos/dzfxuxdzfxux4dzfxux48qjzxqqvvbqSyntax
  ------ 
  ASIN(X)
   
  Description
  ----------- 
  Returns the arc sine of X, that is, the value whose sine is
  X. Returns
  NULL if X is not in the range -1 to 1.
   
  Examples
  -------- 
  SELECT ASIN(0.2);
  +--------------------+
  | ASIN(0.2) |
  +--------------------+
  | 0.2013579207903308 |
  +--------------------+
   
  SELECT ASIN('foo');
  +-------------+
  | ASIN('foo') |
  +-------------+
  | 0 |
  +-------------+
   
  SHOW WARNINGS;
   
  +---------+------+-----------------------------------------+
  | Level | Code | Message |
  +---------+------+-----------------------------------------+
  | Warning | 1292 | Truncated incorrect DOUBLE value: 'foo'
  |
  +---------+------+-----------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/asin/dzfxuxASINdzfxuxhttps://mariadb.com/kb/en/library/asin/dzfxuxdzfxux4dzfxux49qjzxqqvvbqSyntax
  ------ 
  ATAN(X)
   
  Description
  ----------- 
  Returns the arc tangent of X, that is, the value whose
  tangent is X.
   
  Examples
  -------- 
  SELECT ATAN(2);
  +--------------------+
  | ATAN(2) |
  +--------------------+
  | 1.1071487177940904 |
  +--------------------+
   
  SELECT ATAN(-2);
  +---------------------+
  | ATAN(-2) |
  +---------------------+
  | -1.1071487177940904 |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/atan/dzfxuxATANdzfxuxhttps://mariadb.com/kb/en/library/atan/dzfxuxdzfxux4dzfxux50qjzxqqvvbqSyntax
  ------ 
  ATAN(Y,X), ATAN2(Y,X)
   
  Description
  ----------- 
  Returns the arc tangent of the two variables X and Y. It is
  similar to
  calculating the arc tangent of Y / X, except that the signs
  of both
  arguments are used to determine the quadrant of the result.
   
  Examples
  -------- 
  SELECT ATAN(-2,2);
  +---------------------+
  | ATAN(-2,2) |
  +---------------------+
  | -0.7853981633974483 |
  +---------------------+
   
  SELECT ATAN2(PI(),0);
  +--------------------+
  | ATAN2(PI(),0) |
  +--------------------+
  | 1.5707963267948966 |
  +--------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/atan2/dzfxuxATAN2dzfxuxhttps://mariadb.com/kb/en/library/atan2/dzfxuxdzfxux4dzfxux51qjzxqqvvbqSyntax
  ------ 
  CEIL(X)
   
  Description
  ----------- 
  CEIL() is a synonym for CEILING().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/ceil/dzfxuxCEILdzfxuxhttps://mariadb.com/kb/en/library/ceil/dzfxuxdzfxux4dzfxux52qjzxqqvvbqSyntax
  ------ 
  CEILING(X)
   
  Description
  ----------- 
  Returns the smallest integer value not less than X.
   
  Examples
  -------- 
  SELECT CEILING(1.23);
  +---------------+
  | CEILING(1.23) |
  +---------------+
  | 2 |
  +---------------+
   
  SELECT CEILING(-1.23);
  +----------------+
  | CEILING(-1.23) |
  +----------------+
  | -1 |
  +----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/ceiling/dzfxuxCEILINGdzfxuxhttps://mariadb.com/kb/en/library/ceiling/dzfxuxdzfxux4dzfxux53qjzxqqvvbqSyntax
  ------ 
  CONV(N,from_base,to_base)
   
  Description
  ----------- 
  Converts numbers between different number bases. Returns a
  string
  representation of the number N, converted from base
  from_base
  to base to_base.
   
  Returns NULL if any argument is NULL, or if the second or
  third argument are not in the allowed range.
   
  The argument N is interpreted as an integer, but may be
  specified as an
  integer or a string. The minimum base is 2 and the maximum
  base is 36. If
  to_base is a negative number, N is regarded as a signed
  number.
  Otherwise, N is treated as unsigned. CONV() works with
  64-bit
  precision.
   
  Some shortcuts for this function are also available: BIN(),
  OCT(), HEX(), UNHEX(). Also, MariaDB allows binary literal
  values and hexadecimal literal values.
   
  Examples
  -------- 
  SELECT CONV('a',16,2);
  +----------------+
  | CONV('a',16,2) |
  +----------------+
  | 1010 |
  +----------------+
   
  SELECT CONV('6E',18,8);
  +-----------------+
  | CONV('6E',18,8) |
  +-----------------+
  | 172 |
  +-----------------+
   
  SELECT CONV(-17,10,-18);
  +------------------+
  | CONV(-17,10,-18) |
  +------------------+
  | -H |
  +------------------+
   
  SELECT CONV(12+'10'+'10'+0xa,10,10);
  +------------------------------+
  | CONV(12+'10'+'10'+0xa,10,10) |
  +------------------------------+
  | 42 |
  +------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/conv/dzfxuxCONVdzfxuxhttps://mariadb.com/kb/en/library/conv/dzfxuxdzfxux4dzfxux54qjzxqqvvbqSyntax
  ------ 
  COS(X)
   
  Description
  ----------- 
  Returns the cosine of X, where X is given in radians.
   
  Examples
  -------- 
  SELECT COS(PI());
  +-----------+
  | COS(PI()) |
  +-----------+
  | -1 |
  +-----------
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/cos/dzfxuxCOSdzfxuxhttps://mariadb.com/kb/en/library/cos/dzfxuxdzfxux4dzfxux55qjzxqqvvbqSyntax
  ------ 
  COT(X)
   
  Description
  ----------- 
  Returns the cotangent of X.
   
  Examples
  -------- 
  SELECT COT(42);
  +--------------------+
  | COT(42) |
  +--------------------+
  | 0.4364167060752729 |
  +--------------------+
   
  SELECT COT(12);
  +---------------------+
  | COT(12) |
  +---------------------+
  | -1.5726734063976893 |
  +---------------------+
   
  SELECT COT(0);
  ERROR 1690 (22003): DOUBLE value is out of range in
  'cot(0)'
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/cot/dzfxuxCOTdzfxuxhttps://mariadb.com/kb/en/library/cot/dzfxuxdzfxux4dzfxux56qjzxqqvvbqSyntax
  ------ 
  CRC32(expr)
   
  Description
  ----------- 
  Computes a cyclic redundancy check value and returns a
  32-bit unsigned
  value. The result is NULL if the argument is NULL. The
  argument is
  expected to be a string and (if possible) is treated as one
  if it is
  not.
   
  Examples
  -------- 
  SELECT CRC32('MariaDB');
  +------------------+
  | CRC32('MariaDB') |
  +------------------+
  | 4227209140 |
  +------------------+
   
  SELECT CRC32('mariadb');
  +------------------+
  | CRC32('mariadb') |
  +------------------+
  | 2594253378 |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/crc32/dzfxuxCRC32dzfxuxhttps://mariadb.com/kb/en/library/crc32/dzfxuxdzfxux4dzfxux57qjzxqqvvbqSyntax
  ------ 
  DEGREES(X)
   
  Description
  ----------- 
  Returns the argument X, converted from radians to degrees.
   
  This is the converse of the RADIANS() function.
   
  Examples
  -------- 
  SELECT DEGREES(PI());
  +---------------+
  | DEGREES(PI()) |
  +---------------+
  | 180 |
  +---------------+
   
  SELECT DEGREES(PI() / 2);
  +-------------------+
  | DEGREES(PI() / 2) |
  +-------------------+
  | 90 |
  +-------------------+
   
  SELECT DEGREES(45);
  +-----------------+
  | DEGREES(45) |
  +-----------------+
  | 2578.3100780887 |
  +-----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/degrees/dzfxuxDEGREESdzfxuxhttps://mariadb.com/kb/en/library/degrees/dzfxuxdzfxux4dzfxux58qjzxqqvvbqSyntax
  ------ 
  EXP(X)
   
  Description
  ----------- 
  Returns the value of e (the base of natural logarithms)
  raised to the
  power of X. The inverse of this function is LOG() (using a
  single
  argument only) or LN().
   
  If X is NULL, this function returns NULL.
   
  Examples
  -------- 
  SELECT EXP(2);
  +------------------+
  | EXP(2) |
  +------------------+
  | 7.38905609893065 |
  +------------------+
   
  SELECT EXP(-2);
  +--------------------+
  | EXP(-2) |
  +--------------------+
  | 0.1353352832366127 |
  +--------------------+
   
  SELECT EXP(0);
  +--------+
  | EXP(0) |
  +--------+
  | 1 |
  +--------+
   
  SELECT EXP(NULL);
  +-----------+
  | EXP(NULL) |
  +-----------+
  | NULL |
  +-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/exp/dzfxuxEXPdzfxuxhttps://mariadb.com/kb/en/library/exp/dzfxuxdzfxux4dzfxux59qjzxqqvvbqSyntax
  ------ 
  FLOOR(X)
   
  Description
  ----------- 
  Returns the largest integer value not greater than X.
   
  Examples
  -------- 
  SELECT FLOOR(1.23);
  +-------------+
  | FLOOR(1.23) |
  +-------------+
  | 1 |
  +-------------+
   
  SELECT FLOOR(-1.23);
  +--------------+
  | FLOOR(-1.23) |
  +--------------+
  | -2 |
  +--------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/floor/dzfxuxFLOORdzfxuxhttps://mariadb.com/kb/en/library/floor/dzfxuxdzfxux4dzfxux60qjzxqqvvbqSyntax
  ------ 
  LN(X)
   
  Description
  ----------- 
  Returns the natural logarithm of X; that is, the base-e
  logarithm of X.
  If X is less than or equal to 0, or NULL, then NULL is
  returned.
   
  The inverse of this function is EXP().
   
  Examples
  -------- 
  SELECT LN(2);
  +-------------------+
  | LN(2) |
  +-------------------+
  | 0.693147180559945 |
  +-------------------+
   
  SELECT LN(-2);
  +--------+
  | LN(-2) |
  +--------+
  | NULL |
  +--------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/ln/dzfxuxLNdzfxuxhttps://mariadb.com/kb/en/library/ln/dzfxuxdzfxux4dzfxux61qjzxqqvvbqSyntax
  ------ 
  LOG(X), LOG(B,X)
   
  Description
  ----------- 
  If called with one parameter, this function returns the
  natural
  logarithm of X. If X is less than or equal to 0, then NULL
  is
  returned.
   
  If called with two parameters, it returns the logarithm of X
  to the base B. If B is 

  URL: https://mariadb.com/kb/en/library/log/dzfxuxLOGdzfxuxhttps://mariadb.com/kb/en/library/log/dzfxuxdzfxux4dzfxux62qjzxqqvvbqSyntax
  ------ 
  LOG10(X)
   
  Description
  ----------- 
  Returns the base-10 logarithm of X.
   
  Examples
  -------- 
  SELECT LOG10(2);
  +-------------------+
  | LOG10(2) |
  +-------------------+
  | 0.301029995663981 |
  +-------------------+
   
  SELECT LOG10(100);
  +------------+
  | LOG10(100) |
  +------------+
  | 2 |
  +------------+
   
  SELECT LOG10(-100);
  +-------------+
  | LOG10(-100) |
  +-------------+
  | NULL |
  +-------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/log10/dzfxuxLOG10dzfxuxhttps://mariadb.com/kb/en/library/log10/dzfxuxdzfxux4dzfxux63qjzxqqvvbqSyntax
  ------ 
  LOG2(X)
   
  Description
  ----------- 
  Returns the base-2 logarithm of X.
   
  Examples
  -------- 
  SELECT LOG2(4398046511104);
  +---------------------+
  | LOG2(4398046511104) |
  +---------------------+
  | 42 |
  +---------------------+
   
  SELECT LOG2(65536);
  +-------------+
  | LOG2(65536) |
  +-------------+
  | 16 |
  +-------------+
   
  SELECT LOG2(-100);
  +------------+
  | LOG2(-100) |
  +------------+
  | NULL |
  +------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/log2/dzfxuxLOG2dzfxuxhttps://mariadb.com/kb/en/library/log2/dzfxuxdzfxux4dzfxux64qjzxqqvvbqSyntax
  ------ 
  MOD(N,M), N % M, N MOD M
   
  Description
  ----------- 
  Modulo operation. Returns the remainder of N divided by M.
  See also Modulo Operator.
   
  If the ERROR_ON_DIVISION_BY_ZERO SQL_MODE is used, any
  number modulus zero produces an error. Otherwise, it returns
  NULL.
   
  The integer part of a division can be obtained using DIV.
   
  Examples
  -------- 
  SELECT 1042 % 50;
   
  +-----------+
  | 1042 % 50 |
  +-----------+
  | 42 |
  +-----------+
   
  SELECT MOD(234, 10);
  +--------------+
  | MOD(234, 10) |
  +--------------+
  | 4 |
  +--------------+
   
  SELECT 253 % 7;
   
  +---------+
  | 253 % 7 |
  +---------+
  | 1 |
  +---------+
   
  SELECT MOD(29,9);
  +-----------+
  | MOD(29,9) |
  +-----------+
  | 2 |
  +-----------+
   
  SELECT 29 MOD 9;
   
  +----------+
  | 29 MOD 9 |
  +----------+
  | 2 |
  +----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mod/dzfxuxMODdzfxuxhttps://mariadb.com/kb/en/library/mod/dzfxuxdzfxux4dzfxux65qjzxqqvvbqSyntax
  ------ 
  OCT(N)
   
  Description
  ----------- 
  Returns a string representation of the octal value of N,
  where N is a longlong (BIGINT) number. This is equivalent to
  CONV(N,10,8). Returns NULL if N is NULL.
   
  Examples
  -------- 
  SELECT OCT(34);
  +---------+
  | OCT(34) |
  +---------+
  | 42 |
  +---------+
   
  SELECT OCT(12);
  +---------+
  | OCT(12) |
  +---------+
  | 14 |
  +---------+
   


  URL: https://mariadb.com/kb/en/library/oct/dzfxuxOCTdzfxuxhttps://mariadb.com/kb/en/library/oct/dzfxuxdzfxux4dzfxux66qjzxqqvvbqSyntax
  ------ 
  PI()
   
  Description
  ----------- 
  Returns the value of π (pi). The default number of decimal
  places
  displayed is six, but MariaDB uses the full double-precision
  value
  internally.
   
  Examples
  -------- 
  SELECT PI();
  +----------+
  | PI() |
  +----------+
  | 3.141593 |
  +----------+
   
  SELECT PI()+0.0000000000000000000000;
   
  +-------------------------------+
  | PI()+0.0000000000000000000000 |
  +-------------------------------+
  | 3.1415926535897931159980 |
  +-------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/pi/dzfxuxPIdzfxuxhttps://mariadb.com/kb/en/library/pi/dzfxuxdzfxux4dzfxux67qjzxqqvvbqSyntax
  ------ 
  POW(X,Y)
   
  Description
  ----------- 
  Returns the value of X raised to the power of Y.
   
  POWER() is a synonym.
   
  Examples
  -------- 
  SELECT POW(2,3);
  +----------+
  | POW(2,3) |
  +----------+
  | 8 |
  +----------+
   
  SELECT POW(2,-2);
  +-----------+
  | POW(2,-2) |
  +-----------+
  | 0.25 |
  +-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/pow/dzfxuxPOWdzfxuxhttps://mariadb.com/kb/en/library/pow/dzfxuxdzfxux4dzfxux68qjzxqqvvbqSyntax
  ------ 
  POWER(X,Y)
   
  Description
  ----------- 
  This is a synonym for POW(), which returns the value of X
  raised to the power of Y.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/power/dzfxuxPOWERdzfxuxhttps://mariadb.com/kb/en/library/power/dzfxuxdzfxux4dzfxux69qjzxqqvvbqSyntax
  ------ 
  RADIANS(X)
   
  Description
  ----------- 
  Returns the argument X, converted from degrees to radians.
  Note that
  π radians equals 180 degrees. 
   
  This is the converse of the DEGREES() function.
   
  Examples
  -------- 
  SELECT RADIANS(45);
  +-------------------+
  | RADIANS(45) |
  +-------------------+
  | 0.785398163397448 |
  +-------------------+
   
  SELECT RADIANS(90);
  +-----------------+
  | RADIANS(90) |
  +-----------------+
  | 1.5707963267949 |
  +-----------------+
   
  SELECT RADIANS(PI());
  +--------------------+
  | RADIANS(PI()) |
  +--------------------+
  | 0.0548311355616075 |
  +--------------------+
   
  SELECT RADIANS(180);
  +------------------+
  | RADIANS(180) |
  +------------------+
  | 3.14159265358979 |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/radians/dzfxuxRADIANSdzfxuxhttps://mariadb.com/kb/en/library/radians/dzfxuxdzfxux4dzfxux70qjzxqqvvbqSyntax
  ------ 
  RAND(), RAND(N)
   
  Description
  ----------- 
  Returns a random DOUBLE precision floating point value v in
  the range 0 

  URL: https://mariadb.com/kb/en/library/rand/dzfxuxRANDdzfxuxhttps://mariadb.com/kb/en/library/rand/dzfxuxdzfxux4dzfxux71qjzxqqvvbqSyntax
  ------ 
  ROUND(X), ROUND(X,D)
   
  Description
  ----------- 
  Rounds the argument X to D decimal places. The rounding
  algorithm
  depends on the data type of X. D defaults to 0 if not
  specified.
  D can be negative to cause D digits left of the decimal
  point of the
  value X to become zero.
   
  Examples
  -------- 
  SELECT ROUND(-1.23);
  +--------------+
  | ROUND(-1.23) |
  +--------------+
  | -1 |
  +--------------+
   
  SELECT ROUND(-1.58);
  +--------------+
  | ROUND(-1.58) |
  +--------------+
  | -2 |
  +--------------+
   
  SELECT ROUND(1.58); 
  +-------------+
  | ROUND(1.58) |
  +-------------+
  | 2 |
  +-------------+
   
  SELECT ROUND(1.298, 1);
  +-----------------+
  | ROUND(1.298, 1) |
  +-----------------+
  | 1.3 |
  +-----------------+
   
  SELECT ROUND(1.298, 0);
  +-----------------+
  | ROUND(1.298, 0) |
  +-----------------+
  | 1 |
  +-----------------+
   
  SELECT ROUND(23.298, -1);
  +-------------------+
  | ROUND(23.298, -1) |
  +-------------------+
  | 20 |
  +-------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/round/dzfxuxROUNDdzfxuxhttps://mariadb.com/kb/en/library/round/dzfxuxdzfxux4dzfxux72qjzxqqvvbqSyntax
  ------ 
  SIGN(X)
   
  Description
  ----------- 
  Returns the sign of the argument as -1, 0, or 1, depending
  on whether
  X is negative, zero, or positive.
   
  Examples
  -------- 
  SELECT SIGN(-32);
  +-----------+
  | SIGN(-32) |
  +-----------+
  | -1 |
  +-----------+
   
  SELECT SIGN(0);
  +---------+
  | SIGN(0) |
  +---------+
  | 0 |
  +---------+
   
  SELECT SIGN(234);
  +-----------+
  | SIGN(234) |
  +-----------+
  | 1 |
  +-----------+
   


  URL: https://mariadb.com/kb/en/library/sign/dzfxuxSIGNdzfxuxhttps://mariadb.com/kb/en/library/sign/dzfxuxdzfxux4dzfxux73qjzxqqvvbqSyntax
  ------ 
  SIN(X)
   
  Description
  ----------- 
  Returns the sine of X, where X is given in radians.
   
  Examples
  -------- 
  SELECT SIN(1.5707963267948966);
  +-------------------------+
  | SIN(1.5707963267948966) |
  +-------------------------+
  | 1 |
  +-------------------------+
   
  SELECT SIN(PI());
  +----------------------+
  | SIN(PI()) |
  +----------------------+
  | 1.22460635382238e-16 |
  +----------------------+
   
  SELECT ROUND(SIN(PI()));
  +------------------+
  | ROUND(SIN(PI())) |
  +------------------+
  | 0 |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/sin/dzfxuxSINdzfxuxhttps://mariadb.com/kb/en/library/sin/dzfxuxdzfxux4dzfxux74qjzxqqvvbqSyntax
  ------ 
  SQRT(X)
   
  Description
  ----------- 
  Returns the square root of X. If X is negative, NULL is
  returned.
   
  Examples
  -------- 
  SELECT SQRT(4);
  +---------+
  | SQRT(4) |
  +---------+
  | 2 |
  +---------+
   
  SELECT SQRT(20);
  +------------------+
  | SQRT(20) |
  +------------------+
  | 4.47213595499958 |
  +------------------+
   
  SELECT SQRT(-16);
  +-----------+
  | SQRT(-16) |
  +-----------+
  | NULL |
  +-----------+
   
  SELECT SQRT(1764);
  +------------+
  | SQRT(1764) |
  +------------+
  | 42 |
  +------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/sqrt/dzfxuxSQRTdzfxuxhttps://mariadb.com/kb/en/library/sqrt/dzfxuxdzfxux4dzfxux75qjzxqqvvbqSyntax
  ------ 
  TAN(X)
   
  Description
  ----------- 
  Returns the tangent of X, where X is given in radians.
   
  Examples
  -------- 
  SELECT TAN(0.7853981633974483);
  +-------------------------+
  | TAN(0.7853981633974483) |
  +-------------------------+
  | 0.9999999999999999 |
  +-------------------------+
   
  SELECT TAN(PI());
  +-----------------------+
  | TAN(PI()) |
  +-----------------------+
  | -1.22460635382238e-16 |
  +-----------------------+
   
  SELECT TAN(PI()+1);
  +-----------------+
  | TAN(PI()+1) |
  +-----------------+
  | 1.5574077246549 |
  +-----------------+
   
  SELECT TAN(RADIANS(PI()));
  +--------------------+
  | TAN(RADIANS(PI())) |
  +--------------------+
  | 0.0548861508080033 |
  +--------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/tan/dzfxuxTANdzfxuxhttps://mariadb.com/kb/en/library/tan/dzfxuxdzfxux4dzfxux76qjzxqqvvbqThis page documents the TRUNCATE function. See TRUNCATE
  TABLE for the DDL statement.
   
  Syntax
  ------ 
  TRUNCATE(X,D)
   
  Description
  ----------- 
  Returns the number X, truncated to D decimal places. If D is
  0, the
  result has no decimal point or fractional part. D can be
  negative to
  cause D digits left of the decimal point of the value X to
  become
  zero.
   
  Examples
  -------- 
  SELECT TRUNCATE(1.223,1);
  +-------------------+
  | TRUNCATE(1.223,1) |
  +-------------------+
  | 1.2 |
  +-------------------+
   
  SELECT TRUNCATE(1.999,1);
  +-------------------+
  | TRUNCATE(1.999,1) |
  +-------------------+
  | 1.9 |
  +-------------------+
   
  SELECT TRUNCATE(1.999,0); 
  +-------------------+
  | TRUNCATE(1.999,0) |
  +-------------------+
  | 1 |
  +-------------------+
   
  SELECT TRUNCATE(-1.999,1);
  +--------------------+
  | TRUNCATE(-1.999,1) |
  +--------------------+
  | -1.9 |
  +--------------------+
   
  SELECT TRUNCATE(122,-2);
  +------------------+
  | TRUNCATE(122,-2) |
  +------------------+
  | 100 |
  +------------------+
   
  SELECT TRUNCATE(10.28*100,0);
  +-----------------------+
  | TRUNCATE(10.28*100,0) |
  +-----------------------+
  | 1028 |
  +-----------------------+
   


  URL: https://mariadb.com/kb/en/library/truncate/dzfxuxTRUNCATEdzfxuxhttps://mariadb.com/kb/en/library/truncate/dzfxuxdzfxux4dzfxux77qjzxqqvvbqPlugins are server components that enhance MariaDB in some
  way. These can be anything from new storage engines, plugins
  for enhancing full-text parsing, or even small enhancements,
  such as a plugin to get a timestamp as an integer.
   
  Querying Plugin Information
   
  There are a number of ways to see which plugins are
  currently active.
   
  A server almost always has a large number of active plugins,
  because the server contains a large number of built-in
  plugins, which are active by default and cannot be
  uninstalled.
   
  Querying Plugin Information with SHOW PLUGINS
   
  The SHOW PLUGINS statement can be used to query information
  about all active plugins.
   
  For example:
   
  SHOW PLUGINS;
   
  +----------------------------+----------+--------------------+---------+---------+
  | Name | Status | Type | Library | License |
  +----------------------------+----------+--------------------+---------+---------+
  ...
  | mysql_native_password | ACTIVE | AUTHENTICATION | NULL |
  GPL |
  | mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL
  |
  | MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
  ...
  +----------------------------+----------+--------------------+---------+---------+
   
  If a plugin's Library column has the NULL value, then the
  plugin is built-in, and it cannot be uninstalled.
   
  Querying Plugin Information with information_schema.PLUGINS
   
  The information_schema.PLUGINS table can be queried to get
  more detailed information about plugins.
   
  For example:
   
  SELECT * FROM information_schema.PLUGINS\G
  ...
  *************************** 6. row
  ***************************
   PLUGIN_NAME: CSV
   PLUGIN_VERSION: 1.0
   PLUGIN_STATUS: ACTIVE
   PLUGIN_TYPE: STORAGE ENGINE
   PLUGIN_TYPE_VERSION: 100003.0
   PLUGIN_LIBRARY: NULL
  PLUGIN_LIBRARY_VERSION: NULL
   PLUGIN_AUTHOR: Brian Aker, MySQL AB
   PLUGIN_DESCRIPTION: CSV storage engine
   PLUGIN_LICENSE: GPL
   LOAD_OPTION: FORCE
   PLUGIN_MATURITY: Stable
   PLUGIN_AUTH_VERSION: 1.0
  *************************** 7. row
  ***************************
   PLUGIN_NAME: MEMORY
   PLUGIN_VERSION: 1.0
   PLUGIN_STATUS: ACTIVE
   PLUGIN_TYPE: STORAGE ENGINE
   PLUGIN_TYPE_VERSION: 100003.0
   PLUGIN_LIBRARY: NULL
  PLUGIN_LIBRARY_VERSION: NULL
   PLUGIN_AUTHOR: MySQL AB
   PLUGIN_DESCRIPTION: Hash based, stored in memory, useful
  for temporary tables
   PLUGIN_LICENSE: GPL
   LOAD_OPTION: FORCE
   PLUGIN_MATURITY: Stable
   PLUGIN_AUTH_VERSION: 1.0
  ...
   
  If a plugin's PLUGIN_LIBRARY column has the NULL value,
  then the plugin is built-in, and it cannot be uninstalled.
   
  Querying Plugin Information with mysql.plugin
   
  The mysql.plugin table can be queried to get information
  about installed plugins.
   
  This table only contains information about plugins that have
  been installed via the following methods:
  The INSTALL SONAME statement.
  The INSTALL PLUGIN statement.
  The mysql_plugin utility.
   
  This table does not contain information about:
  Built-in plugins.
  Plugins loaded with the --plugin-load-add option.
  Plugins loaded with the --plugin-load option.
   
  This table only contains enough information to reload the
  plugin when the server is restarted, which means it only
  contains the plugin name and the plugin library.
   
  For example:
   
  SELECT * FROM mysql.plugin;
   
  +------+------------+
  | name | dl |
  +------+------------+
  | PBXT | libpbxt.so |
  +------+------------+
   
  Installing a Plugin
   
  There are three primary ways to install a plugin:
  A plugin can be installed dynamically with an SQL statement.
  A plugin can be installed with a mysqld option, but it
  requires a server restart.
  A plugin can be installed with the mysql_plugin utility,
  while the server is completely offline.
   
  When you are installing a plugin, you also have to ensure
  that:
  The server's plugin directory is properly configured, and
  the plugin's library is in the plugin directory.
  The server's minimum plugin maturity is properly
  configured, and the plugin is mature enough to be installed.
   
  Installing a Plugin Dynamically
   
  A plugin can be installed dynamically by executing either
  the INSTALL SONAME or the INSTALL PLUGIN statement.
   
  If a plugin is installed with one of these statements, then
  a record will be added to the mysql.plugins table for the
  plugin. This means that the plugin will automatically be
  loaded every time the server restarts, unless specifically
  uninstalled or deactivated.
   
  Installing a Plugin with INSTALL SONAME
   
  You can install a plugin dynamically by executing the
  INSTALL SONAME statement. INSTALL SONAME installs all
  plugins from the given plugin library. This could be
  required for some plugin libraries.
   
  For example, to install all plugins in the server_audit
  plugin library (which is currently only the server_audit
  audit plugin), you could execute the following:
   
  INSTALL SONAME 'server_audit';
   
  Installing a Plugin with INSTALL PLUGIN
   
  You can install a plugin dynamically by executing the
  INSTALL PLUGIN statement. INSTALL PLUGIN installs a single
  plugin from the given plugin library.
   
  For example, to install the server_audit audit plugin from
  the server_audit plugin library, you could execute the
  following:
   
  INSTALL PLUGIN server_audit SONAME 'server_audit';
   
  Installing a Plugin with Plugin Load Options
   
  A plugin can be installed with a mysqld option by providing
  either the --plugin-load-add or the --plugin-load option.
   
  If a plugin is installed with one of these options, then a
  record will not be added to the mysql.plugins table for the
  plugin. This means that if the server is restarted without
  the same option set, then the plugin will not automatically
  be loaded.
   
  Installing a Plugin with --plugin-load-add
   
  You can install a plugin with the --plugin-load-add option
  by specifying the option as a command-line argument to
  mysqld or by specifying the option in a relevant server
  option group in an option file.
   
  The --plugin-load-add option uses the following format:
  Plugins can be specified in the format name=library, where
  name is the plugin name and library is the plugin library.
  This format installs a single plugin from the given plugin
  library.
  Plugins can also be specified in the format library, where
  library is the plugin library. This format installs all
  plugins from the given plugin library.
  Multiple plugins can be specified by separating them with
  semicolons.
   
  For example, to install all plugins in the server_audit
  plugin library (which is currently only the server_audit
  audit plugin) and also the ed25519 authentication plugin
  from the auth_ed25519 plugin library, you could set the
  option to the following values on the command-line:
   
  $ mysqld --user=mysql --plugin-load-add='server_audit'
  --plugin-load-add='ed25519=auth_ed25519'
   
  You could also set the option to the same values in an
  option file:
   
  [mariadb]
  ...
  plugin_load_add = server_audit
  plugin_load_add = ed25519=auth_ed25519
   
  Special care must be taken when specifying both the
  --plugin-load option and the --plugin-load-add option
  together. The --plugin-load option resets the plugin load
  list, and this can cause unexpected problems if you are not
  aware. The --plugin-load-add option does not reset the
  plugin load list, so it is much safer to use. See Specifying
  Multiple Plugin Load Options for more information.
   
  Installing a Plugin with --plugin-load
   
  You can install a plugin with the --plugin-load option by
  specifying the option as a command-line argument to mysqld
  or by specifying the option in a relevant server option
  group in an option file.
   
  The --plugin-load option uses the following format:
  Plugins can be specified in the format name=library, where
  name is the plugin name and library is the plugin library.
  This format installs a single plugin from the given plugin
  library.
  Plugins can also be specified in the format library, where
  library is the plugin library. This format installs all
  plugins from the given plugin library.
  Multiple plugins can be specified by separating them with
  semicolons.
   
  For example, to install all plugins in the server_audit
  plugin library (which is currently only the server_audit
  audit plugin) and also the ed25519 authentication plugin
  from the auth_ed25519 plugin library, you could set the
  option to the following values on the command-line:
   
  $ mysqld --user=mysql
  --plugin-load='server_audit;ed25519=auth_ed25519'
   
  You could also set the option to the same values in an
  option file:
   
  [mariadb]
  ...
  plugin_load = server_audit;ed25519=auth_ed25519
   
  Special care must be taken when specifying the --plugin-load
  option multiple times, or when specifying both the
  --plugin-load option and the --plugin-load-add option
  together. The --plugin-load option resets the plugin load
  list, and this can cause unexpected problems if you are not
  aware. The --plugin-load-add option does not reset the
  plugin load list, so it is much safer to use. See Specifying
  Multiple Plugin Load Options for more information.
   
  Specifying Multiple Plugin Load Options
   
  Special care must be taken when specifying the --plugin-load
  option multiple times, or when specifying both the
  --plugin-load option and the --plugin-load-add option. The
  --plugin-load option resets the plugin load list, and this
  can cause unexpected problems if you are not aware. The
  --plugin-load-add option does not reset the plugin load
  list, so it is much safer to use.
   
  This can have the following consequences:
  If the --plugin-load option is specified multiple times,
  then only the last instance will have any effect. For
  example, in the following case, the first instance of the
  option is reset:
   
  [mariadb]
  ...
  plugin_load = server_audit
  plugin_load = ed25519=auth_ed25519
  If the --plugin-load option is specified after the
  --plugin-load-add option, then it will also reset the
  changes made by that option. For example, in the following
  case, the --plugin-load-add option does not do anything,
  because the subsequent --plugin-load option resets the
  plugin load list:
   
  [mariadb]
  ...
  plugin_load_add = server_audit
  plugin_load = ed25519=auth_ed25519
  In contrast, if the --plugin-load option is specified before
  the --plugin-load-add option, then it will work fine,
  because the --plugin-load-add option does not reset the
  plugin load list. For example, in the following case, both
  plugins are properly loaded:
   
  [mariadb]
  ...
  plugin_load = server_audit
  plugin_load_add = ed25519=auth_ed25519
   
  Installing a Plugin with mysql_plugin
   
  A plugin can be installed with the mysql_plugin utility if
  the server is completely offline. 
   
  The syntax is:
   
  mysql_plugin [options] 
   ENABLE|DISABLE
   
  For example, to install the server_audit audit plugin, you
  could execute the following:
   
  mysql_plugin server_audit ENABLE
   
  If a plugin is installed with this utility, then a record
  will be added to the mysql.plugins table for the plugin.
  This means that the plugin will automatically be loaded
  every time the server restarts, unless specifically
  uninstalled or deactivated.
   
  Configuring the Plugin Directory
   
  When a plugin is being installed, the server looks for the
  plugin's library in the server's plugin directory. This
  directory is configured by the plugin_dir system variable.
  This can be specified as a command-line argument to mysqld
  or it can be specified in a relevant server option group in
  an option file. For example:
   
  [mariadb]
  ...
  plugin_dir = /usr/lib64/mysql/plugin
   
  Configuring the Minimum Plugin Maturity
   
  When a plugin is being installed, the server compares the
  plugin's maturity level against the server's minimum
  allowed plugin maturity. This can help prevent users from
  using unstable plugins on production servers. This minimum
  plugin maturity is configured by the plugin_maturity system
  variable. This can be specified as a command-line argument
  to mysqld or it can be specified in a relevant server option
  group in an option file. For example:
   
  [mariadb]
  ...
  plugin_maturity = stable
   
  Configuring Plugin Activation at Server Startup
   
  A plugin will be loaded by default when the server starts
  if:
  The plugin was installed with the INSTALL SONAME statement.
  The plugin was installed with the INSTALL PLUGIN statement.
  The plugin was installed with the mysql_plugin utility.
  The server is configured to load the plugin with the
  --plugin-load-add option.
  The server is configured to load the plugin with the
  --plugin-load option.
   
  This behavior can be changed with special options that take
  the form --plugin-name. For example, for the server_audit
  audit plugin, the special option is called --server-audit.
   
  The possible values for these special options are:
   
  Option Value | Description | 
   
  OFF | Disables the plugin without removing it from the
  mysql.plugins table. | 
   
  ON | Enables the plugin. If the plugin cannot be
  initialized, then the server will still continue starting
  up, but the plugin will be disabled. | 
   
  FORCE | Enables the plugin. If the plugin cannot be
  initialized, then the server will fail to start with an
  error. | 
   
  FORCE_PLUS_PERMANENT | Enables the plugin. If the plugin
  cannot be initialized, then the server will fail to start
  with an error. In addition, the plugin cannot be uninstalled
  with UNINSTALL SONAME or UNINSTALL PLUGIN while the server
  is running. | 
   
  A plugin's status can be found by looking at the
  PLUGIN_STATUS column of the information_schema.PLUGINS
  table.
   
  Uninstalling Plugins
   
  Plugins that are found in the mysql.plugin table, that is
  those that were installed with INSTALL SONAME, INSTALL
  PLUGIN or mysql_plugin can be uninstalled in one of two
  ways:
  The UNINSTALL SONAME or the UNINSTALL PLUGIN statement while
  the server is running
  With mysql_plugin while the server is offline.
   
  Plugins that were enabled as a --plugin-load option do not
  need to be uninstalled. If --plugin-load is omitted the next
  time the server starts, or the plugin is not listed as one
  of the --plugin-load entries, the plugin will not be loaded.
   
  UNINSTALL PLUGIN uninstalls a single installed plugin, while
  UNINSTALL SONAME uninstalls all plugins belonging to a given
  library.
   


  URL: https://mariadb.com/kb/en/library/plugin-overview/dzfxuxPlugin Overviewdzfxuxhttps://mariadb.com/kb/en/library/plugin-overview/dzfxuxdzfxux5dzfxux78qjzxqqvvbqSyntax
  ------ 
  INSTALL PLUGIN [IF NOT EXISTS] plugin_name SONAME
  'plugin_library'
   
  Description
  ----------- 
  This statement installs an individual plugin from the
  specified library. To install the whole library (which could
  be required), use INSTALL SONAME.
   
  plugin_name is the name of the plugin as defined in the
  plugin declaration structure contained in the library file.
  Plugin names are
  not case sensitive. For maximal compatibility, plugin names
  should be limited
  to ASCII letters, digits, and underscore, because they are
  used in C source
  files, shell command lines, M4 and Bourne shell scripts, and
  SQL environments.
   
  plugin_library is the name of the shared library that
  contains the plugin code. Before MariaDB 5.5.21, the name
  should include the file name extension (for
  example, libmyplugin.so or libmyplugin.dll). Starting from
  MariaDB 5.5.21, the file name extension can be omitted
  (which makes the statement look the same on all
  architectures).
   
  The shared library must be located in the plugin directory
  (that is,
  the directory named by the plugin_dir system variable). The
  library must be in the plugin directory itself, not in a
  subdirectory. By
  default, plugin_dir is plugin directory under the directory
  named by
  the pkglibdir configuration variable, but it can be changed
  by setting
  the value of plugin_dir at server startup. For example, set
  its value in a my.cnf file:
   
  [mysqld]
  plugin_dir=/path/to/plugin/directory
  If the value of plugin_dir is a relative path name, it is
  taken to be relative to the MySQL base directory (the value
  of the basedir
  system variable).
   
  INSTALL PLUGIN adds a line to the mysql.plugin table that
  describes the plugin. This table contains the plugin name
  and library file
  name.
   
  INSTALL PLUGIN causes the server to read
  option (my.cnf) files just as during server startup. This
  enables the plugin to
  pick up any relevant options from those files. It is
  possible to add plugin
  options to an option file even before loading a plugin (if
  the loose prefix is
  used). It is also possible to uninstall a plugin, edit
  my.cnf, and install the
  plugin again. Restarting the plugin this way enables it to
  the new option
  values without a server restart.
   
  Before MySQL 5.1.33, a plugin was started with each option
  set to its
  default value.
   
  INSTALL PLUGIN also loads and initializes the plugin code to
  make the plugin available for use. A plugin is initialized
  by executing its
  initialization function, which handles any setup that the
  plugin must perform
  before it can be used.
   
  To use INSTALL PLUGIN, you must have the
  INSERT privilege for the mysql.plugin table.
   
  At server startup, the server loads and initializes any
  plugin that is
  listed in the mysql.plugin table. This means that a plugin
  is installed
  with INSTALL PLUGIN only once, not every time the server
  starts. Plugin loading at startup does not occur if the
  server is started with
  the --skip-grant-tables option.
   
  When the server shuts down, it executes the deinitialization
  function
  for each plugin that is loaded so that the plugin has a
  chance to
  perform any final cleanup.
   
  If you need to load plugins for a single server startup when
  the
  --skip-grant-tables option is given (which tells the server
  not to read system tables), use the 
  --plugin-load mysqld option.
   
  IF NOT EXISTS
   
  When the IF NOT EXISTS clause is used, MariaDB will return a
  note instead of an error if the specified plugin already
  exists. See SHOW WARNINGS.
   
  Examples
  -------- 
  INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';
   
  Starting from MariaDB 5.5.21, the extension can be omitted:
   
  INSTALL PLUGIN innodb SONAME 'ha_xtradb';
   
  From MariaDB 10.4.0:
   
  INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
   
  Query OK, 0 rows affected (0.104 sec)
   
  INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example';
   
  Query OK, 0 rows affected, 1 warning (0.000 sec)
   
  SHOW WARNINGS;
   
  +-------+------+------------------------------------+
  | Level | Code | Message |
  +-------+------+------------------------------------+
  | Note | 1968 | Plugin 'example' already installed |
  +-------+------+------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/install-plugin/dzfxuxINSTALL PLUGINdzfxuxhttps://mariadb.com/kb/en/library/install-plugin/dzfxuxdzfxux5dzfxux79qjzxqqvvbqDescription
  ----------- 
  The MBR (Minimum Bounding Rectangle), or Envelope is the
  bounding
  geometry, formed by the minimum and maximum (X,Y)
  coordinates:
   
  Examples
  -------- 
  ((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbr-definition/dzfxuxMBR Definitiondzfxuxhttps://mariadb.com/kb/en/library/mbr-definition/dzfxuxdzfxux6dzfxux83qjzxqqvvbqSyntax
  ------ 
  MBRContains(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangle of
  g1 contains the Minimum Bounding Rectangle of g2. This tests
  the
  opposite relationship as MBRWithin().
   
  Examples
  -------- 
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
   
  SET @g2 = GeomFromText('Point(1 1)');
   
  SELECT MBRContains(@g1,@g2), MBRContains(@g2,@g1);
  +----------------------+----------------------+
  | MBRContains(@g1,@g2) | MBRContains(@g2,@g1) |
  +----------------------+----------------------+
  | 1 | 0 |
  +----------------------+----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbrcontains/dzfxuxMBRContainsdzfxuxhttps://mariadb.com/kb/en/library/mbrcontains/dzfxuxdzfxux6dzfxux84qjzxqqvvbqSyntax
  ------ 
  MBREqual(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangles of
  the two geometries g1 and g2 are the same.
   
  Examples
  -------- 
  SET @g1=GEOMFROMTEXT('LINESTRING(0 0, 1 2)');
  SET @g2=GEOMFROMTEXT('POLYGON((0 0, 0 2, 1 2, 1 0, 0
  0))');
  SELECT MbrEqual(@g1,@g2);
  +-------------------+
  | MbrEqual(@g1,@g2) |
  +-------------------+
  | 1 |
  +-------------------+
   
  SET @g1=GEOMFROMTEXT('LINESTRING(0 0, 1 3)');
  SET @g2=GEOMFROMTEXT('POLYGON((0 0, 0 2, 1 4, 1 0, 0
  0))');
  SELECT MbrEqual(@g1,@g2);
  +-------------------+
  | MbrEqual(@g1,@g2) |
  +-------------------+
  | 0 |
  +-------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbrequal/dzfxuxMBREqualdzfxuxhttps://mariadb.com/kb/en/library/mbrequal/dzfxuxdzfxux6dzfxux86qjzxqqvvbqSyntax
  ------ 
  UNINSTALL PLUGIN [IF EXISTS] plugin_name
   
  Description
  ----------- 
  This statement removes a single installed plugin. To
  uninstall the whole library which contains the plugin, use
  UNINSTALL SONAME. You cannot uninstall a plugin if any table
  that uses it is open.
   
  plugin_name must be the name of some plugin that is listed
  in the mysql.plugin table. The server executes the plugin's
  deinitialization
  function and removes the row for the plugin from the
  mysql.plugin
  table, so that subsequent server restarts will not load and
  initialize
  the plugin. UNINSTALL PLUGIN does not remove the plugin's
  shared library file.
   
  To use UNINSTALL PLUGIN, you must have the
  DELETE privilege for the mysql.plugin table.
   
  IF EXISTS
   
  If the IF EXISTS clause is used, MariaDB will return a note
  instead of an error if the plugin does not exist. See SHOW
  WARNINGS.
   
  Examples
  -------- 
  UNINSTALL PLUGIN example;
   
  From MariaDB 10.4.0:
   
  UNINSTALL PLUGIN IF EXISTS example;
   
  Query OK, 0 rows affected (0.099 sec)
   
  UNINSTALL PLUGIN IF EXISTS example;
   
  Query OK, 0 rows affected, 1 warning (0.000 sec)
   
  SHOW WARNINGS;
   
  +-------+------+-------------------------------+
  | Level | Code | Message |
  +-------+------+-------------------------------+
  | Note | 1305 | PLUGIN example does not exist |
  +-------+------+-------------------------------+
   


  URL: https://mariadb.com/kb/en/library/uninstall-plugin/dzfxuxUNINSTALL PLUGINdzfxuxhttps://mariadb.com/kb/en/library/uninstall-plugin/dzfxuxdzfxux5dzfxux80qjzxqqvvbqINSTALL SONAME has been supported since MariaDB 5.5.21.
   
  Syntax
  ------ 
  INSTALL SONAME 'plugin_library'
   
  Description
  ----------- 
  This statement is a variant of INSTALL PLUGIN. It installs
  all plugins from a given plugin_library. See INSTALL PLUGIN
  for details.
   
  plugin_library is the name of the shared library that
  contains the plugin code. The file name extension (for
  example, libmyplugin.so or libmyplugin.dll) can be omitted
  (which makes the statement look the same on all
  architectures).
   
  The shared library must be located in the plugin directory
  (that is,
  the directory named by the plugin_dir system variable). The
  library must be in the plugin directory itself, not in a
  subdirectory. By
  default, plugin_dir is plugin directory under the directory
  named by
  the pkglibdir configuration variable, but it can be changed
  by setting
  the value of plugin_dir at server startup. For example, set
  its value in a my.cnf file:
   
  [mysqld]
  plugin_dir=/path/to/plugin/directory
  If the value of plugin_dir is a relative path name, it is
  taken to be relative to the MySQL base directory (the value
  of the basedir
  system variable).
   
  INSTALL SONAME adds one or more lines to the mysql.plugin
  table that
  describes the plugin. This table contains the plugin name
  and library file
  name.
   
  INSTALL SONAME causes the server to read
  option (my.cnf) files just as during server startup. This
  enables the plugin to
  pick up any relevant options from those files. It is
  possible to add plugin
  options to an option file even before loading a plugin (if
  the loose prefix is
  used). It is also possible to uninstall a plugin, edit
  my.cnf, and install the
  plugin again. Restarting the plugin this way enables it to
  the new option
  values without a server restart.
   
  INSTALL SONAME also loads and initializes the plugin code to
  make the plugin available for use. A plugin is initialized
  by executing its
  initialization function, which handles any setup that the
  plugin must perform
  before it can be used.
   
  To use INSTALL SONAME, you must have the
  INSERT privilege for the mysql.plugin table.
   
  At server startup, the server loads and initializes any
  plugin that is
  listed in the mysql.plugin table. This means that a plugin
  is installed
  with INSTALL SONAME only once, not every time the server
  starts. Plugin loading at startup does not occur if the
  server is started with
  the --skip-grant-tables option.
   
  When the server shuts down, it executes the deinitialization
  function
  for each plugin that is loaded so that the plugin has a
  chance to
  perform any final cleanup.
   
  If you need to load plugins for a single server startup when
  the
  --skip-grant-tables option is given (which tells the server
  not to read system tables), use the 
  --plugin-load mysqld option.
   
  If you need to install only one plugin from a library, use
  the INSTALL PLUGIN statement.
   
  Examples
  -------- 
  To load the XtraDB storage engine and all of its
  information_schema tables with one statement, use
   
  INSTALL SONAME 'ha_xtradb';
   
  This statement can be used instead of INSTALL PLUGIN even
  when the library contains only one plugin:
   
  INSTALL SONAME 'ha_sequence';
   


  URL: https://mariadb.com/kb/en/library/install-soname/dzfxuxINSTALL SONAMEdzfxuxhttps://mariadb.com/kb/en/library/install-soname/dzfxuxdzfxux5dzfxux81qjzxqqvvbqUNINSTALL SONAMEhas been supported since MariaDB 5.5.21.
   
  Syntax
  ------ 
  UNINSTALL SONAME [IF EXISTS] 'plugin_library'
   
  Description
  ----------- 
  This statement is a variant of UNINSTALL PLUGIN statement,
  that removes all plugins belonging to a specified
  plugin_library. See UNINSTALL PLUGIN for details.
   
  plugin_library is the name of the shared library that
  contains the plugin code. The file name extension (for
  example, libmyplugin.so or libmyplugin.dll) can be omitted
  (which makes the statement look the same on all
  architectures).
   
  To use UNINSTALL SONAME, you must have the
  DELETE privilege for the mysql.plugin table.
   
  IF EXISTS
   
  If the IF EXISTS clause is used, MariaDB will return a note
  instead of an error if the plugin library does not exist.
  See SHOW WARNINGS.
   
  Examples
  -------- 
  To uninstall the XtraDB plugin and all of its
  information_schema tables with one statement, use
   
  UNINSTALL SONAME 'ha_xtradb';
   
  From MariaDB 10.4.0:
   
  UNINSTALL SONAME IF EXISTS 'ha_example';
   
  Query OK, 0 rows affected (0.099 sec)
   
  UNINSTALL SONAME IF EXISTS 'ha_example';
   
  Query OK, 0 rows affected, 1 warning (0.000 sec)
   
  SHOW WARNINGS;
   
  +-------+------+-------------------------------------+
  | Level | Code | Message |
  +-------+------+-------------------------------------+
  | Note | 1305 | SONAME ha_example.so does not exist |
  +-------+------+-------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/uninstall-soname/dzfxuxUNINSTALL SONAMEdzfxuxhttps://mariadb.com/kb/en/library/uninstall-soname/dzfxuxdzfxux5dzfxux82qjzxqqvvbqSyntax
  ------ 
  MBRWithin(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangle of
  g1 is within the Minimum Bounding Rectangle of g2. This
  tests the
  opposite relationship as MBRContains().
   
  Examples
  -------- 
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((0 0,0 5,5 5,5 0,0 0))');
  SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);
  +--------------------+--------------------+
  | MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |
  +--------------------+--------------------+
  | 1 | 0 |
  +--------------------+--------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbrwithin/dzfxuxMBRWithindzfxuxhttps://mariadb.com/kb/en/library/mbrwithin/dzfxuxdzfxux6dzfxux90qjzxqqvvbqSyntax
  ------ 
  IF(expr1,expr2,expr3)
   
  Description
  ----------- 
  If expr1 is TRUE (expr1  0 and expr1  NULL) then IF()
  returns expr2; otherwise it returns expr3. IF() returns a
  numeric
  or string value, depending on the context in which it is
  used.
   
  Note: There is also an IF statement which differs from the
  IF() function described here.
   
  Examples
  -------- 
  SELECT IF(1>2,2,3);
  +-------------+
  | IF(1>2,2,3) |
  +-------------+
  | 3 |
  +-------------+
   
  SELECT IF(1

  URL: https://mariadb.com/kb/en/library/if-function/dzfxuxIF Functiondzfxuxhttps://mariadb.com/kb/en/library/if-function/dzfxuxdzfxux7dzfxux92qjzxqqvvbqSyntax
  ------ 
  MBRDisjoint(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangles of the two geometries g1 and g2 are disjoint. Two
  geometries are disjoint if they do not intersect, that is
  touch or overlap.
   
  Examples
  -------- 
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((4 4,4 7,7 7,7 4,4 4))');
  SELECTmbrdisjoint(@g1,@g2);
  +----------------------+
  | mbrdisjoint(@g1,@g2) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((3 3,3 6,6 6,6 3,3 3))');
  SELECT mbrdisjoint(@g1,@g2);
  +----------------------+
  | mbrdisjoint(@g1,@g2) |
  +----------------------+
  | 0 |
  +----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbrdisjoint/dzfxuxMBRDisjointdzfxuxhttps://mariadb.com/kb/en/library/mbrdisjoint/dzfxuxdzfxux6dzfxux85qjzxqqvvbqSyntax
  ------ 
  MBRIntersects(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangles of the two geometries g1 and g2 intersect.
   
  Examples
  -------- 
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((3 3,3 6,6 6,6 3,3 3))');
  SELECT mbrintersects(@g1,@g2);
  +------------------------+
  | mbrintersects(@g1,@g2) |
  +------------------------+
  | 1 |
  +------------------------+
   
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((4 4,4 7,7 7,7 4,4 4))');
  SELECT mbrintersects(@g1,@g2);
  +------------------------+
  | mbrintersects(@g1,@g2) |
  +------------------------+
  | 0 |
  +------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbrintersects/dzfxuxMBRIntersectsdzfxuxhttps://mariadb.com/kb/en/library/mbrintersects/dzfxuxdzfxux6dzfxux87qjzxqqvvbqSyntax
  ------ 
  MBROverlaps(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangles of
  the two geometries g1 and g2 overlap. The term spatially
  overlaps is
  used if two geometries intersect and their intersection
  results in a
  geometry of the same dimension but not equal to either of
  the given
  geometries.
   
  Examples
  -------- 
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((4 4,4 7,7 7,7 4,4 4))');
  SELECT mbroverlaps(@g1,@g2);
  +----------------------+
  | mbroverlaps(@g1,@g2) |
  +----------------------+
  | 0 |
  +----------------------+
   
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((3 3,3 6,6 6,6 3,3 3))');
  SELECT mbroverlaps(@g1,@g2);
  +----------------------+
  | mbroverlaps(@g1,@g2) |
  +----------------------+
  | 0 |
  +----------------------+
   
  SET @g1 = GeomFromText('Polygon((0 0,0 4,4 4,4 0,0 0))');
  SET @g2 = GeomFromText('Polygon((3 3,3 6,6 6,6 3,3 3))');
  SELECT mbroverlaps(@g1,@g2);
  +----------------------+
  | mbroverlaps(@g1,@g2) |
  +----------------------+
  | 1 |
  +----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbroverlaps/dzfxuxMBROverlapsdzfxuxhttps://mariadb.com/kb/en/library/mbroverlaps/dzfxuxdzfxux6dzfxux88qjzxqqvvbqSyntax
  ------ 
  MBRTouches(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether the Minimum Bounding
  Rectangles of
  the two geometries g1 and g2 touch. Two geometries spatially
  touch if
  the interiors of the geometries do not intersect, but the
  boundary of
  one of the geometries intersects either the boundary or the
  interior
  of the other.
   
  Examples
  -------- 
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((4 4,4 7,7 7,7 4,4 4))');
  SELECT mbrtouches(@g1,@g2);
  +---------------------+
  | mbrtouches(@g1,@g2) |
  +---------------------+
  | 0 |
  +---------------------+
   
  SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
  SET @g2 = GeomFromText('Polygon((3 3,3 6,6 6,6 3,3 3))');
  SELECT mbrtouches(@g1,@g2);
  +---------------------+
  | mbrtouches(@g1,@g2) |
  +---------------------+
  | 1 |
  +---------------------+
   
  SET @g1 = GeomFromText('Polygon((0 0,0 4,4 4,4 0,0 0))');
  SET @g2 = GeomFromText('Polygon((3 3,3 6,6 6,6 3,3 3))');
  SELECT mbrtouches(@g1,@g2);
  +---------------------+
  | mbrtouches(@g1,@g2) |
  +---------------------+
  | 0 |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mbrtouches/dzfxuxMBRTouchesdzfxuxhttps://mariadb.com/kb/en/library/mbrtouches/dzfxuxdzfxux6dzfxux89qjzxqqvvbqSyntax
  ------ 
  CASE value WHEN [compare_value] THEN result [WHEN
  [compare_value] THEN
  result ...] [ELSE result] END
   
  CASE WHEN [condition] THEN result [WHEN [condition] THEN
  result ...]
  [ELSE result] END
   
  Description
  ----------- 
  The first version returns the result where
  value=compare_value. The
  second version returns the result for the first condition
  that is
  true. If there was no matching result value, the result
  after ELSE is
  returned, or NULL if there is no ELSE part.
   
  There is also a CASE statement, which differs from the CASE
  operator described here.
   
  Examples
  -------- 
  SELECT CASE 1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE
  'more' END;
   
  +------------------------------------------------------------+
  | CASE 1 WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE
  'more' END |
  +------------------------------------------------------------+
  | one |
  +------------------------------------------------------------+
   
  SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END;
   
  +--------------------------------------------+
  | CASE WHEN 1>0 THEN 'true' ELSE 'false' END |
  +--------------------------------------------+
  | true |
  +--------------------------------------------+
   
  SELECT CASE BINARY 'B' WHEN 'a' THEN 1 WHEN 'b' THEN 2
  END;
   
  +-----------------------------------------------------+
  | CASE BINARY 'B' WHEN 'a' THEN 1 WHEN 'b' THEN 2 END
  |
  +-----------------------------------------------------+
  | NULL |
  +-----------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/case-operator/dzfxuxCASE OPERATORdzfxuxhttps://mariadb.com/kb/en/library/case-operator/dzfxuxdzfxux7dzfxux91qjzxqqvvbqSyntax
  ------ 
  IFNULL(expr1,expr2)
   
  Description
  ----------- 
  If expr1 is not NULL, IFNULL() returns expr1; otherwise it
  returns
  expr2. IFNULL() returns a numeric or string value, depending
  on the
  context in which it is used.
   
  Examples
  -------- 
  SELECT IFNULL(1,0); 
  +-------------+
  | IFNULL(1,0) |
  +-------------+
  | 1 |
  +-------------+
   
  SELECT IFNULL(NULL,10);
  +-----------------+
  | IFNULL(NULL,10) |
  +-----------------+
  | 10 |
  +-----------------+
   
  SELECT IFNULL(1/0,10);
  +----------------+
  | IFNULL(1/0,10) |
  +----------------+
  | 10.0000 |
  +----------------+
   
  SELECT IFNULL(1/0,'yes');
  +-------------------+
  | IFNULL(1/0,'yes') |
  +-------------------+
  | yes |
  +-------------------+
   


  URL: https://mariadb.com/kb/en/library/ifnull/dzfxuxIFNULLdzfxuxhttps://mariadb.com/kb/en/library/ifnull/dzfxuxdzfxux7dzfxux93qjzxqqvvbqSyntax
  ------ 
  NULLIF(expr1,expr2)
   
  Description
  ----------- 
  Returns NULL if expr1 = expr2 is true, otherwise returns
  expr1. This is
  the same as CASE WHEN expr1 = expr2 THEN NULL ELSE expr1
  END.
   
  Examples
  -------- 
  SELECT NULLIF(1,1);
  +-------------+
  | NULLIF(1,1) |
  +-------------+
  | NULL |
  +-------------+
   
  SELECT NULLIF(1,2);
  +-------------+
  | NULLIF(1,2) |
  +-------------+
  | 1 |
  +-------------+
   


  URL: https://mariadb.com/kb/en/library/nullif/dzfxuxNULLIFdzfxuxhttps://mariadb.com/kb/en/library/nullif/dzfxuxdzfxux7dzfxux94qjzxqqvvbqSyntax
  ------ 
  CHANGE MASTER ['connection_name'] TO master_def [,
  master_def] ...
   
  master_def:
   MASTER_BIND = 'interface_name'
   | MASTER_HOST = 'host_name'[
   | MASTER_USER = 'user_name'
   | MASTER_PASSWORD = 'password'
   | MASTER_PORT = port_num
   | MASTER_CONNECT_RETRY = interval
   | MASTER_HEARTBEAT_PERIOD = interval
   | MASTER_LOG_FILE = 'master_log_name'
   | MASTER_LOG_POS = master_log_pos
   | RELAY_LOG_FILE = 'relay_log_name'
   | RELAY_LOG_POS = relay_log_pos
   | MASTER_DELAY = interval
   | MASTER_SSL = {0|1}
   | MASTER_SSL_CA = 'ca_file_name'
   | MASTER_SSL_CAPATH = 'ca_directory_name'
   | MASTER_SSL_CERT = 'cert_file_name'
   | MASTER_SSL_CRL = 'crl_file_name'
   | MASTER_SSL_CRLPATH = 'crl_directory_name'
   | MASTER_SSL_KEY = 'key_file_name'
   | MASTER_SSL_CIPHER = 'cipher_list'
   | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}
   | MASTER_USE_GTID = {current_pos|slave_pos|no}
   | IGNORE_SERVER_IDS = (server_id_list)
   | DO_DOMAIN_IDS = ([N,..])
   | IGNORE_DOMAIN_IDS = ([N,..])
   
  Description
  ----------- 
  The CHANGE MASTER statement sets the options that a
  replication slave uses to connect to and replicate from a
  replication master. 
   
  MariaDB until 10.0.7
   
  In MariaDB 10.0.7 and before, the relay_log_purge system
  variable was silently set to 0 when CHANGE MASTER was
  executed.
   
  Multi-Source Replication
   
  Multi-source replication was added in MariaDB 10.0.1.
   
  If you are using multi-source replication, then you need to
  specify a connection name when you execute CHANGE MASTER.
  There are two ways to do this:
  Setting the default_master_connection system variable prior
  to executing CHANGE MASTER.
  Setting the connection_name parameter when executing CHANGE
  MASTER.
   
  default_master_connection
   
  SET default_master_connection = 'gandalf';
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   MASTER_PASSWORD='new3cret';
   
  START SLAVE;
   
  connection_name
   
  STOP SLAVE 'gandalf';
   
  CHANGE MASTER 'gandalf' TO 
   MASTER_PASSWORD='new3cret';
   
  START SLAVE 'gandalf';
   
  Options
   
  Connection Options
   
  MASTER_USER
   
  The MASTER_USER option for CHANGE MASTER defines the user
  account that the replication slave will use to connect to
  the replication master.
   
  This user account will need the REPLICATION SLAVE privilege
  on the master.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_USER='repl',
   MASTER_PASSWORD='new3cret';
   
  START SLAVE;
   
  MASTER_PASSWORD
   
  The MASTER_USER option for CHANGE MASTER defines the
  password that the replication slave will use to connect to
  the replication master as the user account defined by the
  MASTER_USER option.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   MASTER_PASSWORD='new3cret';
   
  START SLAVE;
   
  MASTER_HOST
   
  The MASTER_HOST option for CHANGE MASTER defines the
  hostname or IP address of the replication master.
   
  If you set the value of the MASTER_HOST option to the empty
  string, then that is not the same as not setting the
  option's value at all. In MariaDB 5.5 and later, if you set
  the value of the MASTER_HOST option to the empty string,
  then the CHANGE MASTER command will fail with an error. In
  MariaDB 5.3 and before, if you set the value of the
  MASTER_HOST option to the empty string, then the CHANGE
  MASTER command would succeed, but the subsequent START SLAVE
  command would fail.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_HOST='dbserver1.example.com',
   MASTER_USER='repl',
   MASTER_PASSWORD='new3cret',
   MASTER_USE_GTID=slave_pos;
   
  START SLAVE;
   
  If you set the value of the MASTER_HOST option in a CHANGE
  MASTER command, then the slave assumes that the master is
  different from before, even if you set the value of this
  option to the same value it had previously. In this
  scenario, the slave will consider the old values for the
  master's binary
  log file name and position to be invalid for the new master.
  As a side effect, if you do not explicitly set the values of
  the MASTER_LOG_FILE and MASTER_LOG_POS options in the
  statement, then the statement will be implicitly appended
  with MASTER_LOG_FILE='' and MASTER_LOG_POS=4. However, if
  you enable GTID mode for replication by setting the
  MASTER_USE_GTID option to some value other than no in the
  statement, then these values will effectively be ignored
  anyway.
   
  Replication slaves cannot connect to replication masters
  using Unix socket files or Windows named pipes. The
  replication slave must connect to the replication master
  using TCP/IP.
   
  MASTER_PORT
   
  The MASTER_PORT option for CHANGE MASTER defines the TCP/IP
  port of the replication master.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_HOST='dbserver1.example.com',
   MASTER_PORT=3307,
   MASTER_USER='repl',
   MASTER_PASSWORD='new3cret',
   MASTER_USE_GTID=slave_pos;
   
  START SLAVE;
   
  If you set the value of the MASTER_PORT option in a CHANGE
  MASTER command, then the slave assumes that the master is
  different from before, even if you set the value of this
  option to the same value it had previously. In this
  scenario, the slave will consider the old values for the
  master's binary
  log file name and position to be invalid for the new master.
  As a side effect, if you do not explicitly set the values of
  the MASTER_LOG_FILE and MASTER_LOG_POS options in the
  statement, then the statement will be implicitly appended
  with MASTER_LOG_FILE='' and MASTER_LOG_POS=4. However, if
  you enable GTID mode for replication by setting the
  MASTER_USE_GTID option to some value other than no in the
  statement, then these values will effectively be ignored
  anyway.
   
  Replication slaves cannot connect to replication masters
  using Unix socket files or Windows named pipes. The
  replication slave must connect to the replication master
  using TCP/IP.
   
  MASTER_CONNECT_RETRY
   
  The MASTER_CONNECT_RETRY option for CHANGE MASTER defines
  how many seconds that the slave will wait between connection
  retries. The default is 60.
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   MASTER_CONNECT_RETRY=20;
   
  START SLAVE;
   
  The number of connection attempts is limited by the
  master_retry_count option. It can be set either on the
  command-line or in a server option group in an option file
  prior to starting up the server. For example:
   
  [mariadb]
  ...
  master_retry_count=4294967295
   
  MASTER_BIND
   
  The MASTER_BIND option for CHANGE MASTER is only supported
  by MySQL 5.6.2 and later and by MySQL NDB Cluster 7.3.1 and
  later. This option is not yet supported by MariaDB. See
  MDEV-19248 for more information.
   
  The MASTER_BIND option for CHANGE MASTER can be used on
  replication slaves that have multiple network interfaces to
  choose which network interface the slave will use to connect
  to the master.
   
  MASTER_HEARTBEAT_PERIOD
   
  The MASTER_HEARTBEAT_PERIOD option for CHANGE MASTER can be
  used to set the interval in seconds between replication
  heartbeats. Whenever the master's binary log is updated
  with an event, the waiting period for the next heartbeat is
  reset.
   
  This option's interval argument has the following
  characteristics:
  It is a decimal value with a range of 0 to 4294967 seconds.
  It has a resolution of hundredths of a second.
  Its smallest valid non-zero value is 0.001.
  Its default value is the value of the slave_net_timeout
  system variable divided by 2.
  If it's set to 0, then heartbeats are disabled.
   
  Heartbeats are sent by the master only if there are no
  unsent events in the binary log file for a period longer
  than the interval.
   
  If the RESET SLAVE statement is executed, then the heartbeat
  interval is reset to the default.
   
  If the slave_net_timeout system variable is set to a value
  that is lower than the current heartbeat interval, then a
  warning will be issued.
   
  TLS Options
   
  The TLS options are used for providing information about
  TLS. The options can be set even on slaves that are compiled
  without TLS support. The TLS options are saved to either the
  default master.info file or the file that is configured by
  the master_info_file option, but these TLS options are
  ignored unless the slave supports TLS.
   
  See Replication with Secure Connections for more
  information.
   
  MASTER_SSL
   
  The MASTER_SSL option for CHANGE MASTER tells the slave
  whether to force TLS for the connection. The valid values
  are 0 or 1.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL=1;
   
  START SLAVE;
   
  MASTER_SSL_CA
   
  The MASTER_SSL_CA option for CHANGE MASTER defines a path to
  a PEM file that should contain one or more X509 certificates
  for trusted Certificate Authorities (CAs) to use for TLS.
  This option requires that you use the absolute path, not a
  relative path. This option implies the MASTER_SSL option.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1;
   
  START SLAVE;
   
  See Secure Connections Overview: Certificate Authorities
  (CAs) for more information.
   
  MASTER_SSL_CAPATH
   
  The MASTER_SSL_CAPATH option for CHANGE MASTER defines a
  path to a directory that contains one or more PEM files that
  should each contain one X509 certificate for a trusted
  Certificate Authority (CA) to use for TLS. This option
  requires that you use the absolute path, not a relative
  path. The directory specified by this option needs to be run
  through the openssl rehash command. This option implies the
  MASTER_SSL option.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CAPATH='/etc/my.cnf.d/certificates/ca/',
   MASTER_SSL_VERIFY_SERVER_CERT=1;
   
  START SLAVE;
   
  See Secure Connections Overview: Certificate Authorities
  (CAs) for more information.
   
  MASTER_SSL_CERT
   
  The MASTER_SSL_CERT option for CHANGE MASTER defines a path
  to the X509 certificate file to use for TLS. This option
  requires that you use the absolute path, not a relative
  path. This option implies the MASTER_SSL option.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1;
   
  START SLAVE;
   
  MASTER_SSL_CRL
   
  The MASTER_SSL_CRL option for CHANGE MASTER defines a path
  to a PEM file that should contain one or more revoked X509
  certificates to use for TLS. This option requires that you
  use the absolute path, not a relative path.
   
  This option is only supported if the server was built with
  OpenSSL. If the server was built with yaSSL, then this
  option is not supported. See TLS and Cryptography Libraries
  Used by MariaDB for more information about which libraries
  are used on which platforms.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1,
   MASTER_SSL_CRL='/etc/my.cnf.d/certificates/crl.pem';
   
  START SLAVE;
   
  See Secure Connections Overview: Certificate Revocation
  Lists (CRLs) for more information.
   
  MASTER_SSL_CRLPATH
   
  The MASTER_SSL_CRLPATH option for CHANGE MASTER defines a
  path to a directory that contains one or more PEM files that
  should each contain one revoked X509 certificate to use for
  TLS. This option requires that you use the absolute path,
  not a relative path. The directory specified by this
  variable needs to be run through the openssl rehash command.
   
  This option is only supported if the server was built with
  OpenSSL. If the server was built with yaSSL, then this
  option is not supported. See TLS and Cryptography Libraries
  Used by MariaDB for more information about which libraries
  are used on which platforms.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1,
   MASTER_SSL_CRLPATH='/etc/my.cnf.d/certificates/crl/';
   
  START SLAVE;
   
  See Secure Connections Overview: Certificate Revocation
  Lists (CRLs) for more information.
   
  MASTER_SSL_KEY
   
  The MASTER_SSL_KEY option for CHANGE MASTER defines a path
  to a private key file to use for TLS. This option requires
  that you use the absolute path, not a relative path. This
  option implies the MASTER_SSL option.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1;
   
  START SLAVE;
   
  MASTER_SSL_CIPHER
   
  The MASTER_SSL_CIPHER option for CHANGE MASTER defines the
  list of permitted ciphers or cipher suites to use for TLS.
  Besides cipher names, if MariaDB was compiled with OpenSSL,
  this option could be set to "SSLv3" or "TLSv1.2" to
  allow all SSLv3 or all TLSv1.2 ciphers. Note that the
  TLSv1.3 ciphers cannot be excluded when using OpenSSL, even
  by using this option. See Using TLSv1.3 for details. This
  option implies the MASTER_SSL option.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1,
   MASTER_SSL_CIPHER='TLSv1.2';
   
  START SLAVE;
   
  MASTER_SSL_VERIFY_SERVER_CERT
   
  The MASTER_SSL_VERIFY_SERVER_CERT option for CHANGE MASTER
  enables server certificate verification. This option is
  disabled by default.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_SSL_CERT='/etc/my.cnf.d/certificates/server-cert.pem',
   MASTER_SSL_KEY='/etc/my.cnf.d/certificates/server-key.pem',
   MASTER_SSL_CA='/etc/my.cnf.d/certificates/ca.pem',
   MASTER_SSL_VERIFY_SERVER_CERT=1;
   
  START SLAVE;
   
  See Secure Connections Overview: Server Certificate
  Verification for more information.
   
  Binary Log Options
   
  These options are related to the binary log position on the
  master.
   
  MASTER_LOG_FILE
   
  The MASTER_LOG_FILE option for CHANGE MASTER can be used
  along with MASTER_LOG_POS to specify the coordinates at
  which the slave's I/O thread should begin reading from the
  master's binary logs the next time the thread starts.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_LOG_FILE='master2-bin.001',
   MASTER_LOG_POS=4;
   
  START SLAVE;
   
  The MASTER_LOG_FILE and MASTER_LOG_POS options cannot be
  specified if the RELAY_LOG_FILE and RELAY_LOG_POS options
  were also specified.
   
  The MASTER_LOG_FILE and MASTER_LOG_POS options are
  effectively ignored if you enable GTID mode for replication
  by setting the MASTER_USE_GTID option to some value other
  than no in the statement.
   
  MASTER_LOG_POS
   
  The MASTER_LOG_POS option for CHANGE MASTER can be used
  along with MASTER_LOG_FILE to specify the coordinates at
  which the slave's I/O thread should begin reading from the
  master's binary logs the next time the thread starts.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_LOG_FILE='master2-bin.001',
   MASTER_LOG_POS=4;
   
  START SLAVE;
   
  The MASTER_LOG_FILE and MASTER_LOG_POS options cannot be
  specified if the RELAY_LOG_FILE and RELAY_LOG_POS options
  were also specified.
   
  The MASTER_LOG_FILE and MASTER_LOG_POS options are
  effectively ignored if you enable GTID mode for replication
  by setting the MASTER_USE_GTID option to some value other
  than no in the statement.
   
  Relay Log Options
   
  These options are related to the relay log position on the
  slave.
   
  RELAY_LOG_FILE
   
  The RELAY_LOG_FILE option for CHANGE MASTER can be used
  along with the RELAY_LOG_POS option to specify the
  coordinates at which the slave's SQL thread should begin
  reading from the relay log the next time the thread starts.
   
  The CHANGE MASTER statement usually deletes all relay log
  files. However, if the RELAY_LOG_FILE and/or RELAY_LOG_POS
  options are specified, then existing relay log files are
  kept.
   
  When you want to change the relay log position, you only
  need to stop the slave's SQL thread. The slave's I/O
  thread can continue running. The STOP SLAVE and START SLAVE
  statements support the SQL_THREAD option for this scenario.
  For example:
   
  STOP SLAVE SQL_THREAD;
   
  CHANGE MASTER TO
   RELAY_LOG_FILE='slave-relay-bin.006',
   RELAY_LOG_POS=4025;
   
  START SLAVE SQL_THREAD;
   
  When the value of this option is changed, the metadata about
  the slave's SQL thread's position in the relay logs will
  also be changed in the relay-log.info file or the file that
  is configured by the relay_log_info_file system variable.
   
  The RELAY_LOG_FILE and RELAY_LOG_POS options cannot be
  specified if the MASTER_LOG_FILE and MASTER_LOG_POS options
  were also specified.
   
  RELAY_LOG_POS
   
  The RELAY_LOG_POS option for CHANGE MASTER can be used along
  with the RELAY_LOG_FILE option to specify the coordinates at
  which the slave's SQL thread should begin reading from the
  relay log the next time the thread starts.
   
  The CHANGE MASTER statement usually deletes all relay log
  files. However, if the RELAY_LOG_FILE and/or RELAY_LOG_POS
  options are specified, then existing relay log files are
  kept.
   
  When you want to change the relay log position, you only
  need to stop the slave's SQL thread. The slave's I/O
  thread can continue running. The STOP SLAVE and START SLAVE
  statements support the SQL_THREAD option for this scenario.
  For example:
   
  STOP SLAVE SQL_THREAD;
   
  CHANGE MASTER TO
   RELAY_LOG_FILE='slave-relay-bin.006',
   RELAY_LOG_POS=4025;
   
  START SLAVE SQL_THREAD;
   
  When the value of this option is changed, the metadata about
  the slave's SQL thread's position in the relay logs will
  also be changed in the relay-log.info file or the file that
  is configured by the relay_log_info_file system variable.
   
  The RELAY_LOG_FILE and RELAY_LOG_POS options cannot be
  specified if the MASTER_LOG_FILE and MASTER_LOG_POS options
  were also specified.
   
  GTID Options
   
  MASTER_USE_GTID
   
  The MASTER_USE_GTID option for CHANGE MASTER was first added
  in MariaDB 10.0.2 to enable replication with Global
  Transaction IDs (GTIDs).
   
  The MASTER_USE_GTID option for CHANGE MASTER can be used to
  configure the slave to use the global transaction ID (GTID)
  when connecting to a master. The possible values are:
  current_pos - Replicate in GTID mode and use
  gtid_current_pos as the position to start downloading
  transactions from the master.
  slave_pos - Replicate in GTID mode and use gtid_slave_pos as
  the position to start downloading transactions from the
  master.
  no - Don't replicate in GTID mode.
   
  For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO
   MASTER_USE_GTID = current_pos;
   
  START SLAVE;
   
  Or:
   
  STOP SLAVE;
   
  SET GLOBAL gtid_slave_pos='0-1-153';
   
  CHANGE MASTER TO
   MASTER_USE_GTID = slave_pos;
   
  START SLAVE;
   
  Replication Filter Options
   
  IGNORE_SERVER_IDS
   
  The IGNORE_SERVER_IDS option for CHANGE MASTER can be used
  to configure a replication slave to ignore binary log events
  that originated from certain servers. Filtered binary log
  events will not get logged to the slave’s relay log, and
  they will not be applied by the slave.
   
  The option's value can be specified by providing a
  comma-separated list of server_id values. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   IGNORE_SERVER_IDS = (3,5);
  START SLAVE;
   
  If you would like to clear a previously set list, then you
  can set the value to an empty list. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   IGNORE_SERVER_IDS = ();
  START SLAVE;
   
  DO_DOMAIN_IDS
   
  The DO_DOMAIN_IDS option for CHANGE MASTER was first added
  in MariaDB 10.1.2.
   
  The DO_DOMAIN_IDS option for CHANGE MASTER can be used to
  configure a replication slave to only apply binary log
  events if the transaction's GTID is in a specific
  gtid_domain_id value. Filtered binary log events will not
  get logged to the slave’s relay log, and they will not be
  applied by the slave.
   
  The option's value can be specified by providing a
  comma-separated list of gtid_domain_id values. Duplicate
  values are automatically ignored. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   DO_DOMAIN_IDS = (1,2);
  START SLAVE;
   
  If you would like to clear a previously set list, then you
  can set the value to an empty list. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   DO_DOMAIN_IDS = ();
  START SLAVE;
   
  The DO_DOMAIN_IDS option and the IGNORE_DOMAIN_IDS option
  cannot both be set to non-empty values at the same time. If
  you want to set the DO_DOMAIN_IDS option, and the
  IGNORE_DOMAIN_IDS option was previously set, then you need
  to clear the value of the IGNORE_DOMAIN_IDS option. For
  example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   IGNORE_DOMAIN_IDS = (), 
   DO_DOMAIN_IDS = (1,2);
  START SLAVE;
   
  The DO_DOMAIN_IDS option can only be specified if the slave
  is replicating in GTID mode. Therefore, the MASTER_USE_GTID
  option must also be set to some value other than no in order
  to use this option.
   
  IGNORE_DOMAIN_IDS
   
  The IGNORE_DOMAIN_IDS option for CHANGE MASTER was first
  added in MariaDB 10.1.2.
   
  The IGNORE_DOMAIN_IDS option for CHANGE MASTER can be used
  to configure a replication slave to ignore binary log events
  if the transaction's GTID is in a specific gtid_domain_id
  value. Filtered binary log events will not get logged to the
  slave’s relay log, and they will not be applied by the
  slave.
   
  The option's value can be specified by providing a
  comma-separated list of gtid_domain_id values. Duplicate
  values are automatically ignored. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   IGNORE_DOMAIN_IDS = (1,2);
  START SLAVE;
   
  If you would like to clear a previously set list, then you
  can set the value to an empty list. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   IGNORE_DOMAIN_IDS = ();
  START SLAVE;
   
  The DO_DOMAIN_IDS option and the IGNORE_DOMAIN_IDS option
  cannot both be set to non-empty values at the same time. If
  you want to set the IGNORE_DOMAIN_IDS option, and the
  DO_DOMAIN_IDS option was previously set, then you need to
  clear the value of the DO_DOMAIN_IDS option. For example:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   DO_DOMAIN_IDS = (), 
   IGNORE_DOMAIN_IDS = (1,2);
  START SLAVE;
   
  The IGNORE_DOMAIN_IDS option can only be specified if the
  slave is replicating in GTID mode. Therefore, the
  MASTER_USE_GTID option must also be set to some value other
  than no in order to use this option.
   
  Delayed Replication Options
   
  MASTER_DELAY
   
  The MASTER_DELAY option for CHANGE MASTER was first added in
  MariaDB 10.2.3 to enable delayed replication.
   
  The MASTER_DELAY option for CHANGE MASTER can be used to
  enable delayed replication. This option specifies the time
  in seconds (at least) that a replication slave should lag
  behind the master. Before executing an event, the slave will
  first wait, if necessary, until the given time has passed
  since the event was created on the master. The result is
  that the slave will reflect the state of the master some
  time back in the past. The default is zero, no delay.
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   MASTER_DELAY=3600;
   
  START SLAVE;
   
  Changing Option Values
   
  If you don't specify a given option when executing the
  CHANGE MASTER statement, then the option keeps its old value
  in most cases. Most of the time, there is no need to specify
  the options that do not need to change. For example, if the
  password for the user account that the slave uses to connect
  to its master has changed, but no other options need to
  change, then you can just change the MASTER_PASSWORD option
  by executing the following commands:
   
  STOP SLAVE;
   
  CHANGE MASTER TO 
   MASTER_PASSWORD='new3cret';
   
  START SLAVE;
   
  There are some cases where options are implicitly reset,
  such as when the MASTER_HOST and MASTER_PORT options are
  changed.
   
  Option Persistence
   
  The values of the MASTER_LOG_FILE and MASTER_LOG_POS options
  (i.e. the binary log position on the master) and most other
  options are written to either the default master.info file
  or the file that is configured by the master_info_file
  option. The slave's I/O thread keeps this binary log
  position updated as it downloads events only when
  MASTER_USE_GTID option
   is set to NO. Otherwise the file is not updated on a per
  event basis.
   
  The master_info_file option can be set either on the
  command-line or in a server option group in an option file
  prior to starting up the server. For example:
   
  [mariadb]
  ...
  master_info_file=/mariadb/myserver1-master.info
   
  The values of the RELAY_LOG_FILE and RELAY_LOG_POS options
  (i.e. the relay log position) are written to either the
  default relay-log.info file or the file that is configured
  by the relay_log_info_file system variable. The slave's SQL
  thread keeps this relay log position updated as it applies
  events.
   
  The relay_log_info_file system variable can be set either on
  the command-line or in a server option group in an option
  file prior to starting up the server. For example:
   
  [mariadb]
  ...
  relay_log_info_file=/mariadb/myserver1-relay-log.info
   
  GTID Persistence
   
  If the slave is replicating binary log events that contain
  GTIDs, then the slave's SQL thread will write every GTID
  that it applies to the mysql.gtid_slave_pos table. This GTID
  can be inspected and modified through the gtid_slave_pos
  system variable.
   
  If the slave has the log_slave_updates system variable
  enabled and if the slave has the binary log enabled, then
  every write by the slave's SQL thread will also go into the
  slave's binary log. This means that GTIDs of replicated
  transactions would be reflected in the value of the
  gtid_binlog_pos system variable.
   
  Creating a Slave from a Backup
   
  The CHANGE MASTER statement is useful for setting up a slave
  when you have a backup of the master and you also have the
  binary log position or GTID position corresponding to the
  backup.
   
  After restoring the backup on the slave, you could execute
  something like this to use the binary log position:
   
  CHANGE MASTER TO
   MASTER_LOG_FILE='master2-bin.001',
   MASTER_LOG_POS=4;
   
  START SLAVE;
   
  Or you could execute something like this to use the GTID
  position:
   
  SET GLOBAL gtid_slave_pos='0-1-153';
   
  CHANGE MASTER TO
   MASTER_USE_GTID=slave_pos;
   
  START SLAVE;
   
  See Setting up a Replication Slave with Mariabackup for more
  information on how to do this with Mariabackup.
   
  Example
   
  The following example changes the master and master's
  binary log coordinates.
  This is used when you want to set up the slave to replicate
  the master:
   
  CHANGE MASTER TO
   MASTER_HOST='master2.mycompany.com',
   MASTER_USER='replication',
   MASTER_PASSWORD='bigs3cret',
   MASTER_PORT=3306,
   MASTER_LOG_FILE='master2-bin.001',
   MASTER_LOG_POS=4,
   MASTER_CONNECT_RETRY=10;
   
  START SLAVE;
   


  URL: https://mariadb.com/kb/en/library/change-master-to/dzfxuxCHANGE MASTER TOdzfxuxhttps://mariadb.com/kb/en/library/change-master-to/dzfxuxdzfxux8dzfxux95qjzxqqvvbqRESET MASTER [TO #]
   
  Deletes all binary log files listed in the index file,
  resets the
  binary log index file to be empty, and creates a new binary
  log file with a suffix of .000001.
   
  If TO # is given, then the first new binary log file will
  start from number #.
   
  This statement is for use only when the master is started
  for the first time, and should never be used if any slaves
  are actively replicating from the binary log.
   


  URL: https://mariadb.com/kb/en/library/reset-master/dzfxuxRESET MASTERdzfxuxhttps://mariadb.com/kb/en/library/reset-master/dzfxuxdzfxux8dzfxux106qjzxqqvvbqThe COMMIT statement ends a transaction, saving any changes
  to the data so that they become visible to subsequent
  transactions. Also, unlocks metadata changed by current
  transaction. If autocommit is set to 1, an implicit commit
  is performed after each statement. Otherwise, all
  transactions which don't end with an explicit COMMIT are
  implicitly rollbacked and the changes are lost. The ROLLBACK
  statement can be used to do this explicitly.
   
  The required syntax for the COMMIT statement is as follows:
   
  COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
   
  COMMIT is the more important transaction terminator, as well
  as the more interesting one. The basic form of the COMMIT
  statement is simply the keyword COMMIT (the keyword WORK is
  simply noise and can be omitted without changing the
  effect).
   
  The optional AND CHAIN clause is a convenience for
  initiating a new transaction as soon as the old transaction
  terminates. If AND CHAIN is specified, then there is
  effectively nothing between the old and new transactions,
  although they remain separate. The characteristics of the
  new transaction will be the same as the characteristics of
  the old one — that is, the new transaction will have the
  same access mode, isolation level and diagnostics area size
  (we'll discuss all of these shortly) as the transaction
  just terminated. 
   
  RELEASE tells the server to disconnect the client
  immediately after the current transaction.
   
  There are NO RELEASE and AND NO CHAIN options. By default,
  commits do not RELEASE or CHAIN, but it's possible to
  change this default behavior with the completion_type server
  system variable. In this case, the AND NO CHAIN and NO
  RELEASE options override the server default.
   


  URL: https://mariadb.com/kb/en/library/commit/dzfxuxCOMMITdzfxuxhttps://mariadb.com/kb/en/library/commit/dzfxuxdzfxux8dzfxux96qjzxqqvvbqSyntax
  ------ 
  {DEALLOCATE | DROP} PREPARE stmt_name
   
  Description
  ----------- 
  To deallocate a prepared statement produced with PREPARE,
  use a
  DEALLOCATE PREPARE statement that refers to the prepared
  statement
  name.
   
  A prepared statement is implicitly deallocated when a new
  PREPARE command is issued. In that case, there is no need to
  use DEALLOCATE.
   
  Attempting to execute a prepared statement after
  deallocating it
  results in an error, as if it was not prepared at all:
   
  ERROR 1243 (HY000): Unknown prepared statement handler
  (stmt_name) given to EXECUTE
   
  If the specified statement has not been PREPAREd, an error
  similar to the following will be produced:
   
  ERROR 1243 (HY000): Unknown prepared statement handler
  (stmt_name) given to DEALLOCATE PREPARE
   
  Example
   
  See example in PREPARE.
   


  URL:
  https://mariadb.com/kb/en/library/deallocate-drop-prepared-statement/dzfxuxDEALLOCATE / DROP PREPAREdzfxuxhttps://mariadb.com/kb/en/library/deallocate-drop-prepared-statement/dzfxuxdzfxux8dzfxux97qjzxqqvvbqSyntax
  ------ 
  EXECUTE stmt_name
   [USING expression[, expression] ...]
   
  EXECUTE with expression as parameters was introduced in
  MariaDB 10.2.3. Before that one could only use variables
  (@var_name) as parameters.
   
  Description
  ----------- 
  After preparing a statement with PREPARE, you execute it
  with an
  EXECUTE statement that refers to the prepared statement
  name. If the
  prepared statement contains any parameter markers, you must
  supply a
  USING clause that lists user variables containing the values
  to be
  bound to the parameters. Parameter values can be supplied
  only by user
  variables, and the USING clause must name exactly as many
  variables as
  the number of parameter markers in the statement.
   
  You can execute a given prepared statement multiple times,
  passing
  different variables to it or setting the variables to
  different values
  before each execution.
   
  If the specified statement has not been PREPAREd, an error
  similar to the following is produced:
   
  ERROR 1243 (HY000): Unknown prepared statement handler
  (stmt_name) given to EXECUTE
   
  Example
   
  See example in PREPARE.
   


  URL: https://mariadb.com/kb/en/library/execute-statement/dzfxuxEXECUTE Statementdzfxuxhttps://mariadb.com/kb/en/library/execute-statement/dzfxuxdzfxux8dzfxux98qjzxqqvvbqSyntax
  ------ 
  SAVEPOINT identifier
  ROLLBACK [WORK] TO [SAVEPOINT] identifier
  RELEASE SAVEPOINT identifier
   
  Description
  ----------- 
  InnoDB supports the SQL statements SAVEPOINT,
  ROLLBACK TO SAVEPOINT, RELEASE SAVEPOINT
  and the optional WORK keyword for
  ROLLBACK.
   
  Each savepoint must have a legal MariaDB identifier. A
  savepoint is a named sub-transaction.
   
  Normally ROLLBACK undoes the changes performed by the whole
  transaction. When used with the TO clause, it undoes the
  changes performed after the specified savepoint, and erases
  all subsequent savepoints. However, all locks that have been
  acquired after the save point will survive. RELEASE
  SAVEPOINT does not rollback or commit any changes, but
  removes the specified savepoint.
   
  When the execution of a trigger or a stored function begins,
  it is not possible to use statements which reference a
  savepoint which was defined from out of that stored program.
   
  When a COMMIT (including implicit commits) or a ROLLBACK
  statement (with no TO clause) is performed, they act on the
  whole transaction, and all savepoints are removed.
   
  Errors
   
  If COMMIT or ROLLBACK is issued and no transaction was
  started, no error is reported.
   
  If SAVEPOINT is issued and no transaction was started, no
  error is reported but no savepoint is created. When ROLLBACK
  TO SAVEPOINT or RELEASE SAVEPOINT is called for a savepoint
  that does not exist, an error like this is issued:
   
  ERROR 1305 (42000): SAVEPOINT svp_name does not exist
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/savepoint/dzfxuxSAVEPOINTdzfxuxhttps://mariadb.com/kb/en/library/savepoint/dzfxuxdzfxux8dzfxux102qjzxqqvvbqSyntax
  ------ 
  UNLOCK TABLES
   
  Description
  ----------- 
  UNLOCK TABLES explicitly releases any table locks held by
  the
  current session. See LOCK TABLES for more information.
   
  In addition to releasing table locks acquired by the LOCK
  TABLES statement, the UNLOCK TABLES statement also releases
  the global read lock acquired by the FLUSH TABLES WITH READ
  LOCK statement. The FLUSH TABLES WITH READ LOCK statement is
  very useful for performing backups. See FLUSH for more
  information about FLUSH TABLES WITH READ LOCK.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/transactions-unlock-tables/dzfxuxUNLOCK TABLESdzfxuxhttps://mariadb.com/kb/en/library/transactions-unlock-tables/dzfxuxdzfxux8dzfxux113qjzxqqvvbqOverview
   
  The MariaDB XA implementation is based on the X/Open CAE
  document Distributed Transaction Processing: The XA
  Specification. This document is published by The Open Group
  and available at
  http://www.opengroup.org/public/pubs/catalog/c193.htm.
   
  XA transactions are designed to allow distributed
  transactions, where a transaction manager (the application)
  controls a transaction which involves multiple resources.
  Such resources are usually DBMSs, but could be resources of
  any type. The whole set of required transactional operations
  is called a global transaction. Each subset of operations
  which involve a single resource is called a local
  transaction. XA used a 2-phases commit (2PC). With the first
  commit, the transaction manager tells each resource to
  prepare an effective commit, and waits for a confirm
  message. The changes are not still made effective at this
  point. If any of the resources encountered an error, the
  transaction manager will rollback the global transaction. If
  all resources communicate that the first commit is
  successful, the transaction manager can require a second
  commit, which makes the changes effective.
   
  In MariaDB, XA transactions can only be used with storage
  engines that support them. At least InnoDB, TokuDB, SPIDER
  and MyRocks support them. For InnoDB, XA transactions can be
  disabled by setting the innodb_support_xa server system
  variable to 0. 
   
  Like regular transactions, XA transactions create metadata
  locks on accessed tables.
   
  XA transactions require REPEATABLE READ as a minimum
  isolation level. However, distributed transactions should
  always use SERIALIZABLE.
   
  Trying to start more than one XA transaction at the same
  time produces a 1400 error (SQLSTATE 'XAE09'). The same
  error is produced when attempting to start an XA transaction
  while a regular transaction is in effect. Trying to start a
  regular transaction while an XA transaction is in effect
  produces a 1399 error (SQLSTATE 'XAE07').
   
  The statements that cause an implicit COMMIT for regular
  transactions produce a 1400 error (SQLSTATE 'XAE09') if a
  XA transaction is in effect.
   
  Internal XA vs External XA
   
  XA transactions are an overloaded term in MariaDB. If a
  storage engine is XA-capable, it can mean one or both of
  these:
  It supports MariaDB's internal two-phase commit API. This
  is transparent to the user. Sometimes this is called
  "internal XA", since MariaDB's internal transaction
  coordinator log can handle coordinating these transactions.
   
  It supports XA transactions, with the XA START, XA PREPARE,
  XA COMMIT, etc. statements. Sometimes this is called
  "external XA", since it requires the use of an external
  transaction coordinator to use this feature properly.
   
  Transaction Coordinator Log
   
  If you have two or more XA-capable storage engines enabled,
  then a transaction coordinator log must be available.
   
  There are currently two implementations of the transaction
  coordinator log:
  Binary log-based transaction coordinator log
  Memory-mapped file-based transaction coordinator log
   
  If the binary log is enabled on a server, then the server
  will use the binary log-based transaction coordinator log.
  Otherwise, it will use the memory-mapped file-based
  transaction coordinator log.
   
  See Transaction Coordinator Log for more information.
   
  Syntax
  ------ 
  XA {START|BEGIN} xid [JOIN|RESUME]
   
  XA END xid [SUSPEND [FOR MIGRATE]]
   
  XA PREPARE xid
   
  XA COMMIT xid [ONE PHASE]
   
  XA ROLLBACK xid
   
  XA RECOVER [FORMAT=['RAW'|'SQL']]
   
  xid: gtrid [, bqual [, formatID ]]
   
  The interface to XA transactions is a set of SQL statements
  starting with XA. Each statement changes a transaction's
  state, determining which actions it can perform. A
  transaction which does not exist is in the NON-EXISTING
  state.
   
  XA START (or BEGIN) starts a transaction and defines its xid
  (a transaction identifier). The JOIN or RESUME keywords have
  no effect. The new transaction will be in ACTIVE state.
   
  The xid can have 3 components, though only the first one is
  mandatory. gtrid is a quoted string representing a global
  transaction identifier. bqual is a quoted string
  representing a local transaction identifier. formatID is an
  unsigned integer indicating the format used for the first
  two components; if not specified, defaults to 1. MariaDB
  does not interpret in any way these components, and only
  uses them to identify a transaction. xids of transactions in
  effect must be unique.
   
  XA END declares that the specified ACTIVE transaction is
  finished and it changes its state to IDLE. SUSPEND [FOR
  MIGRATE] has no effect.
   
  XA PREPARE prepares an IDLE transaction for commit, changing
  its state to PREPARED. This is the first commit.
   
  XA COMMIT definitely commits and terminates a transaction
  which has already been PREPARED. If the ONE PHASE clause is
  specified, this statements performs a 1-phase commit on an
  IDLE transaction.
   
  XA ROLLBACK rolls back and terminates an IDLE or PREPARED
  transaction.
   
  XA RECOVER shows information about all PREPARED
  transactions.
   
  When trying to execute an operation which is not allowed for
  the transaction's current state, an error is produced:
   
  XA COMMIT 'test' ONE PHASE;
   
  ERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be
  executed when global transaction is in the ACTIVE state
   
  XA COMMIT 'test2';
   
  ERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be
  executed when global transaction is in the NON-EXISTING
  state
   
  XA RECOVER
   
  The XA RECOVER statement shows information about all
  transactions which are in the PREPARED state. It does not
  matter which connection created the transaction: if it has
  been PREPARED, it appears. But this does not mean that a
  connection can commit or rollback a transaction which was
  started by another connection. Note that transactions using
  a 1-phase commit are never in the PREPARED state, so they
  cannot be shown by XA RECOVER.
   
  XA RECOVER produces four columns:
   
  XA RECOVER;
   
  +----------+--------------+--------------+------+
  | formatID | gtrid_length | bqual_length | data |
  +----------+--------------+--------------+------+
  | 1 | 4 | 0 | test |
  +----------+--------------+--------------+------+
   
  You can use XA RECOVER FORMAT='SQL' to get the data in a
  human readable
  form that can be directly copy-pasted into XA COMMIT or XA
  ROLLBACK. This is particularly useful for binary xid
  generated by some transaction coordinators.
   
  formatID is the formatID part of xid.
   
  data are the gtrid and bqual parts of xid, concatenated.
   
  gtrid_length and bqual_length are the lengths of gtrid and
  bqual, respectevely.
   
  Examples
  -------- 
  2-phases commit:
   
  XA START 'test';
   
  INSERT INTO t VALUES (1,2);
   
  XA END 'test';
   
  XA PREPARE 'test';
   
  XA COMMIT 'test';
   
  1-phase commit:
   
  XA START 'test';
   
  INSERT INTO t VALUES (1,2);
   
  XA END 'test';
   
  XA COMMIT 'test' ONE PHASE;
   
  Human-readable:
   
  xa start '12\r34\t67\v78', 'abc\ndef', 3;
   
  insert t1 values (40);
   
  xa end '12\r34\t67\v78', 'abc\ndef', 3;
   
  xa prepare '12\r34\t67\v78', 'abc\ndef', 3;
   
  xa recover format='RAW';
   
  +----------+--------------+--------------+--------------------+
  | formatID | gtrid_length | bqual_length | data |
  +----------+--------------+--------------+--------------------+
  34 67v78abc 11 | 7 | 12
  def |
  +----------+--------------+--------------+--------------------+
   
  xa recover format='SQL';
   
  +----------+--------------+--------------+-----------------------------------------------+
  | formatID | gtrid_length | bqual_length | data |
  +----------+--------------+--------------+-----------------------------------------------+
  | 3 | 11 | 7 |
  X'31320d3334093637763738',X'6162630a646566',3 |
  +----------+--------------+--------------+-----------------------------------------------+
   
  xa rollback
  X'31320d3334093637763738',X'6162630a646566',3;
   
  Known Issues
   
  MariaDB Galera Cluster
   
  MariaDB Galera Cluster does not support XA transactions. See
  MDEV-10532 for more information on that. The request to
  implement that feature is being tracked at MDEV-17099.
   
  However, MariaDB Galera Cluster builds include a built-in
  plugin called wsrep. Prior to MariaDB 10.4.3, this plugin
  was internally considered an XA-capable storage engine.
  Consequently, these MariaDB Galera Cluster builds have
  multiple XA-capable storage engines by default, even if the
  only "real" storage engine that supports external XA
  transactions enabled on these builds by default is InnoDB.
  Therefore, when using one these builds MariaDB would be
  forced to use a transaction coordinator log by default,
  which could have performance implications.
   
  See Transaction Coordinator Log Overview: MariaDB Galera
  Cluster for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/xa-transactions/dzfxuxXA Transactionsdzfxuxhttps://mariadb.com/kb/en/library/xa-transactions/dzfxuxdzfxux8dzfxux115qjzxqqvvbqMariaDB 10.4 introduces a number of changes to the
  authentication process, intended to make things easier and
  more intuitive.
   
  Overview
   
  There are four main changes relating to authentication:
  It is possible to use more than one authentication plugin
  for each user account. For example, this can be useful to
  slowly migrate users to the more secure ed25519
  authentication plugin over time, while allowing the old
  mysql_native_password authentication plugin as an
  alternative for the transitional period.
  The root@localhost user account created by mysql_install_db
  is created with the ability to use two authentication
  plugins.
  First, it is configured to try to use the unix_socket
  authentication plugin. This allows the the root@localhost
  user to login without a password via the local Unix socket
  file defined by the socket system variable, as long as the
  login is attempted from a process owned by the operating
  system root user account.
  Second, if authentication fails with the unix_socket
  authentication plugin, then it is configured to try to use
  the mysql_native_password authentication plugin. However, an
  invalid password is initially set, so in order to
  authenticate this way, a password must be set with SET
  PASSWORD.
  However, just using the unix_socket authentication plugin
  may be fine for many users, and it is very secure. You may
  want to try going without password authentication to see how
  well it works for you. Remember, the best way to keep your
  password safe is not to have one!
   
  All user accounts, passwords, and global privileges are now
  stored in the mysql.global_priv table. The mysql.user table
  still exists and has exactly the same set of columns as
  before, but it’s now a view that references the
  mysql.global_priv table. Tools that analyze the mysql.user
  table should continue to workas before.
  MariaDB 10.4 supports User Password Expiry, which is not
  active by default.
   
  Description
  ----------- 
  As a result of the above changes, the open-for-everyone
  all-powerful root account is finally gone. And installation
  scripts will no longer demand that you “PLEASE REMEMBER TO
  SET A PASSWORD FOR THE MariaDB root USER !”, because the
  root account is securely created automatically.
   
  Two all-powerful accounts are created by default — root
  and the OS user that owns the data directory, typically
  mysql. They are created as:
   
  CREATE USER root@localhost IDENTIFIED VIA unix_socket OR
  mysql_native_password USING 'invalid'
  CREATE USER mysql@localhost IDENTIFIED VIA unix_socket OR
  mysql_native_password USING 'invalid'
   
  Using unix_socket means that if you are the system root
  user, you can login as root@locahost without a password.
  This technique was pioneered by Otto Kek?l?inen in Debian
  MariaDB packages and has been successfully used in Debian
  since as early as MariaDB 10.0. 
   
  It is based on a simple fact that asking the system root for
  a password adds no extra security — root has full access
  to all the data files and all process memory anyway. But not
  asking for a password means, there is no root password to
  forget (no need for the numerous tutorials on “how to
  reset MariaDB root password”). And if you want to script
  some tedious database work, there is no need to store the
  root password in plain text for the scipt to use (no need
  for debian-sys-maint user).
   
  Still, some users may wish to log in as MariaDB root without
  using sudo. Hence the old authentication method —
  conventional MariaDB password — is still available. By
  default it is disabled (“invalid” is not a valid
  password hash), but one can set the password with a usual
  SET PASSWORD statement. And still retain the password-less
  access via sudo.
   
  If you install MariaDB locally (say from a tarball, you
  would not want to use sudo to be able to login. This is why
  MariaDB creates a second all-powerful user with the same
  name as a system user that owns the data directory. In local
  (not system-wide) installations, this will be the user who
  installed MariaDB — they automatically get convenient
  password-less root-like access, because they can access all
  the data files anyway.
   
  Even if MariaDB is installed system-wide, you may not want
  to run your database maintenance scripts as system root —
  now you can run them as system mysql user. And you will know
  that they will never destroy your entire system, even if you
  make a typo in a shell script.
   
  However, seasoned MariaDB DBAs who are used to the old ways
  do need to makes some changes. See the examples below for
  common tasks. 
   
  Cookbook
   
  After installing MariaDB system-wide the first thing
  you’ve got used to doing is logging in into the
  unprotected root account and protecting it, that is, setting
  the root password:
   
  $ sudo dnf install MariaDB-server
  $ mysql -uroot
  ...
  MariaDB> set password = password("XH4VmT3_jt");
   
  This is not only unnecessary now, it will simply not work
  — there is no unprotected root account. To login as root
  use
   
  $ sudo dnf install MariaDB-server
  $ sudo mysql
   
  Note that it implies you are connecting via the unix socket,
  not tcp. If you happen to have protocol=tcp in a system-wide
  /etc/my.cnf file, use sudo mysql --protocol=socket.
   
  After installing MariaDB locally you’ve also used to
  connect to the unprotected root account using mysql -uroot.
  This will not work either, simply use mysql without
  specifying a username.
   
  If you've forgotten your root password, no problem — you
  can still connect using sudo and change the password. And if
  you've also removed unix_socket authentication, to restore
  access do as follows:
  restart MariaDB with --skip-grant-tables
  login into the unprotected server
  run FLUSH PRIVILEGES (note, before 10.4 this would’ve been
  the last step, not anymore). This disables
  --skip-grant-tables and allows you to change the stored
  authentication method.
  run SET PASSWORD FOR root@localhost to change the root
  password
   
  To view inside privilege tables, the old mysql.user table
  still exists. You can select from it as before, although you
  cannot update it anymore. It doesn’t show alternative
  authentication plugins and this was one of the reasons for
  switching to the mysql.global_priv table — complex
  authentication rules did not fit into rigid structure of a
  relational table. You can select from the new table, for
  example: 
   
  select concat(user, '@', host, ' => ',
  json_detailed(priv)) from mysql.global_priv;
   
  Reverting to the Previous Authentication Method for
  root@localhost
   
  If you don't want the root@localhost user account created
  by mysql_install_db to use unix_socket authentication by
  default, then there are a few ways to revert to the previous
  mysql_native_password authentication method for this user
  account.
   
  Configuring mysql_install_db to Revert to the Previous
  Authentication Method
   
  One way to revert to the previous mysql_native_password
  authentication method for the root@localhost user account is
  to execute mysql_install_db with a special option. If
  mysql_install_db is executed while
  --auth-root-authentication-method=normal is specified, then
  it will create the default user accounts using the default
  behavior of MariaDB 10.3 and before.
   
  This means that the root@localhost user account will use
  mysql_native_password authentication by default. There are
  some other differences as well. See mysql_install_db: User
  Accounts Created by Default for more information.
   
  For example, the option can be set on the command-line while
  running mysql_install_db:
   
  mysql_install_db --user=mysql --datadir=/var/lib/mysql
  --auth-root-authentication-method=normal
   
  The option can also be set in an option file in an option
  group supported by mysql_install_db. For example:
   
  [mysql_install_db]
  auth_root_authentication_method=normal
   
  If the option is set in an option file and if
  mysql_install_db is executed, then mysql_install_db will
  read this option from the option file, and it will
  automatically set this option.
   
  Altering the User Account to Revert to the Previous
  Authentication Method
   
  If you have already installed MariaDB, and if the
  root@localhost user account is already using unix_socket
  authentication, then you can revert to the old
  mysql_native_password authentication method for the user
  account by executing the following:
   
  ALTER USER root@localhost IDENTIFIED VIA
  mysql_native_password USING PASSWORD("verysecret")
   


  URL:
  https://mariadb.com/kb/en/library/authentication-from-mariadb-104/dzfxuxAuthentication from MariaDB 10.4dzfxuxhttps://mariadb.com/kb/en/library/authentication-from-mariadb-104/dzfxuxdzfxux10dzfxux117qjzxqqvvbqSyntax
  ------ 
  CREATE [OR REPLACE] USER [IF NOT EXISTS] 
   user_specification [,user_specification ...] 
   [REQUIRE {NONE | tls_option [[AND] tls_option ...] }]
   [WITH resource_option [resource_option ...] ]
   [password_option | lock_option] 
   
  user_specification:
   username [authentication_option]
   
  authentication_option:
   IDENTIFIED BY 'password' 
   | IDENTIFIED BY PASSWORD 'password_hash'
   | IDENTIFIED {VIA|WITH} authentication_rule [OR
  authentication_rule ...]
   
  authentication_rule:
   authentication_plugin
   | authentication_plugin {USING|AS}
  'authentication_string'
   | authentication_plugin {USING|AS} PASSWORD('password')
   
  tls_option:
   SSL 
   | X509
   | CIPHER 'cipher'
   | ISSUER 'issuer'
   | SUBJECT 'subject'
   
  resource_option:
   MAX_QUERIES_PER_HOUR count
   | MAX_UPDATES_PER_HOUR count
   | MAX_CONNECTIONS_PER_HOUR count
   | MAX_USER_CONNECTIONS count
   | MAX_STATEMENT_TIME time
   
  password_option:
   PASSWORD EXPIRE
   | PASSWORD EXPIRE DEFAULT
   | PASSWORD EXPIRE NEVER
   | PASSWORD EXPIRE INTERVAL N DAY
   
  lock_option:
   ACCOUNT LOCK
   | ACCOUNT UNLOCK
  }
   
  Description
  ----------- 
  The CREATE USER statement creates new MariaDB accounts. To
  use it, you must have the global CREATE USER privilege or
  the INSERT privilege for the mysql database. For each
  account, CREATE USER creates a new row in
  the mysql.user table that has no privileges.
   
  If any of the specified accounts, or any permissions for the
  specified accounts, already exist, then the server returns
  ERROR 1396 (HY000). If an error occurs, CREATE USER will
  still create the accounts that do not result in an error.
  Only one error is produced for all users which have not been
  created:
   
  ERROR 1396 (HY000): 
   Operation CREATE USER failed for 'u1'@'%','u2'@'%'
   
  CREATE USER, DROP USER, CREATE ROLE, and DROP ROLE all
  produce the
  same error code when they fail.
   
  See Account Names below for details on how account names are
  specified. 
   
  OR REPLACE
   
  If the optional OR REPLACE clause is used, it is basically a
  shortcut for:
   
  DROP USER IF EXISTS name;
   
  CREATE USER name ...;
   
  For example:
   
  CREATE USER foo2@test IDENTIFIED BY 'password';
   
  ERROR 1396 (HY000): Operation CREATE USER failed for
  'foo2'@'test'
   
  CREATE OR REPLACE USER foo2@test IDENTIFIED BY 'password';
   
  Query OK, 0 rows affected (0.00 sec)
   
  IF NOT EXISTS
   
  When the IF NOT EXISTS clause is used, MariaDB will return a
  warning instead of an error if the specified user already
  exists.
   
  For example:
   
  CREATE USER foo2@test IDENTIFIED BY 'password';
   
  ERROR 1396 (HY000): Operation CREATE USER failed for
  'foo2'@'test'
   
  CREATE USER IF NOT EXISTS foo2@test IDENTIFIED BY
  'password';
   
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  SHOW WARNINGS;
   
  +-------+------+----------------------------------------------------+
  | Level | Code | Message |
  +-------+------+----------------------------------------------------+
  | Note | 1973 | Can't create user 'foo2'@'test';
   it already exists |
  +-------+------+----------------------------------------------------+
  1 row in set (0.00 sec
   
  Authentication Options
   
  IDENTIFIED BY 'password'
   
  The optional IDENTIFIED BY clause can be used to provide an
  account with a password. The password should be specified in
  plain text. It will be hashed by the PASSWORD function prior
  to being stored to the mysql.user table.
   
  For example, if our password is mariadb, then we can create
  the user with:
   
  CREATE USER foo2@test IDENTIFIED BY 'mariadb';
   
  If you do not specify a password with the IDENTIFIED BY
  clause, the user
  will be able to connect without a password. A blank password
  is not a wildcard
  to match any password. The user must connect without
  providing a password if no
  password is set.
   
  The only authentication plugins that this clause supports
  are mysql_native_password and mysql_old_password.
   
  IDENTIFIED BY PASSWORD 'password_hash'
   
  The optional IDENTIFIED BY PASSWORD clause can be used to
  provide an account with a password that has already been
  hashed. The password should be specified as a hash that was
  provided by the PASSWORD function. It will be stored to the
  mysql.user table as-is.
   
  For example, if our password is mariadb, then we can find
  the hash with:
   
  SELECT PASSWORD('mariadb');
  +-------------------------------------------+
  | PASSWORD('mariadb') |
  +-------------------------------------------+
  | *54958E764CE10E50764C2EECBB71D01F08549980 |
  +-------------------------------------------+
  1 row in set (0.00 sec)
   
  And then we can create a user with the hash:
   
  CREATE USER foo2@test IDENTIFIED BY PASSWORD
  '*54958E764CE10E50764C2EECBB71D01F08549980';
   
  If you do not specify a password with the IDENTIFIED BY
  clause, the user
  will be able to connect without a password. A blank password
  is not a wildcard
  to match any password. The user must connect without
  providing a password if no
  password is set.
   
  The only authentication plugins that this clause supports
  are mysql_native_password and mysql_old_password.
   
  IDENTIFIED {VIA|WITH} authentication_plugin
   
  The optional IDENTIFIED VIA authentication_plugin allows you
  to specify that the account should be authenticated by a
  specific authentication plugin. The plugin name must be an
  active authentication plugin as per SHOW PLUGINS. If it
  doesn't show up in that output, then you will need to
  install it with INSTALL PLUGIN or INSTALL SONAME.
   
  For example, this could be used with the PAM authentication
  plugin:
   
  CREATE USER foo2@test IDENTIFIED VIA pam;
   
  Some authentication plugins allow additional arguments to be
  specified after a USING or AS keyword. For example, the PAM
  authentication plugin accepts a service name:
   
  CREATE USER foo2@test IDENTIFIED VIA pam USING 'mariadb';
   
  The exact meaning of the additional argument would depend on
  the specific authentication plugin.
   
  The USING or AS keyword can also be used to provide a
  plain-text password to a plugin if it's provided as an
  argument to the PASSWORD() function. This is only valid for
  authentication plugins that have implemented a hook for the
  PASSWORD() function. For example, the ed25519 authentication
  plugin supports this:
   
  CREATE USER safe@'%' IDENTIFIED VIA ed25519 USING
  PASSWORD('secret');
   
  One can specify many authentication plugins, they all works
  as alternatives ways of authenticating a user:
   
  CREATE USER safe@'%' IDENTIFIED VIA ed25519 USING
  PASSWORD('secret') OR unix_socket;
   
  TLS Options
   
  By default, MariaDB transmits data between the server and
  clients without encrypting it. This is generally acceptable
  when the server and client run on the same host or in
  networks where security is guaranteed through other means.
  However, in cases where the server and client exist on
  separate networks or they are in a high-risk network, the
  lack of encryption does introduce security concerns as a
  malicious actor could potentially eavesdrop on the traffic
  as it is sent over the network between them.
   
  To mitigate this concern, MariaDB allows you to encrypt data
  in transit between the server and clients using the
  Transport Layer Security (TLS) protocol. TLS was formerly
  known as Secure Socket Layer (SSL), but strictly speaking
  the SSL protocol is a predecessor to TLS and, that version
  of the protocol is now considered insecure. The
  documentation still uses the term SSL often and for
  compatibility reasons TLS-related server system and status
  variables still use the prefix ssl_, but internally, MariaDB
  only supports its secure successors.
   
  See Secure Connections Overview for more information about
  how to determine whether your MariaDB server has TLS
  support.
   
  You can set certain TLS-related restrictions for specific
  user accounts. For instance, you might use this with user
  accounts that require access to sensitive data while sending
  it across networks that you do not control. These
  restrictions can be enabled for a user account with the
  CREATE USER, ALTER USER, or GRANT statements. The following
  options are available:
   
  Option | Description | 
   
  REQUIRE NONE | TLS is not required for this account, but can
  still be used. | 
   
  REQUIRE SSL | The account must use TLS, but no valid X509
  certificate is required. This option cannot be combined with
  other TLS options. | 
   
  REQUIRE X509 | The account must use TLS and must have a
  valid X509 certificate. This option implies REQUIRE SSL.
  This option cannot be combined with other TLS options. | 
   
  REQUIRE ISSUER 'issuer' | The account must use TLS and
  must have a valid X509 certificate. Also, the Certificate
  Authority must be the one specified via the string issuer.
  This option implies REQUIRE X509. This option can be
  combined with the SUBJECT, and CIPHER options in any order.
  | 
   
  REQUIRE SUBJECT 'subject' | The account must use TLS and
  must have a valid X509 certificate. Also, the certificate's
  Subject must be the one specified via the string subject.
  This option implies REQUIRE X509. This option can be
  combined with the ISSUER, and CIPHER options in any order. |

   
  REQUIRE CIPHER 'cipher' | The account must use TLS, but no
  valid X509 certificate is required. Also, the encryption
  used for the connection must use one of the methods
  specified in the string cipher. This option implies REQUIRE
  SSL. This option can be combined with the ISSUER, and
  SUBJECT options in any order. | 
   
  The REQUIRE keyword must be used only once for all specified
  options, and the AND keyword can be used to separate
  individual options, but it is not required.
   
  For example, you can create a user account that requires
  these TLS options with the following:
   
  CREATE USER 'alice'@'%'
   REQUIRE SUBJECT '/CN=alice/O=My Dom,
  Inc./C=US/ST=Oregon/L=Portland'
   AND ISSUER '/C=FI/ST=Somewhere/L=City/ O=Some
  Company/CN=Peter Parker/emailAddress=p.parker@marvel.com'
   AND CIPHER 'TLSv1.2';
   
  If any of these options are set for a specific user account,
  then any client who tries to connect with that user account
  will have to be configured to connect with TLS.
   
  See Securing Connections for Client and Server for
  information on how to enable TLS on the client and server.
   
  Resource Limit Options
   
  MariaDB 10.2.0 introduced a number of resource limit
  options.
   
  It is possible to set per-account limits for certain server
  resources. The following table shows the values that can be
  set per account:
   
  Limit Type | Decription | 
   
  MAX_QUERIES_PER_HOUR | Number of statements that the account
  can issue per hour (including updates) | 
   
  MAX_UPDATES_PER_HOUR | Number of updates (not queries) that
  the account can issue per hour | 
   
  MAX_CONNECTIONS_PER_HOUR | Number of connections that the
  account can start per hour | 
   
  MAX_USER_CONNECTIONS | Number of simultaneous connections
  that can be accepted from the same account; if it is 0,
  max_connections will be used instead; if max_connections is
  0, there is no limit for this account's simultaneous
  connections. | 
   
  MAX_STATEMENT_TIME | Timeout, in seconds, for statements
  executed by the user. See also Aborting Statements that
  Exceed a Certain Time to Execute. | 
   
  If any of these limits are set to 0, then there is no limit
  for that resource for that user.
   
  Here is an example showing how to create a user with
  resource limits:
   
  CREATE USER 'someone'@'localhost' WITH
   MAX_USER_CONNECTIONS 10
   MAX_QUERIES_PER_HOUR 200;
   
  The resources are tracked per account, which means
  'user'@'server'; not per user name or per connection.
   
  The count can be reset for all users using FLUSH
  USER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.
   
  Per account resource limits are stored in the user table, in
  the mysql database. Columns used for resources limits are
  named max_questions, max_updates, max_connections (for
  MAX_CONNECTIONS_PER_HOUR), and max_user_connections (for
  MAX_USER_CONNECTIONS).
   
  Account Names
   
  Account names have both a user name component and a host
  name component, and are specified as
  'user_name'@'host_name'.
   
  The user name and host name may be unquoted, quoted as
  strings using double quotes (") or
  single quotes ('), or quoted as identifiers using backticks
  (`). You must use quotes
  when using special characters (such as a hyphen) or wildcard
  characters. If you quote, you 
  must quote the user name and host name separately (for
  example 'user_name'@'host_name').
   
  Host Name Component
   
  If the host name is not provided, it is assumed to be '%'.
   
  Host names may contain the wildcard characters % and _. They
  are matched as if by
  the LIKE clause. If you need to use a wildcard character
  literally (for example, to
  match a domain name with an underscore), prefix the
  character with a backslash. See LIKE
  for more information on escaping wildcard characters.
   
  Host name matches are case-insensitive. Host names can match
  either domain names or IP
  addresses. Use 'localhost' as the host name to allow only
  local client connections.
   
  You can use a netmask to match a range of IP addresses using
  'base_ip/netmask' as the
  host name. A user with an IP address ip_addr will be allowed
  to connect if the following
  condition is true:
   
  ip_addr & netmask = base_ip
   
  You can only use netmasks that specify a multiple of 8 bits
  of the address to match. That is,
  only the following netmasks are allowed:
   
  255.0.0.0
  255.255.0.0
  255.255.255.0
  255.255.255.255
   
  Using 255.255.255.255 is equivalent to not using a netmask
  at all.
   
  User Name Component
   
  User names must match exactly, including case. A user name
  that is empty is known as an anonymous account and is
  allowed to match a login attempt with any user name
  component. These are described more in the next section.
   
  For valid identifiers to use as user names, see Identifier
  Names.
   
  It is possible for more than one account to match when a
  user connects. MariaDB selects
  the first matching account after sorting according to the
  following criteria:
  Accounts with an exact host name are sorted before accounts
  using a wildcard in the
  host name. Host names using a netmask are considered to be
  exact for sorting.
  Accounts with a wildcard in the host name are sorted
  according to the position of
  the first wildcard character. Those with a wildcard
  character later in the host name
  sort before those with a wildcard character earlier in the
  host name.
  Accounts with a non-empty user name sort before accounts
  with an empty user name.
  Accounts with an empty user name are sorted last. As
  mentioned previously, these are known as anonymous accounts.
  These are described more in the next section.
   
  The following table shows a list of example account as
  sorted by these criteria:
   
  +---------+-------------+
  | User | Host |
  +---------+-------------+
  | joffrey | 192.168.0.3 |
  | | 192.168.0.% |
  | joffrey | 192.168.% |
  | | 192.168.% |
  +---------+-------------+
   
  Once connected, you only have the privileges granted to the
  account that matched,
  not all accounts that could have matched. For example,
  consider the following
  commands:
   
  CREATE USER 'joffrey'@'192.168.0.3';
   
  CREATE USER 'joffrey'@'%';
   
  GRANT SELECT ON test.t1 to 'joffrey'@'192.168.0.3';
   
  GRANT SELECT ON test.t2 to 'joffrey'@'%';
   
  If you connect as joffrey from 192.168.0.3, you will have
  the SELECT
  privilege on the table test.t1, but not on the table
  test.t2. If you connect as joffrey from any other IP
  address, you will have the SELECT privilege on the table
  test.t2, but not
  on the table test.t1.
   
  Beginning with MariaDB 5.5.31, usernames can be up to 80
  characters long. From MariaDB 10.0 the system tables are all
  by default this length. However, in order to enable this
  feature in MariaDB 5.5, the following schema changes must be
  made:
   
  ALTER TABLE mysql.user MODIFY User CHAR(80) BINARY NOT NULL
  DEFAULT '';
   
  ALTER TABLE mysql.db MODIFY User CHAR(80) BINARY NOT NULL
  DEFAULT '';
   
  ALTER TABLE mysql.tables_priv MODIFY User CHAR(80) BINARY
  NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.columns_priv MODIFY User CHAR(80) BINARY
  NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.procs_priv MODIFY User CHAR(80) BINARY NOT
  NULL DEFAULT '';
   
  ALTER TABLE mysql.proc MODIFY definer CHAR(141) COLLATE
  utf8_bin NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.event MODIFY definer CHAR(141) COLLATE
  utf8_bin NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.proxies_priv MODIFY User CHAR(80) COLLATE
  utf8_bin NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.proxies_priv MODIFY Proxied_user CHAR(80)
  COLLATE utf8_bin NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.proxies_priv MODIFY Grantor CHAR(141)
  COLLATE utf8_bin NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.servers MODIFY Username CHAR(80) NOT NULL
  DEFAULT '';
   
  ALTER TABLE mysql.procs_priv MODIFY Grantor CHAR(141)
  COLLATE utf8_bin NOT NULL DEFAULT '';
   
  ALTER TABLE mysql.tables_priv MODIFY Grantor CHAR(141)
  COLLATE utf8_bin NOT NULL DEFAULT '';
   
  FLUSH PRIVILEGES;
   
  Anonymous Accounts
   
  Anonymous accounts are accounts where the user name portion
  of the account name is empty. These accounts act as special
  catch-all accounts. If a user attempts to log into the
  system from a host, and an anonymous account exists with a
  host name portion that matches the user's host, then the
  user will log in as the anonymous account if there is no
  more specific account match for the user name that the user
  entered.
   
  For example, here are some anonymous accounts:
   
  CREATE USER ''@'localhost';
   
  CREATE USER ''@'192.168.0.3';
   
  Fixing a Legacy Default Anonymous Account
   
  On some systems, the mysql.db table has some entries for the
  ''@'%' anonymous account by default. Unfortunately,
  there is no matching entry in the mysql.user table, which
  means that this anonymous account doesn't exactly exist,
  but it does have privileges--usually on the default test
  database created by mysql_install_db. These account-less
  privileges are a legacy that is leftover from a time when
  MySQL's privilege system was less advanced.
   
  This situation means that you will run into errors if you
  try to create a ''@'%' account. For example:
   
  CREATE USER ''@'%';
   
  ERROR 1396 (HY000): Operation CREATE USER failed for
  ''@'%'
   
  The fix is to DELETE the row in the mysql.db table and then
  execute FLUSH PRIVILEGES:
   
  DELETE FROM mysql.db WHERE User='' AND Host='%';
   
  FLUSH PRIVILEGES;
   
  And then the account can be created:
   
  CREATE USER ''@'%';
   
  Query OK, 0 rows affected (0.01 sec)
   
  See MDEV-13486 for more information.
   
  Password Expiry
   
  Besides automatic password expiry, as determined by
  default_password_lifetime, password expiry times can be set
  on an individual user basis, overriding the global setting,
  for example:
   
  CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL
  120 DAY;
   
  See User Password Expiry for more details.
   
  Account Locking
   
  Account locking permits privileged administrators to
  lock/unlock user accounts. No new client connections will be
  permitted if an account is locked (existing connections are
  not affected). For example:
   
  CREATE USER 'marijn'@'localhost' ACCOUNT LOCK;
   
  See Account Locking for more details.
   


  URL: https://mariadb.com/kb/en/library/create-user/dzfxuxCREATE USERdzfxuxhttps://mariadb.com/kb/en/library/create-user/dzfxuxdzfxux10dzfxux118qjzxqqvvbqThe ALTER USER statement was introduced in MariaDB 10.2.0.
   
  Syntax
  ------ 
  ALTER USER [IF EXISTS] 
   user_specification [,user_specification] ...
   [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]
   [WITH resource_option [resource_option] ...]
   [password_option | lock_option] 
   
  user_specification:
   username [authentication_option]
   
  authentication_option:
   IDENTIFIED BY 'password' 
   | IDENTIFIED BY PASSWORD 'password_hash'
   | IDENTIFIED {VIA|WITH} authentication_plugin
   | IDENTIFIED {VIA|WITH} authentication_plugin {USING|AS}
  'authentication_string'
   | IDENTIFIED {VIA|WITH} authentication_plugin {USING|AS}
  PASSWORD('password')
   
  tls_option
   SSL 
   | X509
   | CIPHER 'cipher'
   | ISSUER 'issuer'
   | SUBJECT 'subject'
   
  resource_option
   MAX_QUERIES_PER_HOUR count
   | MAX_UPDATES_PER_HOUR count
   | MAX_CONNECTIONS_PER_HOUR count
   | MAX_USER_CONNECTIONS count
   | MAX_STATEMENT_TIME time
   
  password_option:
   PASSWORD EXPIRE
   | PASSWORD EXPIRE DEFAULT
   | PASSWORD EXPIRE NEVER
   | PASSWORD EXPIRE INTERVAL N DAY
   
  lock_option:
   ACCOUNT LOCK
   | ACCOUNT UNLOCK
  }
   
  Description
  ----------- 
  The ALTER USER statement modifies existing MariaDB accounts.
  To use it, you must have the global CREATE USER privilege or
  the UPDATE privilege for the mysql database. The global
  SUPER privilege is also required if the read_only system
  variable is enabled.
   
  If any of the specified user accounts do not yet exist, an
  error results. If an error occurs, ALTER USER will still
  modify the accounts that do not result in an error. Only one
  error is produced for all users which have not been
  modified.
   
  IF EXISTS
   
  When the IF EXISTS clause is used, MariaDB will return a
  warning instead of an error for each specified user that
  does not exist.
   
  Account Names
   
  For ALTER USER statements, account names are specified as
  the username argument in the same way as they are for CREATE
  USER statements. See account names from the CREATE USER page
  for details on how account names are specified.
   
  CURRENT_USER or CURRENT_USER() can also be used to alter the
  account logged into the current session. For example, to
  change the current user's password to mariadb:
   
  ALTER USER CURRENT_USER() IDENTIFIED BY 'mariadb';
   
  Authentication Options
   
  IDENTIFIED BY 'password'
   
  The optional IDENTIFIED BY clause can be used to provide an
  account with a password. The password should be specified in
  plain text. It will be hashed by the PASSWORD function prior
  to being stored to the mysql.user table.
   
  For example, if our password is mariadb, then we can set the
  account's password with:
   
  ALTER USER foo2@test IDENTIFIED BY 'mariadb';
   
  If you do not specify a password with the IDENTIFIED BY
  clause, the user
  will be able to connect without a password. A blank password
  is not a wildcard
  to match any password. The user must connect without
  providing a password if no
  password is set.
   
  The only authentication plugins that this clause supports
  are mysql_native_password and mysql_old_password.
   
  IDENTIFIED BY PASSWORD 'password_hash'
   
  The optional IDENTIFIED BY PASSWORD clause can be used to
  provide an account with a password that has already been
  hashed. The password should be specified as a hash that was
  provided by the PASSWORD function. It will be stored to the
  mysql.user table as-is.
   
  For example, if our password is mariadb, then we can find
  the hash with:
   
  SELECT PASSWORD('mariadb');
  +-------------------------------------------+
  | PASSWORD('mariadb') |
  +-------------------------------------------+
  | *54958E764CE10E50764C2EECBB71D01F08549980 |
  +-------------------------------------------+
  1 row in set (0.00 sec)
   
  And then we can set an account's password with the hash:
   
  ALTER USER foo2@test IDENTIFIED BY PASSWORD
  '*54958E764CE10E50764C2EECBB71D01F08549980';
   
  If you do not specify a password with the IDENTIFIED BY
  clause, the user
  will be able to connect without a password. A blank password
  is not a wildcard
  to match any password. The user must connect without
  providing a password if no
  password is set.
   
  The only authentication plugins that this clause supports
  are mysql_native_password and mysql_old_password.
   
  IDENTIFIED {VIA|WITH} authentication_plugin
   
  The optional IDENTIFIED VIA authentication_plugin allows you
  to specify that the account should be authenticated by a
  specific authentication plugin. The plugin name must be an
  active authentication plugin as per SHOW PLUGINS. If it
  doesn't show up in that output, then you will need to
  install it with INSTALL PLUGIN or INSTALL SONAME.
   
  For example, this could be used with the PAM authentication
  plugin:
   
  ALTER USER foo2@test IDENTIFIED VIA pam;
   
  Some authentication plugins allow additional arguments to be
  specified after a USING or AS keyword. For example, the PAM
  authentication plugin accepts a service name:
   
  ALTER USER foo2@test IDENTIFIED VIA pam USING 'mariadb';
   
  The exact meaning of the additional argument would depend on
  the specific authentication plugin.
   
  In MariaDB 10.4 and later, the USING or AS keyword can also
  be used to provide a plain-text password to a plugin if
  it's provided as an argument to the PASSWORD() function.
  This is only valid for authentication plugins that have
  implemented a hook for the PASSWORD() function. For example,
  the ed25519 authentication plugin supports this:
   
  ALTER USER safe@'%' IDENTIFIED VIA ed25519 USING
  PASSWORD('secret');
   
  TLS Options
   
  By default, MariaDB transmits data between the server and
  clients without encrypting it. This is generally acceptable
  when the server and client run on the same host or in
  networks where security is guaranteed through other means.
  However, in cases where the server and client exist on
  separate networks or they are in a high-risk network, the
  lack of encryption does introduce security concerns as a
  malicious actor could potentially eavesdrop on the traffic
  as it is sent over the network between them.
   
  To mitigate this concern, MariaDB allows you to encrypt data
  in transit between the server and clients using the
  Transport Layer Security (TLS) protocol. TLS was formerly
  known as Secure Socket Layer (SSL), but strictly speaking
  the SSL protocol is a predecessor to TLS and, that version
  of the protocol is now considered insecure. The
  documentation still uses the term SSL often and for
  compatibility reasons TLS-related server system and status
  variables still use the prefix ssl_, but internally, MariaDB
  only supports its secure successors.
   
  See Secure Connections Overview for more information about
  how to determine whether your MariaDB server has TLS
  support.
   
  You can set certain TLS-related restrictions for specific
  user accounts. For instance, you might use this with user
  accounts that require access to sensitive data while sending
  it across networks that you do not control. These
  restrictions can be enabled for a user account with the
  CREATE USER, ALTER USER, or GRANT statements. The following
  options are available:
   
  Option | Description | 
   
  REQUIRE NONE | TLS is not required for this account, but can
  still be used. | 
   
  REQUIRE SSL | The account must use TLS, but no valid X509
  certificate is required. This option cannot be combined with
  other TLS options. | 
   
  REQUIRE X509 | The account must use TLS and must have a
  valid X509 certificate. This option implies REQUIRE SSL.
  This option cannot be combined with other TLS options. | 
   
  REQUIRE ISSUER 'issuer' | The account must use TLS and
  must have a valid X509 certificate. Also, the Certificate
  Authority must be the one specified via the string issuer.
  This option implies REQUIRE X509. This option can be
  combined with the SUBJECT, and CIPHER options in any order.
  | 
   
  REQUIRE SUBJECT 'subject' | The account must use TLS and
  must have a valid X509 certificate. Also, the certificate's
  Subject must be the one specified via the string subject.
  This option implies REQUIRE X509. This option can be
  combined with the ISSUER, and CIPHER options in any order. |

   
  REQUIRE CIPHER 'cipher' | The account must use TLS, but no
  valid X509 certificate is required. Also, the encryption
  used for the connection must use one of the methods
  specified in the string cipher. This option implies REQUIRE
  SSL. This option can be combined with the ISSUER, and
  SUBJECT options in any order. | 
   
  The REQUIRE keyword must be used only once for all specified
  options, and the AND keyword can be used to separate
  individual options, but it is not required.
   
  For example, you can alter a user account to require these
  TLS options with the following:
   
  ALTER USER 'alice'@'%'
   REQUIRE SUBJECT '/CN=alice/O=My Dom,
  Inc./C=US/ST=Oregon/L=Portland'
   AND ISSUER '/C=FI/ST=Somewhere/L=City/ O=Some
  Company/CN=Peter Parker/emailAddress=p.parker@marvel.com'
   AND CIPHER 'TLSv1.2';
   
  If any of these options are set for a specific user account,
  then any client who tries to connect with that user account
  will have to be configured to connect with TLS.
   
  See Securing Connections for Client and Server for
  information on how to enable TLS on the client and server.
   
  Resource Limit Options
   
  MariaDB 10.2.0 introduced a number of resource limit
  options.
   
  It is possible to set per-account limits for certain server
  resources. The following table shows the values that can be
  set per account:
   
  Limit Type | Decription | 
   
  MAX_QUERIES_PER_HOUR | Number of statements that the account
  can issue per hour (including updates) | 
   
  MAX_UPDATES_PER_HOUR | Number of updates (not queries) that
  the account can issue per hour | 
   
  MAX_CONNECTIONS_PER_HOUR | Number of connections that the
  account can start per hour | 
   
  MAX_USER_CONNECTIONS | Number of simultaneous connections
  that can be accepted from the same account; if it is 0,
  max_connections will be used instead; if max_connections is
  0, there is no limit for this account's simultaneous
  connections. | 
   
  MAX_STATEMENT_TIME | Timeout, in seconds, for statements
  executed by the user. See also Aborting Statements that
  Exceed a Certain Time to Execute. | 
   
  If any of these limits are set to 0, then there is no limit
  for that resource for that user.
   
  Here is an example showing how to set an account's resource
  limits:
   
  ALTER USER 'someone'@'localhost' WITH
   MAX_USER_CONNECTIONS 10
   MAX_QUERIES_PER_HOUR 200;
   
  The resources are tracked per account, which means
  'user'@'server'; not per user name or per connection.
   
  The count can be reset for all users using FLUSH
  USER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.
   
  Per account resource limits are stored in the user table, in
  the mysql database. Columns used for resources limits are
  named max_questions, max_updates, max_connections (for
  MAX_CONNECTIONS_PER_HOUR), and max_user_connections (for
  MAX_USER_CONNECTIONS).
   
  Password Expiry
   
  Besides automatic password expiry, as determined by
  default_password_lifetime, password expiry times can be set
  on an individual user basis, overriding the global setting,
  for example:
   
  ALTER USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL
  120 DAY;
   
  ALTER USER 'monty'@'localhost' PASSWORD EXPIRE NEVER;
   
  ALTER USER 'monty'@'localhost' PASSWORD EXPIRE DEFAULT;
   
  See User Password Expiry for more details.
   
  Account Locking
   
  Account locking permits privileged administrators to
  lock/unlock user accounts. No new client connections will be
  permitted if an account is locked (existing connections are
  not affected). For example:
   
  ALTER USER 'marijn'@'localhost' ACCOUNT LOCK;
   
  See Account Locking for more details.
   


  URL: https://mariadb.com/kb/en/library/alter-user/dzfxuxALTER USERdzfxuxhttps://mariadb.com/kb/en/library/alter-user/dzfxuxdzfxux10dzfxux119qjzxqqvvbqSyntax
  ------ 
  GRANT
   priv_type [(column_list)]
   [, priv_type [(column_list)]] ...
   ON [object_type] priv_level
   TO user_specification [ user_options ...]
   
  user_specification:
   username [authentication_option]
   
  authentication_option:
   IDENTIFIED BY 'password' 
   | IDENTIFIED BY PASSWORD 'password_hash'
   | IDENTIFIED {VIA|WITH} authentication_rule [OR
  authentication_rule ...]
   
  authentication_rule:
   authentication_plugin
   | authentication_plugin {USING|AS}
  'authentication_string'
   | authentication_plugin {USING|AS} PASSWORD('password')
   
  GRANT PROXY ON username
   TO username [, username] ...
   [WITH GRANT OPTION]
   
  user_options:
   [REQUIRE {NONE | tls_option [[AND] tls_option] ...}]
   [WITH with_option [with_option] ...]
   
  object_type:
   TABLE
   | FUNCTION
   | PROCEDURE
   
  priv_level:
   *
   | *.*
   | db_name.*
   | db_name.tbl_name
   | tbl_name
   | db_name.routine_name
   
  with_option:
   GRANT OPTION
   | resource_option
   
  resource_option:
   MAX_QUERIES_PER_HOUR count
   | MAX_UPDATES_PER_HOUR count
   | MAX_CONNECTIONS_PER_HOUR count
   | MAX_USER_CONNECTIONS count
   | MAX_STATEMENT_TIME time
   
  tls_option:
   SSL 
   | X509
   | CIPHER 'cipher'
   | ISSUER 'issuer'
   | SUBJECT 'subject'
   
  Description
  ----------- 
  The GRANT statement allows you to grant privileges or roles
  to accounts. To use GRANT, you must have the GRANT OPTION
  privilege, and you must have the privileges that you are
  granting.
   
  Use the REVOKE statement to revoke privileges granted with
  the GRANT statement.
   
  Use the SHOW GRANTS statement to determine what privileges
  an account has.
   
  Account Names
   
  For GRANT statements, account names are specified as the
  username argument in the same way as they are for CREATE
  USER statements. See account names from the CREATE USER page
  for details on how account names are specified.
   
  Implicit Account Creation
   
  The GRANT statement also allows you to implicitly create
  accounts in some cases.
   
  If the account does not yet exist, then GRANT can implicitly
  create it. To implicitly create an account with GRANT, a
  user is required to have the same privileges that would be
  required to explicitly create the account with the CREATE
  USER statement.
   
  If the NO_AUTO_CREATE_USER SQL_MODE is set, then accounts
  can only be created if authentication information is
  specified, or with a CREATE USER statement. If no
  authentication information is provided, GRANT will produce
  an error when the specified account does not exist, for
  example:
   
  show variables like '%sql_mode%' ;
  +---------------+--------------------------------------------+
  | Variable_name | Value |
  +---------------+--------------------------------------------+
  | sql_mode | NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
  +---------------+--------------------------------------------+
   
  GRANT USAGE ON *.* TO 'user123'@'%' IDENTIFIED BY '';
  ERROR 1133 (28000): Can't find any matching row in the user
  table
   
  GRANT USAGE ON *.* TO 'user123'@'%' IDENTIFIED VIA PAM
  using 'mariadb' require ssl ;
  Query OK, 0 rows affected (0.00 sec)
   
  select host, user from mysql.user where user='user123' ;
   
  +------+----------+
  | host | user |
  +------+----------+
  | % | user123 |
  +------+----------+
   
  Privilege Levels
   
  Privileges can be set globally, for an entire database, for
  a table or routine,
  or for individual columns in a table. Certain privileges can
  only be set at
  certain levels.
  Global privileges are granted using *.* for
  priv_level. Global privileges include privileges to
  administer the database
  and manage user accounts, as well as privileges for all
  tables, functions, and
  procedures. Global privileges are stored in the mysql.user
  table.
  Database privileges are granted using db_name.*
  for priv_level, or using just * to use default database.
  Database
  privileges include privileges to create tables and
  functions, as well as
  privileges for all tables, functions, and procedures in the
  database. Database privileges are stored in the mysql.db
  table.
  Table privileges are granted using db_name.tbl_name
  for priv_level, or using just tbl_name to specify a table in
  the default
  database. The TABLE keyword is optional. Table privileges
  include the
  ability to select and change data in the table. Certain
  table privileges can
  be granted for individual columns.
  Column privileges are granted by specifying a table for
  priv_level and providing a column list after the privilege
  type. They allow
  you to control exactly which columns in a table users can
  select and change.
  Function privileges are granted using FUNCTION
  db_name.routine_name
  for priv_level, or using just FUNCTION routine_name to
  specify a function
  in the default database.
  Procedure privileges are granted using PROCEDURE
  db_name.routine_name
  for priv_level, or using just PROCEDURE routine_name to
  specify a procedure
  in the default database.
   
  The USAGE Privilege
   
  The USAGE privilege grants no real privileges. The SHOW
  GRANTS
  statement will show a global USAGE privilege for a
  newly-created user. You
  can use USAGE with the GRANT statement to change options
  like GRANT OPTION
  and MAX_USER_CONNECTIONS without changing any account
  privileges.
   
  The ALL PRIVILEGES Privilege
   
  The ALL PRIVILEGES privilege grants all available
  privileges. Granting all
  privileges only affects the given privilege level. For
  example, granting all
  privileges on a table does not grant any privileges on the
  database or globally.
   
  Using ALL PRIVILEGES does not grant the special GRANT OPTION
  privilege.
   
  You can use ALL instead of ALL PRIVILEGES.
   
  The GRANT OPTION Privilege
   
  Use the WITH GRANT OPTION clause to give users the ability
  to grant privileges
  to other users at the given privilege level. Users with the
  GRANT OPTION privilege can
  only grant privileges they have. They cannot grant
  privileges at a higher privilege level than
  they have the GRANT OPTION privilege.
   
  The GRANT OPTION privilege cannot be set for individual
  columns.
  If you use WITH GRANT OPTION when specifying column
  privileges,
  the GRANT OPTION privilege will be granted for the entire
  table.
   
  Using the WITH GRANT OPTION clause is equivalent to listing
  GRANT OPTION
  as a privilege.
   
  Global Privileges
   
  The following table lists the privileges that can be granted
  globally. You can
  also grant all database, table, and function privileges
  globally. When granted
  globally, these privileges apply to all databases, tables,
  or functions,
  including those created later.
   
  To set a global privilege, use *.* for priv_level.
   
  Privilege | Description | 
   
  CREATE USER | Create a user using the CREATE USER statement,
  or implicitly create a user with the GRANT statement. | 
   
  FILE | Read and write files on the server, using statements
  like LOAD DATA INFILE or functions like LOAD_FILE(). Also
  needed to create CONNECT outward tables. MariaDB server must
  have the permissions to access those files. | 
   
  GRANT OPTION | Grant global privileges. You can only grant
  privileges that you have. | 
   
  PROCESS | Show information about the active processes, via
  SHOW PROCESSLIST or mysqladmin processlist. | 
   
  RELOAD | Execute FLUSH statements or equivalent mysqladmin
  commands. | 
   
  REPLICATION CLIENT | Execute SHOW MASTER STATUS and SHOW
  SLAVE STATUS informative statements. | 
   
  REPLICATION SLAVE | Accounts used by slave servers on the
  master need this privilege. This is needed to get the
  updates made on the master. | 
   
  SHOW DATABASES | List all databases using the SHOW DATABASES
  statement. Without the SHOW DATABASES privilege, you can
  still issue the SHOW DATABASES statement, but it will only
  list databases containing tables on which you have
  privileges. | 
   
  SHUTDOWN | Shut down the server using SHUTDOWN or the
  mysqladmin shutdown command. | 
   
  SUPER | Execute superuser statements: CHANGE MASTER TO, KILL
  (users who do not have this privilege can only KILL their
  own threads), PURGE LOGS, SET global system variables, or
  the mysqladmin debug command. Also, this permission allows
  the user to write data even if the read_only startup option
  is set, enable or disable logging, enable or disable
  replication on slaves, specify a DEFINER for statements that
  support that clause, connect once after reaching the
  MAX_CONNECTIONS. If a statement has been specified for the
  init-connect mysqld option, that command will not be
  executed when a user with SUPER privileges connects to the
  server. | 
   
  Database Privileges
   
  The following table lists the privileges that can be granted
  at the database
  level. You can also grant all table and function privileges
  at the database
  level. Table and function privileges on a database apply to
  all tables or
  functions in that database, including those created later.
   
  To set a privilege for a database, specify the database
  using
  db_name.* for priv_level, or just use *
  to specify the default database.
   
  Privilege | Description | 
   
  CREATE | Create a database using the CREATE DATABASE
  statement, when the privilege is granted for a database. You
  can grant the CREATE privilege on databases that do not yet
  exist. This also grants the CREATE privilege on all tables
  in the database. | 
   
  CREATE ROUTINE | Create Stored Programs using the CREATE
  PROCEDURE and CREATE FUNCTION statements. | 
   
  CREATE TEMPORARY TABLES | Create temporary tables with the
  CREATE TEMPORARY TABLE statement. This privilege enable
  writing and dropping those temporary tables | 
   
  DROP | Drop a database using the DROP DATABASE statement,
  when the privilege is granted for a database. This also
  grants the DROP privilege on all tables in the database. | 
   
  EVENT | Create, drop and alter EVENTs. Added in MySQL 5.1.6.
  | 
   
  GRANT OPTION | Grant database privileges. You can only grant
  privileges that you have. | 
   
  LOCK TABLES | Acquire explicit locks using the LOCK TABLES
  statement; you also need to have the SELECT privilege on a
  table, in order to lock it. | 
   
  Table Privileges
   
  Privilege | Description | 
   
  ALTER | Change the structure of an existing table using the
  ALTER TABLE statement. | 
   
  CREATE | Create a table using the CREATE TABLE statement.
  You can grant the CREATE privilege on tables that do not yet
  exist. | 
   
  CREATE VIEW | Create a view using the CREATE_VIEW statement.
  | 
   
  DELETE | Remove rows from a table using the DELETE
  statement. | 
   
  DELETE HISTORY | Remove historical rows from a table using
  the DELETE HISTORY statement. Displays as DELETE VERSIONING
  ROWS when running SHOW GRANTS (MDEV-17655). From MariaDB
  10.3.4. From MariaDB 10.3.5, if a user has the SUPER
  privilege but not this privilege, running mysql_upgrade will
  grant this privilege as well. | 
   
  DROP | Drop a table using the DROP TABLE statement or a view
  using the DROP VIEW statement. Also required to execute the
  TRUNCATE TABLE statement. | 
   
  GRANT OPTION | Grant table privileges. You can only grant
  privileges that you have. | 
   
  INDEX | Create an index on a table using the CREATE INDEX
  statement. Without the INDEX privilege, you can still create
  indexes when creating a table using the CREATE TABLE
  statement if the you have the CREATE privilege, and you can
  create indexes using the ALTER TABLE statement if you have
  the ALTER privilege. | 
   
  INSERT | Add rows to a table using the INSERT statement. The
  INSERT privilege can also be set on individual columns; see
  Column Privileges below for details. | 
   
  REFERENCES | Unused. | 
   
  SELECT | Read data from a table using the SELECT statement.
  The SELECT privilege can also be set on individual columns;
  see Column Privileges below for details. | 
   
  SHOW VIEW | Show the CREATE VIEW statement to create a view
  using the SHOW CREATE VIEW statement. | 
   
  TRIGGER | Execute triggers associated to tables you update,
  execute the CREATE TRIGGER and DROP TRIGGER statements. You
  will still be able to see triggers. | 
   
  UPDATE | Update existing rows in a table using the UPDATE
  statement. UPDATE statements usually include a WHERE clause
  to update only certain rows. You must have SELECT privileges
  on the table or the appropriate columns for the WHERE
  clause. The UPDATE privilege can also be set on individual
  columns; see Column Privileges below for details. | 
   
  Column Privileges
   
  Some table privileges can be set for individual columns of a
  table. To use
  column privileges, specify the table explicitly and provide
  a list of column
  names after the privilege type. For example, the following
  statement would allow
  the user to read the names and positions of employees, but
  not other information
  from the same table, such as salaries.
   
  GRANT SELECT (name, position) on Employee to
  'jeffrey'@'localhost';
   
  Privilege | Description | 
   
  INSERT (column_list) | Add rows specifying values in columns
  using the INSERT statement. If you only have column-level
  INSERT privileges, you must specify the columns you are
  setting in the INSERT statement. All other columns will be
  set to their default values, or NULL. | 
   
  REFERENCES (column_list) | Unused. | 
   
  SELECT (column_list) | Read values in columns using the
  SELECT statement. You cannot access or query any columns for
  which you do not have SELECT privileges, including in WHERE,
  ON, GROUP BY, and ORDER BY clauses. | 
   
  UPDATE (column_list) | Update values in columns of existing
  rows using the UPDATE statement. UPDATE statements usually
  include a WHERE clause to update only certain rows. You must
  have SELECT privileges on the table or the appropriate
  columns for the WHERE clause. | 
   
  Function Privileges
   
  Privilege | Description | 
   
  ALTER ROUTINE | Change the characteristics of a stored
  function using the ALTER FUNCTION statement. | 
   
  EXECUTE | Use a stored function. You need SELECT privileges
  for any tables or columns accessed by the function. | 
   
  GRANT OPTION | Grant function privileges. You can only grant
  privileges that you have. | 
   
  Procedure Privileges
   
  Privilege | Description | 
   
  ALTER ROUTINE | Change the characteristics of a stored
  procedure using the ALTER PROCEDURE statement. | 
   
  EXECUTE | Execute a stored procedure using the CALL
  statement. The privilege to call a procedure may allow you
  to perform actions you wouldn't otherwise be able to do,
  such as insert rows into a table. | 
   
  GRANT OPTION | Grant procedure privileges. You can only
  grant privileges that you have. | 
   
  Proxy Privileges
   
  Privilege | Description | 
   
  PROXY | Permits one user to be a proxy for another. | 
   
  The PROXY privilege allows one user to proxy as another
  user, which means their privileges change to that of the
  proxy user, and the CURRENT_USER() function returns the user
  name of the proxy user.
   
  The PROXY privilege only works with authentication plugins
  that support it. The default mysql_native_password
  authentication plugin does not support proxy users.
   
  The pam authentication plugin is the only plugin included
  with MariaDB that currently supports proxy users. The PROXY
  privilege is commonly used with the pam authentication
  plugin to enable user and group mapping with PAM.
   
  For example, to grant the PROXY privilege to an anonymous
  account that authenticates with the pam authentication
  plugin, you could execute the following:
   
  CREATE USER 'dba'@'%' IDENTIFIED BY 'strongpassword';
   
  GRANT ALL PRIVILEGES ON *.* TO 'dba'@'%' ;
   
  CREATE USER ''@'%' IDENTIFIED VIA pam USING 'mariadb';
   
  GRANT PROXY ON 'dba'@'%' TO ''@'%';
   
  A user account can only grant the PROXY privilege for a
  specific user account if the granter also has the PROXY
  privilege for that specific user account, and if that
  privilege is defined WITH GRANT OPTION. For example, the
  following example fails because the granter does not have
  the PROXY privilege for that specific user account at all:
   
  SELECT USER(), CURRENT_USER();
  +-----------------+-----------------+
  | USER() | CURRENT_USER() |
  +-----------------+-----------------+
  | alice@localhost | alice@localhost |
  +-----------------+-----------------+
   
  SHOW GRANTS;
   
  +-----------------------------------------------------------------------------------------------------------------------+
  | Grants for alice@localhost |
  +-----------------------------------------------------------------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'alice'@'localhost'
  IDENTIFIED BY PASSWORD
  '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' |
  +-----------------------------------------------------------------------------------------------------------------------+
   
  GRANT PROXY ON 'dba'@'localhost' TO
  'bob'@'localhost';
   
  ERROR 1698 (28000): Access denied for user
  'alice'@'localhost'
   
  And the following example fails because the granter does
  have the PROXY privilege for that specific user account, but
  it is not defined WITH GRANT OPTION:
   
  SELECT USER(), CURRENT_USER();
  +-----------------+-----------------+
  | USER() | CURRENT_USER() |
  +-----------------+-----------------+
  | alice@localhost | alice@localhost |
  +-----------------+-----------------+
   
  SHOW GRANTS;
   
  +-----------------------------------------------------------------------------------------------------------------------+
  | Grants for alice@localhost |
  +-----------------------------------------------------------------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'alice'@'localhost'
  IDENTIFIED BY PASSWORD
  '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' |
  | GRANT PROXY ON 'dba'@'localhost' TO
  'alice'@'localhost' |
  +-----------------------------------------------------------------------------------------------------------------------+
   
  MariaDB [(none)]> GRANT PROXY ON 'dba'@'localhost' TO
  'bob'@'localhost';
   
  ERROR 1698 (28000): Access denied for user
  'alice'@'localhost'
   
  But the following example succeeds because the granter does
  have the PROXY privilege for that specific user account, and
  it is defined WITH GRANT OPTION:
   
  SELECT USER(), CURRENT_USER();
  +-----------------+-----------------+
  | USER() | CURRENT_USER() |
  +-----------------+-----------------+
  | alice@localhost | alice@localhost |
  +-----------------+-----------------+
   
  SHOW GRANTS;
   
  +-----------------------------------------------------------------------------------------------------------------------------------------+
  | Grants for alice@localhost |
  +-----------------------------------------------------------------------------------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'alice'@'localhost'
  IDENTIFIED BY PASSWORD
  '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' WITH GRANT
  OPTION |
  | GRANT PROXY ON 'dba'@'localhost' TO
  'alice'@'localhost' WITH GRANT OPTION |
  +-----------------------------------------------------------------------------------------------------------------------------------------+
   
  GRANT PROXY ON 'dba'@'localhost' TO
  'bob'@'localhost';
   
  Query OK, 0 rows affected (0.004 sec)
   
  A user account can grant the PROXY privilege for any other
  user account if the granter has the PROXY privilege for the
  ''@'%' anonymous user account, like this:
   
  GRANT PROXY ON ''@'%' TO 'dba'@'localhost' WITH
  GRANT OPTION;
   
  For example, the following example succeeds because the user
  can grant the PROXY privilege for any other user account:
   
  SELECT USER(), CURRENT_USER();
  +-----------------+-----------------+
  | USER() | CURRENT_USER() |
  +-----------------+-----------------+
  | alice@localhost | alice@localhost |
  +-----------------+-----------------+
   
  SHOW GRANTS;
   
  +-----------------------------------------------------------------------------------------------------------------------------------------+
  | Grants for alice@localhost |
  +-----------------------------------------------------------------------------------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'alice'@'localhost'
  IDENTIFIED BY PASSWORD
  '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' WITH GRANT
  OPTION |
  | GRANT PROXY ON ''@'%' TO 'alice'@'localhost' WITH
  GRANT OPTION |
  +-----------------------------------------------------------------------------------------------------------------------------------------+
   
  GRANT PROXY ON 'app1_dba'@'localhost' TO
  'bob'@'localhost';
   
  Query OK, 0 rows affected (0.004 sec)
   
  GRANT PROXY ON 'app2_dba'@'localhost' TO
  'carol'@'localhost';
   
  Query OK, 0 rows affected (0.004 sec)
   
  The default root user accounts created by mysql_install_db
  have this privilege. For example:
   
  GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH
  GRANT OPTION;
   
  GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH
  GRANT OPTION;
   
  This allows the default root user accounts to grant the
  PROXY privilege for any other user account, and it also
  allows the default root user accounts to grant others the
  privilege to do the same.
   
  Authentication Options
   
  The authentication options for the GRANT statement are the
  same as those for the CREATE USER statement.
   
  IDENTIFIED BY 'password'
   
  The optional IDENTIFIED BY clause can be used to provide an
  account with a password. The password should be specified in
  plain text. It will be hashed by the PASSWORD function prior
  to being stored to the mysql.user table.
   
  For example, if our password is mariadb, then we can create
  the user with:
   
  GRANT USAGE ON *.* TO foo2@test IDENTIFIED BY 'mariadb';
   
  If you do not specify a password with the IDENTIFIED BY
  clause, the user
  will be able to connect without a password. A blank password
  is not a wildcard
  to match any password. The user must connect without
  providing a password if no
  password is set.
   
  If the user account already exists and if you provide the
  IDENTIFIED BY clause, then the user's password will be
  changed. You must have the privileges needed for the SET
  PASSWORD
  statement to change a user's password with GRANT.
   
  The only authentication plugins that this clause supports
  are mysql_native_password and mysql_old_password.
   
  IDENTIFIED BY PASSWORD 'password_hash'
   
  The optional IDENTIFIED BY PASSWORD clause can be used to
  provide an account with a password that has already been
  hashed. The password should be specified as a hash that was
  provided by the PASSWORD function. It will be stored to the
  mysql.user table as-is.
   
  For example, if our password is mariadb, then we can find
  the hash with:
   
  SELECT PASSWORD('mariadb');
  +-------------------------------------------+
  | PASSWORD('mariadb') |
  +-------------------------------------------+
  | *54958E764CE10E50764C2EECBB71D01F08549980 |
  +-------------------------------------------+
  1 row in set (0.00 sec)
   
  And then we can create a user with the hash:
   
  GRANT USAGE ON *.* TO foo2@test IDENTIFIED BY PASSWORD
  '*54958E764CE10E50764C2EECBB71D01F08549980';
   
  If you do not specify a password with the IDENTIFIED BY
  clause, the user
  will be able to connect without a password. A blank password
  is not a wildcard
  to match any password. The user must connect without
  providing a password if no
  password is set.
   
  If the user account already exists and if you provide the
  IDENTIFIED BY clause, then the user's password will be
  changed. You must have the privileges needed for the SET
  PASSWORD
  statement to change a user's password with GRANT.
   
  The only authentication plugins that this clause supports
  are mysql_native_password and mysql_old_password.
   
  IDENTIFIED {VIA|WITH} authentication_plugin
   
  The optional IDENTIFIED VIA authentication_plugin allows you
  to specify that the account should be authenticated by a
  specific authentication plugin. The plugin name must be an
  active authentication plugin as per SHOW PLUGINS. If it
  doesn't show up in that output, then you will need to
  install it with INSTALL PLUGIN or INSTALL SONAME.
   
  For example, this could be used with the PAM authentication
  plugin:
   
  GRANT USAGE ON *.* TO foo2@test IDENTIFIED VIA pam;
   
  Some authentication plugins allow additional arguments to be
  specified after a USING or AS keyword. For example, the PAM
  authentication plugin accepts a service name:
   
  GRANT USAGE ON *.* TO foo2@test IDENTIFIED VIA pam USING
  'mariadb';
   
  The exact meaning of the additional argument would depend on
  the specific authentication plugin.
   
  The USING or AS keyword can also be used to provide a
  plain-text password to a plugin if it's provided as an
  argument to the PASSWORD() function. This is only valid for
  authentication plugins that have implemented a hook for the
  PASSWORD() function. For example, the ed25519 authentication
  plugin supports this:
   
  CREATE USER safe@'%' IDENTIFIED VIA ed25519 USING
  PASSWORD('secret');
   
  One can specify many authentication plugins, they all works
  as alternatives ways of authenticating a user:
   
  CREATE USER safe@'%' IDENTIFIED VIA ed25519 USING
  PASSWORD('secret') OR unix_socket;
   
  Resource Limit Options
   
  MariaDB 10.2.0 introduced a number of resource limit
  options.
   
  It is possible to set per-account limits for certain server
  resources. The following table shows the values that can be
  set per account:
   
  Limit Type | Decription | 
   
  MAX_QUERIES_PER_HOUR | Number of statements that the account
  can issue per hour (including updates) | 
   
  MAX_UPDATES_PER_HOUR | Number of updates (not queries) that
  the account can issue per hour | 
   
  MAX_CONNECTIONS_PER_HOUR | Number of connections that the
  account can start per hour | 
   
  MAX_USER_CONNECTIONS | Number of simultaneous connections
  that can be accepted from the same account; if it is 0,
  max_connections will be used instead; if max_connections is
  0, there is no limit for this account's simultaneous
  connections. | 
   
  MAX_STATEMENT_TIME | Timeout, in seconds, for statements
  executed by the user. See also Aborting Statements that
  Exceed a Certain Time to Execute. | 
   
  If any of these limits are set to 0, then there is no limit
  for that resource for that user.
   
  To set resource limits for an account, if you do not want to
  change that account's privileges, you can issue a GRANT
  statement with the USAGE privilege, which has no meaning.
  The statement can name some or all limit types, in any
  order.
   
  Here is an example showing how to set resource limits:
   
  GRANT USAGE ON *.* TO 'someone'@'localhost' WITH
   MAX_USER_CONNECTIONS 0
   MAX_QUERIES_PER_HOUR 200;
   
  The resources are tracked per account, which means
  'user'@'server'; not per user name or per connection.
   
  The count can be reset for all users using FLUSH
  USER_RESOURCES, FLUSH PRIVILEGES or mysqladmin reload.
   
  Per account resource limits are stored in the user table, in
  the mysql database. Columns used for resources limits are
  named max_questions, max_updates, max_connections (for
  MAX_CONNECTIONS_PER_HOUR), and max_user_connections (for
  MAX_USER_CONNECTIONS).
   
  TLS Options
   
  By default, MariaDB transmits data between the server and
  clients without encrypting it. This is generally acceptable
  when the server and client run on the same host or in
  networks where security is guaranteed through other means.
  However, in cases where the server and client exist on
  separate networks or they are in a high-risk network, the
  lack of encryption does introduce security concerns as a
  malicious actor could potentially eavesdrop on the traffic
  as it is sent over the network between them.
   
  To mitigate this concern, MariaDB allows you to encrypt data
  in transit between the server and clients using the
  Transport Layer Security (TLS) protocol. TLS was formerly
  known as Secure Socket Layer (SSL), but strictly speaking
  the SSL protocol is a predecessor to TLS and, that version
  of the protocol is now considered insecure. The
  documentation still uses the term SSL often and for
  compatibility reasons TLS-related server system and status
  variables still use the prefix ssl_, but internally, MariaDB
  only supports its secure successors.
   
  See Secure Connections Overview for more information about
  how to determine whether your MariaDB server has TLS
  support.
   
  You can set certain TLS-related restrictions for specific
  user accounts. For instance, you might use this with user
  accounts that require access to sensitive data while sending
  it across networks that you do not control. These
  restrictions can be enabled for a user account with the
  CREATE USER, ALTER USER, or GRANT statements. The following
  options are available:
   
  Option | Description | 
   
  REQUIRE NONE | TLS is not required for this account, but can
  still be used. | 
   
  REQUIRE SSL | The account must use TLS, but no valid X509
  certificate is required. This option cannot be combined with
  other TLS options. | 
   
  REQUIRE X509 | The account must use TLS and must have a
  valid X509 certificate. This option implies REQUIRE SSL.
  This option cannot be combined with other TLS options. | 
   
  REQUIRE ISSUER 'issuer' | The account must use TLS and
  must have a valid X509 certificate. Also, the Certificate
  Authority must be the one specified via the string issuer.
  This option implies REQUIRE X509. This option can be
  combined with the SUBJECT, and CIPHER options in any order.
  | 
   
  REQUIRE SUBJECT 'subject' | The account must use TLS and
  must have a valid X509 certificate. Also, the certificate's
  Subject must be the one specified via the string subject.
  This option implies REQUIRE X509. This option can be
  combined with the ISSUER, and CIPHER options in any order. |

   
  REQUIRE CIPHER 'cipher' | The account must use TLS, but no
  valid X509 certificate is required. Also, the encryption
  used for the connection must use one of the methods
  specified in the string cipher. This option implies REQUIRE
  SSL. This option can be combined with the ISSUER, and
  SUBJECT options in any order. | 
   
  The REQUIRE keyword must be used only once for all specified
  options, and the AND keyword can be used to separate
  individual options, but it is not required.
   
  For example, you can create a user account that requires
  these TLS options with the following:
   
  GRANT USAGE ON *.* TO 'alice'@'%'
   REQUIRE SUBJECT '/CN=alice/O=My Dom,
  Inc./C=US/ST=Oregon/L=Portland'
   AND ISSUER '/C=FI/ST=Somewhere/L=City/ O=Some
  Company/CN=Peter Parker/emailAddress=p.parker@marvel.com'
   AND CIPHER 'TLSv1.2';
   
  If any of these options are set for a specific user account,
  then any client who tries to connect with that user account
  will have to be configured to connect with TLS.
   
  See Securing Connections for Client and Server for
  information on how to enable TLS on the client and server.
   
  Roles
   
  Roles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  GRANT role TO grantee [, grantee2 ... ]
  [ WITH ADMIN OPTION ]
   
  The GRANT statement is also used to grant the use a role to
  one or more users or other roles. In order to be able to
  grant a role, the grantor doing so must have permission to
  do so (see WITH ADMIN in the CREATE ROLE article).
   
  Specifying the WITH ADMIN OPTION permits the grantee to in
  turn grant the role to another.
   
  For example, the following commands show how to grant the
  same role to a couple different users.
   
  GRANT journalist TO hulda;
   
  GRANT journalist TO berengar WITH ADMIN OPTION;
   
  If a user has been granted a role, they do not automatically
  obtain all permissions associated with that role. These
  permissions are only in use when the user activates the role
  with the SET ROLE statement.
   
  Grant Examples
   
  Granting Root-like Privileges
   
  You can create a user that has privileges similar to the
  default root accounts by executing the following:
   
  CREATE USER 'alexander'@'localhost';
   
  GRANT ALL PRIVILEGES ON *.* to 'alexander'@'localhost'
  WITH GRANT OPTION;
   


  URL: https://mariadb.com/kb/en/library/grant/dzfxuxGRANTdzfxuxhttps://mariadb.com/kb/en/library/grant/dzfxuxdzfxux10dzfxux121qjzxqqvvbqSyntax
  ------ 
  ST_X(p)
  X(p)
   
  Description
  ----------- 
  Returns the X-coordinate value for the point p as a
  double-precision number.
   
  ST_X() and X() are synonyms.
   
  Examples
  -------- 
  SET @pt = 'Point(56.7 53.34)';
   
  SELECT X(GeomFromText(@pt));
  +----------------------+
  | X(GeomFromText(@pt)) |
  +----------------------+
  | 56.7 |
  +----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_x/dzfxuxST_Xdzfxuxhttps://mariadb.com/kb/en/library/st_x/dzfxuxdzfxux11dzfxux131qjzxqqvvbqSyntax
  ------ 
  ST_Y(p)
  Y(p)
   
  Description
  ----------- 
  Returns the Y-coordinate value for the point p as a
  double-precision number.
   
  ST_Y() and Y() are synonyms.
   
  Examples
  -------- 
  SET @pt = 'Point(56.7 53.34)';
   
  SELECT Y(GeomFromText(@pt));
  +----------------------+
  | Y(GeomFromText(@pt)) |
  +----------------------+
  | 53.34 |
  +----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_y/dzfxuxST_Ydzfxuxhttps://mariadb.com/kb/en/library/st_y/dzfxuxdzfxux11dzfxux132qjzxqqvvbqEXECUTE IMMEDIATE was introduced in MariaDB 10.2.3.
   
  Syntax
  ------ 
  EXECUTE IMMEDIATE statement
   
  Description
  ----------- 
  EXECUTE IMMEDIATE executes a dynamic SQL statement created
  on the fly, which can reduce performance overhead.
   
  For example:
   
  EXECUTE IMMEDIATE 'SELECT 1' 
   
  which is shorthand for:
   
  prepare stmt from "select 1";
   
  execute stmt;
   
  deallocate prepare stmt;
   
  EXECUTE IMMEDIATE supports complex expressions as prepare
  source and parameters:
   
  EXECUTE IMMEDIATE CONCAT('SELECT COUNT(*) FROM ', 't1',
  ' WHERE a=?') USING 5+5;
   
  Limitations: subselects and stored function calls are not
  supported as a prepare source.
   
  The following examples return an error:
   
  CREATE OR REPLACE FUNCTION f1() RETURNS VARCHAR(64) RETURN
  'SELECT * FROM t1';
  EXECUTE IMMEDIATE f1();
  ERROR 1970 (42000): EXECUTE IMMEDIATE does not support
  subqueries or stored functions
   
  EXECUTE IMMEDIATE (SELECT 'SELECT * FROM t1');
  ERROR 1064 (42000): You have an error in your SQL syntax;
  check the manual that 
   corresponds to your MariaDB server version for the right
  syntax to use near 
   'SELECT 'SELECT * FROM t1')' at line 1
   
  CREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN 10;
  EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a=?' USING f1();
  ERROR 1970 (42000): EXECUTE..USING does not support
  subqueries or stored functions
   
  EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a=?' USING
  (SELECT 10);
  ERROR 1064 (42000): You have an error in your SQL syntax;
  check the manual that 
   corresponds to your MariaDB server version for the right
  syntax to use near 
   'SELECT 10)' at line 1
   
  One can use a user or an SP variable as a workaround:
   
  CREATE OR REPLACE FUNCTION f1() RETURNS VARCHAR(64) RETURN
  'SELECT * FROM t1';
  SET @stmt=f1();
  EXECUTE IMMEDIATE @stmt;
   
  SET @stmt=(SELECT 'SELECT 1');
  EXECUTE IMMEDIATE @stmt;
   
  CREATE OR REPLACE FUNCTION f1() RETURNS INT RETURN 10;
  SET @param=f1();
  EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a=?' USING
  @param;
   
  SET @param=(SELECT 10);
  EXECUTE IMMEDIATE 'SELECT * FROM t1 WHERE a=?' USING
  @param;
   
  EXECUTE IMMEDIATE supports user variables and SP variables
  as OUT parameters
   
  DELIMITER $$
  CREATE OR REPLACE PROCEDURE p1(OUT a INT)
  BEGIN
   SET a:= 10;
  END;
  $$
  DELIMITER ;
  SET @a=2;
  EXECUTE IMMEDIATE 'CALL p1(?)' USING @a;
  SELECT @a;
  +------+
  | @a |
  +------+
  | 10 |
  +------+
   
  Similar to PREPARE, EXECUTE IMMEDIATE is allowed in stored
  procedures but is not allowed in stored functions.
   
  This example uses EXECUTE IMMEDIATE inside a stored
  procedure:
   
  DELIMITER $$
  CREATE OR REPLACE PROCEDURE p1()
  BEGIN
   EXECUTE IMMEDIATE 'SELECT 1';
  END;
  $$
  DELIMITER ;
  CALL p1;
  +---+
  | 1 |
  +---+
  | 1 |
  +---+
   
  This script returns an error:
   
  DELIMITER $$
  CREATE FUNCTION f1() RETURNS INT
  BEGIN
   EXECUTE IMMEDIATE 'DO 1';
   RETURN 1;
  END;
  $$
  ERROR 1336 (0A000): Dynamic SQL is not allowed in stored
  function or trigger
   
  EXECUTE IMMEDIATE can use DEFAULT and IGNORE indicators as
  bind parameters:
   
  CREATE OR REPLACE TABLE t1 (a INT DEFAULT 10);
  EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES (?)' USING
  DEFAULT;
  SELECT * FROM t1;
  +------+
  | a |
  +------+
  | 10 |
  +------+
   
  EXECUTE IMMEDIATE increments the Com_execute_immediate
  status variable, as well as the Com_stmt_prepare,
  Com_stmt_execute and Com_stmt_close status variables.
   
  Note, EXECUTE IMMEDIATE does not increment the
  Com_execute_sql status variable. Com_execute_sql is used
  only for PREPARE..EXECUTE.
   
  This session screenshot demonstrates how EXECUTE IMMEDIATE
  affects status variables:
   
  SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE
  VARIABLE_NAME RLIKE 
   ('COM_(EXECUTE|STMT_PREPARE|STMT_EXECUTE|STMT_CLOSE)');
   
  +-----------------------+----------------+
  | VARIABLE_NAME | VARIABLE_VALUE |
  +-----------------------+----------------+
  | COM_EXECUTE_IMMEDIATE | 0 |
  | COM_EXECUTE_SQL | 0 |
  | COM_STMT_CLOSE | 0 |
  | COM_STMT_EXECUTE | 0 |
  | COM_STMT_PREPARE | 0 |
  +-----------------------+----------------+
   
  EXECUTE IMMEDIATE 'SELECT 1';
  +---+
  | 1 |
  +---+
  | 1 |
  +---+
   
  SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE
  VARIABLE_NAME RLIKE 
   ('COM_(EXECUTE|STMT_PREPARE|STMT_EXECUTE|STMT_CLOSE)');
  +-----------------------+----------------+
  | VARIABLE_NAME | VARIABLE_VALUE |
  +-----------------------+----------------+
  | COM_EXECUTE_IMMEDIATE | 1 |
  | COM_EXECUTE_SQL | 0 |
  | COM_STMT_CLOSE | 1 |
  | COM_STMT_EXECUTE | 1 |
  | COM_STMT_PREPARE | 1 |
  +-----------------------+----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/execute-immediate/dzfxuxEXECUTE IMMEDIATEdzfxuxhttps://mariadb.com/kb/en/library/execute-immediate/dzfxuxdzfxux8dzfxux99qjzxqqvvbqMetadata locking has been supported since MariaDB 5.5. This
  means that when a transaction (including XA transactions)
  uses a table, it locks its metadata until the end of
  transaction. Non-transactional tables are also locked, as
  well as views and objects which are related to locked
  tables/views (stored functions, triggers, etc). When a
  connection tries to use a DDL statement (like an ALTER
  TABLE) which modifies a table that is locked, that
  connection is queued, and has to wait until it's unlocked.
  Using savepoints and performing a partial rollback does not
  release metadata locks.
   
  LOCK TABLES ... WRITE are also queued. Some wrong statements
  which produce an error may not need to wait for the lock to
  be freed.
   
  Metadata lock's timeout is determined by the value of the
  lock_wait_timeout server system variable (in seconds).
  However, note that its default value is 31536000 (1 year).
  If this timeout exceeds, the following error is returned:
   
  ERROR 1205 (HY000): Lock wait timeout exceeded;
   try restarting transaction
   
  If the metadata_lock_info plugin is installed, the
  Information Schema metadata_lock_info table stores
  information about existing metadata locks.
   
  Example
   
  Let's use the following MEMORY (non-transactional) table:
   
  CREATE TABLE t (a INT) ENGINE = MEMORY;
   
  Connection 1 starts a transaction, and INSERTs a row into t:
   
  START TRANSACTION;
   
  INSERT INTO t SET a=1;
   
  t's metadata is now locked by connection 1. Connection 2
  tries to alter t, but has to wait:
   
  ALTER TABLE t ADD COLUMN b INT;
   
  Connection 2's prompt is blocked now.
   
  Now connection 1 ends the transaction:
   
  COMMIT;
   
  ...and connection 2 finally gets the output of its command:
   
  Query OK, 1 row affected (35.23 sec)
  Records: 1 Duplicates: 0 Warnings: 0
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/metadata-locking/dzfxuxMetadata Lockingdzfxuxhttps://mariadb.com/kb/en/library/metadata-locking/dzfxuxdzfxux8dzfxux103qjzxqqvvbqA synonym for ST_X.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/point-properties-x/dzfxuxXdzfxuxhttps://mariadb.com/kb/en/library/point-properties-x/dzfxuxdzfxux11dzfxux133qjzxqqvvbqA synonym for ST_Y.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/point-properties-y/dzfxuxYdzfxuxhttps://mariadb.com/kb/en/library/point-properties-y/dzfxuxdzfxux11dzfxux134qjzxqqvvbqSyntax
  ------ 
  AES_DECRYPT(crypt_str,key_str)
   
  Description
  ----------- 
  This function allows decryption of data using the official
  AES
  (Advanced Encryption Standard) algorithm. For more
  information, see
  the description of AES_ENCRYPT().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/aes_decrypt/dzfxuxAES_DECRYPTdzfxuxhttps://mariadb.com/kb/en/library/aes_decrypt/dzfxuxdzfxux12dzfxux135qjzxqqvvbqSyntax
  ------ 
  DECODE(crypt_str,pass_str)
   
  Description
  ----------- 
  Decrypts the encrypted string crypt_str using pass_str as
  the
  password. crypt_str should be a string returned from
  ENCODE(). The resulting string will be the original string
  only if pass_str is the same.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/decode/dzfxuxDECODEdzfxuxhttps://mariadb.com/kb/en/library/decode/dzfxuxdzfxux12dzfxux138qjzxqqvvbqSyntax
  ------ 
  LOCK TABLE[S]
   tbl_name [[AS] alias] lock_type
   [, tbl_name [[AS] alias] lock_type] ...
   [WAIT n|NOWAIT]
   
  lock_type:
   READ [LOCAL]
   | [LOW_PRIORITY] WRITE
   | WRITE CONCURRENT
   
  UNLOCK TABLES
   
  Description
  ----------- 
  The lock_type can be one of:
   
  Option | Description | 
   
  READ | Read lock, no writes allowed | 
   
  READ LOCAL | Read lock, but allow concurrent inserts | 
   
  WRITE | Exclusive write lock. No other connections can read
  or write to this table | 
   
  LOW_PRIORITY WRITE | Exclusive write lock, but allow new
  read locks on the table until we get the write lock. | 
   
  WRITE CONCURRENT | Exclusive write lock, but allow READ
  LOCAL locks to the table. | 
   
  MariaDB enables client sessions to acquire table locks
  explicitly for the
  purpose of cooperating with other sessions for access to
  tables, or to
  prevent other sessions from modifying tables during periods
  when a
  session requires exclusive access to them. A session can
  acquire or
  release locks only for itself. One session cannot acquire
  locks for
  another session or release locks held by another session.
   
  Locks may be used to emulate transactions or to get more
  speed when
  updating tables.
   
  LOCK TABLES explicitly acquires table locks for the current
  client session.
  Table locks can be acquired for base tables or views. To use
  LOCK TABLES,
  you must have the LOCK TABLES privilege, and the SELECT
  privilege for
  each object to be locked. See GRANT
   
  For view locking, LOCK TABLES adds all base tables used in
  the view to the
  set of tables to be locked and locks them automatically. If
  you lock a table
  explicitly with LOCK TABLES, any tables used in triggers are
  also locked
  implicitly, as described in Triggers and Implicit Locks.
   
  UNLOCK TABLES explicitly releases any table locks held by
  the
  current session.
   
  WAIT/NOWAIT
   
  Set the lock wait timeout. See WAIT and NOWAIT.
   
  Limitations
   
  LOCK TABLES doesn't work when using Galera cluster. You may
  experience crashes or locks when used with Galera.
   
  LOCK TABLES works on XtraDB/InnoDB tables only if the
  innodb_table_locks system variable is set to 1 (the default)
  and autocommit is set to 0 (1 is default). Please note that
  no error message will be returned on LOCK TABLES with
  innodb_table_locks = 0.
   
  LOCK TABLES implicitly commits the active transaction, if
  any. Also, starting a transaction always releases all table
  locks acquired with LOCK TABLES. This means that there is no
  way to have table locks and an active transaction at the
  same time. The only exceptions are the transactions in
  autocommit mode. To preserve the data integrity between
  transactional and non-transactional tables, the GET_LOCK()
  function can be used.
   
  While a connection holds an explicit read lock on a table,
  it cannot modify it. If you try, the following error will be
  produced:
   
  ERROR 1099 (HY000): Table 'tab_name' was locked with a
  READ lock and can't be updated
   
  While a connection holds an explicit lock on a table, it
  cannot access a non-locked table. If you try, the following
  error will be produced:
   
  ERROR 1100 (HY000): Table 'tab_name' was not locked with
  LOCK TABLES
   
  While a connection holds an explicit lock on a table, it
  cannot issue the following: INSERT DELAYED, CREATE TABLE,
  CREATE TABLE ... LIKE, and DDL statements involving stored
  programs and views (except for triggers). If you try, the
  following error will be produced:
   
  ERROR 1192 (HY000): Can't execute the given command because
  you have active locked tables or an active transaction
   
  LOCK TABLES can not be used in stored routines - if you try,
  the following error will be produced on creation:
   
  ERROR 1314 (0A000): LOCK is not allowed in stored procedures
   


  URL: https://mariadb.com/kb/en/library/lock-tables/dzfxuxLOCK TABLESdzfxuxhttps://mariadb.com/kb/en/library/lock-tables/dzfxuxdzfxux8dzfxux100qjzxqqvvbqSyntax
  ------ 
  PURGE { BINARY | MASTER } LOGS
   { TO 'log_name' | BEFORE datetime_expr }
   
  Description
  ----------- 
  The PURGE BINARY LOGS statement deletes all the binary log
  files listed in the log index file prior to the specified
  log file name or
  date. BINARY and MASTER are synonyms.
  Deleted log files also are removed from the list recorded in
  the index file, so
  that the given log file becomes the first in the list.
   
  The datetime expression is in the format 'YYYY-MM-DD
  hh:mm:ss'. 
   
  If a slave is active but has yet to read from a binary log
  file you attempt to delete, the statement will fail with an
  error. However, if the slave is not connected and has yet to
  read from a log file you delete, the file will be deleted,
  but the slave will be unable to continue replicating once it
  connects again.
   
  This statement has no effect if the server was not started
  with the
  --log-bin option to enable binary logging.
   
  To list the binary log files on the server, use SHOW BINARY
  LOGS. To see which files they are reading, use SHOW SLAVE
  STATUS. You can only delete the files that are older than
  the oldest file that is used by the slaves.
   
  To delete all binary log files, use RESET MASTER.
  To move to a new log file (for example if you want to remove
  the current log file), use FLUSH LOGS before you execute
  PURGE LOGS.
   
  If the expire_logs_days server system variable is not set to
  0, the server automatically deletes binary log files after
  the given number of days.
   
  Examples
  -------- 
  PURGE BINARY LOGS TO 'mariadb-bin.000063';
   
  PURGE BINARY LOGS BEFORE '2013-04-21';
   
  PURGE BINARY LOGS BEFORE '2013-04-22 09:55:22';
   


  URL: https://mariadb.com/kb/en/library/purge-binary-logs/dzfxuxPURGE BINARY LOGSdzfxuxhttps://mariadb.com/kb/en/library/purge-binary-logs/dzfxuxdzfxux8dzfxux105qjzxqqvvbqSyntax
  ------ 
  MD5(str)
   
  Description
  ----------- 
  Calculates an MD5 128-bit checksum for the string. 
   
  The return value is a 32-hex digit string, and as of MariaDB
  5.5, is a nonbinary string in the connection character set
  and collation, determined by the values of the
  character_set_connection and collation_connection system
  variables. Before 5.5, the return value was a binary string.
   
  NULL is returned if the argument was NULL. 
   
  Examples
  -------- 
  SELECT MD5('testing');
  +----------------------------------+
  | MD5('testing') |
  +----------------------------------+
  | ae2b1fca515949e5d54fb22b8ed95575 |
  +----------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/md5/dzfxuxMD5dzfxuxhttps://mariadb.com/kb/en/library/md5/dzfxuxdzfxux12dzfxux143qjzxqqvvbqSyntax
  ------ 
  PASSWORD(str)
   
  Description
  ----------- 
  The PASSWORD() function is used for hashing passwords for
  use in authentication by the MariaDB server. It is not
  intended for use in other applications.
   
  Calculates and returns a hashed password string from the
  plaintext password str. Returns an empty string (>= MariaDB
  10.0.4) or NULL (

  URL: https://mariadb.com/kb/en/library/password/dzfxuxPASSWORDdzfxuxhttps://mariadb.com/kb/en/library/password/dzfxuxdzfxux12dzfxux145qjzxqqvvbqA synonym for ST_ENDPOINT.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/linestring-properties-endpoint/dzfxuxENDPOINTdzfxuxhttps://mariadb.com/kb/en/library/linestring-properties-endpoint/dzfxuxdzfxux13dzfxux150qjzxqqvvbqSyntax
  ------ 
  GLength(ls)
   
  Description
  ----------- 
  Returns as a double-precision number the length of the
  LineString value ls in its associated spatial reference.
   
  Examples
  -------- 
  SET @ls = 'LineString(1 1,2 2,3 3)';
   
  SELECT GLength(GeomFromText(@ls));
  +----------------------------+
  | GLength(GeomFromText(@ls)) |
  +----------------------------+
  | 2.82842712474619 |
  +----------------------------+
   


  URL: https://mariadb.com/kb/en/library/glength/dzfxuxGLENGTHdzfxuxhttps://mariadb.com/kb/en/library/glength/dzfxuxdzfxux13dzfxux151qjzxqqvvbqThe ROLLBACK statement rolls back (ends) a transaction,
  destroying any changes to SQL-data so that they never become
  visible to subsequent transactions. The required syntax for
  the ROLLBACK statement is as follows. 
   
  ROLLBACK [ WORK ] [ AND [ NO ] CHAIN ] 
  [ TO [ SAVEPOINT ] { | } ]
   
  The ROLLBACK statement will either end a transaction,
  destroying all data changes that happened during any of the
  transaction, or it will just destroy any data changes that
  happened since you established a savepoint. The basic form
  of the ROLLBACK statement is just the keyword ROLLBACK (the
  keyword WORK is simply noise and can be omitted without
  changing the effect). 
   
  The optional AND CHAIN clause is a convenience for
  initiating a new transaction as soon as the old transaction
  terminates. If AND CHAIN is specified, then there is
  effectively nothing between the old and new transactions,
  although they remain separate. The characteristics of the
  new transaction will be the same as the characteristics of
  the old one — that is, the new transaction will have the
  same access mode, isolation level and diagnostics area size
  (we'll discuss all of these shortly) as the transaction
  just terminated. The AND NO CHAIN option just tells your
  DBMS to end the transaction — that is, these four SQL
  statements are equivalent: 
   
  ROLLBACK;
   
  ROLLBACK WORK;
   
  ROLLBACK AND NO CHAIN;
   
  ROLLBACK WORK AND NO CHAIN;
   
  All of them end a transaction without saving any transaction
  characteristics. The only other options, the equivalent
  statements: 
   
  ROLLBACK AND CHAIN;
   
  ROLLBACK WORK AND CHAIN;
   
  both tell your DBMS to end a transaction, but to save that
  transaction's characteristics for the next transaction. 
   
  ROLLBACK is much simpler than COMMIT: it may involve no more
  than a few deletions (of Cursors, locks, prepared SQL
  statements and log-file entries). It's usually assumed that
  ROLLBACK can't fail, although such a thing is conceivable
  (for example, an encompassing transaction might reject an
  attempt to ROLLBACK because it's lining up for a COMMIT). 
   
  ROLLBACK cancels all effects of a transaction. It does not
  cancel effects on objects outside the DBMS's control (for
  example the values in host program variables or the settings
  made by some SQL/CLI function calls). But in general, it is
  a convenient statement for those situations when you say
  "oops, this isn't working" or when you simply don't care
  whether your temporary work becomes permanent or not.
   
  Here is a moot question. If all you've been doing is
  SELECTs, so that there have been no data changes, should you
  end the transaction with ROLLBACK or COMMIT? It shouldn't
  really matter because both ROLLBACK and COMMIT do the same
  transaction-terminating job. However, the popular conception
  is that ROLLBACK implies failure, so after a successful
  series of SELECT statements the convention is to end the
  transaction with COMMIT rather than ROLLBACK.
   
  MariaDB (and most other DBMSs) supports rollback of SQL-data
  change statements, but not of SQL-Schema statements. This
  means that if you use any of CREATE, ALTER, DROP, GRANT,
  REVOKE, you are implicitly committing at execution time.
   
  INSERT INTO Table_2 VALUES(5); 
  DROP TABLE Table_3 CASCADE;
   
  ROLLBACK;
   
  The result will be that both the INSERT and the DROP will go
  through as separate transactions so the ROLLBACK will have
  no effect. 
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/rollback/dzfxuxROLLBACKdzfxuxhttps://mariadb.com/kb/en/library/rollback/dzfxuxdzfxux8dzfxux101qjzxqqvvbqRESET SLAVE ["connection_name"] [ALL] 
   
  RESET SLAVE makes the slave forget its replication position
  in the
  master's binary log. This statement is meant to be used for
  a clean
  start. It deletes the master.info and relay-log.info files,
  all the
  relay log files, and starts a new relay log file. To use
  RESET SLAVE,
  the slave replication threads must be stopped (use STOP
  SLAVE if
  necessary).
   
  Note: All relay log files are deleted, even if they have not
  been
  completely executed by the slave SQL thread. (This is a
  condition
  likely to exist on a replication slave if you have issued a
  STOP SLAVE
  statement or if the slave is highly loaded.)
   
  Connection information stored in the master.info file is
  immediately
  reset using any values specified in the corresponding
  startup options.
  This information includes values such as master host, master
  port,
  master user, and master password. If the slave SQL thread
  was in the
  middle of replicating temporary tables when it was stopped,
  and RESET
  SLAVE is issued, these replicated temporary tables are
  deleted on the
  slave.
   
  The ALL also resets the PORT, HOST, USER and PASSWORD
  parameters for the slave. If you are using a connection
  name, it will permanently delete it and it will not show up
  anymore in SHOW ALL SLAVES STATUS.
   
  connection_name
   
  The connection_name option was added as part of multi-source
  replication added in MariaDB 10.0
   
  If there is only one nameless master, or the default master
  (as specified by the default_master_connection system
  variable) is intended, connection_name can be omitted. If
  provided, the RESET SLAVE statement will apply to the
  specified master. connection_name is case-insensitive.
   


  URL:
  https://mariadb.com/kb/en/library/reset-slave-connection_name/dzfxuxRESET SLAVEdzfxuxhttps://mariadb.com/kb/en/library/reset-slave-connection_name/dzfxuxdzfxux8dzfxux107qjzxqqvvbqA synonym for ST_NumPoints.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/linestring-properties-numpoints/dzfxuxNumPointsdzfxuxhttps://mariadb.com/kb/en/library/linestring-properties-numpoints/dzfxuxdzfxux13dzfxux152qjzxqqvvbqA synonym for ST_PointN.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/linestring-properties-pointn/dzfxuxPointNdzfxuxhttps://mariadb.com/kb/en/library/linestring-properties-pointn/dzfxuxdzfxux13dzfxux153qjzxqqvvbqA synonym for ST_STARTPOINT.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/linestring-properties-startpoint/dzfxuxSTARTPOINTdzfxuxhttps://mariadb.com/kb/en/library/linestring-properties-startpoint/dzfxuxdzfxux13dzfxux154qjzxqqvvbqSyntax
  ------ 
  ST_EndPoint(ls)
  EndPoint(ls)
   
  Description
  ----------- 
  Returns the Point that is the endpoint of the
  LineString value ls.
   
  ST_EndPoint() and EndPoint() are synonyms.
   
  Examples
  -------- 
  SET @ls = 'LineString(1 1,2 2,3 3)';
   
  SELECT AsText(EndPoint(GeomFromText(@ls)));
  +-------------------------------------+
  | AsText(EndPoint(GeomFromText(@ls))) |
  +-------------------------------------+
  | POINT(3 3) |
  +-------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_endpoint/dzfxuxST_ENDPOINTdzfxuxhttps://mariadb.com/kb/en/library/st_endpoint/dzfxuxdzfxux13dzfxux155qjzxqqvvbqSyntax
  ------ 
  ST_NumPoints(ls)
  NumPoints(ls)
   
  Description
  ----------- 
  Returns the number of Point objects in the LineString
  value ls.
   
  ST_NumPoints() and NumPoints() are synonyms.
   
  Examples
  -------- 
  SET @ls = 'LineString(1 1,2 2,3 3)';
   
  SELECT NumPoints(GeomFromText(@ls));
  +------------------------------+
  | NumPoints(GeomFromText(@ls)) |
  +------------------------------+
  | 3 |
  +------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_numpoints/dzfxuxST_NUMPOINTSdzfxuxhttps://mariadb.com/kb/en/library/st_numpoints/dzfxuxdzfxux13dzfxux156qjzxqqvvbqSyntax
  ------ 
  ST_PointN(ls,N)
  PointN(ls,N)
   
  Description
  ----------- 
  Returns the N-th Point in the LineString value ls.
  Points are numbered beginning with 1.
   
  ST_PointN() and PointN() are synonyms.
   
  Examples
  -------- 
  SET @ls = 'LineString(1 1,2 2,3 3)';
   
  SELECT AsText(PointN(GeomFromText(@ls),2));
  +-------------------------------------+
  | AsText(PointN(GeomFromText(@ls),2)) |
  +-------------------------------------+
  | POINT(2 2) |
  +-------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_pointn/dzfxuxST_POINTNdzfxuxhttps://mariadb.com/kb/en/library/st_pointn/dzfxuxdzfxux13dzfxux157qjzxqqvvbqSyntax
  ------ 
  PREPARE stmt_name FROM preparable_stmt
   
  Description
  ----------- 
  The PREPARE statement prepares a statement and assigns it a
  name,
  stmt_name, by which to refer to the statement later.
  Statement names
  are not case sensitive. preparable_stmt is either a string
  literal or a user variable (not a local variable, an SQL
  expression or a subquery) that contains the text of the
  statement. The text must 
  represent a single SQL statement, not multiple statements.
  Within the
  statement, "?" characters can be used as parameter markers
  to indicate
  where data values are to be bound to the query later when
  you execute
  it. The "?" characters should not be enclosed within
  quotes, even if
  you intend to bind them to string values. Parameter markers
  can be used
  only where data values should appear, not for SQL keywords,
  identifiers, and so forth.
   
  The scope of a prepared statement is the session within
  which it is
  created. Other sessions cannot see it.
   
  If a prepared statement with the given name already exists,
  it is
  deallocated implicitly before the new statement is prepared.
  This means
  that if the new statement contains an error and cannot be
  prepared, an
  error is returned and no statement with the given name
  exists.
   
  Prepared statements can be PREPAREd and EXECUTEd in a stored
  procedure, but not in a stored function or trigger. Also,
  even if the statement is PREPAREd in a procedure, it will
  not be deallocated when the procedure execution ends.
   
  A prepared statement can access user-defined variables, but
  not local variables or procedure's parameters.
   
  If the prepared statement contains a syntax error, PREPARE
  will fail. As a side effect, stored procedures can use it to
  check if a statement is valid. For example:
   
  CREATE PROCEDURE `test_stmt`(IN sql_text TEXT)
  BEGIN
   DECLARE EXIT HANDLER FOR SQLEXCEPTION
   BEGIN
   SELECT CONCAT(sql_text, ' is not valid');
   END;
   SET @SQL := sql_text;
   PREPARE stmt FROM @SQL;
   DEALLOCATE PREPARE stmt;
  END;
   
  The FOUND_ROWS() and ROW_COUNT() functions, if called
  immediatly after EXECUTE, return the number of rows read or
  affected by the prepared statements; however, if they are
  called after DEALLOCATE PREPARE, they provide information
  about this statement. If the prepared statement produces
  errors or warnings, GET DIAGNOSTICS return information about
  them. DEALLOCATE PREPARE shouldn't clear the diagnostics
  area, unless it produces an error.
   
  A prepared statement is executed with EXECUTE and released 
  with DEALLOCATE PREPARE.
   
  The max_prepared_stmt_count server system variable
  determines the number of allowed prepared statements that
  can be prepared on the server. If it is set to 0, prepared
  statements are not allowed. If the limit is reached, an
  error similar to the following will be produced:
   
  ERROR 1461 (42000): Can't create more than
  max_prepared_stmt_count statements 
   (current value: 0)
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, PREPARE stmt FROM 'SELECT
  :1, :2' is used, instead of ?.
   
  Permitted Statements
   
  Not all statements can be prepared. Only the following SQL
  commands are permitted:
  ALTER TABLE
  ANALYZE TABLE
  BINLOG
  CACHE INDEX
  CALL
  CHANGE MASTER
  CHECKSUM {TABLE | TABLES}
  COMMIT
  {CREATE | DROP} DATABASE
  {CREATE | DROP} INDEX
  {CREATE | RENAME | DROP} TABLE
  {CREATE | RENAME | DROP} USER
  {CREATE | DROP} VIEW
  DELETE
  DESCRIBE
  DO
  EXPLAIN
  FLUSH {TABLE | TABLES | TABLES WITH READ LOCK | HOSTS |
  PRIVILEGES | LOGS | STATUS | 
   MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES | QUERY
  CACHE | TABLE_STATISTICS | 
   INDEX_STATISTICS | USER_STATISTICS | CLIENT_STATISTICS}
  GRANT
  INSERT
  INSTALL {PLUGIN | SONAME}
  HANDLER READ
  KILL
  LOAD INDEX INTO CACHE
  OPTIMIZE TABLE
  REPAIR TABLE
  REPLACE
  RESET {MASTER | SLAVE | QUERY CACHE}
  REVOKE
  ROLLBACK
  SELECT
  SET
  SET GLOBAL SQL_SLAVE_SKIP_COUNTER
  SET ROLE
  SET SQL_LOG_BIN
  SET TRANSACTION ISOLATION LEVEL
  SHOW EXPLAIN
  SHOW {DATABASES | TABLES | OPEN TABLES | TABLE STATUS |
  COLUMNS | INDEX | TRIGGERS | 
   EVENTS | GRANTS | CHARACTER SET | COLLATION | ENGINES |
  PLUGINS [SONAME] | PRIVILEGES | 
   PROCESSLIST | PROFILE | PROFILES | VARIABLES | STATUS |
  WARNINGS | ERRORS | 
   TABLE_STATISTICS | INDEX_STATISTICS | USER_STATISTICS |
  CLIENT_STATISTICS | AUTHORS | 
   CONTRIBUTORS}
  SHOW CREATE {DATABASE | TABLE | VIEW | PROCEDURE | FUNCTION
  | TRIGGER | EVENT}
  SHOW {FUNCTION | PROCEDURE} CODE
  SHOW BINLOG EVENTS
  SHOW SLAVE HOSTS
  SHOW {MASTER | BINARY} LOGS
  SHOW {MASTER | SLAVE | TABLES | INNODB | FUNCTION |
  PROCEDURE} STATUS
  SLAVE {START | STOP}
  TRUNCATE TABLE
  SHUTDOWN
  UNINSTALL {PLUGIN | SONAME}
  UPDATE
   
  Synonyms are not listed here, but can be used. For example,
  DESC can be used instead of DESCRIBE.
   
  Compound statements can be prepared too.
   
  Note that if a statement can be run in a stored routine, it
  will work even if it is called by a prepared statement. For
  example, SIGNAL can't be directly prepared. However, it is
  allowed in stored routines. If the x() procedure contains
  SIGNAL, you can still prepare and execute the 'CALL x();'
  prepared statement.
   
  PREPARE now supports most kinds of expressions as well, for
  example:
   
  PREPARE stmt FROM CONCAT('SELECT * FROM ', table_name);
   
  When PREPARE is used with a statement which is not
  supported, the following error is produced:
   
  ERROR 1295 (HY000): This command is not supported in the
  prepared statement protocol yet
   
  Example
   
  create table t1 (a int,b char(10));
  insert into t1 values (1,"one"),(2,
  "two"),(3,"three");
  prepare test from "select * from t1 where a=?";
  set @param=2;
  execute test using @param;
  +------+------+
  | a | b |
  +------+------+
  | 2 | two |
  +------+------+
  set @param=3;
  execute test using @param;
  +------+-------+
  | a | b |
  +------+-------+
  | 3 | three |
  +------+-------+
  deallocate prepare test;
   
  Since identifiers are not permitted as prepared statements
  parameters, sometimes it is necessary to dynamically compose
  an SQL statement. This technique is called dynamic SQL). The
  following example shows how to use dynamic SQL:
   
  CREATE PROCEDURE test.stmt_test(IN tab_name VARCHAR(64))
  BEGIN
   SET @sql = CONCAT('SELECT COUNT(*) FROM ', tab_name);
   PREPARE stmt FROM @sql;
   EXECUTE stmt;
   DEALLOCATE PREPARE stmt;
  END;
   
  CALL test.stmt_test('mysql.user');
  +----------+
  | COUNT(*) |
  +----------+
  | 4 |
  +----------+
   
  Use of variables in prepared statements:
   
  PREPARE stmt FROM 'SELECT @x;';
   
  SET @x = 1;
   
  EXECUTE stmt;
  +------+
  | @x |
  +------+
  | 1 |
  +------+
   
  SET @x = 0;
   
  EXECUTE stmt;
  +------+
  | @x |
  +------+
  | 0 |
  +------+
   
  DEALLOCATE PREPARE stmt;
   


  URL: https://mariadb.com/kb/en/library/prepare-statement/dzfxuxPREPARE Statementdzfxuxhttps://mariadb.com/kb/en/library/prepare-statement/dzfxuxdzfxux8dzfxux104qjzxqqvvbqSyntax
  ------ 
  INET_ATON(expr)
   
  Description
  ----------- 
  Given the dotted-quad representation of an IPv4 network
  address as a string,
  returns an integer that represents the numeric value of the
  address.
  Addresses may be 4- or 8-byte addresses.
   
  Returns NULL if the argument is not understood.
   
  Examples
  -------- 
  SELECT INET_ATON('192.168.1.1');
  +--------------------------+
  | INET_ATON('192.168.1.1') |
  +--------------------------+
  | 3232235777 |
  +--------------------------+
   
  This is calculated as follows: 192 x 2563 + 168 x 256 2 + 1
  x 256 + 1
   


  URL: https://mariadb.com/kb/en/library/inet_aton/dzfxuxINET_ATONdzfxuxhttps://mariadb.com/kb/en/library/inet_aton/dzfxuxdzfxux14dzfxux161qjzxqqvvbqSyntax
  ------ 
  INET_NTOA(expr)
   
  Description
  ----------- 
  Given a numeric IPv4 network address in network byte order
  (4 or 8 byte),
  returns the dotted-quad representation of the address as a
  string.
   
  Examples
  -------- 
  SELECT INET_NTOA(3232235777);
  +-----------------------+
  | INET_NTOA(3232235777) |
  +-----------------------+
  | 192.168.1.1 |
  +-----------------------+
   
  192.168.1.1 corresponds to 3232235777 since 192 x 2563 + 168
  x 256 2 + 1 x 256 + 1 = 3232235777
   


  URL: https://mariadb.com/kb/en/library/inet_ntoa/dzfxuxINET_NTOAdzfxuxhttps://mariadb.com/kb/en/library/inet_ntoa/dzfxuxdzfxux14dzfxux162qjzxqqvvbqSyntax
  ------ 
  SET [GLOBAL | SESSION] TRANSACTION
   transaction_property [, transaction_property] ...
   
  transaction_property:
   ISOLATION LEVEL level
   | READ WRITE
   | READ ONLY
   
  level:
   REPEATABLE READ
   | READ COMMITTED
   | READ UNCOMMITTED
   | SERIALIZABLE
   
  Description
  ----------- 
  This statement sets the transaction isolation level or the
  transaction access mode globally, for the current session,
  or for the next transaction:
  With the GLOBAL keyword, the statement sets the default
   transaction level globally for all subsequent sessions.
  Existing sessions are
   unaffected.
  With the SESSION keyword, the statement sets the default
   transaction level for all subsequent transactions performed
  within the
   current session.
  Without any SESSION or GLOBAL keyword,
   the statement sets the isolation level for the next (not
  started) transaction
   performed within the current session.
   
  A change to the global default isolation level requires the 
  SUPER privilege. Any session is free to change its
  session isolation level (even in the middle of a
  transaction), or the isolation
  level for its next transaction.
   
  Isolation Level
   
  To set the global default isolation level at server startup,
  use the
  --transaction-isolation=level option on the command line or
  in an option file. Values of level for this option use
  dashes
  rather than spaces, so the allowable values are
  READ-UNCOMMITTED,
  READ-COMMITTED, REPEATABLE-READ, or
  SERIALIZABLE. For example, to set the default isolation
  level to REPEATABLE READ, use these lines in the [mysqld]
  section of an option file:
   
  [mysqld]
  transaction-isolation = REPEATABLE-READ
  To determine the global and session transaction isolation
  levels at
  runtime, check the value of the tx_isolation system
  variable:
   
  SELECT @@GLOBAL.tx_isolation, @@tx_isolation;
   
  InnoDB supports each of the translation isolation levels
  described here
  using different locking strategies. The default level is 
  REPEATABLE READ. For additional information about InnoDB
  record-level locks and how it uses them to execute various
  types of statements,
  see XtraDB/InnoDB Lock Modes,
  and
  http://dev.mysql.com/doc/refman/en/innodb-locks-set.html.
   
  Isolation Levels
   
  The following sections describe how MariaDB supports the
  different transaction levels.
   
  READ UNCOMMITTED
   
  SELECT statements are performed in a non-locking fashion,
  but a possible earlier version of a row might be used. Thus,
  using this
  isolation level, such reads are not consistent. This is also
  called a "dirty
  read." Otherwise, this isolation level works like 
  READ COMMITTED.
   
  READ COMMITTED
   
  A somewhat Oracle-like isolation level with respect to
  consistent
  (non-locking) reads: Each consistent read, even within the
  same
  transaction, sets and reads its own fresh snapshot. See
  http://dev.mysql.com/doc/refman/en/innodb-consistent-read.html.
   
  For locking reads (SELECT with FOR UPDATE
  or LOCK IN SHARE MODE), InnoDB locks only index records, not
  the gaps before them, and thus allows the free insertion of
  new records next to
  locked records. For UPDATE and DELETE
  statements, locking depends on whether the statement uses a
  unique index with a
  unique search condition (such as WHERE id = 100), or a
  range-type search condition (such as WHERE id > 100). For a
  unique index with a unique search condition, InnoDB locks
  only the index record
  found, not the gap before it. For range-type searches,
  InnoDB locks the index
  range scanned, using gap locks or next-key (gap plus
  index-record) locks to
  block insertions by other sessions into the gaps covered by
  the range. This is
  necessary because "phantom rows" must be blocked for MySQL
  replication and
  recovery to work.
   
  Note: Since MariaDB 5.1, if the READ COMMITTED isolation
  level is used or the innodb_locks_unsafe_for_binlog system
  variable is enabled,
  there is no InnoDB gap locking except for foreign-key
  constraint checking and
  duplicate-key checking. Also, record locks for non-matching
  rows are released
  after MariaDB has evaluated the WHERE condition. As of
  MariaDB/MySQL
  5.1, if you use READ COMMITTED or enable
  innodb_locks_unsafe_for_binlog, you must use row-based
  binary logging.
   
  REPEATABLE READ
   
  This is the default isolation level for InnoDB. For
  consistent reads,
  there is an important difference from the READ COMMITTED
  isolation level: All consistent reads within the same
  transaction read the
  snapshot established by the first read. This convention
  means that if you issue
  several plain (non-locking) SELECT statements within the
  same transaction, these SELECT statements are consistent
  also with respect to each other. See
  http://dev.mysql.com/doc/refman/en/innodb-consistent-read.html.
   
  For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE
  MODE),
  UPDATE, and DELETE statements, locking depends on whether
  the
  statement uses a unique index with a unique search
  condition, or a
  range-type search condition. For a unique index with a
  unique search
  condition, InnoDB locks only the index record found, not the
  gap
  before it. For other search conditions, InnoDB locks the
  index range
  scanned, using gap locks or next-key (gap plus index-record)
  locks to
  block insertions by other sessions into the gaps covered by
  the range.
   
  This is the minimum isolation level for non-distributed XA
  transactions.
   
  SERIALIZABLE
   
  This level is like REPEATABLE READ, but InnoDB implicitly
  converts all
  plain SELECT statements to SELECT ... LOCK IN SHARE MODE if
  autocommit
  is disabled. If autocommit is enabled, the SELECT is its own
  transaction. It therefore is known to be read only and can
  be
  serialized if performed as a consistent (non-locking) read
  and need
  not block for other transactions. (This means that to force
  a plain
  SELECT to block if other transactions have modified the
  selected rows,
  you should disable autocommit.)
   
  Distributed XA transactions should always use this isolation
  level.
   
  Access Mode
   
  These clauses appeared in MariaDB 10.0.
   
  The access mode specifies whether the transaction is allowed
  to write data or not. By default, transactions are in READ
  WRITE mode (see the tx_read_only system variable). READ ONLY
  mode allows the storage engine to apply optimizations that
  cannot be used for transactions which write data. The only
  exception to this rule is that read only transactions can
  perform DDL statements on temporary tables.
   
  It is not permitted to specify both READ WRITE and READ ONLY
  in the same statement.
   
  READ WRITE and READ ONLY can also be specified in the START
  TRANSACTION statement, in which case the specified mode is
  only valid for one transaction.
   
  Examples
  -------- 
  SET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;
   
  Attempting to set the isolation level within an existing
  transaction without specifying GLOBAL or SESSION.
   
  START TRANSACTION;
   
  SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
  ERROR 1568 (25001): Transaction characteristics can't be
  changed while a transaction is in progress
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/set-transaction/dzfxuxSET TRANSACTIONdzfxuxhttps://mariadb.com/kb/en/library/set-transaction/dzfxuxdzfxux8dzfxux108qjzxqqvvbqSyntax
  ------ 
  IS_FREE_LOCK(str)
   
  Description
  ----------- 
  Checks whether the lock named str is free to use (that is,
  not locked).
  Returns 1 if the lock is free (no one is using the lock),
   0 if the lock is in use, and NULL if an
  error occurs (such as an incorrect argument, like an empty
  string or NULL). str is case insensitive.
   
  If the metadata_lock_info plugin is installed, the
  Information Schema metadata_lock_info table contains
  information about locks of this kind (as well as metadata
  locks).
   
  Statements using the IS_FREE_LOCK() function are not safe
  for replication.
   


  URL: https://mariadb.com/kb/en/library/is_free_lock/dzfxuxIS_FREE_LOCKdzfxuxhttps://mariadb.com/kb/en/library/is_free_lock/dzfxuxdzfxux14dzfxux163qjzxqqvvbqSyntax
  ------ 
  START SLAVE ["connection_name"] [thread_type [,
  thread_type] ... ]
  START SLAVE ["connection_name"] [SQL_THREAD] UNTIL 
   MASTER_LOG_FILE = 'log_name', MASTER_LOG_POS = log_pos
  START SLAVE ["connection_name"] [SQL_THREAD] UNTIL
   RELAY_LOG_FILE = 'log_name', RELAY_LOG_POS = log_pos
  START SLAVE ["connection_name"] [SQL_THREAD] UNTIL
   MASTER_GTID_POS = 
  START ALL SLAVES [thread_type [, thread_type]]
  thread_type: IO_THREAD | SQL_THREAD
   
  Description
  ----------- 
  START SLAVE with no thread_type options starts both of the
  slave
  threads (see replication). The I/O thread reads events from
  the master server and stores
  them in the relay log. The SQL thread reads events from the
  relay log
  and executes them. START SLAVE requires the SUPER privilege.
   
  If START SLAVE succeeds in starting the slave threads, it
  returns
  without any error. However, even in that case, it might be
  that the
  slave threads start and then later stop (for example,
  because they do
  not manage to connect to the master or read its binary log,
  or some
  other problem). START SLAVE does not warn you about this.
  You must
  check the slave's error log for error messages generated by
  the slave
  threads, or check that they are running satisfactorily with
  SHOW SLAVE
  STATUS.
   
  START SLAVE UNTIL
   
  START SLAVE UNTIL refers to the SQL_THREAD slave position at
  which the SQL_THREAD replication will halt. If SQL_THREAD
  isn't specified both threads are started.
   
  Since version 10.0.2, START SLAVE UNTIL master_gtid_pos=xxx
  has also been supported. See Global Transaction ID/START
  SLAVE UNTIL master_gtid_pos=xxx for more details.
   
  connection_name
   
  The connection_name option was added as part of multi-source
  replication added in MariaDB 10.0
   
  If there is only one nameless master, or the default master
  (as specified by the default_master_connection system
  variable) is intended, connection_name can be omitted. If
  provided, the START SLAVE statement will apply to the
  specified master. connection_name is case-insensitive.
   
  START ALL SLAVES
   
  START ALL SLAVES starts all configured slaves (slaves with
  master_host not empty) that were not started before. It will
  give a note for all started connections. You can check the
  notes with SHOW WARNINGS.
   


  URL: https://mariadb.com/kb/en/library/start-slave/dzfxuxSTART SLAVEdzfxuxhttps://mariadb.com/kb/en/library/start-slave/dzfxuxdzfxux8dzfxux109qjzxqqvvbqSyntax
  ------ 
  START TRANSACTION [transaction_property [,
  transaction_property] ...] | BEGIN [WORK]
  COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
  ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
  SET autocommit = {0 | 1}
   
  transaction_property:
   WITH CONSISTENT SNAPSHOT
   | READ WRITE
   | READ ONLY
   
  Description
  ----------- 
  The START TRANSACTION or BEGIN statement
  begins a new transaction. COMMIT commits the current
  transaction, making its changes permanent. ROLLBACK rolls
  back the current transaction, canceling its changes. The SET
  autocommit statement disables or enables the default
  autocommit mode for the current session.
   
  START TRANSACTION and SET autocommit = 1 implicitly commit
  the current transaction, if any.
   
  The optional WORK keyword is supported for
  COMMIT and ROLLBACK, as are the
  CHAIN and RELEASE clauses.
  CHAIN and RELEASE can be used for
  additional control over transaction completion. The value of
  the
  completion_type system variable determines the default
  completion behavior.
   
  The AND CHAIN clause causes a new transaction to begin as
  soon as the current one ends, and the new transaction has
  the same isolation
  level as the just-terminated transaction. The RELEASE clause
  causes the server to disconnect the current client session
  after terminating
  the current transaction. Including the NO keyword suppresses
  CHAIN or RELEASE completion, which can be
  useful if the completion_type system variable is set to
  cause chaining or release completion by default.
   
  Access Mode
   
  These clauses appeared in MariaDB 10.0.
   
  The access mode specifies whether the transaction is allowed
  to write data or not. By default, transactions are in READ
  WRITE mode (see the tx_read_only system variable). READ ONLY
  mode allows the storage engine to apply optimizations that
  cannot be used for transactions which write data. The only
  exception to this rule is that read only transactions can
  perform DDL statements on temporary tables.
   
  It is not permitted to specify both READ WRITE and READ ONLY
  in the same statement.
   
  READ WRITE and READ ONLY can also be specified in the SET
  TRANSACTION statement, in which case the specified mode is
  valid for all sessions, or for all subsequent transaction
  used by the current session.
   
  autocommit
   
  By default, MariaDB runs with autocommit mode enabled. This
  means that as soon as you execute a statement that updates
  (modifies) a table, MariaDB stores the update on disk to
  make it permanent. To disable autocommit mode, use the
  following statement:
   
  SET autocommit=0;
   
  After disabling autocommit mode by setting the autocommit
  variable to zero, changes to transaction-safe tables (such
  as those for InnoDB or
  NDBCLUSTER) are not made permanent immediately. You must use
  COMMIT to store your changes to disk or ROLLBACK to ignore
  the changes.
   
  To disable autocommit mode for a single series of
  statements, use the START TRANSACTION statement.
   
  DDL Statements
   
  DDL statements (CREATE, ALTER, DROP) and administrative
  statements (FLUSH, RESET, OPTIMIZE, ANALYZE, CHECK, REPAIR,
  CACHE INDEX), and LOAD DATA INFILE, cause an implicit COMMIT
  and start a new transaction. An exception to this rule are
  the DDL that operate on temporary tables: you can CREATE,
  ALTER and DROP them without causing any COMMIT, but those
  actions cannot be rolled back. This means that if you call
  ROLLBACK, the temporary tables you created in the
  transaction will remain, while the rest of the transaction
  will be rolled back.
   
  Transactions cannot be used in Stored Functions or Triggers.
  In Stored Procedures and Events BEGIN is not allowed, so you
  should use START TRANSACTION instead.
   
  A transaction acquires a metadata lock on every table it
  accesses to prevent other connections from altering their
  structure. The lock is released at the end of the
  transaction. This happens even with non-transactional
  storage engines (like MEMORY or CONNECT), so it makes sense
  to use transactions with non-transactional tables.
   
  in_transaction
   
  The in_transaction system variable appeared in MariaDB 5.3.
   
  It is a session-only, read-only variable that returns 1
  inside a transaction, and 0 if not in a transaction.
   
  WITH CONSISTENT SNAPSHOT
   
  The WITH CONSISTENT SNAPSHOT option starts a consistent read
  for storage engines such as XtraDB and InnoDB that can do
  so, the same as if a START TRANSACTION followed by a SELECT
  from any InnoDB table was issued. 
   
  MariaDB 5.3 introduced enhancements to this feature. See
  Enhancements for START TRANSACTION WITH CONSISTENT SNAPSHOT.
   
  Examples
  -------- 
  START TRANSACTION;
   
  SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
   
  UPDATE table2 SET summary=@A WHERE type=1;
   
  COMMIT;
   


  URL: https://mariadb.com/kb/en/library/start-transaction/dzfxuxSTART TRANSACTIONdzfxuxhttps://mariadb.com/kb/en/library/start-transaction/dzfxuxdzfxux8dzfxux110qjzxqqvvbqIS_IPV6() has been available since MariaDB 10.0.12.
   
  Syntax
  ------ 
  IS_IPV6(expr)
   
  Description
  ----------- 
  Returns 1 if the expression is a valid IPv6 address
  specified as a string, otherwise returns 0. Does not
  consider IPv4 addresses to be valid IPv6 addresses.
   
  Examples
  -------- 
   SELECT IS_IPV6('48f3::d432:1431:ba23:846f');
  +--------------------------------------+
  | IS_IPV6('48f3::d432:1431:ba23:846f') |
  +--------------------------------------+
  | 1 |
  +--------------------------------------+
  1 row in set (0.02 sec)
   
  SELECT IS_IPV6('10.0.1.1');
  +---------------------+
  | IS_IPV6('10.0.1.1') |
  +---------------------+
  | 0 |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/is_ipv6/dzfxuxIS_IPV6dzfxuxhttps://mariadb.com/kb/en/library/is_ipv6/dzfxuxdzfxux14dzfxux167qjzxqqvvbqSyntax
  ------ 
  STOP SLAVE ["connection_name"] [thread_type [,
  thread_type] ... ]
   
  STOP ALL SLAVES [thread_type [, thread_type]]
   
  thread_type: IO_THREAD | SQL_THREAD
   
  Description
  ----------- 
  Stops the slave threads. STOP SLAVE requires the SUPER
  privilege.
   
  Like START SLAVE, this statement may be used with the
  IO_THREAD and
  SQL_THREAD options to name the thread or threads to be
  stopped. In almost all cases, one never need to use the
  thread_type options.
   
  STOP SLAVE waits until any current replication event group
  affecting
  one or more non-transactional tables has finished executing
  (if there
  is any such replication group), or until the user issues a
  KILL QUERY or KILL CONNECTION statement.
   
  Note that STOP SLAVE doesn't delete the connection
  permanently. Next time you execute START SLAVE or the
  MariaDB server restarts, the slave connection is restored
  with it's original arguments. If you want to delete a
  connection, you should execute RESET SLAVE.
   
  STOP ALL SLAVES
   
  STOP ALL SLAVES stops all your running slaves. It will give
  you a note for every stopped connection. You can check the
  notes with SHOW WARNINGS.
   
  connection_name
   
  The connection_name option was added as part of multi-source
  replication added in MariaDB 10.0
   
  If there is only one nameless master, or the default master
  (as specified by the default_master_connection system
  variable) is intended, connection_name can be omitted. If
  provided, the STOP SLAVE statement will apply to the
  specified master. connection_name is case-insensitive.
   


  URL: https://mariadb.com/kb/en/library/stop-slave/dzfxuxSTOP SLAVEdzfxuxhttps://mariadb.com/kb/en/library/stop-slave/dzfxuxdzfxux8dzfxux111qjzxqqvvbqMariaDB has always had the wait_timeout and
  interactive_timeout settings, which close connections after
  a certain period of inactivity.
   
  However, these are by default set to a long wait period. In
  situations where transactions may be started, but not
  committed or rolled back, more granular control and a
  shorter timeout may be desirable so as to avoid locks being
  held for too long.
   
  MariaDB 10.3 introduced three new variables to handle this
  situation.
  idle_transaction_timeout (all transactions)
  idle_write_transaction_timeout (write transactions - called
  idle_readwrite_transaction_timeout until MariaDB 10.3.2)
  idle_readonly_transaction_timeout (read transactions)
   
  These accept a time in seconds to time out, by closing the
  connection, transactions that are idle for longer than this
  period. By default all are set to zero, or no timeout.
   
  idle_transaction_timeout affects all transactions,
  idle_write_transaction_timeout affects write transactions
  only and idle_readonly_transaction_timeout affects read
  transactions only. The latter two variables work
  independently. However, if either is set along with
  idle_transaction_timeout, the settings for
  idle_write_transaction_timeout or
  idle_readonly_transaction_timeout will take precedence.
   
  Examples
  -------- 
  SET SESSION idle_transaction_timeout=2;
   
  BEGIN;
   
  SELECT * FROM t;
   
  Empty set (0.000 sec)
  ## wait 3 seconds
  SELECT * FROM t;
   
  ERROR 2006 (HY000): MySQL server has gone away
   
  SET SESSION idle_write_transaction_timeout=2;
   
  BEGIN;
   
  SELECT * FROM t;
   
  Empty set (0.000 sec)
  ## wait 3 seconds
  SELECT * FROM t;
   
  Empty set (0.000 sec)
  INSERT INTO t VALUES(1);
  ## wait 3 seconds
  SELECT * FROM t;
   
  ERROR 2006 (HY000): MySQL server has gone away
   
  SET SESSION idle_transaction_timeout=2, SESSION
  idle_readonly_transaction_timeout=10;
   
  BEGIN;
   
  SELECT * FROM t;
   
  Empty set (0.000 sec)
   ## wait 3 seconds
  SELECT * FROM t;
   
  Empty set (0.000 sec)
  ## wait 11 seconds
  SELECT * FROM t;
   
  ERROR 2006 (HY000): MySQL server has gone away
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/transaction-timeouts/dzfxuxTransaction Timeoutsdzfxuxhttps://mariadb.com/kb/en/library/transaction-timeouts/dzfxuxdzfxux8dzfxux112qjzxqqvvbqMariaDB 10.3.0 introduced extended syntax so that it is
  possible to set innodb_lock_wait_timeout and
  lock_wait_timeout for the following statements:
   
  Syntax
  ------ 
  ALTER TABLE tbl_name [WAIT n|NOWAIT] ...
  CREATE ... INDEX ON tbl_name (index_col_name, ...) [WAIT
  n|NOWAIT] ...
  DROP INDEX ... [WAIT n|NOWAIT]
  DROP TABLE tbl_name [WAIT n|NOWAIT] ...
  LOCK TABLE ... [WAIT n|NOWAIT]
  OPTIMIZE TABLE tbl_name [WAIT n|NOWAIT]
  RENAME TABLE tbl_name [WAIT n|NOWAIT] ...
  SELECT ... FOR UPDATE [WAIT n|NOWAIT]
  SELECT ... LOCK IN SHARE MODE [WAIT n|NOWAIT]
  TRUNCATE TABLE tbl_name [WAIT n|NOWAIT]
   
  Description
  ----------- 
  The lock wait timeout can be explicitly set in the statement
  by using either WAIT n (to set the wait in seconds) or
  NOWAIT, in which case the statement will immediately fail if
  the lock cannot be obtained. WAIT 0 is equivalent to NOWAIT.
   


  URL: https://mariadb.com/kb/en/library/wait-and-nowait/dzfxuxWAIT and NOWAITdzfxuxhttps://mariadb.com/kb/en/library/wait-and-nowait/dzfxuxdzfxux8dzfxux114qjzxqqvvbqAccount locking was introduced in MariaDB 10.4.2.
   
  Description
  ----------- 
  Account locking permits privileged administrators to
  lock/unlock user accounts. No new client connections will be
  permitted if an account is locked (existing connections are
  not affected).
   
  User accounts can be locked at creation, with the CREATE
  USER statement, or modified after creation with the ALTER
  USER statement. For example:
   
  CREATE USER 'lorin'@'localhost' ACCOUNT LOCK;
   
  or
   
  ALTER USER 'marijn'@'localhost' ACCOUNT LOCK;
   
  The server will return an ER_ACCOUNT_HAS_BEEN_LOCKED error
  when locked users attempt to connect:
   
  mysql -ulorin
   ERROR 4151 (HY000): Access denied, this account is locked
   
  The ALTER USER statement is also used to unlock a user:
   
  ALTER USER 'lorin'@'localhost' ACCOUNT UNLOCK;
   
  The SHOW CREATE USER statement will show whether the account
  is locked:
   
  SHOW CREATE USER 'marijn'@'localhost';
   
  +-----------------------------------------------+
  | CREATE USER for marijn@localhost |
  +-----------------------------------------------+
  | CREATE USER 'marijn'@'localhost' ACCOUNT LOCK |
  +-----------------------------------------------+
   
  as well as querying the mysql.global_priv table:
   
  SELECT CONCAT(user, '@', host, ' => ',
  JSON_DETAILED(priv)) FROM mysql.global_priv 
   WHERE user='marijn';
  +--------------------------------------------------------------------------------------+
  | CONCAT(user, '@', host, ' => ', JSON_DETAILED(priv)) |
  +--------------------------------------------------------------------------------------+
  | marijn@localhost => {
   "access": 0,
   "plugin": "mysql_native_password",
   "authentication_string": "",
   "account_locked": true,
   "password_last_changed": 1558017158
  } |
  +--------------------------------------------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/account-locking/dzfxuxAccount Lockingdzfxuxhttps://mariadb.com/kb/en/library/account-locking/dzfxuxdzfxux10dzfxux116qjzxqqvvbqSyntax
  ------ 
  IS_USED_LOCK(str)
   
  Description
  ----------- 
  Checks whether the lock named str is in use (that is,
  locked). If so,
  it returns the connection identifier of the client that
  holds the
  lock. Otherwise, it returns NULL. str is case insensitive.
   
  If the metadata_lock_info plugin is installed, the
  Information Schema metadata_lock_info table contains
  information about locks of this kind (as well as metadata
  locks).
   
  Statements using the IS_USED_LOCK() function are not safe
  for replication.
   


  URL: https://mariadb.com/kb/en/library/is_used_lock/dzfxuxIS_USED_LOCKdzfxuxhttps://mariadb.com/kb/en/library/is_used_lock/dzfxuxdzfxux14dzfxux168qjzxqqvvbqSyntax
  ------ 
  DROP USER [IF EXISTS] user_name [, user_name] ...
   
  Description
  ----------- 
  The DROP USER statement removes one or more MariaDB
  accounts. It removes
  privilege rows for the account from all grant tables. To use
  this statement,
  you must have the global CREATE USER privilege
  or the DELETE privilege for the mysql database.
  Each account is named using the same format as for the
  CREATE USER
  statement; for example, 'jeffrey'@'localhost'. If you
  specify
  only the user name part of the account name, a host name
  part of '%' is
  used. For additional information about specifying account
  names, see
  CREATE USER.
   
  Note that, if you specify an account that is currently
  connected, it will not
  be deleted until the connection is closed. The connection
  will not be
  automatically closed.
   
  If any of the specified user accounts do not exist, ERROR
  1396 (HY000)
  results. If an error occurs, DROP USER will still drop the
  accounts that do
  not result in an error. Only one error is produced for all
  users which have not
  been dropped:
   
  ERROR 1396 (HY000): Operation DROP USER failed for
  'u1'@'%','u2'@'%'
   
  Failed CREATE or DROP operations, for both users and roles,
  produce the
  same error code.
   
  IF EXISTS
   
  The IF EXISTS clause was added in MariaDB 10.1.3
   
  If the IF EXISTS clause is used, MariaDB will return a note
  instead of an error if the user does not exist.
   
  Examples
  -------- 
  DROP USER bob;
   
  IF EXISTS:
   
  DROP USER bob;
   
  ERROR 1396 (HY000): Operation DROP USER failed for
  'bob'@'%'
   
  DROP USER IF EXISTS bob;
   
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  SHOW WARNINGS;
   
  +-------+------+---------------------------------------------+
  | Level | Code | Message |
  +-------+------+---------------------------------------------+
  | Note | 1974 | Can't drop user 'bob'@'%'; it doesn't
  exist |
  +-------+------+---------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/drop-user/dzfxuxDROP USERdzfxuxhttps://mariadb.com/kb/en/library/drop-user/dzfxuxdzfxux10dzfxux120qjzxqqvvbqUser password expiry was introduced in MariaDB 10.4.3.
   
  Password expiry permits administrators to expire user
  passwords, either manually or automatically. 
   
  System Variables
   
  There are two system variables which affect password expiry:
  default_password_lifetime, which determines the amount of
  time between requiring the user to change their password. 0,
  the default, means automatic password expiry is not active.
   
  The second variable, disconnect_on_expired_password
  determines whether a client is permitted to connect if their
  password has expired, or whether they are permitted to
  connect in sandbox mode, able to perform a limited subset of
  queries related to resetting the password, in particular SET
  PASSWORD and SET.
   
  Setting a Password Expiry Limit for a User
   
  Besides automatic password expiry, as determined by
  default_password_lifetime, password expiry times can be set
  on an individual user basis, overriding the global using the
  CREATE USER or ALTER USER statements, for example:
   
  CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL
  120 DAY;
   
  ALTER USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL
  120 DAY;
   
  Limits can be disabled by use of the NEVER keyword, for
  example:
   
  CREATE USER 'monty'@'localhost' PASSWORD EXPIRE NEVER;
   
  ALTER USER 'monty'@'localhost' PASSWORD EXPIRE NEVER;
   
  A manually set limit can be restored the system default by
  use of DEFAULT, for example:
   
  CREATE USER 'monty'@'localhost' PASSWORD EXPIRE DEFAULT;
   
  ALTER USER 'monty'@'localhost' PASSWORD EXPIRE DEFAULT;
   
  SHOW CREATE USER
   
  The SHOW CREATE USER statement will display information
  about the password expiry status of the user. Unlike MySQL,
  it will not display if the user is unlocked, or if the
  password expiry is set to default.
   
  CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL
  120 DAY;
   
  CREATE USER 'konstantin'@'localhost' PASSWORD EXPIRE
  NEVER;
   
  CREATE USER 'amse'@'localhost' PASSWORD EXPIRE DEFAULT;
   
  SHOW CREATE USER 'monty'@'localhost';
   
  +------------------------------------------------------------------+
  | CREATE USER for monty@localhost |
  +------------------------------------------------------------------+
  | CREATE USER 'monty'@'localhost' PASSWORD EXPIRE
  INTERVAL 120 DAY |
  +------------------------------------------------------------------+
   
  SHOW CREATE USER 'konstantin'@'localhost';
   
  +------------------------------------------------------------+
  | CREATE USER for konstantin@localhost |
  +------------------------------------------------------------+
  | CREATE USER 'konstantin'@'localhost' PASSWORD EXPIRE
  NEVER |
  +------------------------------------------------------------+
   
  SHOW CREATE USER 'amse'@'localhost';
   
  +--------------------------------+
  | CREATE USER for amse@localhost |
  +--------------------------------+
  | CREATE USER 'amse'@'localhost' |
  +--------------------------------+
   
  --connect-expired-password Client Option
   
  The mysql client --connect-expired-password option notifies
  the server that the client is prepared to handle expired
  password sandbox mode (even if the --batch option was
  specified).
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/user-password-expiry/dzfxuxUser Password Expirydzfxuxhttps://mariadb.com/kb/en/library/user-password-expiry/dzfxuxdzfxux10dzfxux122qjzxqqvvbqSyntax
  ------ 
  NAME_CONST(name,value)
   
  Description
  ----------- 
  Returns the given value. When used to produce a result set
  column,
   NAME_CONST() causes the column to have the given name. The
  arguments should be constants.
   
  This function is used internally when replicating stored
  procedures. It makes little sense to use it explicitly in
  SQL statements, and it was not supposed to be used like
  that.
   
  SELECT NAME_CONST('myname', 14);
  +--------+
  | myname |
  +--------+
  | 14 |
  +--------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/name_const/dzfxuxNAME_CONSTdzfxuxhttps://mariadb.com/kb/en/library/name_const/dzfxuxdzfxux14dzfxux171qjzxqqvvbqSyntax
  ------ 
  SLEEP(duration)
   
  Description
  ----------- 
  Sleeps (pauses) for the number of seconds given by the
  duration argument, then
  returns 0. If SLEEP() is interrupted, it
  returns 1. The duration may have a fractional part given in
  microseconds.
   
  Statements using the SLEEP() function are not safe for
  replication.
   
  Example
   
  SELECT SLEEP(5.5);
  +------------+
  | SLEEP(5.5) |
  +------------+
  | 0 |
  +------------+
  1 row in set (5.50 sec)
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/sleep/dzfxuxSLEEPdzfxuxhttps://mariadb.com/kb/en/library/sleep/dzfxuxdzfxux14dzfxux173qjzxqqvvbqSyntax
  ------ 
  UUID_SHORT()
   
  Description
  ----------- 
  Returns a "short" universal identifier as a 64-bit
  unsigned integer (rather
  than a string-form 128-bit identifier as returned by the
  UUID() function).
   
  The value of UUID_SHORT() is guaranteed to be unique if the
  following conditions hold:
  The server_id of the current host is unique among your set
  of master and
   slave servers
  server_id is between 0 and 255
  You don't set back your system time for your server between
  mysqld restarts
  You do not invoke UUID_SHORT() on average more than 16
   million times per second between mysqld restarts
   
  The UUID_SHORT() return value is constructed this way:
   
   (server_id & 255) 

  URL: https://mariadb.com/kb/en/library/uuid_short/dzfxuxUUID_SHORTdzfxuxhttps://mariadb.com/kb/en/library/uuid_short/dzfxuxdzfxux14dzfxux175qjzxqqvvbqSyntax
  ------ 
  NOT, !
   
  Description
  ----------- 
  Logical NOT. Evaluates to 1 if the operand is 0, to 0 if the
  operand
  is non-zero, and NOT NULL returns NULL.
   
  By default, the ! operator has a higher precedence. If the
  HIGH_NOT_PRECEDENCE SQL_MODE flag is set, NOT and ! have the
  same precedence.
   
  Examples
  -------- 
  SELECT NOT 10;
   
  +--------+
  | NOT 10 |
  +--------+
  | 0 |
  +--------+
   
  SELECT NOT 0;
   
  +-------+
  | NOT 0 |
  +-------+
  | 1 |
  +-------+
   
  SELECT NOT NULL;
   
  +----------+
  | NOT NULL |
  +----------+
  | NULL |
  +----------+
   
  SELECT ! (1+1);
  +---------+
  | ! (1+1) |
  +---------+
  | 0 |
  +---------+
   
  SELECT ! 1+1;
   
  +-------+
  | ! 1+1 |
  +-------+
  | 1 |
  +-------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/not/dzfxux!dzfxuxhttps://mariadb.com/kb/en/library/not/dzfxuxdzfxux15dzfxux177qjzxqqvvbqSyntax
  ------ 
  RENAME USER old_user TO new_user
   [, old_user TO new_user] ...
   
  Description
  ----------- 
  The RENAME USER statement renames existing MariaDB accounts.
  To use it,
  you must have the global CREATE USER privilege
  or the UPDATE privilege for the mysql database.
  Each account is named using the same format as for the
  CREATE USER
  statement; for example, 'jeffrey'@'localhost'.
  If you specify only the user name part of the account name,
  a host
  name part of '%' is used.
   
  If any of the old user accounts do not exist or any of the
  new user accounts already
  exist, ERROR 1396 (HY000) results. If an error occurs,
  RENAME USER
  will still rename the accounts that do not result in an
  error.
   
  Examples
  -------- 
  CREATE USER 'donald', 'mickey';
   
  RENAME USER 'donald' TO 'duck'@'localhost', 'mickey'
  TO 'mouse'@'localhost';
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/rename-user/dzfxuxRENAME USERdzfxuxhttps://mariadb.com/kb/en/library/rename-user/dzfxuxdzfxux10dzfxux123qjzxqqvvbqPrivileges
   
  Syntax
  ------ 
  REVOKE 
   priv_type [(column_list)]
   [, priv_type [(column_list)]] ...
   ON [object_type] priv_level
   FROM user [, user] ...
   
  REVOKE ALL PRIVILEGES, GRANT OPTION
   FROM user [, user] ...
   
  Description
  ----------- 
  The REVOKE statement enables system administrators to revoke
  privileges (or roles - see section below) from MariaDB
  accounts. Each account is named using the same format
  as for the GRANT statement; for example,
  'jeffrey'@'localhost'. If you specify only the user name
  part
  of the account name, a host name part of '%' is used. For
  details on the levels at which privileges exist, the
  allowable
  priv_type and priv_level values, and the
  syntax for specifying users and passwords, see GRANT.
   
  To use the first REVOKE syntax, you must have the
  GRANT OPTION privilege, and you must have the privileges
  that
  you are revoking.
   
  To revoke all privileges, use the second syntax, which drops
  all
  global, database, table, column, and routine privileges for
  the named
  user or users:
   
  REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user] ...
   
  To use this REVOKE syntax, you must have the global
  CREATE USER privilege or the
  UPDATE privilege for the mysql database. See
  GRANT.
   
  Examples
  -------- 
  REVOKE SUPER ON *.* FROM 'alexander'@'localhost';
   
  Roles
   
  Roles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  REVOKE role [, role ...]
   FROM grantee [, grantee2 ... ]
   
  Description
  ----------- 
  REVOKE is also used to remove a role from a user or another
  role that it's previously been assigned to. If a role has
  previously been set as a default role, REVOKE does not
  remove the record of the default role from the mysql.user
  table. If the role is subsequently granted again, it will
  again be the user's default. Use SET DEFAULT ROLE NONE to
  explicitly remove this.
   
  Before MariaDB 10.1.13, the REVOKE role statement was not
  permitted in prepared statements.
   
  Example
   
  REVOKE journalist FROM hulda
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/revoke/dzfxuxREVOKEdzfxuxhttps://mariadb.com/kb/en/library/revoke/dzfxuxdzfxux10dzfxux124qjzxqqvvbqRoles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  CREATE [OR REPLACE] ROLE [IF NOT EXISTS] role 
   [WITH ADMIN 
   {CURRENT_USER | CURRENT_ROLE | user | role}]
   
  Description
  ----------- 
  The CREATE ROLE statement creates one or more MariaDB roles.
  To
  use it, you must have the global CREATE USER
  privilege or the INSERT privilege for the mysql
  database. For each account, CREATE ROLE creates a new row in
  the
  mysql.user table that has no privileges, and with the
  corresponding is_role field set to Y. It also creates a
  record in the
  mysql.roles_mapping table.
   
  If any of the specified roles already exist, ERROR 1396
  (HY000) results. If
  an error occurs, CREATE ROLE will still create the roles
  that do not result
  in an error. The maximum length for a role is 128
  characters. Role names can be
  quoted, as explained in the Identifier names page. Only
  one error is produced for all roles which have not been
  created:
   
  ERROR 1396 (HY000): Operation CREATE ROLE failed for
  'a','b','c'
   
  Failed CREATE or DROP operations, for both users and roles,
  produce the
  same error code.
   
  PUBLIC and NONE are reserved, and cannot be used as role
  names.
   
  Before MariaDB 10.1.13, the CREATE ROLE statement was not
  permitted in prepared statements.
   
  For valid identifiers to use as role names, see Identifier
  Names.
   
  WITH ADMIN
   
  The optional WITH ADMIN clause determines whether the
  current user, the
  current role or another user or role has use of the newly
  created role. If the
  clause is omitted, WITH ADMIN CURRENT_USER is treated as the
  default, which
  means that the current user will be able to GRANT this role
  to
  users.
   
  OR REPLACE
   
  The OR REPLACE clause was added in MariaDB 10.1.3
   
  If the optional OR REPLACE clause is used, it acts as a
  shortcut for:
   
  DROP ROLE IF EXISTS name;
   
  CREATE ROLE name ...;
   
  IF NOT EXISTS
   
  The IF NOT EXISTS clause was added in MariaDB 10.1.3
   
  When the IF NOT EXISTS clause is used, MariaDB will return a
  warning instead of an error if the specified role already
  exists. Cannot be used together with the OR REPLACE clause.
   
  Examples
  -------- 
  CREATE ROLE journalist;
   
  CREATE ROLE developer WITH ADMIN lorinda;
   
  The OR REPLACE and IF NOT EXISTS clauses:
   
  CREATE ROLE journalist;
  ERROR 1396 (HY000): Operation CREATE ROLE failed for
  'journalist'
   
  CREATE OR REPLACE ROLE journalist;
  Query OK, 0 rows affected (0.00 sec)
   
  CREATE ROLE IF NOT EXISTS journalist;
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  SHOW WARNINGS;
  +-------+------+---------------------------------------------------+
  | Level | Code | Message |
  +-------+------+---------------------------------------------------+
  | Note | 1975 | Can't create role 'journalist'; it
  already exists |
  +-------+------+---------------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/create-role/dzfxuxCREATE ROLEdzfxuxhttps://mariadb.com/kb/en/library/create-role/dzfxuxdzfxux10dzfxux127qjzxqqvvbqSyntax
  ------ 
  AND, &&
   
  Description
  ----------- 
  Logical AND. Evaluates to 1 if all operands are non-zero and
  not NULL,
  to 0 if one or more operands are 0, otherwise NULL is
  returned.
   
  For this operator, short-circuit evaluation can be used.
   
  Examples
  -------- 
  SELECT 1 && 1;
   
  +--------+
  | 1 && 1 |
  +--------+
  | 1 |
  +--------+
   
  SELECT 1 && 0;
   
  +--------+
  | 1 && 0 |
  +--------+
  | 0 |
  +--------+
   
  SELECT 1 && NULL;
   
  +-----------+
  | 1 && NULL |
  +-----------+
  | NULL |
  +-----------+
   
  SELECT 0 && NULL;
   
  +-----------+
  | 0 && NULL |
  +-----------+
  | 0 |
  +-----------+
   
  SELECT NULL && 0;
   
  +-----------+
  | NULL && 0 |
  +-----------+
  | 0 |
  +-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/and/dzfxux&amp;&dzfxuxhttps://mariadb.com/kb/en/library/and/dzfxuxdzfxux15dzfxux178qjzxqqvvbqSyntax
  ------ 
  var_name := expr
   
  Description
  ----------- 
  Assignment operator for assigning a value. The value on the
  right is assigned to the variable on left.
   
  Unlike the = operator, := can always be used to assign a
  value to a variable.
   
  This operator works with both user-defined variables and
  local variables.
   
  When assigning the same value to several variables,
  LAST_VALUE() can be useful.
   
  Examples
  -------- 
   SELECT @x := 10;
   
  +----------+
  | @x := 10 |
  +----------+
  | 10 |
  +----------+
   
  SELECT @x, @y := @x;
   
  +------+----------+
  | @x | @y := @x |
  +------+----------+
  | 10 | 10 |
  +------+----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/assignment-operator/dzfxuxAssignment Operator (:=)dzfxuxhttps://mariadb.com/kb/en/library/assignment-operator/dzfxuxdzfxux15dzfxux182qjzxqqvvbqSyntax
  ------ 
  SET PASSWORD [FOR user] =
   {
   PASSWORD('some password')
   | OLD_PASSWORD('some password')
   | 'encrypted password'
   }
   
  Description
  ----------- 
  The SET PASSWORD statement assigns a password to an existing
  MariaDB user
  account.
   
  If the password is specified using the PASSWORD() or
  OLD_PASSWORD()
  function, the literal text of the password should be given.
  If the
  password is specified without using either function, the
  password
  should be the already-encrypted password value as returned
  by
  PASSWORD().
   
  OLD_PASSWORD() should only be used if your MariaDB/MySQL
  clients are very old (< 4.0.0).
   
  With no FOR clause, this statement sets the password for the
  current
  user. Any client that has connected to the server using a
  non-anonymous
  account can change the password for that account.
   
  With a FOR clause, this statement sets the password for a
  specific
  account on the current server host. Only clients that have
  the UPDATE
  privilege for the mysql database can do this. The user value
  should be
  given in user_name@host_name format, where user_name and
  host_name are
  exactly as they are listed in the User and Host columns of
  the
  mysql.user table entry. 
   
  The argument to PASSWORD() and the password given to MariaDB
  clients can be of arbitrary length.
   
  Authentication Plugin Support
   
  In MariaDB 10.4 and later, SET PASSWORD (with or without
  PASSWORD()) works for accounts authenticated via any
  authentication plugin that supports passwords stored in the
  mysql.global_priv table.
   
  The ed25519, mysql_native_password, and mysql_old_password
  authentication plugins store passwords in the
  mysql.global_priv table.
   
  If you run SET PASSWORD on an account that authenticates
  with one of these authentication plugins that stores
  passwords in the mysql.global_priv table, then the
  PASSWORD() function is evaluated by the specific
  authentication plugin used by the account. The
  authentication plugin hashes the password with a method that
  is compatible with that specific authentication plugin.
   
  The unix_socket, named_pipe, gssapi, and pam authentication
  plugins do not store passwords in the mysql.global_priv
  table. These authentication plugins rely on other methods to
  authenticate the user.
   
  If you attempt to run SET PASSWORD on an account that
  authenticates with one of these authentication plugins that
  doesn't store a password in the mysql.global_priv table,
  then MariaDB Server will raise a warning like the following:
   
  SET PASSWORD is ignored for users authenticating via
  unix_socket plugin
   
  See Authentication from MariaDB 10.4 for an overview of
  authentication changes in MariaDB 10.4.
   
  MariaDB until 10.3
   
  In MariaDB 10.3 and before, SET PASSWORD (with or without
  PASSWORD()) only works for accounts authenticated via
  mysql_native_password or mysql_old_password authentication
  plugins
   
  Passwordless User Accounts
   
  User accounts do not always require passwords to login.
   
  The unix_socket and named_pipe authentication plugins do not
  require a password to authenticate the user.
   
  The gssapi and pam authentication plugins may or may not
  require a password to authenticate the user, depending on
  the specific configuration.
   
  The mysql_native_password and mysql_old_password
  authentication plugins require passwords for authentication,
  but the password can be blank. In that case, no password is
  required.
   
  If you provide a password while attempting to log into the
  server as an account that doesn't require a password, then
  MariaDB server will simply ignore the password.
   
  In MariaDB 10.4 and later, a user account can be defined to
  use multiple authentication plugins in a specific order of
  preference. This specific scenario may be more noticeable in
  these versions, since an account could be associated with
  some authentication plugins that require a password, and
  some that do not.
   
  Example
   
  For example, if you had an entry with User and
  Host column values of 'bob' and 
  '%.loc.gov', you would write the
  statement like this:
   
  SET PASSWORD FOR 'bob'@'%.loc.gov' =
  PASSWORD('newpass');
   


  URL: https://mariadb.com/kb/en/library/set-password/dzfxuxSET PASSWORDdzfxuxhttps://mariadb.com/kb/en/library/set-password/dzfxuxdzfxux10dzfxux125qjzxqqvvbqRoles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  DROP ROLE [IF EXISTS] role_name [,role_name ...]
   
  Description
  ----------- 
  The DROP ROLE statement removes one or more MariaDB roles.
  To use this
  statement, you must have the global CREATE USER privilege or
  the DELETE privilege for the mysql database.
   
  DROP ROLE does not disable roles for connections which
  selected them with SET ROLE. If a role has previously been
  set as a default role, DROP ROLE does not remove the record
  of the default role from the mysql.user table. If the role
  is subsequently recreated and granted, it will again be the
  user's default. Use SET DEFAULT ROLE NONE to explicitly
  remove this.
   
  If any of the specified user accounts do not exist, ERROR
  1396 (HY000)
  results. If an error occurs, DROP ROLE will still drop the
  roles that
  do not result in an error. Only one error is produced for
  all roles which have not been dropped:
   
  ERROR 1396 (HY000): Operation DROP ROLE failed for
  'a','b','c'
   
  Failed CREATE or DROP operations, for both users and roles,
  produce the same error code.
   
  Before MariaDB 10.1.13, the DROP ROLE statement was not
  permitted in prepared statements.
   
  IF EXISTS
   
  The IF EXISTS clause was added in MariaDB 10.1.3
   
  If the IF EXISTS clause is used, MariaDB will return a
  warning instead of an error if the role does not exist.
   
  Examples
  -------- 
  DROP ROLE journalist;
   
  The same thing using the optional IF EXISTS clause:
   
  DROP ROLE journalist;
   
  ERROR 1396 (HY000): Operation DROP ROLE failed for
  'journalist'
   
  DROP ROLE IF EXISTS journalist;
   
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  Note (Code 1975): Can't drop role 'journalist'; it
  doesn't exist
   


  URL: https://mariadb.com/kb/en/library/drop-role/dzfxuxDROP ROLEdzfxuxhttps://mariadb.com/kb/en/library/drop-role/dzfxuxdzfxux10dzfxux128qjzxqqvvbqSyntax
  ------ 
  GROUP_CONCAT(expr)
   
  Description
  ----------- 
  This function returns a string result with the concatenated
  non-NULL
  values from a group. It returns NULL if there are no
  non-NULL values.
   
  The maximum returned length in bytes is determined by the
  group_concat_max_len server system variable, which defaults
  to 1M (>= MariaDB 10.2.4) or 1K (

  URL: https://mariadb.com/kb/en/library/group_concat/dzfxuxGROUP_CONCATdzfxuxhttps://mariadb.com/kb/en/library/group_concat/dzfxuxdzfxux16dzfxux189qjzxqqvvbqSyntax
  ------ 
  STDDEV_SAMP(expr)
   
  Description
  ----------- 
  Returns the sample standard deviation of expr (the square
  root of VAR_SAMP()).
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, STDDEV_SAMP() can be used as a window
  function.
   
  STDDEV_SAMP() returns NULL if there were no matching rows.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/stddev_samp/dzfxuxSTDDEV_SAMPdzfxuxhttps://mariadb.com/kb/en/library/stddev_samp/dzfxuxdzfxux16dzfxux195qjzxqqvvbqSyntax
  ------ 
  BENCHMARK(count,expr)
   
  Description
  ----------- 
  The BENCHMARK() function executes the expression expr
  repeatedly count
  times. It may be used to time how quickly MariaDB processes
  the
  expression. The result value is always 0. The intended use
  is from
  within the mysql client, which reports query execution
  times.
   
  Examples
  -------- 
  SELECT BENCHMARK(1000000,ENCODE('hello','goodbye'));
  +----------------------------------------------+
  | BENCHMARK(1000000,ENCODE('hello','goodbye')) |
  +----------------------------------------------+
  | 0 |
  +----------------------------------------------+
  1 row in set (0.21 sec)
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/benchmark/dzfxuxBENCHMARKdzfxuxhttps://mariadb.com/kb/en/library/benchmark/dzfxuxdzfxux17dzfxux200qjzxqqvvbqRoles were introduced in MariaDB 10.0.5.
   
  Description
  ----------- 
  A role bundles a number of privileges together. It assists
  larger organizations where, typically, a number of users
  would have the same privileges, and, previously, the only
  way to change the privileges for a group of users was by
  changing each user's privileges individually. 
   
  Alternatively, multiple external users could have been
  assigned the same user, and there would have been no way to
  see which actual user was responsible for which action.
   
  With roles, managing this is easy. For example, there could
  be a number of users assigned to a journalist role, with
  identical privileges. Changing the privileges for all the
  journalists is a matter of simply changing the role's
  privileges, while the individual user is still linked with
  any changes that take place.
   
  Roles are created with the CREATE ROLE statement, and
  dropped with the DROP ROLE statement. Roles are then
  assigned to a user with an extension to the GRANT statement,
  while privileges are assigned to a role in the regular way
  with GRANT. Similarly, the REVOKE statement can be used to
  both revoke a role from a user, or revoke a privilege from a
  role.
   
  Once a user has connected, he can obtain all privileges
  associated with a role by setting a role with the SET ROLE
  statement. The CURRENT_ROLE function returns the currently
  set role for the session, if any.
   
  Only roles granted directly to a user can be set, roles
  granted to other roles cannot. Instead the privileges
  granted to a role, which is, in turn, granted to another
  role (grantee), will be immediately available to any user
  who sets this second grantee role.
   
  Roles were implemented as a GSoC 2013 project by Vicentiu
  Ciorbaru. 
   
  The SET DEFAULT ROLE statement allows one to set a default
  role for a user. A default role is automatically enabled
  when a user connects (an implicit SET ROLE statement is
  executed immediately after a connection is established).
   
  System Tables
   
  Information about roles and who they've been granted to can
  be found in the Information Schema APPLICABLE_ROLES table as
  well as the mysql.ROLES_MAPPING table.
   
  The Information Schema ENABLED_ROLES table shows the enabled
  roles for the current session.
   
  Examples
  -------- 
  Creating a role and granting a privilege:
   
  CREATE ROLE journalist;
   
  GRANT SHOW DATABASES ON *.* TO journalist;
   
  GRANT journalist to hulda;
   
  Note, that hulda has no SHOW DATABASES privilege, even
  though she was granted the journalist role. She needs to set
  the role first:
   
  SHOW DATABASES;
   
  +--------------------+
  | Database |
  +--------------------+
  | information_schema |
  +--------------------+
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | NULL |
  +--------------+
   
  SET ROLE journalist;
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | journalist |
  +--------------+
   
  SHOW DATABASES;
   
  +--------------------+
  | Database |
  +--------------------+
  | ... |
  | information_schema |
  | mysql |
  | performance_schema |
  | test |
  | ... |
  +--------------------+
   
  SET ROLE NONE;
   
  Roles can be granted to roles:
   
  CREATE ROLE writer;
   
  GRANT SELECT ON data.* TO writer;
   
  GRANT writer TO journalist;
   
  But one does not need to set a role granted to a role. For
  example, hulda will automatically get all writer privileges
  when she sets the journalist role:
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | NULL |
  +--------------+
   
  SHOW TABLES FROM data;
   
  Empty set (0.01 sec)
   
  SET ROLE journalist;
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | journalist |
  +--------------+
   
  SHOW TABLES FROM data;
   
  +------------------------------+
  | Tables_in_data |
  +------------------------------+
  | set1 |
  | ... |
  +------------------------------+
   
  Roles and Views (and Stored Routines)
   
  When a user sets a role, he, in a sense, has two identities
  with two associated sets of privileges.
  But a view (or a stored routine) can have only one definer.
  So, when a view (or a stored routine) is created with the
  SQL SECURITY DEFINER, one can specify whether the definer
  should be CURRENT_USER (and the view will have none of the
  privileges of the user's role) or CURRENT_ROLE (in this
  case, the view will use role's privileges, but none of the
  user's privileges). As a result, sometimes one can create a
  view that is impossible to use.
   
  CREATE ROLE r1;
   
  GRANT ALL ON db1.* TO r1;
   
  GRANT r1 TO foo@localhost;
   
  GRANT ALL ON db.* TO foo@localhost;
   
  SELECT CURRENT_USER
  +---------------+
  | current_user |
  +---------------+
  | foo@localhost |
  +---------------+
   
  SET ROLE r1;
   
  CREATE TABLE db1.t1 (i int);
   
  CREATE VIEW db.v1 AS SELECT * FROM db1.t1;
   
  SHOW CREATE VIEW db.v1;
   
  +------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
  | View | Create View | character_set_client |
  collation_connection |
  +------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
  | v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`foo`@`localhost`
  SQL SECURITY DEFINER VIEW `db`.`v1` AS SELECT `db1`.`t1`.`i`
  AS `i` from `db1`.`t1` | utf8 | utf8_general_ci |
  +------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
   
  CREATE DEFINER=CURRENT_ROLE VIEW db.v2 AS SELECT * FROM
  db1.t1;
   
  SHOW CREATE VIEW db.b2;
   
  +------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
  | View | Create View | character_set_client |
  collation_connection |
  +------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
  | v2 | CREATE ALGORITHM=UNDEFINED DEFINER=`r1` SQL SECURITY
  DEFINER VIEW `db`.`v2` AS select `db1`.`t1`.`a` AS `a` from
  `db1`.`t1` | utf8 | utf8_general_ci |
  +------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
   
  Other Resources
   
  Roles Review by Peter Gulutzan
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/roles_overview/dzfxuxRoles Overviewdzfxuxhttps://mariadb.com/kb/en/library/roles_overview/dzfxuxdzfxux10dzfxux126qjzxqqvvbqFrom version 10.0.2, MariaDB supports global transaction IDs
  for replication.
   
  Syntax
  ------ 
  BINLOG_GTID_POS(binlog_filename,binlog_offset)
   
  Description
  ----------- 
  The BINLOG_GTID_POS() function takes as input an old-style
  binary log position in the form of a file name and a file
  offset. It looks up the position in the current binlog, and
  returns a string representation of the corresponding GTID
  position. If the position is not found in the current
  binlog, NULL is returned.
   
  Examples
  -------- 
  SELECT BINLOG_GTID_POS("master-bin.000001", 600);
   


  URL: https://mariadb.com/kb/en/library/binlog_gtid_pos/dzfxuxBINLOG_GTID_POSdzfxuxhttps://mariadb.com/kb/en/library/binlog_gtid_pos/dzfxuxdzfxux17dzfxux201qjzxqqvvbqSyntax
  ------ 
  COLLATION(str)
   
  Description
  ----------- 
  Returns the collation of the string argument. If str is not
  a string, it is considered as a binary string (so the
  function returns 'binary'). This applies to NULL, too. The
  return value is a string in the utf8 character set.
   
  See Character Sets and Collations.
   
  Examples
  -------- 
  SELECT COLLATION('abc');
  +-------------------+
  | COLLATION('abc') |
  +-------------------+
  | latin1_swedish_ci |
  +-------------------+
   
  SELECT COLLATION(_utf8'abc');
  +-----------------------+
  | COLLATION(_utf8'abc') |
  +-----------------------+
  | utf8_general_ci |
  +-----------------------+
   


  URL: https://mariadb.com/kb/en/library/collation/dzfxuxCOLLATIONdzfxuxhttps://mariadb.com/kb/en/library/collation/dzfxuxdzfxux17dzfxux204qjzxqqvvbqRoles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  SET ROLE { role | NONE }
   
  Description
  ----------- 
  The SET ROLE statement enables a role, along with all of its
  associated permissions, for the current session. To unset a
  role, use NONE .
   
  If a role that doesn't exist, or to which the user has not
  been assigned, is specified, an ERROR 1959 (OP000): Invalid
  role specification error occurs.
   
  From MariaDB 10.1.1, an automatic SET ROLE is implicitly
  performed when a user connects if that user has been
  assigned a default role. See SET DEFAULT ROLE.
   
  Example
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | NULL |
  +--------------+
   
  SET ROLE staff;
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | staff |
  +--------------+
   
  SET ROLE NONE;
   
  Query OK, 0 rows affected (0.00 sec)
   
  SELECT CURRENT_ROLE();
  +----------------+
  | CURRENT_ROLE() |
  +----------------+
  | NULL |
  +----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/set-role/dzfxuxSET ROLEdzfxuxhttps://mariadb.com/kb/en/library/set-role/dzfxuxdzfxux10dzfxux129qjzxqqvvbqDefault roles were implemented in MariaDB 10.1.1.
   
  Syntax
  ------ 
  SET DEFAULT ROLE { role | NONE } [ FOR user@host ]
   
  Description
  ----------- 
  The SET DEFAULT ROLE statement sets a default role for a
  specified (or current) user. A default role is automatically
  enabled when a user connects (an implicit SET ROLE statement
  is executed immediately after a connection is established).
   
  To be able to set a role as a default, one needs the
  privileges to enable this role (if you cannot do SET ROLE X,
  you won't be able to do SET DEFAULT ROLE X). To set a
  default role for another user one needs to have write access
  to the mysql database.
   
  To remove a user's default role, use SET DEFAULT ROLE NONE
  [ FOR user@host ]. The record of the default role is not
  removed if the role is dropped or revoked, so if the role is
  subsequently re-created or granted, it will again be the
  user's default role.
   
  The default role is stored in a new column in the mysql.user
  table, and currently viewing this table is the only way to
  see which role has been assigned to a user as the default. 
   
  Examples
  -------- 
  Setting a default role for the current user:
   
  SET DEFAULT ROLE journalist;
   
  Removing a default role from the current user:
   
  SET DEFAULT ROLE NONE;
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/set-default-role/dzfxuxSET DEFAULT ROLEdzfxuxhttps://mariadb.com/kb/en/library/set-default-role/dzfxuxdzfxux10dzfxux130qjzxqqvvbqSyntax
  ------ 
  AES_ENCRYPT(str,key_str)
   
  Description
  ----------- 
  AES_ENCRYPT() and AES_DECRYPT() allow encryption and
  decryption of
  data using the official AES (Advanced Encryption Standard)
  algorithm,
  previously known as "Rijndael." Encoding with a 128-bit
  key length is
  used, but you can extend it up to 256 bits by modifying the
  source. We
  chose 128 bits because it is much faster and it is secure
  enough for
  most purposes.
   
  AES_ENCRYPT() encrypts a string str using the key key_str,
  and returns a binary string.
   
  AES_DECRYPT() decrypts the encrypted string and returns the
  original
  string.
   
  The input arguments may be any length. If either argument is
  NULL, the result of this function is also NULL.
   
  Because AES is a block-level algorithm, padding is used to
  encode
  uneven length strings and so the result string length may be
  calculated using this formula:
   
  16 x (trunc(string_length / 16) + 1)
   
  If AES_DECRYPT() detects invalid data or incorrect padding,
  it returns
  NULL. However, it is possible for AES_DECRYPT() to return a
  non-NULL
  value (possibly garbage) if the input data or the key is
  invalid.
   
  Examples
  -------- 
  INSERT INTO t VALUES
  (AES_ENCRYPT('text',SHA2('password',512)));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/aes_encrypt/dzfxuxAES_ENCRYPTdzfxuxhttps://mariadb.com/kb/en/library/aes_encrypt/dzfxuxdzfxux12dzfxux136qjzxqqvvbqSyntax
  ------ 
  COMPRESS(string_to_compress)
   
  Description
  ----------- 
  Compresses a string and returns the result as a binary
  string. This
  function requires MariaDB to have been compiled with a
  compression
  library such as zlib. Otherwise, the return value is always
  NULL. The
  compressed string can be uncompressed with UNCOMPRESS().
   
  The have_compress server system variable indicates whether a
  compression library is present. 
   
  Examples
  -------- 
  SELECT LENGTH(COMPRESS(REPEAT('a',1000)));
  +------------------------------------+
  | LENGTH(COMPRESS(REPEAT('a',1000))) |
  +------------------------------------+
  | 21 |
  +------------------------------------+
   
  SELECT LENGTH(COMPRESS(''));
  +----------------------+
  | LENGTH(COMPRESS('')) |
  +----------------------+
  | 0 |
  +----------------------+
   
  SELECT LENGTH(COMPRESS('a'));
  +-----------------------+
  | LENGTH(COMPRESS('a')) |
  +-----------------------+
  | 13 |
  +-----------------------+
   
  SELECT LENGTH(COMPRESS(REPEAT('a',16)));
  +----------------------------------+
  | LENGTH(COMPRESS(REPEAT('a',16))) |
  +----------------------------------+
  | 15 |
  +----------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/compress/dzfxuxCOMPRESSdzfxuxhttps://mariadb.com/kb/en/library/compress/dzfxuxdzfxux12dzfxux137qjzxqqvvbqSyntax
  ------ 
  CONNECTION_ID()
   
  Description
  ----------- 
  Returns the connection ID (thread ID) for the connection.
  Every
  thread (including events) has an ID that is unique among the
  set of currently
  connected clients.
   
  Until MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or
  bigint(10), in all cases. From MariaDB 10.3.1, returns
  MYSQL_TYPE_LONG, or int(10), when the result would fit
  within 32-bits.
   
  Examples
  -------- 
  SELECT CONNECTION_ID();
  +-----------------+
  | CONNECTION_ID() |
  +-----------------+
  | 3 |
  +-----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/connection_id/dzfxuxCONNECTION_IDdzfxuxhttps://mariadb.com/kb/en/library/connection_id/dzfxuxdzfxux17dzfxux205qjzxqqvvbqSyntax
  ------ 
  SCHEMA()
   
  Description
  ----------- 
  This function is a synonym for DATABASE().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/schema/dzfxuxSCHEMAdzfxuxhttps://mariadb.com/kb/en/library/schema/dzfxuxdzfxux17dzfxux216qjzxqqvvbqSyntax
  ------ 
  SESSION_USER()
   
  Description
  ----------- 
  SESSION_USER() is a synonym for USER().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/session_user/dzfxuxSESSION_USERdzfxuxhttps://mariadb.com/kb/en/library/session_user/dzfxuxdzfxux17dzfxux217qjzxqqvvbqSyntax
  ------ 
  SYSTEM_USER()
   
  Description
  ----------- 
  SYSTEM_USER() is a synonym for USER().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/system_user/dzfxuxSYSTEM_USERdzfxuxhttps://mariadb.com/kb/en/library/system_user/dzfxuxdzfxux17dzfxux218qjzxqqvvbqSyntax
  ------ 


  URL: https://mariadb.com/kb/en/library/less-than/dzfxux<dzfxuxhttps://mariadb.com/kb/en/library/less-than/dzfxuxdzfxux18dzfxux222qjzxqqvvbqSyntax
  ------ 


  URL: https://mariadb.com/kb/en/library/less-than-or-equal/dzfxux<=dzfxuxhttps://mariadb.com/kb/en/library/less-than-or-equal/dzfxuxdzfxux18dzfxux223qjzxqqvvbqSyntax
  ------ 
  expr BETWEEN min AND max
   
  Description
  ----------- 
  If expr is greater than or equal to min and expr is less
  than or equal
  to max, BETWEEN returns 1, otherwise it returns 0. This is
  equivalent
  to the expression (min 

  URL: https://mariadb.com/kb/en/library/between-and/dzfxuxBETWEEN ANDdzfxuxhttps://mariadb.com/kb/en/library/between-and/dzfxuxdzfxux18dzfxux228qjzxqqvvbqSyntax
  ------ 
  GREATEST(value1,value2,...)
   
  Description
  ----------- 
  With two or more arguments, returns the largest
  (maximum-valued)
  argument. The arguments are compared using the same rules as
  for
  LEAST().
   
  Examples
  -------- 
  SELECT GREATEST(2,0);
  +---------------+
  | GREATEST(2,0) |
  +---------------+
  | 2 |
  +---------------+
   
  SELECT GREATEST(34.0,3.0,5.0,767.0);
  +------------------------------+
  | GREATEST(34.0,3.0,5.0,767.0) |
  +------------------------------+
  | 767.0 |
  +------------------------------+
   
  SELECT GREATEST('B','A','C');
  +-----------------------+
  | GREATEST('B','A','C') |
  +-----------------------+
  | C |
  +-----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/greatest/dzfxuxGREATESTdzfxuxhttps://mariadb.com/kb/en/library/greatest/dzfxuxdzfxux18dzfxux230qjzxqqvvbqSyntax
  ------ 
  DES_DECRYPT(crypt_str[,key_str])
   
  Description
  ----------- 
  Decrypts a string encrypted with DES_ENCRYPT(). If an error
  occurs,
  this function returns NULL.
   
  This function works only if MariaDB has been configured with
  TLS
  support.
   
  If no key_str argument is given, DES_DECRYPT() examines the
  first byte
  of the encrypted string to determine the DES key number that
  was used
  to encrypt the original string, and then reads the key from
  the DES
  key file to decrypt the message. For this to work, the user
  must have
  the SUPER privilege. The key file can be specified with the
  --des-key-file server option.
   
  If you pass this function a key_str argument, that string is
  used as
  the key for decrypting the message.
   
  If the crypt_str argument does not appear to be an encrypted
  string,
  MariaDB returns the given crypt_str.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/des_decrypt/dzfxuxDES_DECRYPTdzfxuxhttps://mariadb.com/kb/en/library/des_decrypt/dzfxuxdzfxux12dzfxux139qjzxqqvvbqSyntax
  ------ 
  DES_ENCRYPT(str[,{key_num|key_str}])
   
  Description
  ----------- 
  Encrypts the string with the given key using the Triple-DES
  algorithm.
   
  This function works only if MariaDB has been configured with
  TLS support.
   
  The encryption key to use is chosen based on the second
  argument to
  DES_ENCRYPT(), if one was given. With no argument, the first
  key from
  the DES key file is used. With a key_num argument, the given
  key 
  number (0-9) from the DES key file is used. With a key_str
  argument,
  the given key string is used to encrypt str. 
   
  The key file can be specified with the --des-key-file server
  option.
   
  The return string is a binary string where the first
  character is 
  CHAR(128 | key_num). If an error occurs, DES_ENCRYPT()
  returns NULL.
   
  The 128 is added to make it easier to recognize an encrypted
  key. If
  you use a string key, key_num is 127.
   
  The string length for the result is given by this formula:
   
  new_len = orig_len + (8 - (orig_len % 8)) + 1
   
  Each line in the DES key file has the following format:
   
  key_num des_key_str
   
  Each key_num value must be a number in the range from 0 to
  9. Lines in
  the file may be in any order. des_key_str is the string that
  is used
  to encrypt the message. There should be at least one space
  between the
  number and the key. The first key is the default key that is
  used if
  you do not specify any key argument to DES_ENCRYPT().
   
  You can tell MariaDB to read new key values from the key
  file with the
  FLUSH DES_KEY_FILE statement. This requires the RELOAD
  privilege.
   
  One benefit of having a set of default keys is that it gives
  applications a way to check for the existence of encrypted
  column
  values, without giving the end user the right to decrypt
  those values.
   
  Examples
  -------- 
  SELECT customer_address FROM customer_table 
   WHERE crypted_credit_card =
  DES_ENCRYPT('credit_card_number');
   


  URL: https://mariadb.com/kb/en/library/des_encrypt/dzfxuxDES_ENCRYPTdzfxuxhttps://mariadb.com/kb/en/library/des_encrypt/dzfxuxdzfxux12dzfxux140qjzxqqvvbqSyntax
  ------ 
  ENCODE(str,pass_str)
   
  Description
  ----------- 
  ENCODE is not considered cryptographically secure, and
  should not be used for password encryption.
   
  Encrypt str using pass_str as the password. To decrypt the
  result, use
  DECODE().
   
  The result is a binary string of the same length as str.
   
  The strength of the encryption is based on how good the
  random generator is. 
   
  It is not recommended to rely on the encryption performed by
  the ENCODE function. Using a salt value (changed when a
  password is updated) will improve matters somewhat, but for
  storing passwords, consider a more cryptographically secure
  function, such as SHA2().
   
  Examples
  -------- 
  ENCODE('not so secret text',
  CONCAT('random_salt','password'))
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/encode/dzfxuxENCODEdzfxuxhttps://mariadb.com/kb/en/library/encode/dzfxuxdzfxux12dzfxux141qjzxqqvvbqSyntax
  ------ 
  ENCRYPT(str[,salt])
   
  Description
  ----------- 
  Encrypts a string using the Unix crypt() system call,
  returning an encrypted binary string. The salt argument
  should be a string with at least two characters or the
  returned result will be NULL. If no salt argument is given,
  a random value of sufficient length is used.
   
  It is not recommended to use ENCRYPT() with utf16, utf32 or
  ucs2 multi-byte character sets because the crypt() system
  call expects a string terminated with a zero byte.
   
  Note that the underlying crypt() system call may have some
  limitations, such as ignoring all but the first eight
  characters.
   
  If the have_crypt system variable is set to NO (because the
  crypt() system call is not available), the ENCRYPT function
  will always return NULL.
   
  Examples
  -------- 
  SELECT ENCRYPT('encrypt me');
  +-----------------------+
  | ENCRYPT('encrypt me') |
  +-----------------------+
  | 4I5BsEx0lqTDk |
  +-----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/encrypt/dzfxuxENCRYPTdzfxuxhttps://mariadb.com/kb/en/library/encrypt/dzfxuxdzfxux12dzfxux142qjzxqqvvbqSyntax
  ------ 
  INTERVAL(N,N1,N2,N3,...)
   
  Description
  ----------- 
  Returns the index of the last argument that is less than the
  first argument or is NULL. 
   
  Returns 0 if N < N1, 1 if N < N2, 2 if N < N3 and so on or
  -1 if N is NULL. All
  arguments are treated as integers. It is required that N1 <
  N2 < N3 

  URL: https://mariadb.com/kb/en/library/interval/dzfxuxINTERVALdzfxuxhttps://mariadb.com/kb/en/library/interval/dzfxuxdzfxux18dzfxux232qjzxqqvvbqSyntax
  ------ 
  IS NOT NULL
   
  Description
  ----------- 
  Tests whether a value is not NULL. See also NULL Values in
  MariaDB.
   
  Examples
  -------- 
  SELECT 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL;
  +---------------+---------------+------------------+
  | 1 IS NOT NULL | 0 IS NOT NULL | NULL IS NOT NULL |
  +---------------+---------------+------------------+
  | 1 | 1 | 0 |
  +---------------+---------------+------------------+
   


  URL: https://mariadb.com/kb/en/library/is-not-null/dzfxuxIS NOT NULLdzfxuxhttps://mariadb.com/kb/en/library/is-not-null/dzfxuxdzfxux18dzfxux235qjzxqqvvbqSyntax
  ------ 
  ISNULL(expr)
   
  Description
  ----------- 
  If expr is NULL, ISNULL() returns 1, otherwise it returns 0.
   
  See also NULL Values in MariaDB.
   
  Examples
  -------- 
  SELECT ISNULL(1+1);
  +-------------+
  | ISNULL(1+1) |
  +-------------+
  | 0 |
  +-------------+
   
  SELECT ISNULL(1/0);
  +-------------+
  | ISNULL(1/0) |
  +-------------+
  | 1 |
  +-------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/isnull/dzfxuxISNULLdzfxuxhttps://mariadb.com/kb/en/library/isnull/dzfxuxdzfxux18dzfxux237qjzxqqvvbqThe precedence is the order in which the SQL operators are
  evaluated.
   
  The following list shows the SQL operator precedence.
  Operators that appear first in the list have a higher
  precedence. Operators which are listed together have the
  same precedence.
  INTERVAL
  BINARY, COLLATE
  !
  - (unary minus), [[bitwise-not|]] (unary bit inversion)
  || (string concatenation)
  ^
  *, /, DIV, %, MOD
  -, +
   
  &
  |
  = (comparison), , >=, >, 

  URL: https://mariadb.com/kb/en/library/operator-precedence/dzfxuxOperator Precedencedzfxuxhttps://mariadb.com/kb/en/library/operator-precedence/dzfxuxdzfxux19dzfxux241qjzxqqvvbqSyntax
  ------ 
  &
   
  Description
  ----------- 
  Bitwise AND. Converts the values to binary and compares
  bits. Only if both the corresponding bits are 1 is the
  resulting bit also 1.
   
  See also bitwise OR.
   
  Examples
  -------- 
  SELECT 2&1;
  +-----+
  | 2&1 |
  +-----+
  | 0 |
  +-----+
   
  SELECT 3&1;
  +-----+
  | 3&1 |
  +-----+
  | 1 |
  +-----+
   
  SELECT 29 & 15;
  +---------+
  | 29 & 15 |
  +---------+
  | 13 |
  +---------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bitwise_and/dzfxux&amp;dzfxuxhttps://mariadb.com/kb/en/library/bitwise_and/dzfxuxdzfxux19dzfxux242qjzxqqvvbqSyntax
  ------ 
  OLD_PASSWORD(str)
   
  Description
  ----------- 
  OLD_PASSWORD() was added to MySQL when the implementation of

  PASSWORD() was changed to improve security. OLD_PASSWORD()
  returns the
  value of the old (pre-MySQL 4.1) implementation of
  PASSWORD() as a
  string, and is intended to permit you to reset passwords for
  any
  pre-4.1 clients that need to connect to a more recent MySQL
  server version, or any version of MariaDB,
  without locking them out.
   
  As of MariaDB 5.5, the return value is a nonbinary string in
  the connection character set and collation, determined by
  the values of the character_set_connection and
  collation_connection system variables. Before 5.5, the
  return value was a binary string.
   
  The return value is 16 bytes in length, or NULL if the
  argument was NULL.
   


  URL: https://mariadb.com/kb/en/library/old_password/dzfxuxOLD_PASSWORDdzfxuxhttps://mariadb.com/kb/en/library/old_password/dzfxuxdzfxux12dzfxux144qjzxqqvvbqSyntax
  ------ 
  SHA1(str), SHA(str)
   
  Description
  ----------- 
  Calculates an SHA-1 160-bit checksum for the string str, as
  described in
  RFC 3174 (Secure Hash Algorithm).
   
  The value is returned as a string of 40 hex digits, or NULL
  if the argument was NULL. As of MariaDB 5.5, the return
  value is a nonbinary string in the connection character set
  and collation, determined by the values of the
  character_set_connection and collation_connection system
  variables. Before 5.5, the return value was a binary string.
   
  Examples
  -------- 
  SELECT SHA1('some boring text');
  +------------------------------------------+
  | SHA1('some boring text') |
  +------------------------------------------+
  | af969fc2085b1bb6d31e517d5c456def5cdd7093 |
  +------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/sha1/dzfxuxSHA1dzfxuxhttps://mariadb.com/kb/en/library/sha1/dzfxuxdzfxux12dzfxux146qjzxqqvvbqSHA2() was introduced in MariaDB 5.5
   
  Syntax
  ------ 
  SHA2(str,hash_len)
   
  Description
  ----------- 
  Given a string str, calculates an SHA-2 checksum, which is
  considered more cryptographically secure than its SHA-1
  equivalent. The SHA-2 family includes SHA-224, SHA-256,
  SHA-384, and SHA-512, and the hash_len must correspond to
  one of these, i.e. 224, 256, 384 or 512. 0 is equivalent to
  256.
   
  The return value is a nonbinary string in the connection
  character set and collation, determined by the values of the
  character_set_connection and collation_connection system
  variables. 
   
  NULL is returned if the hash length is not valid, or the
  string str is NULL.
   
  SHA2 will only work if MariaDB was has been configured with
  TLS support. 
   
  Examples
  -------- 
  SELECT SHA2('Maria',224);
  +----------------------------------------------------------+
  | SHA2('Maria',224) |
  +----------------------------------------------------------+
  | 6cc67add32286412efcab9d0e1675a43a5c2ef3cec8879f81516ff83 |
  +----------------------------------------------------------+
   
  SELECT SHA2('Maria',256);
  +------------------------------------------------------------------+
  | SHA2('Maria',256) |
  +------------------------------------------------------------------+
  |
  9ff18ebe7449349f358e3af0b57cf7a032c1c6b2272cb2656ff85eb112232f16
  |
  +------------------------------------------------------------------+
   
  SELECT SHA2('Maria',0);
  +------------------------------------------------------------------+
  | SHA2('Maria',0) |
  +------------------------------------------------------------------+
  |
  9ff18ebe7449349f358e3af0b57cf7a032c1c6b2272cb2656ff85eb112232f16
  |
  +------------------------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/sha2/dzfxuxSHA2dzfxuxhttps://mariadb.com/kb/en/library/sha2/dzfxuxdzfxux12dzfxux147qjzxqqvvbqSyntax
  ------ 
  UNCOMPRESS(string_to_uncompress)
   
  Description
  ----------- 
  Uncompresses a string compressed by the COMPRESS() function.
  If the
  argument is not a compressed value, the result is NULL. This
  function
  requires MariaDB to have been compiled with a compression
  library such
  as zlib. Otherwise, the return value is always NULL. The
  have_compress server system variable indicates whether a
  compression library is present. 
   
  Examples
  -------- 
  SELECT UNCOMPRESS(COMPRESS('a string'));
  +----------------------------------+
  | UNCOMPRESS(COMPRESS('a string')) |
  +----------------------------------+
  | a string |
  +----------------------------------+
   
  SELECT UNCOMPRESS('a string');
  +------------------------+
  | UNCOMPRESS('a string') |
  +------------------------+
  | NULL |
  +------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/uncompress/dzfxuxUNCOMPRESSdzfxuxhttps://mariadb.com/kb/en/library/uncompress/dzfxuxdzfxux12dzfxux148qjzxqqvvbqSyntax
  ------ 
  UNCOMPRESSED_LENGTH(compressed_string)
   
  Description
  ----------- 
  Returns the length that the compressed string had before
  being
  compressed with COMPRESS().
   
  UNCOMPRESSED_LENGTH() returns NULL or an incorrect result if
  the string is not compressed.
   
  Until MariaDB 10.3.1, returns MYSQL_TYPE_LONGLONG, or
  bigint(10), in all cases. From MariaDB 10.3.1, returns
  MYSQL_TYPE_LONG, or int(10), when the result would fit
  within 32-bits.
   
  Examples
  -------- 
  SELECT UNCOMPRESSED_LENGTH(COMPRESS(REPEAT('a',30)));
  +-----------------------------------------------+
  | UNCOMPRESSED_LENGTH(COMPRESS(REPEAT('a',30))) |
  +-----------------------------------------------+
  | 30 |
  +-----------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/uncompressed_length/dzfxuxUNCOMPRESSED_LENGTHdzfxuxhttps://mariadb.com/kb/en/library/uncompressed_length/dzfxuxdzfxux12dzfxux149qjzxqqvvbqSyntax
  ------ 
  value1 

  URL: https://mariadb.com/kb/en/library/shift-left/dzfxux<<dzfxuxhttps://mariadb.com/kb/en/library/shift-left/dzfxuxdzfxux19dzfxux243qjzxqqvvbqSyntax
  ------ 
  value1 >> value2
   
  Description
  ----------- 
  Converts a longlong (BIGINT) number (value1) to binary and
  shifts value2 units to the right.
   
  Examples
  -------- 
  SELECT 4 >> 2;
  +--------+
  | 4 >> 2 |
  +--------+
  | 1 |
  +--------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/shift-right/dzfxux>>dzfxuxhttps://mariadb.com/kb/en/library/shift-right/dzfxuxdzfxux19dzfxux244qjzxqqvvbqSyntax
  ------ 
  BIT_COUNT(N)
   
  Description
  ----------- 
  Returns the number of bits that are set in the argument N.
   
  Examples
  -------- 
  SELECT BIT_COUNT(29), BIT_COUNT(b'101010');
  +---------------+----------------------+
  | BIT_COUNT(29) | BIT_COUNT(b'101010') |
  +---------------+----------------------+
  | 4 | 3 |
  +---------------+----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bit_count/dzfxuxBIT_COUNTdzfxuxhttps://mariadb.com/kb/en/library/bit_count/dzfxuxdzfxux19dzfxux245qjzxqqvvbqSyntax
  ------ 
  ^
   
  Description
  ----------- 
  Bitwise XOR. Converts the values to binary and compares
  bits. If one (and only one) of the corresponding bits is 1
  is the resulting bit also 1.
   
  Examples
  -------- 
  SELECT 1 ^ 1;
  +-------+
  | 1 ^ 1 |
  +-------+
  | 0 |
  +-------+
   
  SELECT 1 ^ 0;
  +-------+
  | 1 ^ 0 |
  +-------+
  | 1 |
  +-------+
   
  SELECT 11 ^ 3;
  +--------+
  | 11 ^ 3 |
  +--------+
  | 8 |
  +--------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bitwise-xor/dzfxux^dzfxuxhttps://mariadb.com/kb/en/library/bitwise-xor/dzfxuxdzfxux19dzfxux246qjzxqqvvbqSyntax
  ------ 
  |
   
  Description
  ----------- 
  Bitwise OR. Converts the values to binary and compares bits.
  If either of the corresponding bits has a value of 1, the
  resulting bit is also 1.
   
  See also bitwise AND.
   
  Examples
  -------- 
  SELECT 2|1;
  +-----+
  | 2|1 |
  +-----+
  | 3 |
  +-----+
   
  SELECT 29 | 15;
  +---------+
  | 29 | 15 |
  +---------+
  | 31 |
  +---------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bitwise-or/dzfxux|dzfxuxhttps://mariadb.com/kb/en/library/bitwise-or/dzfxuxdzfxux19dzfxux247qjzxqqvvbqSyntax
  ------ 
  GET_LOCK(str,timeout)
   
  Description
  ----------- 
  Tries to obtain a lock with a name given by the string str,
  using a timeout of timeout seconds. Returns 1 if the lock
  was obtained successfully, 0 if the attempt timed out (for
  example, because another client has previously locked the
  name), or NULL if an error occurred (such as running out of
  memory or the thread was killed with mysqladmin kill).
   
  A lock is released with RELEASE_LOCK(), when the connection
  terminates (either normally or abnormally), or before
  MariaDB 10.0.2, when the connection executes another
  GET_LOCK statement. From MariaDB 10.0.2, a connection can
  hold multiple locks at the same time, so a lock that is no
  longer needed needs to be explicitly released.
   
  The IS_FREE_LOCK function returns whether a specified lock a
  free or not, and the IS_USED_LOCK whether the function is in
  use or not.
   
  Locks obtained with GET_LOCK() do not interact with
  transactions. That is, committing a transaction does not
  release any such locks obtained during the transaction.
   
  From MariaDB 10.0.2, it is also possible to recursively set
  the same lock. If a lock with the same name is set n times,
  it needs to be released n times as well. 
   
  str is case insensitive for GET_LOCK() and related
  functions. If str is an empty string or NULL, GET_LOCK()
  returns NULL and does nothing. From MariaDB 10.2.2, timeout
  supports microseconds. Before then, it was rounded to the
  closest integer.
   
  If the metadata_lock_info plugin is installed, locks
  acquired with this function are visible in the Information
  Schema METADATA_LOCK_INFO table.
   
  This function can be used to implement application locks or
  to simulate record locks. Names are locked on a server-wide
  basis. If a name has been locked by one client, GET_LOCK()
  blocks any request by another client for a lock with the
  same name. This allows clients that agree on a given lock
  name to use the name to perform cooperative advisory
  locking. But be aware that it also allows a client that is
  not among the set of cooperating clients to lock a name,
  either inadvertently or deliberately, and thus prevent any
  of the cooperating clients from locking that name. One way
  to reduce the likelihood of this is to use lock names that
  are database-specific or application-specific. For example,
  use lock names of the form db_name.str or app_name.str.
   
  Statements using the GET_LOCK() function are not safe for
  replication.
   
  The patch to permit multiple locks was contributed by
  Konstantin "Kostja" Osipov (MDEV-3917).
   
  Examples
  -------- 
  SELECT GET_LOCK('lock1',10);
  +----------------------+
  | GET_LOCK('lock1',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT IS_FREE_LOCK('lock1'), IS_USED_LOCK('lock1');
  +-----------------------+-----------------------+
  | IS_FREE_LOCK('lock1') | IS_USED_LOCK('lock1') |
  +-----------------------+-----------------------+
  | 0 | 46 |
  +-----------------------+-----------------------+
   
  SELECT IS_FREE_LOCK('lock2'), IS_USED_LOCK('lock2');
  +-----------------------+-----------------------+
  | IS_FREE_LOCK('lock2') | IS_USED_LOCK('lock2') |
  +-----------------------+-----------------------+
  | 1 | NULL |
  +-----------------------+-----------------------+
   
  From MariaDB 10.0.2, multiple locks can be held:
   
  SELECT GET_LOCK('lock2',10);
  +----------------------+
  | GET_LOCK('lock2',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT IS_FREE_LOCK('lock1'), IS_FREE_LOCK('lock2');
  +-----------------------+-----------------------+
  | IS_FREE_LOCK('lock1') | IS_FREE_LOCK('lock2') |
  +-----------------------+-----------------------+
  | 0 | 0 |
  +-----------------------+-----------------------+
   
  SELECT RELEASE_LOCK('lock1'), RELEASE_LOCK('lock2');
  +-----------------------+-----------------------+
  | RELEASE_LOCK('lock1') | RELEASE_LOCK('lock2') |
  +-----------------------+-----------------------+
  | 1 | 1 |
  +-----------------------+-----------------------+
   
  Before MariaDB 10.0.2, a connection could only hold a single
  lock:
   
  SELECT GET_LOCK('lock2',10);
  +----------------------+
  | GET_LOCK('lock2',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT IS_FREE_LOCK('lock1'), IS_FREE_LOCK('lock2');
  +-----------------------+-----------------------+
  | IS_FREE_LOCK('lock1') | IS_FREE_LOCK('lock2') |
  +-----------------------+-----------------------+
  | 1 | 0 |
  +-----------------------+-----------------------+
   
  SELECT RELEASE_LOCK('lock1'), RELEASE_LOCK('lock2');
  +-----------------------+-----------------------+
  | RELEASE_LOCK('lock1') | RELEASE_LOCK('lock2') |
  +-----------------------+-----------------------+
  | NULL | 1 |
  +-----------------------+-----------------------+
   
  From MariaDB 10.0.2, it is possible to hold the same lock
  recursively. This example is viewed using the
  metadata_lock_info plugin:
   
  SELECT GET_LOCK('lock3',10);
  +----------------------+
  | GET_LOCK('lock3',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT GET_LOCK('lock3',10);
  +----------------------+
  | GET_LOCK('lock3',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;
   
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |
  TABLE_SCHEMA | TABLE_NAME |
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |
  +-----------+---------------------+---------------+-----------+--------------+------------+
   
  SELECT RELEASE_LOCK('lock3');
  +-----------------------+
  | RELEASE_LOCK('lock3') |
  +-----------------------+
  | 1 |
  +-----------------------+
   
  SELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;
   
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |
  TABLE_SCHEMA | TABLE_NAME |
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |
  +-----------+---------------------+---------------+-----------+--------------+------------+
   
  SELECT RELEASE_LOCK('lock3');
  +-----------------------+
  | RELEASE_LOCK('lock3') |
  +-----------------------+
  | 1 |
  +-----------------------+
   
  SELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;
   
  Empty set (0.000 sec)
   
  Timeout example: Connection 1:
   
  SELECT GET_LOCK('lock4',10);
  +----------------------+
  | GET_LOCK('lock4',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  Connection 2:
   
  SELECT GET_LOCK('lock4',10);
   
  After 10 seconds...
   
  +----------------------+
  | GET_LOCK('lock4',10) |
  +----------------------+
  | 0 |
  +----------------------+
   
  Deadlocks are automatically detected and resolved.
  Connection 1:
   
  SELECT GET_LOCK('lock5',10); 
  +----------------------+
  | GET_LOCK('lock5',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  Connection 2:
   
  SELECT GET_LOCK('lock6',10);
  +----------------------+
  | GET_LOCK('lock6',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  Connection 1:
   
  SELECT GET_LOCK('lock6',10); 
  +----------------------+
  | GET_LOCK('lock6',10) |
  +----------------------+
  | 0 |
  +----------------------+
   
  Connection 2:
   
  SELECT GET_LOCK('lock5',10);
  ERROR 1213 (40001): Deadlock found when trying to get lock;
   try restarting transaction
   


  URL: https://mariadb.com/kb/en/library/get_lock/dzfxuxGET_LOCKdzfxuxhttps://mariadb.com/kb/en/library/get_lock/dzfxuxdzfxux14dzfxux158qjzxqqvvbqINET6_ATON() has been available since MariaDB 10.0.12.
   
  Syntax
  ------ 
  INET6_ATON(expr)
   
  Description
  ----------- 
  Given an IPv6 or IPv4 network address as a string, returns a
  binary string that represents the numeric value of the
  address.
   
  No trailing zone ID's or traling network masks are
  permitted. For IPv4 addresses, or IPv6 addresses with IPv4
  address parts, no classful addresses or trailing port
  numbers are permitted and octal numbers are not supported.
   
  The returned binary string will be VARBINARY(16) or
  VARBINARY(4) for IPv6 and IPv4 addresses respectively.
   
  Returns NULL if the argument is not understood.
   
  Examples
  -------- 
  SELECT HEX(INET6_ATON('10.0.1.1'));
  +-----------------------------+
  | HEX(INET6_ATON('10.0.1.1')) |
  +-----------------------------+
  | 0A000101 |
  +-----------------------------+
   
  SELECT HEX(INET6_ATON('48f3::d432:1431:ba23:846f'));
  +----------------------------------------------+
  | HEX(INET6_ATON('48f3::d432:1431:ba23:846f')) |
  +----------------------------------------------+
  | 48F3000000000000D4321431BA23846F |
  +----------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/inet6_aton/dzfxuxINET6_ATONdzfxuxhttps://mariadb.com/kb/en/library/inet6_aton/dzfxuxdzfxux14dzfxux159qjzxqqvvbqINET6_NTOA() has been available from MariaDB 10.0.12.
   
  Syntax
  ------ 
  INET6_NTOA(expr)
   
  Description
  ----------- 
  Given an IPv6 or IPv4 network address as a numeric binary
  string, returns the address as a nonbinary string in the
  connection character set.
   
  The return string is lowercase, and is platform independent,
  since it does not use functions specific to the operating
  system. It has a maximum length of 39 characters.
   
  Returns NULL if the argument is not understood.
   
  Examples
  -------- 
  SELECT INET6_NTOA(UNHEX('0A000101'));
  +-------------------------------+
  | INET6_NTOA(UNHEX('0A000101')) |
  +-------------------------------+
  | 10.0.1.1 |
  +-------------------------------+
   
  SELECT
  INET6_NTOA(UNHEX('48F3000000000000D4321431BA23846F'));
  +-------------------------------------------------------+
  | INET6_NTOA(UNHEX('48F3000000000000D4321431BA23846F')) |
  +-------------------------------------------------------+
  | 48f3::d432:1431:ba23:846f |
  +-------------------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/inet6_ntoa/dzfxuxINET6_NTOAdzfxuxhttps://mariadb.com/kb/en/library/inet6_ntoa/dzfxuxdzfxux14dzfxux160qjzxqqvvbqIS_IPV4() has been available since MariaDB 10.0.12.
   
  Syntax
  ------ 
  IS_IPV4(expr)
   
  Description
  ----------- 
  If the expression is a valid IPv4 address, returns 1,
  otherwise returns 0.
   
  IS_IPV4() is stricter than INET_ATON(), but as strict as
  INET6_ATON(), in determining the validity of an IPv4
  address. This implies that if IS_IPV4 returns 1, the same
  expression will always return a non-NULL result when passed
  to INET_ATON(), but that the reverse may not apply.
   
  Examples
  -------- 
  SELECT IS_IPV4('1110.0.1.1');
  +-----------------------+
  | IS_IPV4('1110.0.1.1') |
  +-----------------------+
  | 0 |
  +-----------------------+
   
  SELECT IS_IPV4('48f3::d432:1431:ba23:846f');
  +--------------------------------------+
  | IS_IPV4('48f3::d432:1431:ba23:846f') |
  +--------------------------------------+
  | 0 |
  +--------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/is_ipv4/dzfxuxIS_IPV4dzfxuxhttps://mariadb.com/kb/en/library/is_ipv4/dzfxuxdzfxux14dzfxux164qjzxqqvvbqIS_IPV4_COMPAT() has been available since MariaDB 10.0.12.
   
  Syntax
  ------ 
  IS_IPV4_COMPAT(expr)
   
  Description
  ----------- 
  Returns 1 if a given numeric binary string IPv6 address,
  such as returned by INET6_ATON(), is IPv4-compatible,
  otherwise returns 0. 
   
  Examples
  -------- 
  SELECT IS_IPV4_COMPAT(INET6_ATON('::10.0.1.1'));
  +------------------------------------------+
  | IS_IPV4_COMPAT(INET6_ATON('::10.0.1.1')) |
  +------------------------------------------+
  | 1 |
  +------------------------------------------+
   
  SELECT
  IS_IPV4_COMPAT(INET6_ATON('::48f3::d432:1431:ba23:846f'));
  +-----------------------------------------------------------+
  |
  IS_IPV4_COMPAT(INET6_ATON('::48f3::d432:1431:ba23:846f'))
  |
  +-----------------------------------------------------------+
  | 0 |
  +-----------------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/is_ipv4_compat/dzfxuxIS_IPV4_COMPATdzfxuxhttps://mariadb.com/kb/en/library/is_ipv4_compat/dzfxuxdzfxux14dzfxux165qjzxqqvvbqIS_IPV4_MAPPED() has been available since MariaDB 10.0.12.
   
  Syntax
  ------ 
  IS_IPV4_MAPPED(expr)
   
  Description
  ----------- 
  Returns 1 if a given a numeric binary string IPv6 address,
  such as returned by INET6_ATON(), is a valid IPv4-mapped
  address, otherwise returns 0.
   
  Examples
  -------- 
  SELECT IS_IPV4_MAPPED(INET6_ATON('::10.0.1.1'));
  +------------------------------------------+
  | IS_IPV4_MAPPED(INET6_ATON('::10.0.1.1')) |
  +------------------------------------------+
  | 0 |
  +------------------------------------------+
   
  SELECT IS_IPV4_MAPPED(INET6_ATON('::ffff:10.0.1.1'));
  +-----------------------------------------------+
  | IS_IPV4_MAPPED(INET6_ATON('::ffff:10.0.1.1')) |
  +-----------------------------------------------+
  | 1 |
  +-----------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/is_ipv4_mapped/dzfxuxIS_IPV4_MAPPEDdzfxuxhttps://mariadb.com/kb/en/library/is_ipv4_mapped/dzfxuxdzfxux14dzfxux166qjzxqqvvbqSyntax
  ------ 
  ~
   
  Description
  ----------- 
  Bitwise NOT. Converts the value to 4 bytes binary and
  inverts all bits.
   
  Examples
  -------- 
  SELECT 3 & ~1;
  +--------+
  | 3 & ~1 |
  +--------+
  | 2 |
  +--------+
   
  SELECT 5 & ~1;
  +--------+
  | 5 & ~1 |
  +--------+
  | 4 |
  +--------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bitwise-not/dzfxux~dzfxuxhttps://mariadb.com/kb/en/library/bitwise-not/dzfxuxdzfxux19dzfxux248qjzxqqvvbqDescription
  ----------- 
  The constants TRUE and FALSE evaluate to 1 and 0,
  respectively. The
  constant names can be written in any lettercase.
   
  Examples
  -------- 
  SELECT TRUE, true, FALSE, false;
   
  +------+------+-------+-------+
  | TRUE | TRUE | FALSE | FALSE |
  +------+------+-------+-------+
  | 1 | 1 | 0 | 0 |
  +------+------+-------+-------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/true-false/dzfxuxTRUE FALSEdzfxuxhttps://mariadb.com/kb/en/library/true-false/dzfxuxdzfxux19dzfxux250qjzxqqvvbqCHECK VIEW was introduced in MariaDB 10.0.18.
   
  Syntax
  ------ 
  CHECK VIEW view_name
   
  Description
  ----------- 
  The CHECK VIEW statement was introduced in MariaDB 10.0.18
  to assist with fixing MDEV-6916, an issue introduced in
  MariaDB 5.2 where the view algorithms were swapped. It
  checks whether the view algorithm is correct. It is run as
  part of mysql_upgrade, and should not normally be required
  in regular use.
   


  URL: https://mariadb.com/kb/en/library/check-view/dzfxuxCHECK VIEWdzfxuxhttps://mariadb.com/kb/en/library/check-view/dzfxuxdzfxux20dzfxux253qjzxqqvvbqDescription
  ----------- 
  A BLOB is a binary large object that can hold a variable
  amount of
  data. The four BLOB types are 
  TINYBLOB,
  BLOB, 
  MEDIUMBLOB, and
  LONGBLOB.
   
  These differ only in the maximum length of the values they
  can hold. 
   
  The TEXT types are 
  TINYTEXT,
  TEXT,
  MEDIUMTEXT, and
  LONGTEXT.
  JSON (alias for LONGTEXT)
   
  These correspond to the four BLOB types and have the same
  maximum lengths and storage requirements.
   
  Starting from MariaDB 10.2.1, BLOB and TEXT columns can have
  a DEFAULT value.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/blob-and-text-data-types/dzfxuxBLOB and TEXT Data Typesdzfxuxhttps://mariadb.com/kb/en/library/blob-and-text-data-types/dzfxuxdzfxux22dzfxux269qjzxqqvvbqMASTER_GTID_WAIT() was included in MariaDB 10.0.9.
   
  Syntax
  ------ 
  MASTER_GTID_WAIT(gtid-list[, timeout)
   
  Description
  ----------- 
  This function takes a string containing a comma-separated
  list of global transaction id's
  (similar to the value of, for example, gtid_binlog_pos). It
  waits until the value of gtid_slave_pos has the same or
  higher seq_no within all replication domains specified in
  the gtid-list; in other words, it waits until the slave has
  reached the specified GTID position.
   
  An optional second argument gives a timeout in seconds. If
  the timeout
  expires before the specified GTID position is reached, then
  the function
  returns -1. Passing NULL or a negative number for the
  timeout means no timeout, and the function will wait
  indefinitely.
   
   If the wait completes without a timeout, 0 is returned.
  Passing NULL for the
   gtid-list makes the function return NULL immediately,
  without waiting.
   
  The gtid-list may be the empty string, in which case
  MASTER_GTID_WAIT()
  returns immediately. If the gtid-list contains fewer domains
  than
  gtid_slave_pos, then only those domains are waited upon. If
  gtid-list
  contains a domain that is not present in @@gtid_slave_pos,
  then
  MASTER_GTID_WAIT() will wait until an event containing such
  domain_id arrives
  on the slave (or until timed out or killed).
   
  MASTER_GTID_WAIT() can be useful to ensure that a slave has
  caught up to
  a master. Simply take the value of gtid_binlog_pos on the
  master, and use it in a MASTER_GTID_WAIT() call on the
  slave; when the call completes, the slave
  will have caught up with that master position.
   
  MASTER_GTID_WAIT() can also be used in client applications
  together with the
  last_gtid session variable. This is useful in a
  read-scaleout replication setup, where the application
  writes to a single master but divides the
  reads out to a number of slaves to distribute the load. In
  such a setup, there
  is a risk that an application could first do an update on
  the master, and then
  a bit later do a read on a slave, and if the slave is not
  fast enough, the
  data read from the slave might not include the update just
  made, possibly
  confusing the application and/or the end-user. One way to
  avoid this is to
  request the value of last_gtid on the master just after the
  update. Then
  before doing the read on the slave, do a MASTER_GTID_WAIT()
  on the value
  obtained from the master; this will ensure that the read is
  not performed
  until the slave has replicated sufficiently far for the
  update to have become
  visible.
   
  Note that MASTER_GTID_WAIT() can be used even if the slave
  is configured not
  to use GTID for connections (CHANGE MASTER TO
  master_use_gtid=no). This is
  because from MariaDB 10, GTIDs are always logged on the
  master server, and
  always recorded on the slave servers.
   
  Differences to MASTER_POS_WAIT()
   
  MASTER_GTID_WAIT() is global; it waits for any master
  connection to reach
   the specified GTID position. MASTER_POS_WAIT() works only
  against a
   specific connection. This also means that while
  MASTER_POS_WAIT() aborts if
   its master connection is terminated with STOP SLAVE or due
  to an error,
   MASTER_GTID_WAIT() continues to wait while slaves are
  stopped.
   
  MASTER_GTID_WAIT() can take its timeout as a floating-point
  value, so a
   timeout in fractional seconds is supported, eg.
  MASTER_GTID_WAIT("0-1-100",
   0.5). (The minimum wait is one microsecond, 0.000001
  seconds).
   
  MASTER_GTID_WAIT() allows one to specify a timeout of zero
  in order to do a
   non-blocking check to see if the slaves have progressed to
  a specific GTID position
   (MASTER_POS_WAIT() takes a zero timeout as meaning an
  infinite wait). To do
   an infinite MASTER_GTID_WAIT(), specify a negative timeout,
  or omit the
   timeout argument.
   
  MASTER_GTID_WAIT() does not return the number of events
  executed since the
   wait started, nor does it return NULL if a slave thread is
  stopped. It
   always returns either 0 for successful wait completed, or
  -1 for timeout
   reached (or NULL if the specified gtid-pos is NULL).
   
  Since MASTER_GTID_WAIT() looks only at the seq_no part of
  the GTIDs, not the
  server_id, care is needed if a slave becomes diverged from
  another server so
  that two different GTIDs with the same seq_no (in the same
  domain) arrive at
  the same server. This situation is in any case best avoided;
  setting
  gtid_strict_mode is recommended, as this will prevent any
  such out-of-order sequence numbers from ever being
  replicated on a slave.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/master_gtid_wait/dzfxuxMASTER_GTID_WAITdzfxuxhttps://mariadb.com/kb/en/library/master_gtid_wait/dzfxuxdzfxux14dzfxux169qjzxqqvvbqMASTER_POS_WAIT was introduced in MariaDB 10.0.9.
   
  Syntax
  ------ 
  MASTER_POS_WAIT(log_name,log_pos[,timeout,["connection_name"]])
   
  Description
  ----------- 
  This function is useful in replication for controlling
  master/slave synchronization. It blocks until the slave has
  read and applied all updates up to the specified position
  (log_name,log_pos) in the master log. The return value is
  the number of log events the slave had to wait for to
  advance to the specified position. The function returns NULL
  if
  the slave SQL thread is not started, the slave's master
  information is not
  initialized, the arguments are incorrect, or an error
  occurs. It returns -1 if
  the timeout has been exceeded. If the slave SQL thread stops
  while
   MASTER_POS_WAIT() is waiting, the function returns NULL. If
  the slave is past the specified position, the function
  returns immediately.
   
  If a timeout value is specified, MASTER_POS_WAIT() stops
  waiting when timeout seconds have elapsed. timeout must be
  greater than 0; a
  zero or negative timeout means no timeout.
   
  The connection_name is used when you are using
  multi-source-replication. If you don't specify it, it's
  set to the value of the default_master_connection system
  variable.
   
  Statements using the MASTER_POS_WAIT() function are not safe
  for replication.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/master_pos_wait/dzfxuxMASTER_POS_WAITdzfxuxhttps://mariadb.com/kb/en/library/master_pos_wait/dzfxuxdzfxux14dzfxux170qjzxqqvvbqDescription
  ----------- 
  The CHAR BYTE data type is an alias for the 
  BINARY data type. This is a
  compatibility feature.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/char-byte/dzfxuxCHAR BYTEdzfxuxhttps://mariadb.com/kb/en/library/char-byte/dzfxuxdzfxux22dzfxux272qjzxqqvvbqSyntax
  ------ 
  LONGBLOB
   
  Description
  ----------- 
  A BLOB column with a 
  maximum length of 4,294,967,295 bytes or 4GB (232 - 1). The
  effective maximum length of LONGBLOB columns depends on the
  configured maximum packet size in the client/server protocol
  and
  available memory. Each LONGBLOB value is stored using a
  four-byte
  length prefix that indicates the number of bytes in the
  value.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, BLOB is a synonym for
  LONGBLOB.
   


  URL: https://mariadb.com/kb/en/library/longblob/dzfxuxLONGBLOBdzfxuxhttps://mariadb.com/kb/en/library/longblob/dzfxuxdzfxux22dzfxux281qjzxqqvvbqSyntax
  ------ 
  MEDIUMBLOB
   
  Description
  ----------- 
  A BLOB column with a maximum
  length of 16,777,215 (224 - 1) bytes.
  Each MEDIUMBLOB value is stored using a three-byte length
  prefix that
  indicates the number of bytes in the value. 
   


  URL: https://mariadb.com/kb/en/library/mediumblob/dzfxuxMEDIUMBLOBdzfxuxhttps://mariadb.com/kb/en/library/mediumblob/dzfxuxdzfxux22dzfxux283qjzxqqvvbqSyntax
  ------ 
  MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE
  collation_name]
   
  Description
  ----------- 
  A TEXT column with a 
  maximum length of 16,777,215 (224 - 1)
  characters. The effective maximum length is less if the
  value
  contains multi-byte characters. Each MEDIUMTEXT value is
  stored using
  a three-byte length prefix that indicates the number of
  bytes in the
  value.
   


  URL: https://mariadb.com/kb/en/library/mediumtext/dzfxuxMEDIUMTEXTdzfxuxhttps://mariadb.com/kb/en/library/mediumtext/dzfxuxdzfxux22dzfxux285qjzxqqvvbqSyntax
  ------ 
  RELEASE_LOCK(str)
   
  Description
  ----------- 
  Releases the lock named by the string str that was obtained
  with GET_LOCK(). Returns 1 if the lock was released, 0 if
  the lock was not established by this thread (in which case
  the lock is not
  released), and NULL if the named lock did not exist. The
  lock does not exist if it was never obtained by a call to
  GET_LOCK() or if it has previously been released.
   
  MariaDB until 10.0.1
   
  Before 10.0.2, GET_LOCK() released the existing lock, if
  any. Since 10.0.2 this does not happen, because multiple
  locks are allowed.
   
  str is case insensitive. If str is an empty string or NULL,
  RELEASE_LOCK() returns NULL and does nothing.
   
  Statements using the RELEASE_LOCK() function are not safe
  for replication.
   
  The DO statement is convenient to use with RELEASE_LOCK().
   
  Examples
  -------- 
  Connection1:
   
  SELECT GET_LOCK('lock1',10);
  +----------------------+
  | GET_LOCK('lock1',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  Connection 2:
   
  SELECT GET_LOCK('lock2',10);
  +----------------------+
  | GET_LOCK('lock2',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  Connection 1:
   
  SELECT RELEASE_LOCK('lock1'), RELEASE_LOCK('lock2'),
  RELEASE_LOCK('lock3');
  +-----------------------+-----------------------+-----------------------+
  | RELEASE_LOCK('lock1') | RELEASE_LOCK('lock2') |
  RELEASE_LOCK('lock3') |
  +-----------------------+-----------------------+-----------------------+
  | 1 | 0 | NULL |
  +-----------------------+-----------------------+-----------------------+
   
  From MariaDB 10.0.2, it is possible to hold the same lock
  recursively. This example is viewed using the
  metadata_lock_info plugin:
   
  SELECT GET_LOCK('lock3',10);
  +----------------------+
  | GET_LOCK('lock3',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT GET_LOCK('lock3',10);
  +----------------------+
  | GET_LOCK('lock3',10) |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;
   
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |
  TABLE_SCHEMA | TABLE_NAME |
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |
  +-----------+---------------------+---------------+-----------+--------------+------------+
   
  SELECT RELEASE_LOCK('lock3');
  +-----------------------+
  | RELEASE_LOCK('lock3') |
  +-----------------------+
  | 1 |
  +-----------------------+
   
  SELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;
   
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | THREAD_ID | LOCK_MODE | LOCK_DURATION | LOCK_TYPE |
  TABLE_SCHEMA | TABLE_NAME |
  +-----------+---------------------+---------------+-----------+--------------+------------+
  | 46 | MDL_SHARED_NO_WRITE | NULL | User lock | lock3 | |
  +-----------+---------------------+---------------+-----------+--------------+------------+
   
  SELECT RELEASE_LOCK('lock3');
  +-----------------------+
  | RELEASE_LOCK('lock3') |
  +-----------------------+
  | 1 |
  +-----------------------+
   
  SELECT * FROM INFORMATION_SCHEMA.METADATA_LOCK_INFO;
   
  Empty set (0.000 sec)
   


  URL: https://mariadb.com/kb/en/library/release_lock/dzfxuxRELEASE_LOCKdzfxuxhttps://mariadb.com/kb/en/library/release_lock/dzfxuxdzfxux14dzfxux172qjzxqqvvbqSyntax
  ------ 
  UUID()
   
  Description
  ----------- 
  Returns a Universal Unique Identifier (UUID) generated
  according to "DCE 1.1:
  Remote Procedure Call" (Appendix A) CAE (Common
  Applications Environment)
  Specifications published by The Open Group in October
  1997 
  (Document Number C706).
   
  A UUID is designed as a number that is globally unique in
  space and time. Two
  calls to UUID() are expected to generate two different
  values, even if these calls are performed on two separate
  computers that are
  not connected to each other.
   
  A UUID is a 128-bit number represented by a utf8 string of
  five
  hexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
  format:
  The first three numbers are generated from a timestamp.
  The fourth number preserves temporal uniqueness in case the
  timestamp value
   loses monotonicity (for example, due to daylight saving
  time).
  The fifth number is an IEEE 802 node number that provides
  spatial uniqueness.
   A random number is substituted if the latter is not
  available (for example,
   because the host computer has no Ethernet card, or we do
  not know how to find
   the hardware address of an interface on your operating
  system). In this case,
   spatial uniqueness cannot be guaranteed. Nevertheless, a
  collision should
   have very low probability.
   
  Currently, the MAC address of an interface is taken into
  account only on FreeBSD and Linux. On other operating
  systems, MariaDB uses a randomly generated 48-bit number.
   
  Statements using the UUID() function are not safe for
  replication.
   
  UUID() results are intended to be unique, but cannot always
  be relied upon to unpredictable and unguessable, so should
  not be relied upon for these purposes.
   
  Examples
  -------- 
  SELECT UUID();
  +--------------------------------------+
  | UUID() |
  +--------------------------------------+
  | cd41294a-afb0-11df-bc9b-00241dd75637 |
  +--------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/uuid/dzfxuxUUIDdzfxuxhttps://mariadb.com/kb/en/library/uuid/dzfxuxdzfxux14dzfxux174qjzxqqvvbqThe ROW data type was introduced in MariaDB 10.3.0.
   
  Syntax
  ------ 
  ROW (  [{,  }... ])
   
  Description
  ----------- 
  ROW is a data type for stored procedure variables.
   
  Features
   
  ROW fields as normal variables
   
  ROW fields (members) act as normal variables, and are able
  to appear in all
  query parts where a stored procedure variable is allowed:
  Assignment is using the := operator and the SET command:
   
  a.x:= 10;
   
  a.x:= b.x;
   
  SET a.x= 10, a.y=20, a.z= b.z;
   
  Passing to functions and operators:
   
  SELECT f1(rec.a), rec.a

  URL: https://mariadb.com/kb/en/library/row/dzfxuxROWdzfxuxhttps://mariadb.com/kb/en/library/row/dzfxuxdzfxux22dzfxux287qjzxqqvvbqSyntax
  ------ 
  SET('value1','value2',...) [CHARACTER SET charset_name]
  [COLLATE collation_name]
   
  Description
  ----------- 
  A set. A string object that can have zero or more values,
  each of
  which must be chosen from the list of values 'value1',
  'value2', ... A
  SET column can have a maximum of 64 members. SET values are
  represented internally as integers.
   


  URL: https://mariadb.com/kb/en/library/set-data-type/dzfxuxSET Data Typedzfxuxhttps://mariadb.com/kb/en/library/set-data-type/dzfxuxdzfxux22dzfxux288qjzxqqvvbqSyntax
  ------ 
  TIMESTAMP [(

  URL: https://mariadb.com/kb/en/library/timestamp/dzfxuxTIMESTAMPdzfxuxhttps://mariadb.com/kb/en/library/timestamp/dzfxuxdzfxux22dzfxux293qjzxqqvvbqSyntax
  ------ 
  TINYBLOB
   
  Description
  ----------- 
  A BLOB column with a maximum length of 
  255 (28 - 1) bytes. Each
  TINYBLOB value is stored using a one-byte length prefix that
  indicates
  the number of bytes in the value.
   


  URL: https://mariadb.com/kb/en/library/tinyblob/dzfxuxTINYBLOBdzfxuxhttps://mariadb.com/kb/en/library/tinyblob/dzfxuxdzfxux22dzfxux294qjzxqqvvbqSyntax
  ------ 
  TINYTEXT [CHARACTER SET charset_name] [COLLATE
  collation_name]
   
  Description
  ----------- 
  A TEXT column with a maximum length of 255 (28 - 1)
  characters. The effective maximum length is less if the
  value contains multi-byte characters. Each TINYTEXT value is
  stored using a one-byte length prefix that indicates the
  number of bytes in the value.
   


  URL: https://mariadb.com/kb/en/library/tinytext/dzfxuxTINYTEXTdzfxuxhttps://mariadb.com/kb/en/library/tinytext/dzfxuxdzfxux22dzfxux296qjzxqqvvbqSyntax
  ------ 
  VALUE(col_name) 
   
  MariaDB until 10.3.2
   
  VALUES(col_name) 
   
  Description
  ----------- 
  In an INSERT ... ON DUPLICATE KEY UPDATE statement, you can
  use the VALUES(col_name) function in the UPDATE clause to
  refer to column values from the INSERT portion of the
  statement. In other words, VALUES(col_name) in the UPDATE
  clause refers to the value of col_name that would be
  inserted, had no duplicate-key conflict occurred. This
  function is especially useful in multiple-row inserts.
   
  The VALUES() function is meaningful only in INSERT ... ON
  DUPLICATE KEY UPDATE statements and returns NULL otherwise.
   
  In MariaDB 10.3.3 this function was renamed to VALUE(),
  because it's incompatible with the standard Table Value
  Constructors syntax, implemented in MariaDB 10.3.3.
   
  The VALUES() function can still be used even from MariaDB
  10.3.3, but only in INSERT ... ON DUPLICATE KEY UPDATE
  statements; it's a syntax error otherwise.
   
  Examples
  -------- 
  INSERT INTO t (a,b,c) VALUES (1,2,3),(4,5,6)
   ON DUPLICATE KEY UPDATE c=VALUE(a)+VALUE(b);
   
  MariaDB until 10.3.2
   
  INSERT INTO t (a,b,c) VALUES (1,2,3),(4,5,6)
   ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/values-value/dzfxuxVALUES / VALUEdzfxuxhttps://mariadb.com/kb/en/library/values-value/dzfxuxdzfxux14dzfxux176qjzxqqvvbqSyntax
  ------ 
  OR, ||
   
  Description
  ----------- 
  Logical OR. When both operands are non-NULL, the result is 1
  if any
  operand is non-zero, and 0 otherwise. With a NULL operand,
  the result
  is 1 if the other operand is non-zero, and NULL otherwise.
  If both
  operands are NULL, the result is NULL.
   
  For this operator, short-circuit evaluation can be used.
   
  Note that, if the PIPES_AS_CONCAT SQL_MODE is set, || is
  used as a string concatenation operator. This means that a
  || b is the same as CONCAT(a,b). See CONCAT() for details.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, || ignores NULL.
   
  Examples
  -------- 
  SELECT 1 || 1;
   
  +--------+
  | 1 || 1 |
  +--------+
  | 1 |
  +--------+
   
  SELECT 1 || 0;
   
  +--------+
  | 1 || 0 |
  +--------+
  | 1 |
  +--------+
   
  SELECT 0 || 0;
   
  +--------+
  | 0 || 0 |
  +--------+
  | 0 |
  +--------+
   
  SELECT 0 || NULL;
   
  +-----------+
  | 0 || NULL |
  +-----------+
  | NULL |
  +-----------+
   
  SELECT 1 || NULL;
   
  +-----------+
  | 1 || NULL |
  +-----------+
  | 1 |
  +-----------+
   
  In Oracle mode, from MariaDB 10.3:
   
  SELECT 0 || NULL;
   
  +-----------+
  | 0 || NULL |
  +-----------+
  | 0 |
  +-----------+
   


  URL: https://mariadb.com/kb/en/library/or/dzfxux||dzfxuxhttps://mariadb.com/kb/en/library/or/dzfxuxdzfxux15dzfxux179qjzxqqvvbqSyntax
  ------ 
  XOR
   
  Description
  ----------- 
  XOR stands for eXclusive OR. Returns NULL if either operand
  is NULL. For non-NULL
  operands, evaluates to 1 if an odd number of operands is
  non-zero,
  otherwise 0 is returned.
   
  Examples
  -------- 
  SELECT 1 XOR 1;
   
  +---------+
  | 1 XOR 1 |
  +---------+
  | 0 |
  +---------+
   
  SELECT 1 XOR 0;
   
  +---------+
  | 1 XOR 0 |
  +---------+
  | 1 |
  +---------+
   
  SELECT 1 XOR NULL;
   
  +------------+
  | 1 XOR NULL |
  +------------+
  | NULL |
  +------------+
   
  In the following example, the right 1 XOR 1 is evaluated
  first, and returns 0. Then, 1 XOR 0 is evaluated, and 1 is
  returned.
   
  SELECT 1 XOR 1 XOR 1;
   
  +---------------+
  | 1 XOR 1 XOR 1 |
  +---------------+
  | 1 |
  +---------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/xor/dzfxuxXORdzfxuxhttps://mariadb.com/kb/en/library/xor/dzfxuxdzfxux15dzfxux180qjzxqqvvbqSyntax
  ------ 
  identifier = expr
   
  Description
  ----------- 
  The equal sign is used as both an assignment operator in
  certain contexts, and as a comparison operator. When used as
  assignment operator, the value on the right is assigned to
  the variable (or column, in some contexts) on the left.
   
  Since its use can be ambiguous, unlike the := assignment
  operator, the = assignment operator cannot be used in all
  contexts, and is only valid as part of a SET statement, or
  the SET clause of an UPDATE statement
   
  This operator works with both user-defined variables and
  local variables.
   
  Examples
  -------- 
  UPDATE table_name SET x = 2 WHERE x > 100;
   
  SET @x = 1, @y := 2;
   

   
   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/assignment-operators-assignment-operator/dzfxuxAssignment Operator (=)dzfxuxhttps://mariadb.com/kb/en/library/assignment-operators-assignment-operator/dzfxuxdzfxux15dzfxux181qjzxqqvvbqThe ability to create stored aggregate functions was added
  in MariaDB 10.3.3.
   
  Aggregate functions are functions that are computed over a
  sequence of rows and return one result for the sequence of
  rows.
   
  Creating a custom aggregate function is done using the
  CREATE FUNCTION statement with two main differences:
  The addition of the AGGREGATE keyword, so CREATE AGGREGATE
  FUNCTION
  The FETCH GROUP NEXT ROW instruction inside the loop
  Oracle PL/SQL compatibility using SQL/PL is provided
   
  Standard Syntax
   
  CREATE AGGREGATE FUNCTION function_name (parameters) RETURNS
  return_type
  BEGIN
   All types of declarations
   DECLARE CONTINUE HANDLER FOR NOT FOUND RETURN return_val;
   LOOP
   FETCH GROUP NEXT ROW; // fetches next row from table
   other instructions
   END LOOP;
  END
   
  Stored aggregate functions were a 2016 Google Summer of Code
  project by Varun Gupta.
   
  Using SQL/PL
   
  SET sql_mode=Oracle;
  DELIMITER //
   
  CREATE AGGREGATE FUNCTION function_name (parameters) RETURN
  return_type
   declarations
  BEGIN
   LOOP
   FETCH GROUP NEXT ROW; -- fetches next row from table
   -- other instructions
   
   END LOOP;
  EXCEPTION
   WHEN NO_DATA_FOUND THEN
   RETURN return_val;
  END //
   
  DELIMITER ;
   
  Examples
  -------- 
  First a simplified example:
   
  CREATE TABLE marks(stud_id INT, grade_count INT);
   
  INSERT INTO marks VALUES (1,6), (2,4), (3,7), (4,5), (5,8);
   
  SELECT * FROM marks;
   
  +---------+-------------+
  | stud_id | grade_count |
  +---------+-------------+
  | 1 | 6 |
  | 2 | 4 |
  | 3 | 7 |
  | 4 | 5 |
  | 5 | 8 |
  +---------+-------------+
   
  DELIMITER //
  CREATE AGGREGATE FUNCTION IF NOT EXISTS aggregate_count(x
  INT) RETURNS INT
  BEGIN
   DECLARE count_students INT DEFAULT 0;
   
   DECLARE CONTINUE HANDLER FOR NOT FOUND
   RETURN count_students;
   
   LOOP
   FETCH GROUP NEXT ROW;
   
   IF x THEN
   SET count_students = count_students+1;
   
   END IF;
   
   END LOOP;
   
  END //
  DELIMITER ;
   
  A non-trivial example that cannot easily be rewritten using
  existing functions:
   
  DELIMITER //
  CREATE AGGREGATE FUNCTION medi_int(x INT) RETURNS DOUBLE
  BEGIN
   DECLARE CONTINUE HANDLER FOR NOT FOUND
   BEGIN
   DECLARE res DOUBLE;
   
   DECLARE cnt INT DEFAULT (SELECT COUNT(*) FROM tt);
   DECLARE lim INT DEFAULT (cnt-1) DIV 2;
   
   IF cnt % 2 = 0 THEN
   SET res = (SELECT AVG(a) FROM (SELECT a FROM tt ORDER BY a
  LIMIT lim,2) ttt);
   ELSE
   SET res = (SELECT a FROM tt ORDER BY a LIMIT lim,1);
   END IF;
   
   DROP TEMPORARY TABLE tt;
   
   RETURN res;
   
   END;
   
   CREATE TEMPORARY TABLE tt (a INT);
   LOOP
   FETCH GROUP NEXT ROW;
   
   INSERT INTO tt VALUES (x);
   END LOOP;
   
  END //
  DELIMITER ;
   
  SQL/PL Example
   
  This uses the same marks table as created above.
   
  SET sql_mode=Oracle;
   
  DELIMITER //
   
  CREATE AGGREGATE FUNCTION aggregate_count(x INT) RETURN INT
  AS count_students INT DEFAULT 0;
   
  BEGIN
   LOOP
   FETCH GROUP NEXT ROW;
   
   IF x THEN
   SET count_students := count_students+1;
   
   END IF;
   
   END LOOP;
   
  EXCEPTION
   WHEN NO_DATA_FOUND THEN
   RETURN count_students;
   
  END aggregate_count //
  DELIMITER ;
   
  SELECT aggregate_count(stud_id) FROM marks;
   


  URL:
  https://mariadb.com/kb/en/library/stored-aggregate-functions/dzfxuxStored Aggregate Functionsdzfxuxhttps://mariadb.com/kb/en/library/stored-aggregate-functions/dzfxuxdzfxux16dzfxux183qjzxqqvvbqSyntax
  ------ 
  AVG([DISTINCT] expr)
   
  Description
  ----------- 
  Returns the average value of expr. The DISTINCT option can
  be used to return the average of the distinct values of
  expr. NULL values are ignored. It is an aggregate function,
  and so can be used with the GROUP BY clause.
   
  AVG() returns NULL if there were no matching rows.
   
  From MariaDB 10.2.0, AVG() can be used as a window function.
   
  Examples
  -------- 
  CREATE TABLE sales (sales_value INT);
   
  INSERT INTO sales VALUES(10),(20),(20),(40);
   
  SELECT AVG(sales_value) FROM sales;
   
  +------------------+
  | AVG(sales_value) |
  +------------------+
  | 22.5000 |
  +------------------+
   
  SELECT AVG(DISTINCT(sales_value)) FROM sales;
   
  +----------------------------+
  | AVG(DISTINCT(sales_value)) |
  +----------------------------+
  | 23.3333 |
  +----------------------------+
   
  Commonly, AVG() is used with a GROUP BY clause:
   
  CREATE TABLE student (name CHAR(10), test CHAR(10), score
  TINYINT); 
   
  INSERT INTO student VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);
   
  SELECT name, AVG(score) FROM student GROUP BY name;
   
  +---------+------------+
  | name | AVG(score) |
  +---------+------------+
  | Chun | 74.0000 |
  | Esben | 37.0000 |
  | Kaolin | 72.0000 |
  | Tatiana | 85.0000 |
  +---------+------------+
   
  Be careful to avoid this common mistake, not grouping
  correctly and returning mismatched data: 
   
  SELECT name,test,AVG(score) FROM student;
   
  +------+------+------------+
  | name | test | MIN(score) |
  +------+------+------------+
  | Chun | SQL | 31 |
  +------+------+------------+
   
  As a window function:
   
  CREATE TABLE student_test (name CHAR(10), test CHAR(10),
  score TINYINT); 
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);
   
  SELECT name, test, score, AVG(score) OVER (PARTITION BY
  test) 
   AS average_by_test FROM student_test;
   
  +---------+--------+-------+-----------------+
  | name | test | score | average_by_test |
  +---------+--------+-------+-----------------+
  | Chun | SQL | 75 | 65.2500 |
  | Chun | Tuning | 73 | 68.7500 |
  | Esben | SQL | 43 | 65.2500 |
  | Esben | Tuning | 31 | 68.7500 |
  | Kaolin | SQL | 56 | 65.2500 |
  | Kaolin | Tuning | 88 | 68.7500 |
  | Tatiana | SQL | 87 | 65.2500 |
  | Tatiana | Tuning | 83 | 68.7500 |
  +---------+--------+-------+-----------------+
   


  URL: https://mariadb.com/kb/en/library/avg/dzfxuxAVGdzfxuxhttps://mariadb.com/kb/en/library/avg/dzfxuxdzfxux16dzfxux184qjzxqqvvbqSyntax
  ------ 
  BIT_AND(expr)
   
  Description
  ----------- 
  Returns the bitwise AND of all bits in expr. The calculation
  is performed with 64-bit (BIGINT) precision. It is an
  aggregate function, and so can be used with the GROUP BY
  clause.
   
  From MariaDB 10.2.0, BIT_AND() can be used as a window
  function.
   
  Examples
  -------- 
  CREATE TABLE vals (x INT);
   
  INSERT INTO vals VALUES(111),(110),(100);
   
  SELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;
   
  +------------+-----------+------------+
  | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |
  +------------+-----------+------------+
  | 100 | 111 | 101 |
  +------------+-----------+------------+
   
  As an aggregate function:
   
  CREATE TABLE vals2 (category VARCHAR(1), x INT);
   
  INSERT INTO vals2 VALUES
   ('a',111),('a',110),('a',100),
   ('b','000'),('b',001),('b',011);
   
  SELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) 
   FROM vals GROUP BY category;
   
  +----------+------------+-----------+------------+
  | category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |
  +----------+------------+-----------+------------+
  | a | 100 | 111 | 101 |
  | b | 0 | 11 | 10 |
  +----------+------------+-----------+------------+
   


  URL: https://mariadb.com/kb/en/library/bit_and/dzfxuxBIT_ANDdzfxuxhttps://mariadb.com/kb/en/library/bit_and/dzfxuxdzfxux16dzfxux185qjzxqqvvbqSyntax
  ------ 
  BIT_OR(expr)
   
  Description
  ----------- 
  Returns the bitwise OR of all bits in expr. The calculation
  is performed with 64-bit (BIGINT) precision. It is an
  aggregate function, and so can be used with the GROUP BY
  clause.
   
  From MariaDB 10.2.0, BIT_OR can be used as a window
  function.
   
  Examples
  -------- 
  CREATE TABLE vals (x INT);
   
  INSERT INTO vals VALUES(111),(110),(100);
   
  SELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;
   
  +------------+-----------+------------+
  | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |
  +------------+-----------+------------+
  | 100 | 111 | 101 |
  +------------+-----------+------------+
   
  As an aggregate function:
   
  CREATE TABLE vals2 (category VARCHAR(1), x INT);
   
  INSERT INTO vals2 VALUES
   ('a',111),('a',110),('a',100),
   ('b','000'),('b',001),('b',011);
   
  SELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) 
   FROM vals GROUP BY category;
   
  +----------+------------+-----------+------------+
  | category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |
  +----------+------------+-----------+------------+
  | a | 100 | 111 | 101 |
  | b | 0 | 11 | 10 |
  +----------+------------+-----------+------------+
   


  URL: https://mariadb.com/kb/en/library/bit_or/dzfxuxBIT_ORdzfxuxhttps://mariadb.com/kb/en/library/bit_or/dzfxuxdzfxux16dzfxux186qjzxqqvvbqSyntax
  ------ 
  CLOSE cursor_name
   
  Description
  ----------- 
  This statement closes a previously opened cursor. The cursor
  must have been previously opened or else an error occurs.
   
  If not closed explicitly, a cursor is closed at the end of
  the
  compound statement in which it was declared.
   
  See Cursor Overview for an example.
   


  URL: https://mariadb.com/kb/en/library/close/dzfxuxCLOSEdzfxuxhttps://mariadb.com/kb/en/library/close/dzfxuxdzfxux23dzfxux302qjzxqqvvbqSyntax
  ------ 


  URL: https://mariadb.com/kb/en/library/declare-cursor/dzfxuxDECLARE CURSORdzfxuxhttps://mariadb.com/kb/en/library/declare-cursor/dzfxuxdzfxux23dzfxux304qjzxqqvvbqSyntax
  ------ 
  FETCH cursor_name INTO var_name [, var_name] ...
   
  Description
  ----------- 
  This statement fetches the next row (if a row exists) using
  the
  specified open cursor, and advances the cursor pointer.
   
  var_name can be a local variable, but not a user-defined
  variable.
   
  If no more rows are available, a No Data condition occurs
  with
  SQLSTATE value 02000. To detect this condition, you can set
  up a
  handler for it (or for a NOT FOUND condition).
   
  See Cursor Overview for an example.
   


  URL: https://mariadb.com/kb/en/library/fetch/dzfxuxFETCHdzfxuxhttps://mariadb.com/kb/en/library/fetch/dzfxuxdzfxux23dzfxux307qjzxqqvvbqThe GOTO statement was introduced in MariaDB 10.3 for Oracle
  compatibility.
   
  Syntax
  ------ 
  GOTO label
   
  Description
  ----------- 
  The GOTO statement causes the code to jump to the specified
  label, and continue operating from there. It is only
  accepted when in Oracle mode.
   
  Example
   
  SET sql_mode=ORACLE;
   
  DELIMITER //
   
  CREATE OR REPLACE PROCEDURE p1 AS
   
  BEGIN
   
   SELECT 1;
   
   GOTO label;
   
   SELECT 2;
   
   SELECT 3;
   
  END;
   
  //
   
  DELIMITER 
   
  call p1();
  +---+
  | 1 |
  +---+
  | 1 |
  +---+
  1 row in set (0.000 sec)
   
  +---+
  | 3 |
  +---+
  | 3 |
  +---+
  1 row in set (0.000 sec)
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/goto/dzfxuxGOTOdzfxuxhttps://mariadb.com/kb/en/library/goto/dzfxuxdzfxux23dzfxux309qjzxqqvvbqSyntax
  ------ 
  IF search_condition THEN statement_list
   [ELSEIF search_condition THEN statement_list] ...
   [ELSE statement_list]
  END IF;
   
  Description
  ----------- 
  IF implements a basic conditional construct. If the
  search_condition
  evaluates to true, the corresponding SQL statement list is
  executed.
  If no search_condition matches, the statement list in the
  ELSE clause
  is executed. Each statement_list consists of one or more
  statements.
   


  URL: https://mariadb.com/kb/en/library/if/dzfxuxIFdzfxuxhttps://mariadb.com/kb/en/library/if/dzfxuxdzfxux23dzfxux310qjzxqqvvbqSyntax
  ------ 
  BIT_XOR(expr)
   
  Description
  ----------- 
  Returns the bitwise XOR of all bits in expr. The calculation
  is performed with 64-bit (BIGINT) precision. It is an
  aggregate function, and so can be used with the GROUP BY
  clause.
   
  From MariaDB 10.2.0, BIT_XOR() can be used as a window
  function.
   
  Examples
  -------- 
  CREATE TABLE vals (x INT);
   
  INSERT INTO vals VALUES(111),(110),(100);
   
  SELECT BIT_AND(x), BIT_OR(x), BIT_XOR(x) FROM vals;
   
  +------------+-----------+------------+
  | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |
  +------------+-----------+------------+
  | 100 | 111 | 101 |
  +------------+-----------+------------+
   
  As an aggregate function:
   
  CREATE TABLE vals2 (category VARCHAR(1), x INT);
   
  INSERT INTO vals2 VALUES
   ('a',111),('a',110),('a',100),
   ('b','000'),('b',001),('b',011);
   
  SELECT category, BIT_AND(x), BIT_OR(x), BIT_XOR(x) 
   FROM vals GROUP BY category;
   
  +----------+------------+-----------+------------+
  | category | BIT_AND(x) | BIT_OR(x) | BIT_XOR(x) |
  +----------+------------+-----------+------------+
  | a | 100 | 111 | 101 |
  | b | 0 | 11 | 10 |
  +----------+------------+-----------+------------+
   


  URL: https://mariadb.com/kb/en/library/bit_xor/dzfxuxBIT_XORdzfxuxhttps://mariadb.com/kb/en/library/bit_xor/dzfxuxdzfxux16dzfxux187qjzxqqvvbqSyntax
  ------ 
  COUNT(expr)
   
  Description
  ----------- 
  Returns a count of the number of non-NULL values of expr in
  the rows retrieved by a SELECT statement. The result is a
  BIGINT value. It is an aggregate function, and so can be
  used with the GROUP BY clause.
   
  COUNT(*) counts the total number of rows in a table.
   
  COUNT() returns 0 if there were no matching rows.
   
  From MariaDB 10.2.0, COUNT() can be used as a window
  function.
   
  Examples
  -------- 
  CREATE TABLE student (name CHAR(10), test CHAR(10), score
  TINYINT); 
   
  INSERT INTO student VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);
   
  SELECT COUNT(*) FROM student;
   
  +----------+
  | COUNT(*) |
  +----------+
  | 8 |
  +----------+
   
  COUNT(DISTINCT) example:
   
  SELECT COUNT(DISTINCT (name)) FROM student;
   
  +------------------------+
  | COUNT(DISTINCT (name)) |
  +------------------------+
  | 4 |
  +------------------------+
   
  As a window function
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, COUNT(score) OVER (PARTITION BY
  name) 
   AS tests_written FROM student_test;
   
  +---------+--------+-------+---------------+
  | name | test | score | tests_written |
  +---------+--------+-------+---------------+
  | Chun | SQL | 75 | 2 |
  | Chun | Tuning | 73 | 2 |
  | Esben | SQL | 43 | 2 |
  | Esben | Tuning | 31 | 2 |
  | Kaolin | SQL | 56 | 2 |
  | Kaolin | Tuning | 88 | 2 |
  | Tatiana | SQL | 87 | 1 |
  +---------+--------+-------+---------------+
   


  URL: https://mariadb.com/kb/en/library/count/dzfxuxCOUNTdzfxuxhttps://mariadb.com/kb/en/library/count/dzfxuxdzfxux16dzfxux188qjzxqqvvbqSyntax
  ------ 
  MAX([DISTINCT] expr)
   
  Description
  ----------- 
  Returns the largest, or maximum, value of expr. MAX() can
  also take a string
  argument in which case it returns the maximum string value.
  The DISTINCT
  keyword can be used to find the maximum of the distinct
  values of expr,
  however, this produces the same result as omitting DISTINCT.
   
  Note that SET and ENUM fields are currently compared by
  their string value rather than their relative position in
  the set, so MAX() may produce a different highest result
  than ORDER BY DESC.
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, MAX() can be used as a window function.
   
  MAX() returns NULL if there were no matching rows.
   
  Examples
  -------- 
  CREATE TABLE student (name CHAR(10), test CHAR(10), score
  TINYINT); 
   
  INSERT INTO student VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);
   
  SELECT name, MAX(score) FROM student GROUP BY name;
   
  +---------+------------+
  | name | MAX(score) |
  +---------+------------+
  | Chun | 75 |
  | Esben | 43 |
  | Kaolin | 88 |
  | Tatiana | 87 |
  +---------+------------+
   
  MAX string:
   
  SELECT MAX(name) FROM student;
   
  +-----------+
  | MAX(name) |
  +-----------+
  | Tatiana |
  +-----------+
   
  Be careful to avoid this common mistake, not grouping
  correctly and returning mismatched data: 
   
  SELECT name,test,MAX(SCORE) FROM student;
   
  +------+------+------------+
  | name | test | MAX(SCORE) |
  +------+------+------------+
  | Chun | SQL | 88 |
  +------+------+------------+
   
  Difference between ORDER BY DESC and MAX():
   
  CREATE TABLE student2(name CHAR(10),grade
  ENUM('b','c','a'));
   
  INSERT INTO student2
  VALUES('Chun','b'),('Esben','c'),('Kaolin','a');
   
  SELECT MAX(grade) FROM student2;
   
  +------------+
  | MAX(grade) |
  +------------+
  | c |
  +------------+
   
  SELECT grade FROM student2 ORDER BY grade DESC LIMIT 1;
   
  +-------+
  | grade |
  +-------+
  | a |
  +-------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, MAX(score) 
   OVER (PARTITION BY name) AS highest_score FROM
  student_test;
   
  +---------+--------+-------+---------------+
  | name | test | score | highest_score |
  +---------+--------+-------+---------------+
  | Chun | SQL | 75 | 75 |
  | Chun | Tuning | 73 | 75 |
  | Esben | SQL | 43 | 43 |
  | Esben | Tuning | 31 | 43 |
  | Kaolin | SQL | 56 | 88 |
  | Kaolin | Tuning | 88 | 88 |
  | Tatiana | SQL | 87 | 87 |
  +---------+--------+-------+---------------+
   


  URL: https://mariadb.com/kb/en/library/max/dzfxuxMAXdzfxuxhttps://mariadb.com/kb/en/library/max/dzfxuxdzfxux16dzfxux190qjzxqqvvbqSyntax
  ------ 
  ITERATE label
   
  ITERATE can appear only within LOOP, REPEAT, and WHILE
  statements.
  ITERATE means "do the loop again", and uses the
  statement's label to determine which statements to repeat.
  The label must be in the same stored program, not in a
  caller procedure.
   
  If you try to use ITERATE with a non-existing label, or if
  the label is associated to a construct which is not a loop,
  the following error will be produced:
   
  ERROR 1308 (42000): ITERATE with no matching label: 
   
  Below is an example of how ITERATE might be used:
   
  CREATE PROCEDURE doiterate(p1 INT)
  BEGIN
   label1: LOOP
   SET p1 = p1 + 1;
   
   IF p1 

  URL: https://mariadb.com/kb/en/library/iterate/dzfxuxITERATEdzfxuxhttps://mariadb.com/kb/en/library/iterate/dzfxuxdzfxux23dzfxux311qjzxqqvvbqSyntax
  ------ 
  [begin_label:] LOOP
   statement_list
  END LOOP [end_label]
   
  Description
  ----------- 
  LOOP implements a simple loop construct, enabling repeated
  execution
  of the statement list, which consists of one or more
  statements, each
  terminated by a semicolon (i.e., ;) statement delimiter. The
  statements
  within the loop are repeated until the loop is exited;
  usually this is
  accomplished with a LEAVE statement.
   
  A LOOP statement can be labeled. end_label cannot be given
  unless
  begin_label also is present. If both are present, they must
  be the
  same.
   
  See Delimiters in the mysql client for more on delimiter
  usage in the client.
   


  URL: https://mariadb.com/kb/en/library/loop/dzfxuxLOOPdzfxuxhttps://mariadb.com/kb/en/library/loop/dzfxuxdzfxux23dzfxux314qjzxqqvvbqSyntax
  ------ 
  MIN([DISTINCT] expr)
   
  Description
  ----------- 
  Returns the minimum value of expr. MIN() may take a string
  argument, in which case it returns the minimum string value.
  The DISTINCT
  keyword can be used to find the minimum of the distinct
  values of expr,
  however, this produces the same result as omitting DISTINCT.
   
  Note that SET and ENUM fields are currently compared by
  their string value rather than their relative position in
  the set, so MIN() may produce a different lowest result than
  ORDER BY ASC.
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, MIN() can be used as a window function.
   
  MIN() returns NULL if there were no matching rows.
   
  Examples
  -------- 
  CREATE TABLE student (name CHAR(10), test CHAR(10), score
  TINYINT); 
   
  INSERT INTO student VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83);
   
  SELECT name, MIN(score) FROM student GROUP BY name;
   
  +---------+------------+
  | name | MIN(score) |
  +---------+------------+
  | Chun | 73 |
  | Esben | 31 |
  | Kaolin | 56 |
  | Tatiana | 83 |
  +---------+------------+
   
  MIN() with a string:
   
  SELECT MIN(name) FROM student;
   
  +-----------+
  | MIN(name) |
  +-----------+
  | Chun |
  +-----------+
   
  Be careful to avoid this common mistake, not grouping
  correctly and returning mismatched data: 
   
  SELECT name,test,MIN(score) FROM student;
   
  +------+------+------------+
  | name | test | MIN(score) |
  +------+------+------------+
  | Chun | SQL | 31 |
  +------+------+------------+
   
  Difference between ORDER BY ASC and MIN():
   
  CREATE TABLE student2(name CHAR(10),grade
  ENUM('b','c','a'));
   
  INSERT INTO student2
  VALUES('Chun','b'),('Esben','c'),('Kaolin','a');
   
  SELECT MIN(grade) FROM student2;
   
  +------------+
  | MIN(grade) |
  +------------+
  | a |
  +------------+
   
  SELECT grade FROM student2 ORDER BY grade ASC LIMIT 1;
   
  +-------+
  | grade |
  +-------+
  | b |
  +-------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, MIN(score) 
   OVER (PARTITION BY name) AS lowest_score FROM student_test;
   
  +---------+--------+-------+--------------+
  | name | test | score | lowest_score |
  +---------+--------+-------+--------------+
  | Chun | SQL | 75 | 73 |
  | Chun | Tuning | 73 | 73 |
  | Esben | SQL | 43 | 31 |
  | Esben | Tuning | 31 | 31 |
  | Kaolin | SQL | 56 | 56 |
  | Kaolin | Tuning | 88 | 56 |
  | Tatiana | SQL | 87 | 87 |
  +---------+--------+-------+--------------+
   


  URL: https://mariadb.com/kb/en/library/min/dzfxuxMINdzfxuxhttps://mariadb.com/kb/en/library/min/dzfxuxdzfxux16dzfxux191qjzxqqvvbqSyntax
  ------ 
  STD(expr)
   
  Description
  ----------- 
  Returns the population standard deviation of expr. This is
  an extension
  to standard SQL. The standard SQL function STDDEV_POP() can
  be used instead. 
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, STD() can be used as a window function.
   
  This function returns NULL if there were no matching rows.
   
  Examples
  -------- 
  As an aggregate function:
   
  CREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);
   
  INSERT INTO stats VALUES 
   ('a',1),('a',2),('a',3),
   ('b',11),('b',12),('b',20),('b',30),('b',60);
   
  SELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) 
   FROM stats GROUP BY category;
   
  +----------+---------------+----------------+------------+
  | category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |
  +----------+---------------+----------------+------------+
  | a | 0.8165 | 1.0000 | 0.6667 |
  | b | 18.0400 | 20.1693 | 325.4400 |
  +----------+---------------+----------------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, STDDEV_POP(score) 
   OVER (PARTITION BY test) AS stddev_results FROM
  student_test;
   
  +---------+--------+-------+----------------+
  | name | test | score | stddev_results |
  +---------+--------+-------+----------------+
  | Chun | SQL | 75 | 16.9466 |
  | Chun | Tuning | 73 | 24.1247 |
  | Esben | SQL | 43 | 16.9466 |
  | Esben | Tuning | 31 | 24.1247 |
  | Kaolin | SQL | 56 | 16.9466 |
  | Kaolin | Tuning | 88 | 24.1247 |
  | Tatiana | SQL | 87 | 16.9466 |
  +---------+--------+-------+----------------+
   


  URL: https://mariadb.com/kb/en/library/std/dzfxuxSTDdzfxuxhttps://mariadb.com/kb/en/library/std/dzfxuxdzfxux16dzfxux192qjzxqqvvbqSyntax
  ------ 
  STDDEV(expr)
   
  Description
  ----------- 
  Returns the population standard deviation of expr. This
  function is
  provided for compatibility with Oracle. The standard SQL
  function
  STDDEV_POP() can be used instead.
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, STDDEV() can be used as a window
  function.
   
  This function returns NULL if there were no matching rows.
   
  Examples
  -------- 
  As an aggregate function:
   
  CREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);
   
  INSERT INTO stats VALUES 
   ('a',1),('a',2),('a',3),
   ('b',11),('b',12),('b',20),('b',30),('b',60);
   
  SELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) 
   FROM stats GROUP BY category;
   
  +----------+---------------+----------------+------------+
  | category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |
  +----------+---------------+----------------+------------+
  | a | 0.8165 | 1.0000 | 0.6667 |
  | b | 18.0400 | 20.1693 | 325.4400 |
  +----------+---------------+----------------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, STDDEV_POP(score) 
   OVER (PARTITION BY test) AS stddev_results FROM
  student_test;
   
  +---------+--------+-------+----------------+
  | name | test | score | stddev_results |
  +---------+--------+-------+----------------+
  | Chun | SQL | 75 | 16.9466 |
  | Chun | Tuning | 73 | 24.1247 |
  | Esben | SQL | 43 | 16.9466 |
  | Esben | Tuning | 31 | 24.1247 |
  | Kaolin | SQL | 56 | 16.9466 |
  | Kaolin | Tuning | 88 | 24.1247 |
  | Tatiana | SQL | 87 | 16.9466 |
  +---------+--------+-------+----------------+
   


  URL: https://mariadb.com/kb/en/library/stddev/dzfxuxSTDDEVdzfxuxhttps://mariadb.com/kb/en/library/stddev/dzfxuxdzfxux16dzfxux193qjzxqqvvbqSyntax
  ------ 


  URL: https://mariadb.com/kb/en/library/open/dzfxuxOPENdzfxuxhttps://mariadb.com/kb/en/library/open/dzfxuxdzfxux23dzfxux315qjzxqqvvbqSyntax
  ------ 
  RETURN expr 
   
  The RETURN statement terminates execution of a stored
  function and
  returns the value expr to the function caller. There must be
  at least
  one RETURN statement in a stored function. If the function
  has multiple exit points, all exit points must have a
  RETURN.
   
  This statement is not used in stored procedures, triggers,
  or events. LEAVE can be used instead.
   
  The following example shows that RETURN can return the
  result of a scalar subquery:
   
  CREATE FUNCTION users_count() RETURNS BOOL
   READS SQL DATA
  BEGIN
   RETURN (SELECT COUNT(DISTINCT User) FROM mysql.user);
  END;
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/return/dzfxuxRETURNdzfxuxhttps://mariadb.com/kb/en/library/return/dzfxuxdzfxux23dzfxux318qjzxqqvvbqSyntax
  ------ 
  STDDEV_POP(expr)
   
  Description
  ----------- 
  Returns the population standard deviation of expr (the
  square root of
  VAR_POP()). You can also use STD() or
  STDDEV(), which are equivalent but not standard SQL.
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, STDDEV_POP() can be used as a window
  function.
   
  STDDEV_POP() returns NULL if there were no matching rows.
   
  Examples
  -------- 
  As an aggregate function:
   
  CREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);
   
  INSERT INTO stats VALUES 
   ('a',1),('a',2),('a',3),
   ('b',11),('b',12),('b',20),('b',30),('b',60);
   
  SELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) 
   FROM stats GROUP BY category;
   
  +----------+---------------+----------------+------------+
  | category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |
  +----------+---------------+----------------+------------+
  | a | 0.8165 | 1.0000 | 0.6667 |
  | b | 18.0400 | 20.1693 | 325.4400 |
  +----------+---------------+----------------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, STDDEV_POP(score) 
   OVER (PARTITION BY test) AS stddev_results FROM
  student_test;
   
  +---------+--------+-------+----------------+
  | name | test | score | stddev_results |
  +---------+--------+-------+----------------+
  | Chun | SQL | 75 | 16.9466 |
  | Chun | Tuning | 73 | 24.1247 |
  | Esben | SQL | 43 | 16.9466 |
  | Esben | Tuning | 31 | 24.1247 |
  | Kaolin | SQL | 56 | 16.9466 |
  | Kaolin | Tuning | 88 | 24.1247 |
  | Tatiana | SQL | 87 | 16.9466 |
  +---------+--------+-------+----------------+
   


  URL: https://mariadb.com/kb/en/library/stddev_pop/dzfxuxSTDDEV_POPdzfxuxhttps://mariadb.com/kb/en/library/stddev_pop/dzfxuxdzfxux16dzfxux194qjzxqqvvbqSyntax
  ------ 
  SUM([DISTINCT] expr)
   
  Description
  ----------- 
  Returns the sum of expr. If the return set has no rows,
  SUM() returns
  NULL. The DISTINCT keyword can be used to sum only the
  distinct values
  of expr.
   
  From MariaDB 10.2.0, SUM() can be used as a window function,
  although not with the DISTINCT specifier.
   
  Examples
  -------- 
  CREATE TABLE sales (sales_value INT);
  INSERT INTO sales VALUES(10),(20),(20),(40);
   
  SELECT SUM(sales_value) FROM sales;
   
  +------------------+
  | SUM(sales_value) |
  +------------------+
  | 90 |
  +------------------+
   
  SELECT SUM(DISTINCT(sales_value)) FROM sales;
   
  +----------------------------+
  | SUM(DISTINCT(sales_value)) |
  +----------------------------+
  | 70 |
  +----------------------------+
   
  Commonly, SUM is used with a GROUP BY clause:
   
  CREATE TABLE sales (name CHAR(10), month CHAR(10), units
  INT);
   
  INSERT INTO sales VALUES 
   ('Chun', 'Jan', 75), ('Chun', 'Feb', 73),
   ('Esben', 'Jan', 43), ('Esben', 'Feb', 31),
   ('Kaolin', 'Jan', 56), ('Kaolin', 'Feb', 88),
   ('Tatiana', 'Jan', 87), ('Tatiana', 'Feb', 83);
   
  SELECT name, SUM(units) FROM sales GROUP BY name;
   
  +---------+------------+
  | name | SUM(units) |
  +---------+------------+
  | Chun | 148 |
  | Esben | 74 |
  | Kaolin | 144 |
  | Tatiana | 170 |
  +---------+------------+
   
  The GROUP BY clause is required when using an aggregate
  function along with regular column data, otherwise the
  result will be a mismatch, as in the following common type
  of mistake:
   
  SELECT name,SUM(units) FROM sales
  ;
  +------+------------+
  | name | SUM(units) |
  +------+------------+
  | Chun | 536 |
  +------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, SUM(score) OVER (PARTITION BY
  name) AS total_score FROM student_test;
   
  +---------+--------+-------+-------------+
  | name | test | score | total_score |
  +---------+--------+-------+-------------+
  | Chun | SQL | 75 | 148 |
  | Chun | Tuning | 73 | 148 |
  | Esben | SQL | 43 | 74 |
  | Esben | Tuning | 31 | 74 |
  | Kaolin | SQL | 56 | 144 |
  | Kaolin | Tuning | 88 | 144 |
  | Tatiana | SQL | 87 | 87 |
  +---------+--------+-------+-------------+
   


  URL: https://mariadb.com/kb/en/library/sum/dzfxuxSUMdzfxuxhttps://mariadb.com/kb/en/library/sum/dzfxuxdzfxux16dzfxux196qjzxqqvvbqSyntax
  ------ 
  VARIANCE(expr) 
   
  Description
  ----------- 
  Returns the population standard variance of expr. This is an
  extension to
  standard SQL. The standard SQL function VAR_POP() can be
  used
  instead.
   
  Variance is calculated by
  working out the mean for the set
  for each number, subtracting the mean and squaring the
  result
  calculate the average of the resulting differences
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, VARIANCE() can be used as a window
  function.
   
  VARIANCE() returns NULL if there were no matching rows.
   
  Examples
  -------- 
  CREATE TABLE v(i tinyint);
   
  INSERT INTO v VALUES(101),(99);
   
  SELECT VARIANCE(i) FROM v;
   
  +-------------+
  | VARIANCE(i) |
  +-------------+
  | 1.0000 |
  +-------------+
   
  INSERT INTO v VALUES(120),(80);
   
  SELECT VARIANCE(i) FROM v;
   
  +-------------+
  | VARIANCE(i) |
  +-------------+
  | 200.5000 |
  +-------------+
   
  As an aggregate function:
   
  CREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);
   
  INSERT INTO stats VALUES 
   ('a',1),('a',2),('a',3),
   ('b',11),('b',12),('b',20),('b',30),('b',60);
   
  SELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) 
   FROM stats GROUP BY category;
   
  +----------+---------------+----------------+------------+
  | category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |
  +----------+---------------+----------------+------------+
  | a | 0.8165 | 1.0000 | 0.6667 |
  | b | 18.0400 | 20.1693 | 325.4400 |
  +----------+---------------+----------------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, VAR_POP(score) 
   OVER (PARTITION BY test) AS variance_results FROM
  student_test;
   
  +---------+--------+-------+------------------+
  | name | test | score | variance_results |
  +---------+--------+-------+------------------+
  | Chun | SQL | 75 | 287.1875 |
  | Chun | Tuning | 73 | 582.0000 |
  | Esben | SQL | 43 | 287.1875 |
  | Esben | Tuning | 31 | 582.0000 |
  | Kaolin | SQL | 56 | 287.1875 |
  | Kaolin | Tuning | 88 | 582.0000 |
  | Tatiana | SQL | 87 | 287.1875 |
  +---------+--------+-------+------------------+
   


  URL: https://mariadb.com/kb/en/library/variance/dzfxuxVARIANCEdzfxuxhttps://mariadb.com/kb/en/library/variance/dzfxuxdzfxux16dzfxux197qjzxqqvvbqSyntax
  ------ 
  [begin_label:] WHILE search_condition DO
   statement_list
  END WHILE [end_label]
   
  Description
  ----------- 
  The statement list within a WHILE statement is repeated as
  long as the
  search_condition is true. statement_list consists of one or
  more
  statements. If the loop must be executed at least once,
  REPEAT ... LOOP can be used instead.
   
  A WHILE statement can be labeled. end_label cannot be given
  unless
  begin_label also is present. If both are present, they must
  be the
  same.
   
  Examples
  -------- 
  CREATE PROCEDURE dowhile()
  BEGIN
   DECLARE v1 INT DEFAULT 5;
   
   WHILE v1 > 0 DO
   ...
   SET v1 = v1 - 1;
   
   END WHILE;
   
  END
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/while/dzfxuxWHILEdzfxuxhttps://mariadb.com/kb/en/library/while/dzfxuxdzfxux23dzfxux321qjzxqqvvbqSyntax
  ------ 
  VAR_POP(expr)
   
  Description
  ----------- 
  Returns the population standard variance of expr. It
  considers rows as
  the whole population, not as a sample, so it has the number
  of rows as
  the denominator. You can also use VARIANCE(), which is
  equivalent but
  is not standard SQL.
   
  Variance is calculated by
  working out the mean for the set
  for each number, subtracting the mean and squaring the
  result
  calculate the average of the resulting differences
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, VAR_POP() can be used as a window
  function.
   
  VAR_POP() returns NULL if there were no matching rows.
   
  Examples
  -------- 
  CREATE TABLE v(i tinyint);
   
  INSERT INTO v VALUES(101),(99);
   
  SELECT VAR_POP(i) FROM v;
   
  +------------+
  | VAR_POP(i) |
  +------------+
  | 1.0000 |
  +------------+
   
  INSERT INTO v VALUES(120),(80);
   
  SELECT VAR_POP(i) FROM v;
   
  +------------+
  | VAR_POP(i) |
  +------------+
  | 200.5000 |
  +------------+
   
  As an aggregate function:
   
  CREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);
   
  INSERT INTO stats VALUES 
   ('a',1),('a',2),('a',3),
   ('b',11),('b',12),('b',20),('b',30),('b',60);
   
  SELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) 
   FROM stats GROUP BY category;
   
  +----------+---------------+----------------+------------+
  | category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |
  +----------+---------------+----------------+------------+
  | a | 0.8165 | 1.0000 | 0.6667 |
  | b | 18.0400 | 20.1693 | 325.4400 |
  +----------+---------------+----------------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, VAR_POP(score) 
   OVER (PARTITION BY test) AS variance_results FROM
  student_test;
   
  +---------+--------+-------+------------------+
  | name | test | score | variance_results |
  +---------+--------+-------+------------------+
  | Chun | SQL | 75 | 287.1875 |
  | Chun | Tuning | 73 | 582.0000 |
  | Esben | SQL | 43 | 287.1875 |
  | Esben | Tuning | 31 | 582.0000 |
  | Kaolin | SQL | 56 | 287.1875 |
  | Kaolin | Tuning | 88 | 582.0000 |
  | Tatiana | SQL | 87 | 287.1875 |
  +---------+--------+-------+------------------+
   


  URL: https://mariadb.com/kb/en/library/var_pop/dzfxuxVAR_POPdzfxuxhttps://mariadb.com/kb/en/library/var_pop/dzfxuxdzfxux16dzfxux198qjzxqqvvbqSyntax
  ------ 
  VAR_SAMP(expr)
   
  Description
  ----------- 
  Returns the sample variance of expr. That is, the
  denominator is the number of rows minus one.
   
  It is an aggregate function, and so can be used with the
  GROUP BY clause.
   
  From MariaDB 10.2.2, VAR_SAMP() can be used as a window
  function.
   
  VAR_SAMP() returns NULL if there were no matching rows.
   
  Examples
  -------- 
  As an aggregate function:
   
  CREATE OR REPLACE TABLE stats (category VARCHAR(2), x INT);
   
  INSERT INTO stats VALUES 
   ('a',1),('a',2),('a',3),
   ('b',11),('b',12),('b',20),('b',30),('b',60);
   
  SELECT category, STDDEV_POP(x), STDDEV_SAMP(x), VAR_POP(x) 
   FROM stats GROUP BY category;
   
  +----------+---------------+----------------+------------+
  | category | STDDEV_POP(x) | STDDEV_SAMP(x) | VAR_POP(x) |
  +----------+---------------+----------------+------------+
  | a | 0.8165 | 1.0000 | 0.6667 |
  | b | 18.0400 | 20.1693 | 325.4400 |
  +----------+---------------+----------------+------------+
   
  As a window function:
   
  CREATE OR REPLACE TABLE student_test (name CHAR(10), test
  CHAR(10), score TINYINT);
   
  INSERT INTO student_test VALUES 
   ('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), 
   ('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), 
   ('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), 
   ('Tatiana', 'SQL', 87);
   
  SELECT name, test, score, VAR_SAMP(score) 
   OVER (PARTITION BY test) AS variance_results FROM
  student_test;
   
  +---------+--------+-------+------------------+
  | name | test | score | variance_results |
  +---------+--------+-------+------------------+
  | Chun | SQL | 75 | 382.9167 |
  | Chun | Tuning | 73 | 873.0000 |
  | Esben | SQL | 43 | 382.9167 |
  | Esben | Tuning | 31 | 873.0000 |
  | Kaolin | SQL | 56 | 382.9167 |
  | Kaolin | Tuning | 88 | 873.0000 |
  | Tatiana | SQL | 87 | 382.9167 |
  +---------+--------+-------+------------------+
   


  URL: https://mariadb.com/kb/en/library/var_samp/dzfxuxVAR_SAMPdzfxuxhttps://mariadb.com/kb/en/library/var_samp/dzfxuxdzfxux16dzfxux199qjzxqqvvbqSyntax
  ------ 
  CHARSET(str)
   
  Description
  ----------- 
  Returns the character set of the string argument. If str is
  not a string, it is considered as a binary string (so the
  function returns 'binary'). This applies to NULL, too. The
  return value is a string in the utf8 character set.
   
  Examples
  -------- 
  SELECT CHARSET('abc');
  +----------------+
  | CHARSET('abc') |
  +----------------+
  | latin1 |
  +----------------+
   
  SELECT CHARSET(CONVERT('abc' USING utf8));
  +------------------------------------+
  | CHARSET(CONVERT('abc' USING utf8)) |
  +------------------------------------+
  | utf8 |
  +------------------------------------+
   
  SELECT CHARSET(USER());
  +-----------------+
  | CHARSET(USER()) |
  +-----------------+
  | utf8 |
  +-----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/charset/dzfxuxCHARSETdzfxuxhttps://mariadb.com/kb/en/library/charset/dzfxuxdzfxux17dzfxux202qjzxqqvvbqA synonym for ST_BUFFER.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/buffer/dzfxuxBUFFERdzfxuxhttps://mariadb.com/kb/en/library/buffer/dzfxuxdzfxux24dzfxux322qjzxqqvvbqA synonym for ST_CONVEXHULL.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/convexhull/dzfxuxCONVEXHULLdzfxuxhttps://mariadb.com/kb/en/library/convexhull/dzfxuxdzfxux24dzfxux323qjzxqqvvbqSyntax
  ------ 
  GeometryCollection(g1,g2,...)
   
  Description
  ----------- 
  Constructs a WKB GeometryCollection. If any argument is not
  a well-formed WKB representation of a geometry, the return
  value is NULL.
   
  Examples
  -------- 
  CREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);
  SHOW FIELDS FROM gis_geometrycollection;
   
  INSERT INTO gis_geometrycollection VALUES
   (GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0),
  LINESTRING(0 0,10 10))')),
   (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),
  LineString(Point(3, 6), Point(7, 9)))))),
   (GeomFromText('GeometryCollection()')),
   (GeomFromText('GeometryCollection EMPTY'));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/geometrycollection/dzfxuxGEOMETRYCOLLECTIONdzfxuxhttps://mariadb.com/kb/en/library/geometrycollection/dzfxuxdzfxux24dzfxux324qjzxqqvvbqSyntax
  ------ 
  MultiLineString(ls1,ls2,...)
   
  Description
  ----------- 
  Constructs a WKB MultiLineString value using WKB LineString
  arguments. If any argument is not a WKB LineString, the
  return value is
  NULL.
   
  Example
   
  CREATE TABLE gis_multi_line (g MULTILINESTRING);
  INSERT INTO gis_multi_line VALUES
   (MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10
  0),(16 0,16 23,16 48))')),
   (MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
   (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),
  Point(3, 5)), LineString(Point(2, 5),Point(5, 8),Point(21,
  7))))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multilinestring/dzfxuxMULTILINESTRINGdzfxuxhttps://mariadb.com/kb/en/library/multilinestring/dzfxuxdzfxux24dzfxux326qjzxqqvvbqSyntax
  ------ 
  MultiPoint(pt1,pt2,...)
   
  Description
  ----------- 
  Constructs a WKB MultiPoint value using WKB Point arguments.
  If any argument is not a WKB Point, the return value is
  NULL.
   
  Examples
  -------- 
  SET @g = ST_GEOMFROMTEXT('MultiPoint( 1 1, 2 2, 5 3, 7 2, 9
  3, 8 4, 6 6, 6 9, 4 9, 1 5 )');
   
  CREATE TABLE gis_multi_point (g MULTIPOINT);
  INSERT INTO gis_multi_point VALUES
   (MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20
  20)')),
   (MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
   (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,
  10)))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multipoint/dzfxuxMULTIPOINTdzfxuxhttps://mariadb.com/kb/en/library/multipoint/dzfxuxdzfxux24dzfxux327qjzxqqvvbqSyntax
  ------ 
  COERCIBILITY(str)
   
  Description
  ----------- 
  Returns the collation coercibility value of the string
  argument. Coercibility defines what will be converted to
  what in case of collation conflict, with an expression with
  higher coercibility being converted to the collation of an
  expression with lower coercibility.
   
  Coercibility | Description | Example | 
   
  0 | Explicit | Value using a COLLATE clause | 
   
  1 | No collation | Concatenated strings using different
  collations | 
   
  2 | Implicit | Column value | 
   
  3 | Constant | USER() return value | 
   
  4 | Coercible | Literal string | 
   
  5 | Ignorable | NULL or derived from NULL | 
   
  Examples
  -------- 
  SELECT COERCIBILITY('abc' COLLATE latin1_swedish_ci);
  +-----------------------------------------------+
  | COERCIBILITY('abc' COLLATE latin1_swedish_ci) |
  +-----------------------------------------------+
  | 0 |
  +-----------------------------------------------+
   
  SELECT COERCIBILITY(USER());
  +----------------------+
  | COERCIBILITY(USER()) |
  +----------------------+
  | 3 |
  +----------------------+
   
  SELECT COERCIBILITY('abc');
  +---------------------+
  | COERCIBILITY('abc') |
  +---------------------+
  | 4 |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/coercibility/dzfxuxCOERCIBILITYdzfxuxhttps://mariadb.com/kb/en/library/coercibility/dzfxuxdzfxux17dzfxux203qjzxqqvvbqRoles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  CURRENT_ROLE, CURRENT_ROLE()
   
  Description
  ----------- 
  Returns the current role name. This determines your access
  privileges. The return value is a string in the
  utf8 character set.
   
  If there is no current role, NULL is returned.
   
  The output of SELECT CURRENT_ROLE is equivalent to the
  contents of the ENABLED_ROLES Information Schema table.
   
  USER() returns the combination of user and host used to
  login. CURRENT_USER() returns the account used to determine
  current connection's privileges.
   
  Examples
  -------- 
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | NULL |
  +--------------+
   
  SET ROLE staff;
   
  SELECT CURRENT_ROLE;
   
  +--------------+
  | CURRENT_ROLE |
  +--------------+
  | staff |
  +--------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/current_role/dzfxuxCURRENT_ROLEdzfxuxhttps://mariadb.com/kb/en/library/current_role/dzfxuxdzfxux17dzfxux206qjzxqqvvbqSyntax
  ------ 
  CURRENT_USER, CURRENT_USER()
   
  Description
  ----------- 
  Returns the user name and host name combination for the
  MariaDB account
  that the server used to authenticate the current client.
  This account
  determines your access privileges. The return value is a
  string in the
  utf8 character set.
   
  The value of CURRENT_USER() can differ from the value of
  USER(). CURRENT_ROLE() returns the current active role.
   
  Examples
  -------- 
  shell> mysql --user="anonymous"
   
  MariaDB [(none)]> select user(),current_user();
  +---------------------+----------------+
  | user() | current_user() |
  +---------------------+----------------+
  | anonymous@localhost | @localhost |
  +---------------------+----------------+
   
  When calling CURRENT_USER() in a stored procedure, it
  returns the owner of the stored procedure, as defined with
  DEFINER.
   


  URL: https://mariadb.com/kb/en/library/current_user/dzfxuxCURRENT_USERdzfxuxhttps://mariadb.com/kb/en/library/current_user/dzfxuxdzfxux17dzfxux207qjzxqqvvbqSyntax
  ------ 
  DATABASE()
   
  Description
  ----------- 
  Returns the default (current) database name as a string in
  the utf8 character set. If there is no default database,
  DATABASE() returns NULL. Within a stored routine, the
  default database is the database that the routine is
  associated with, which is not necessarily the same as the
  database that is the default in the calling context.
   
  SCHEMA() is a synonym for DATABASE().
   
  To select a default database, the USE statement can be run.
  Another way to set the default database is specifying its
  name at mysql command line client startup.
   
  Examples
  -------- 
  SELECT DATABASE();
  +------------+
  | DATABASE() |
  +------------+
  | NULL |
  +------------+
   
  USE test;
   
  Database changed
   
  SELECT DATABASE();
  +------------+
  | DATABASE() |
  +------------+
  | test |
  +------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/database/dzfxuxDATABASEdzfxuxhttps://mariadb.com/kb/en/library/database/dzfxuxdzfxux17dzfxux208qjzxqqvvbqSyntax
  ------ 
  DEFAULT(col_name)
   
  Description
  ----------- 
  Returns the default value for a table column. If the column
  has no default value, NULL is returned.
  For integer columns using AUTO_INCREMENT, 0 is returned.
   
  When using DEFAULT as a value to set in an INSERT or UPDATE
  statement, you can use the bare keyword DEFAULT without the
  parentheses and argument to
  refer to the column in context. You can only use DEFAULT as
  a bare keyword if you are using it
  alone without a surrounding expression or function.
   
  Examples
  -------- 
  Select only non-default values for a column:
   
  SELECT i FROM t WHERE i != DEFAULT(i);
   
  Update values to be one greater than the default value:
   
  UPDATE t SET i = DEFAULT(i)+1 WHERE i 

  URL: https://mariadb.com/kb/en/library/default/dzfxuxDEFAULTdzfxuxhttps://mariadb.com/kb/en/library/default/dzfxuxdzfxux17dzfxux210qjzxqqvvbqSyntax
  ------ 
  Point(x,y)
   
  Description
  ----------- 
  Constructs a WKB Point using the given coordinates.
   
  Examples
  -------- 
  SET @g = ST_GEOMFROMTEXT('Point(1 1)');
   
  CREATE TABLE gis_point (g POINT);
  INSERT INTO gis_point VALUES
   (PointFromText('POINT(10 10)')),
   (PointFromText('POINT(20 10)')),
   (PointFromText('POINT(20 20)')),
   (PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/point/dzfxuxPOINTdzfxuxhttps://mariadb.com/kb/en/library/point/dzfxuxdzfxux24dzfxux329qjzxqqvvbqA synonym for ST_PointOnSurface.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/pointonsurface/dzfxuxPointOnSurfacedzfxuxhttps://mariadb.com/kb/en/library/pointonsurface/dzfxuxdzfxux24dzfxux330qjzxqqvvbqSyntax
  ------ 
  ST_INTERSECTION(g1,g2)
   
  Description
  ----------- 
  Returns a geometry that is the intersection, or shared
  portion, of geometry g1 and geometry g2.
   
  Examples
  -------- 
  SET @g1 = ST_GEOMFROMTEXT('POINT(2 1)');
   
  SET @g2 = ST_GEOMFROMTEXT('LINESTRING(2 1, 0 2)');
   
  SELECT ASTEXT(ST_INTERSECTION(@g1,@g2));
  +----------------------------------+
  | ASTEXT(ST_INTERSECTION(@g1,@g2)) |
  +----------------------------------+
  | POINT(2 1) |
  +----------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_intersection/dzfxuxST_INTERSECTIONdzfxuxhttps://mariadb.com/kb/en/library/st_intersection/dzfxuxdzfxux24dzfxux334qjzxqqvvbqST_POINTONSURFACE() was introduced in MariaDB 10.1.2
   
  Syntax
  ------ 
  ST_PointOnSurface(g)
  PointOnSurface(g)
   
  Description
  ----------- 
  Given a geometry, returns a POINT guaranteed to intersect a
  surface. However, see MDEV-7514.
   
  ST_PointOnSurface() and PointOnSurface() are synonyms.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_pointonsurface/dzfxuxST_POINTONSURFACEdzfxuxhttps://mariadb.com/kb/en/library/st_pointonsurface/dzfxuxdzfxux24dzfxux335qjzxqqvvbqSyntax
  ------ 
  BINLOG 'str'
   
  Description
  ----------- 
  BINLOG is an internal-use statement. It is generated by the
  mysqlbinlog program as the printable representation of
  certain events
  in binary log files. The 'str' value is a base 64-encoded
  string the that server decodes to determine the data change
  indicated by the
  corresponding event. This statement requires the SUPER
  privilege. It was added in MySQL 5.1.5.
   


  URL: https://mariadb.com/kb/en/library/binlog/dzfxuxBINLOGdzfxuxhttps://mariadb.com/kb/en/library/binlog/dzfxuxdzfxux26dzfxux338qjzxqqvvbqDECODE_HISTOGRAM() was introduced in MariaDB 10.0.2
   
  Syntax
  ------ 
  DECODE_HISTOGRAM(hist_type,histogram)
   
  Note: Before MariaDB 10.0.10 the arguments were reversed.
   
  Description
  ----------- 
  Returns a string of comma separated numeric values
  corresponding to a probability distribution represented by
  the histogram of type hist_type (SINGLE_PREC_HB or
  DOUBLE_PREC_HB). The hist_type and histogram would be
  commonly used from the mysql.column_stats table.
   
  See Histogram Based Statistics for details.
   
  Examples
  -------- 
  CREATE TABLE origin (
   i INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
   v INT UNSIGNED NOT NULL
  );
   
  INSERT INTO origin(v) VALUES 
   (1),(2),(3),(4),(5),(10),(20),
   (30),(40),(50),(60),(70),(80),
   (90),(100),(200),(400),(800);
   
  SET histogram_size=10,histogram_type=SINGLE_PREC_HB;
   
  ANALYZE TABLE origin PERSISTENT FOR ALL;
   
  +-------------+---------+----------+-----------------------------------------+
  | Table | Op | Msg_type | Msg_text |
  +-------------+---------+----------+-----------------------------------------+
  | test.origin | analyze | status | Engine-independent
  statistics collected |
  | test.origin | analyze | status | OK |
  +-------------+---------+----------+-----------------------------------------+
   
  SELECT db_name,table_name,column_name,hist_type,
   hex(histogram),decode_histogram(hist_type,histogram) 
   FROM mysql.column_stats WHERE db_name='test' and
  table_name='origin';
   
  +---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+
  | db_name | table_name | column_name | hist_type |
  hex(histogram) | decode_histogram(hist_type,histogram) |
  +---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+
  | test | origin | i | SINGLE_PREC_HB | 0F2D3C5A7887A5C3D2F0
  |
  0.059,0.118,0.059,0.118,0.118,0.059,0.118,0.118,0.059,0.118,0.059
  |
  | test | origin | v | SINGLE_PREC_HB | 000001060C0F161C1F7F
  |
  0.000,0.000,0.004,0.020,0.024,0.012,0.027,0.024,0.012,0.376,0.502
  |
  +---------+------------+-------------+----------------+----------------------+-------------------------------------------------------------------+
   
  SET histogram_size=20,histogram_type=DOUBLE_PREC_HB;
   
  ANALYZE TABLE origin PERSISTENT FOR ALL;
   
  +-------------+---------+----------+-----------------------------------------+
  | Table | Op | Msg_type | Msg_text |
  +-------------+---------+----------+-----------------------------------------+
  | test.origin | analyze | status | Engine-independent
  statistics collected |
  | test.origin | analyze | status | OK |
  +-------------+---------+----------+-----------------------------------------+
   
  SELECT db_name,table_name,column_name,
   hist_type,hex(histogram),decode_histogram(hist_type,histogram)

   FROM mysql.column_stats WHERE db_name='test' and
  table_name='origin';
   
  +---------+------------+-------------+----------------+------------------------------------------+-----------------------------------------------------------------------------------------+
  | db_name | table_name | column_name | hist_type |
  hex(histogram) | decode_histogram(hist_type,histogram) |
  +---------+------------+-------------+----------------+------------------------------------------+-----------------------------------------------------------------------------------------+
  | test | origin | i | DOUBLE_PREC_HB |
  0F0F2D2D3C3C5A5A78788787A5A5C3C3D2D2F0F0 |
  0.05882,0.11765,0.05882,0.11765,0.11765,0.05882,0.11765,0.11765,0.05882,0.11765,0.05882
  |
  | test | origin | v | DOUBLE_PREC_HB |
  5200F600480116067E0CB30F1B16831CB81FD67F |
  0.00125,0.00250,0.00125,0.01877,0.02502,0.01253,0.02502,0.02502,0.01253,0.37546,0.50063
  |
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/decode_histogram/dzfxuxDECODE_HISTOGRAMdzfxuxhttps://mariadb.com/kb/en/library/decode_histogram/dzfxuxdzfxux17dzfxux209qjzxqqvvbqSyntax
  ------ 
  FOUND_ROWS()
   
  Description
  ----------- 
  A SELECT statement may include a LIMIT clause to restrict
  the number
  of rows the server returns to the client. In some cases, it
  is
  desirable to know how many rows the statement would have
  returned
  without the LIMIT, but without running the statement again.
  To obtain
  this row count, include a SQL_CALC_FOUND_ROWS option in the
  SELECT
  statement, and then invoke FOUND_ROWS() afterwards.
   
  You can also use FOUND_ROWS() to obtain the number of rows
  returned by a SELECT which does not contain a LIMIT clause.
  In this case you don't need to use the SQL_CALC_FOUND_ROWS
  option. This can be useful for example in a stored
  procedure.
   
  Also, this function works with some other statements which
  return a resultset, including SHOW, DESC and HELP. For
  DELETE ... RETURNING you should use ROW_COUNT(). It also
  works as a prepared statement, or after executing a prepared
  statement.
   
  Statements which don't return any results don't affect
  FOUND_ROWS() - the previous value will still be returned.
   
  Warning: When used after a CALL statement, this function
  returns the number of rows selected by the last query in the
  procedure, not by the whole procedure.
   
  Statements using the FOUND_ROWS() function are not safe for
  replication.
   
  Examples
  -------- 
  SHOW ENGINES;
   
  +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
  | Engine | Support | Comment | Transactions | XA |
  Savepoints |
  +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
  | InnoDB | DEFAULT | Supports transactions, row-level
  locking, and foreign keys | YES | YES | YES |
  ...
  | SPHINX | YES | Sphinx storage engine | NO | NO | NO |
  +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
  11 rows in set (0.01 sec)
   
  SELECT FOUND_ROWS();
  +--------------+
  | FOUND_ROWS() |
  +--------------+
  | 11 |
  +--------------+
   
  SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE id > 100
  LIMIT 10;
   
  SELECT FOUND_ROWS();
  +--------------+
  | FOUND_ROWS() |
  +--------------+
  | 23 |
  +--------------+
   


  URL: https://mariadb.com/kb/en/library/found_rows/dzfxuxFOUND_ROWSdzfxuxhttps://mariadb.com/kb/en/library/found_rows/dzfxuxdzfxux17dzfxux211qjzxqqvvbqDescription
  ----------- 
  You can defragment the query cache to better utilize its
  memory with
  the FLUSH QUERY CACHE statement. The statement does not
  remove any queries from the cache.
   
  The RESET QUERY CACHE statement removes all query results
  from the query cache.
  The FLUSH TABLES statement also does this.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/flush-query-cache/dzfxuxFLUSH QUERY CACHEdzfxuxhttps://mariadb.com/kb/en/library/flush-query-cache/dzfxuxdzfxux26dzfxux341qjzxqqvvbqSyntax
  ------ 
  LOAD INDEX INTO CACHE
   tbl_index_list [, tbl_index_list] ...
   
  tbl_index_list:
   tbl_name
   [[INDEX|KEY] (index_name[, index_name] ...)]
   [IGNORE LEAVES]
   
  Description
  ----------- 
  The LOAD INDEX INTO CACHE statement preloads a table index
  into the key
  cache to which it has been assigned by an explicit CACHE
  INDEX
  statement, or into the default key cache otherwise. 
  LOAD INDEX INTO CACHE is used only for MyISAM or Aria
  tables. Until MariaDB 5.3, it was not supported for tables
  having user-defined partitioning, but this limitation was
  removed in MariaDB 5.5.
   
  The IGNORE LEAVES modifier causes only blocks for the
  nonleaf nodes of
  the index to be preloaded.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/load-index/dzfxuxLOAD INDEXdzfxuxhttps://mariadb.com/kb/en/library/load-index/dzfxuxdzfxux26dzfxux345qjzxqqvvbqSyntax
  ------ 
  LAST_INSERT_ID(), LAST_INSERT_ID(expr)
   
  Description
  ----------- 
  LAST_INSERT_ID() (no arguments) returns
  the first automatically generated value successfully
  inserted for an
  AUTO_INCREMENT column as a result of the most recently
  executed INSERT
  statement. The value of LAST_INSERT_ID() remains unchanged
  if no rows
  are successfully inserted.
   
  If one gives an argument to LAST_INSERT_ID(), then it will
  return the value of the expression and
  the next call to LAST_INSERT_ID() will return the same
  value. The value will also be sent to the client
  and can be accessed by the mysql_insert_id function.
   
  For example, after inserting a row that generates an
  AUTO_INCREMENT
  value, you can get the value like this:
   
  SELECT LAST_INSERT_ID();
  +------------------+
  | LAST_INSERT_ID() |
  +------------------+
  | 9 |
  +------------------+
   
  You can also use LAST_INSERT_ID() to delete the last
  inserted row:
   
  DELETE FROM product WHERE id = LAST_INSERT_ID();
   
  If no rows were successfully inserted, LAST_INSERT_ID()
  returns 0.
   
  The value of LAST_INSERT_ID() will be consistent across all
  versions
  if all rows in the INSERT or UPDATE statement were
  successful.
   
  The currently executing statement does not affect the value
  of
  LAST_INSERT_ID(). Suppose that you generate an
  AUTO_INCREMENT value
  with one statement, and then refer to LAST_INSERT_ID() in a
  multiple-row INSERT statement that inserts rows into a table
  with its
  own AUTO_INCREMENT column. The value of LAST_INSERT_ID()
  will remain
  stable in the second statement; its value for the second and
  later
  rows is not affected by the earlier row insertions.
  (However, if you
  mix references to LAST_INSERT_ID() and LAST_INSERT_ID(expr),
  the
  effect is undefined.)
   
  If the previous statement returned an error, the value of
  LAST_INSERT_ID() is undefined. For transactional tables, if
  the
  statement is rolled back due to an error, the value of
  LAST_INSERT_ID() is left undefined. For manual ROLLBACK, the
  value of
  LAST_INSERT_ID() is not restored to that before the
  transaction; it
  remains as it was at the point of the ROLLBACK.
   
  Within the body of a stored routine (procedure or function)
  or a
  trigger, the value of LAST_INSERT_ID() changes the same way
  as for
  statements executed outside the body of these kinds of
  objects. The
  effect of a stored routine or trigger upon the value of
  LAST_INSERT_ID() that is seen by following statements
  depends on the
  kind of routine:
  If a stored procedure executes statements that change the
  value of LAST_INSERT_ID(), the new value will be seen by
  statements that follow the procedure call.
   
  For stored functions and triggers that change the value, the
  value is restored when the function or trigger ends, so
  following statements will not see a changed value.
   
  Examples
  -------- 
  CREATE TABLE t (
   id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY KEY, 
   f VARCHAR(1)) 
  ENGINE = InnoDB;
   
  INSERT INTO t(f) VALUES('a');
   
  SELECT LAST_INSERT_ID();
  +------------------+
  | LAST_INSERT_ID() |
  +------------------+
  | 1 |
  +------------------+
   
  INSERT INTO t(f) VALUES('b');
   
  INSERT INTO t(f) VALUES('c');
   
  SELECT LAST_INSERT_ID();
  +------------------+
  | LAST_INSERT_ID() |
  +------------------+
  | 3 |
  +------------------+
   
  INSERT INTO t(f) VALUES('d'),('e');
   
  SELECT LAST_INSERT_ID();
  +------------------+
  | LAST_INSERT_ID() |
  +------------------+
  | 4 |
  +------------------+
   
  SELECT * FROM t;
   
  +----+------+
  | id | f |
  +----+------+
  | 1 | a |
  | 2 | b |
  | 3 | c |
  | 4 | d |
  | 5 | e |
  +----+------+
   
  SELECT LAST_INSERT_ID(12);
  +--------------------+
  | LAST_INSERT_ID(12) |
  +--------------------+
  | 12 |
  +--------------------+
   
  SELECT LAST_INSERT_ID();
  +------------------+
  | LAST_INSERT_ID() |
  +------------------+
  | 12 |
  +------------------+
   
  INSERT INTO t(f) VALUES('f');
   
  SELECT LAST_INSERT_ID();
  +------------------+
  | LAST_INSERT_ID() |
  +------------------+
  | 6 |
  +------------------+
   
  SELECT * FROM t;
   
  +----+------+
  | id | f |
  +----+------+
  | 1 | a |
  | 2 | b |
  | 3 | c |
  | 4 | d |
  | 5 | e |
  | 6 | f |
  +----+------+
   
  SELECT LAST_INSERT_ID(12);
  +--------------------+
  | LAST_INSERT_ID(12) |
  +--------------------+
  | 12 |
  +--------------------+
   
  INSERT INTO t(f) VALUES('g');
   
  SELECT * FROM t;
   
  +----+------+
  | id | f |
  +----+------+
  | 1 | a |
  | 2 | b |
  | 3 | c |
  | 4 | d |
  | 5 | e |
  | 6 | f |
  | 7 | g |
  +----+------+
   


  URL: https://mariadb.com/kb/en/library/last_insert_id/dzfxuxLAST_INSERT_IDdzfxuxhttps://mariadb.com/kb/en/library/last_insert_id/dzfxuxdzfxux17dzfxux212qjzxqqvvbqSyntax
  ------ 
  analyse([max_elements[,max_memory]])
   
  Description
  ----------- 
  This procedure is defined in the sql/sql_analyse.cc file. It
  examines
  the result from a query and returns an analysis of the
  results that
  suggests optimal data types for each column. To obtain this
  analysis,
  append PROCEDURE ANALYSE to the end of a SELECT statement:
   
  SELECT ... FROM ... WHERE ... PROCEDURE
  ANALYSE([max_elements,[max_memory]])
   
  For example:
   
  SELECT col1, col2 FROM table1 PROCEDURE ANALYSE(10, 2000);
   
  The results show some statistics for the values returned by
  the query,
  and propose an optimal data type for the columns. This can
  be helpful
  for checking your existing tables, or after importing new
  data. You
  may need to try different settings for the arguments so that
  PROCEDURE
  ANALYSE() does not suggest the ENUM data type when it is not
  appropriate.
   
  The arguments are optional and are used as follows:
  max_elements (default 256) is the maximum number of distinct
  values that analyse notices per column. This is used by
  analyse to check whether the optimal data type should be of
  type ENUM; if there are more than max_elements distinct
  values, then ENUM is not a suggested type.
  max_memory (default 8192) is the maximum amount of memory
  that analyse should allocate per column while trying to find
  all distinct values.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/procedure-analyse/dzfxuxPROCEDURE ANALYSEdzfxuxhttps://mariadb.com/kb/en/library/procedure-analyse/dzfxuxdzfxux17dzfxux214qjzxqqvvbqSyntax
  ------ 
  SHOW FUNCTION CODE func_name
   
  Description
  ----------- 
  SHOW FUNCTION CODE shows a representation of the internal
  implementation of the stored function.
   
  It is similar to SHOW PROCEDURE CODE but for stored
  functions.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-function-code/dzfxuxSHOW FUNCTION CODEdzfxuxhttps://mariadb.com/kb/en/library/show-function-code/dzfxuxdzfxux26dzfxux375qjzxqqvvbqSyntax
  ------ 
  SHOW PROFILES
   
  Description
  ----------- 
  The SHOW PROFILES statement displays profiling information
  that indicates resource usage for statements executed during
  the course of the
  current session. It is used together with 
  SHOW PROFILE.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-profiles/dzfxuxSHOW PROFILESdzfxuxhttps://mariadb.com/kb/en/library/show-profiles/dzfxuxdzfxux26dzfxux391qjzxqqvvbqSHOW QUERY_RESPONSE_TIME was introduced in MariaDB 10.1.1.
   
  Starting with MariaDB 10.1.1, which introduced the
  Information Schema plugin extension, it is possible to use
  SHOW QUERY_RESPONSE_TIME as an alternative for retrieving
  information from the QUERY_RESPONSE_TIME plugin.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/show-query_response_time/dzfxuxSHOW QUERY_RESPONSE_TIMEdzfxuxhttps://mariadb.com/kb/en/library/show-query_response_time/dzfxuxdzfxux26dzfxux392qjzxqqvvbqSyntax
  ------ 
  SHOW SLAVE ["connection_name"] STATUS
   
  or
   
  SHOW ALL SLAVES STATUS
   
  Description
  ----------- 
  This statement is to be run on a slave and provides status
  information on essential parameters of the replication slave
  threads.
   
  This statement requires the SUPER or the REPLICATION_CLIENT
  privilege.
   
  Multi-source
   
  MariaDB 10.0 introduced the FULL and "connection_name"
  options to
  allow you to connect to many masters at the same time.
   
  ALL SLAVES gives you a list of all connections to the
  master.
   
  The rows will be sorted according to Connection_name.
   
  If you specify a connection_name, you only get the
  information about that
  connection. If connection_name is not used, then the name
  set by default_master_connection is used. If the connection
  name doesn't exist you will get an error:
  There is no master connection for 'xxx'.
   
  Column descriptions
   
  Name | Description | Added | 
   
  Connection_name | Name of the master connection. Returned
  with SHOW ALL SLAVES STATUS only. | MariaDB 10.0 | 
   
  Slave_SQL_State | State of SQL thread. Returned with SHOW
  ALL SLAVES STATUS only. See Slave SQL Thread States. |
  MariaDB 10.0 | 
   
  Slave_IO_State | State of I/O thread. See Slave I/O Thread
  States. | MariaDB 10.0 | 
   
  Master_host | Master host that the slave is connected to. | 
  | 
   
  Master_user | Account user name being used to connect to the
  master. |  | 
   
  Master_port | The port being used to connect to the master.
  |  | 
   
  Connect_Retry | Time in seconds between retries to connect.
  The default is 60. The CHANGE MASTER TO statement can set
  this. The master-retry-count option determines the maximum
  number of reconnection attempts. |  | 
   
  Master_Log_File | Name of the master binary log file that
  the I/O thread is currently reading from. |  | 
   
  Read_Master_Log_Pos | Position up to which the I/O thread
  has read in the current master binary log file. |  | 
   
  Relay_Log_File | Name of the relay log file that the SQL
  thread is currently processing. |  | 
   
  Relay_Log_Pos | Position up to which the SQL thread has
  finished processing in the current relay log file. |  | 
   
  Relay_Master_Log_File | Name of the master binary log file
  that contains the most recent event executed by the SQL
  thread. |  | 
   
  Slave_IO_Running | Whether the slave I/O thread is running
  and connected (Yes), running but not connected to a master
  (Connecting) or not running (No). |  | 
   
  Slave_SQL_Running | Whether or not the SQL thread is
  running. |  | 
   
  Replicate_Do_DB | Databases specified for replicating with
  the replicate_do_db option. |  | 
   
  Replicate_Ignore_DB | Databases specified for ignoring with
  the replicate_ignore_db option. |  | 
   
  Replicate_Do_Table | Tables specified for replicating with
  the replicate_do_table option. |  | 
   
  Replicate_Ignore_Table | Tables specified for ignoring with
  the replicate_ignore_table option. |  | 
   
  Replicate_Wild_Do_Table | Tables specified for replicating
  with the replicate_wild_do_table option. |  | 
   
  Replicate_Wild_Ignore_Table | Tables specified for ignoring
  with the replicate_wild_ignore_table option. |  | 
   
  Last_Errno | Alias for Last_SQL_Errno (see below) |  | 
   
  Last Error | Alias for Last_SQL_Error (see below) |  | 
   
  Skip_Counter | Number of events that a slave skips from the
  master, as recorded in the sql_slave_skip_counter system
  variable. |  | 
   
  Exec_Master_Log_Pos | Position up to which the SQL thread
  has processed in the current master binary log file. Can be
  used to start a new slave from a current slave with the
  CHANGE MASTER TO ... MASTER_LOG_POS option. |  | 
   
  Relay_Log_Space | Total size of all relay log files
  combined. |  | 
   
  Until_Condition |  |  | 
   
  Until_Log_File | The MASTER_LOG_FILE value of the START
  SLAVE UNTIL condition. |  | 
   
  Until_Log_Pos | The MASTER_LOG_POS value of the START SLAVE
  UNTIL condition. |  | 
   
  Master_SSL_Allowed | Whether an SSL connection is permitted
  (Yes), not permitted (No) or permitted but without the slave
  having SSL support enabled (Ignored) |  | 
   
  Master_SSL_CA_File | The MASTER_SSL_CA option of the CHANGE
  MASTER TO statement. |  | 
   
  Master_SSL_CA_Path | The MASTER_SSL_CAPATH option of the
  CHANGE MASTER TO statement. |  | 
   
  Master_SSL_Cert | The MASTER_SSL_CERT option of the CHANGE
  MASTER TO statement. |  | 
   
  Master_SSL_Cipher | The MASTER_SSL_CIPHER option of the
  CHANGE MASTER TO statement. |  | 
   
  Master_SSL_Key | The MASTER_SSL_KEY option of the CHANGE
  MASTER TO statement. |  | 
   
  Seconds_Behind_Master | Difference between the timestamp
  logged on the master for the event that the slave is
  currently processing, and the current timestamp on the
  slave. Zero if the slave is not currently processing an
  event. From MariaDB 10.0.23 and MariaDB 10.1.9, with
  parallel replication, seconds_behind_master is updated only
  after transactions commit. |  | 
   
  Master_SSL_Verify_Server_Cert | The
  MASTER_SSL_VERIFY_SERVER_CERT option of the CHANGE MASTER TO
  statement. |  | 
   
  Last_IO_Errno | Error code of the most recent error that
  caused the I/O thread to stop (also recorded in the slave's
  error log). 0 means no error. RESET SLAVE or RESET MASTER
  will reset this value. |  | 
   
  Last_IO_Error | Error message of the most recent error that
  caused the I/O thread to stop (also recorded in the slave's
  error log). An empty string means no error. RESET SLAVE or
  RESET MASTER will reset this value. |  | 
   
  Last_SQL_Errno | Error code of the most recent error that
  caused the SQL thread to stop (also recorded in the slave's
  error log). 0 means no error. RESET SLAVE or RESET MASTER
  will reset this value. |  | 
   
  Last_SQL_Error | Error message of the most recent error that
  caused the SQL thread to stop (also recorded in the slave's
  error log). An empty string means no error. RESET SLAVE or
  RESET MASTER will reset this value. |  | 
   
  Replicate_Ignore_Server_Ids | List of server_ids that are
  currently being ignored for replication purposes, or an
  empty string for none, as specified in the IGNORE_SERVER_IDS
  option of the CHANGE MASTER TO statement. |  | 
   
  Master_Server_Id | The master's server_id value. |  | 
   
  Master_SSL_Crl | The MASTER_SSL_CRL option of the CHANGE
  MASTER TO statement. | MariaDB 10.0 | 
   
  Master_SSL_Crlpath | The MASTER_SSL_CRLPATH option of the
  CHANGE MASTER TO statement. | MariaDB 10.0 | 
   
  Using_Gtid | Whether or not global transaction ID's are
  being used for replication (can be No, Slave_Pos, or
  Current_Pos). | MariaDB 10.0.2 | 
   
  Gtid_IO_Pos | Current global transaction ID value. | MariaDB
  10.0.2 | 
   
  Retried_transactions | Number of retried transactions for
  this connection. Returned with SHOW ALL SLAVES STATUS only.
  | MariaDB 10.0 | 
   
  Max_relay_log_size | Max relay log size for this connection.
  Returned with SHOW ALL SLAVES STATUS only. | MariaDB 10.0 | 
   
  Executed_log_entries | How many log entries the slave has
  executed. Returned with SHOW ALL SLAVES STATUS only. |
  MariaDB 10.0 | 
   
  Slave_received_heartbeats | How many heartbeats we have got
  from the master. Returned with SHOW ALL SLAVES STATUS only.
  | MariaDB 10.0 | 
   
  Slave_heartbeat_period | How often to request a heartbeat
  packet from the master (in seconds). Returned with SHOW ALL
  SLAVES STATUS only. | MariaDB 10.0 | 
   
  Gtid_Slave_Pos | GTID of the last event group replicated on
  a slave server, for each replication domain, as stored in
  the gtid_slave_pos system variable. Returned with SHOW ALL
  SLAVES STATUS only. | MariaDB 10.0 | 
   
  SQL_Delay | Value specified by MASTER_DELAY in CHANGE MASTER
  (or 0 if none). | MariaDB 10.2.3 | 
   
  SQL_Remaining_Delay | When the slave is delaying the
  execution of an event due to MASTER_DELAY, this is the
  number of seconds of delay remaining before the event will
  be applied. Otherwise, the value is NULL. | MariaDB 10.2.3 |

   
  Slave_SQL_Running_State | The state of the SQL driver
  threads, same as in SHOW PROCESSLIST. When the slave is
  delaying the execution of an event due to MASTER_DELAY, this
  field displays: "Waiting until MASTER_DELAY seconds after
  master executed event". | MariaDB 10.2.3 | 
   
  Examples
  -------- 
  If you issue this statement using the mysql client,
  you can use a \G statement terminator rather than a
  semicolon to
  obtain a more readable vertical layout.
   
  SHOW SLAVE STATUS\G
  *************************** 1. row
  ***************************
   Slave_IO_State: Waiting for master to send event
   Master_Host: db01.example.com
   Master_User: replicant
   Master_Port: 3306
   Connect_Retry: 60
   Master_Log_File: mariadb-bin.000010
   Read_Master_Log_Pos: 548
   Relay_Log_File: relay-bin.000004
   Relay_Log_Pos: 837
   Relay_Master_Log_File: mariadb-bin.000010
   Slave_IO_Running: Yes
   Slave_SQL_Running: Yes
   Replicate_Do_DB: 
   Replicate_Ignore_DB: 
   Replicate_Do_Table: 
   Replicate_Ignore_Table: 
   Replicate_Wild_Do_Table: 
   Replicate_Wild_Ignore_Table: 
   Last_Errno: 0
   Last_Error: 
   Skip_Counter: 0
   Exec_Master_Log_Pos: 548
   Relay_Log_Space: 1497
   Until_Condition: None
   Until_Log_File: 
   Until_Log_Pos: 0
   Master_SSL_Allowed: No
   Master_SSL_CA_File: 
   Master_SSL_CA_Path: 
   Master_SSL_Cert: 
   Master_SSL_Cipher: 
   Master_SSL_Key: 
   Seconds_Behind_Master: 0
  Master_SSL_Verify_Server_Cert: No
   Last_IO_Errno: 0
   Last_IO_Error: 
   Last_SQL_Errno: 0
   Last_SQL_Error: 
   Replicate_Ignore_Server_Ids: 
   Master_Server_Id: 101
   Master_SSL_Crl: 
   Master_SSL_Crlpath: 
   Using_Gtid: No
   Gtid_IO_Pos: 
   
  MariaDB [(none)]> SHOW ALL SLAVES STATUS\G
  *************************** 1. row
  ***************************
   Connection_name: 
   Slave_SQL_State: Slave has read all relay log; waiting for
  the slave I/O thread to update it
   Slave_IO_State: Waiting for master to send event
   Master_Host: db01.example.com
   Master_User: replicant
   Master_Port: 3306
   Connect_Retry: 60
   Master_Log_File: mariadb-bin.000010
   Read_Master_Log_Pos: 3608
   Relay_Log_File: relay-bin.000004
   Relay_Log_Pos: 3897
   Relay_Master_Log_File: mariadb-bin.000010
   Slave_IO_Running: Yes
   Slave_SQL_Running: Yes
   Replicate_Do_DB: 
   Replicate_Ignore_DB: 
   Replicate_Do_Table: 
   Replicate_Ignore_Table: 
   Replicate_Wild_Do_Table: 
   Replicate_Wild_Ignore_Table: 
   Last_Errno: 0
   Last_Error: 
   Skip_Counter: 0
   Exec_Master_Log_Pos: 3608
   Relay_Log_Space: 4557
   Until_Condition: None
   Until_Log_File: 
   Until_Log_Pos: 0
   Master_SSL_Allowed: No
   Master_SSL_CA_File: 
   Master_SSL_CA_Path: 
   Master_SSL_Cert: 
   Master_SSL_Cipher: 
   Master_SSL_Key: 
   Seconds_Behind_Master: 0
  Master_SSL_Verify_Server_Cert: No
   Last_IO_Errno: 0
   Last_IO_Error: 
   Last_SQL_Errno: 0
   Last_SQL_Error: 
   Replicate_Ignore_Server_Ids: 
   Master_Server_Id: 101
   Master_SSL_Crl: 
   Master_SSL_Crlpath: 
   Using_Gtid: No
   Gtid_IO_Pos:
   Retried_transactions: 0
   Max_relay_log_size: 104857600
   Executed_log_entries: 40
   Slave_received_heartbeats: 11
   Slave_heartbeat_period: 1800.000
   Gtid_Slave_Pos: 0-101-2320
   
  You can also access some of the variables directly from
  status variables:
   
  SET @@default_master_connection="test" ;
  show status like "%slave%"
   
  Variable_name Value
  Com_show_slave_hosts 0
  Com_show_slave_status 0
  Com_start_all_slaves 0
  Com_start_slave 0
  Com_stop_all_slaves 0
  Com_stop_slave 0
  Rpl_semi_sync_slave_status OFF
  Slave_connections 0
  Slave_heartbeat_period 1800.000
  Slave_open_temp_tables 0
  Slave_received_heartbeats 0
  Slave_retried_transactions 0
  Slave_running OFF
  Slaves_connected 0
  Slaves_running 1
   


  URL: https://mariadb.com/kb/en/library/show-slave-status/dzfxuxSHOW SLAVE STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-slave-status/dzfxuxdzfxux26dzfxux395qjzxqqvvbqSyntax
  ------ 
  SHOW [GLOBAL | SESSION] STATUS
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  SHOW STATUS provides server status information. This
  information also can be obtained using the mysqladmin
  extended-status command, or by querying the Information
  Schema GLOBAL_STATUS and SESSION_STATUS tables.
  The LIKE clause, if present, indicates which variable names
  to match. The WHERE clause can be given to select rows using
  more general conditions.
   
  With the GLOBAL modifier, SHOW STATUS
  displays the status values for all connections to MariaDB.
  With
  SESSION, it displays the status values
  for the current connection. If no modifier is present, the
  default is
   SESSION. LOCAL is a synonym for
   SESSION. If you see a lot of 0 values, the reason is
  probably that you have used SHOW STATUS with a new
  connection instead of SHOW GLOBAL STATUS.
   
  Some status variables have only a global value. For these,
  you get the
  same value for both GLOBAL and SESSION.
   
  See Server Status Variables for a full list, scope and
  description of the variables that can be viewed with SHOW
  STATUS.
   
  The LIKE clause, if present on its own, indicates which
  variable name to match.
   
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  Examples
  -------- 
  Full output from MariaDB 10.1.17:
   
  SHOW GLOBAL STATUS;
   
  +--------------------------------------------------------------+----------------------------------------+
  | Variable_name | Value |
  +--------------------------------------------------------------+----------------------------------------+
  | Aborted_clients | 0 |
  | Aborted_connects | 0 |
  | Access_denied_errors | 0 |
  | Acl_column_grants | 0 |
  | Acl_database_grants | 2 |
  | Acl_function_grants | 0 |
  | Acl_procedure_grants | 0 |
  | Acl_proxy_users | 2 |
  | Acl_role_grants | 0 |
  | Acl_roles | 0 |
  | Acl_table_grants | 0 |
  | Acl_users | 6 |
  | Aria_pagecache_blocks_not_flushed | 0 |
  | Aria_pagecache_blocks_unused | 15706 |
  | Aria_pagecache_blocks_used | 0 |
  | Aria_pagecache_read_requests | 0 |
  | Aria_pagecache_reads | 0 |
  | Aria_pagecache_write_requests | 0 |
  | Aria_pagecache_writes | 0 |
  | Aria_transaction_log_syncs | 0 |
  | Binlog_commits | 0 |
  | Binlog_group_commits | 0 |
  | Binlog_group_commit_trigger_count | 0 |
  | Binlog_group_commit_trigger_lock_wait | 0 |
  | Binlog_group_commit_trigger_timeout | 0 |
  | Binlog_snapshot_file | |
  | Binlog_snapshot_position | 0 |
  | Binlog_bytes_written | 0 |
  | Binlog_cache_disk_use | 0 |
  | Binlog_cache_use | 0 |
  | Binlog_stmt_cache_disk_use | 0 |
  | Binlog_stmt_cache_use | 0 |
  | Busy_time | 0.000000 |
  | Bytes_received | 432 |
  | Bytes_sent | 15183 |
  | Com_admin_commands | 1 |
  | Com_alter_db | 0 |
  | Com_alter_db_upgrade | 0 |
  | Com_alter_event | 0 |
  | Com_alter_function | 0 |
  | Com_alter_procedure | 0 |
  | Com_alter_server | 0 |
  | Com_alter_table | 0 |
  | Com_alter_tablespace | 0 |
  | Com_analyze | 0 |
  | Com_assign_to_keycache | 0 |
  | Com_begin | 0 |
  | Com_binlog | 0 |
  | Com_call_procedure | 0 |
  | Com_change_db | 0 |
  | Com_change_master | 0 |
  | Com_check | 0 |
  | Com_checksum | 0 |
  | Com_commit | 0 |
  | Com_compound_sql | 0 |
  | Com_create_db | 0 |
  | Com_create_event | 0 |
  | Com_create_function | 0 |
  | Com_create_index | 0 |
  | Com_create_procedure | 0 |
  | Com_create_role | 0 |
  | Com_create_server | 0 |
  | Com_create_table | 0 |
  | Com_create_temporary_table | 0 |
  | Com_create_trigger | 0 |
  | Com_create_udf | 0 |
  | Com_create_user | 0 |
  | Com_create_view | 0 |
  | Com_dealloc_sql | 0 |
  | Com_delete | 0 |
  | Com_delete_multi | 0 |
  | Com_do | 0 |
  | Com_drop_db | 0 |
  | Com_drop_event | 0 |
  | Com_drop_function | 0 |
  | Com_drop_index | 0 |
  | Com_drop_procedure | 0 |
  | Com_drop_role | 0 |
  | Com_drop_server | 0 |
  | Com_drop_table | 0 |
  | Com_drop_temporary_table | 0 |
  | Com_drop_trigger | 0 |
  | Com_drop_user | 0 |
  | Com_drop_view | 0 |
  | Com_empty_query | 0 |
  | Com_execute_sql | 0 |
  | Com_flush | 0 |
  | Com_get_diagnostics | 0 |
  | Com_grant | 0 |
  | Com_grant_role | 0 |
  | Com_ha_close | 0 |
  | Com_ha_open | 0 |
  | Com_ha_read | 0 |
  | Com_help | 0 |
  | Com_insert | 0 |
  | Com_insert_select | 0 |
  | Com_install_plugin | 0 |
  | Com_kill | 0 |
  | Com_load | 0 |
  | Com_lock_tables | 0 |
  | Com_optimize | 0 |
  | Com_preload_keys | 0 |
  | Com_prepare_sql | 0 |
  | Com_purge | 0 |
  | Com_purge_before_date | 0 |
  | Com_release_savepoint | 0 |
  | Com_rename_table | 0 |
  | Com_rename_user | 0 |
  | Com_repair | 0 |
  | Com_replace | 0 |
  | Com_replace_select | 0 |
  | Com_reset | 0 |
  | Com_resignal | 0 |
  | Com_revoke | 0 |
  | Com_revoke_all | 0 |
  | Com_revoke_role | 0 |
  | Com_rollback | 0 |
  | Com_rollback_to_savepoint | 0 |
  | Com_savepoint | 0 |
  | Com_select | 1 |
  | Com_set_option | 0 |
  | Com_show_authors | 0 |
  | Com_show_binlog_events | 0 |
  | Com_show_binlogs | 0 |
  | Com_show_charsets | 0 |
  | Com_show_collations | 0 |
  | Com_show_contributors | 0 |
  | Com_show_create_db | 0 |
  | Com_show_create_event | 0 |
  | Com_show_create_func | 0 |
  | Com_show_create_proc | 0 |
  | Com_show_create_table | 0 |
  | Com_show_create_trigger | 0 |
  | Com_show_databases | 0 |
  | Com_show_engine_logs | 0 |
  | Com_show_engine_mutex | 0 |
  | Com_show_engine_status | 0 |
  | Com_show_errors | 0 |
  | Com_show_events | 0 |
  | Com_show_explain | 0 |
  | Com_show_fields | 0 |
  | Com_show_function_status | 0 |
  | Com_show_generic | 0 |
  | Com_show_grants | 0 |
  | Com_show_keys | 0 |
  | Com_show_master_status | 0 |
  | Com_show_open_tables | 0 |
  | Com_show_plugins | 0 |
  | Com_show_privileges | 0 |
  | Com_show_procedure_status | 0 |
  | Com_show_processlist | 0 |
  | Com_show_profile | 0 |
  | Com_show_profiles | 0 |
  | Com_show_relaylog_events | 0 |
  | Com_show_slave_hosts | 0 |
  | Com_show_slave_status | 0 |
  | Com_show_status | 2 |
  | Com_show_storage_engines | 0 |
  | Com_show_table_status | 0 |
  | Com_show_tables | 0 |
  | Com_show_triggers | 0 |
  | Com_show_variables | 0 |
  | Com_show_warnings | 0 |
  | Com_shutdown | 0 |
  | Com_signal | 0 |
  | Com_start_all_slaves | 0 |
  | Com_start_slave | 0 |
  | Com_stmt_close | 0 |
  | Com_stmt_execute | 0 |
  | Com_stmt_fetch | 0 |
  | Com_stmt_prepare | 0 |
  | Com_stmt_reprepare | 0 |
  | Com_stmt_reset | 0 |
  | Com_stmt_send_long_data | 0 |
  | Com_stop_all_slaves | 0 |
  | Com_stop_slave | 0 |
  | Com_truncate | 0 |
  | Com_uninstall_plugin | 0 |
  | Com_unlock_tables | 0 |
  | Com_update | 0 |
  | Com_update_multi | 0 |
  | Com_xa_commit | 0 |
  | Com_xa_end | 0 |
  | Com_xa_prepare | 0 |
  | Com_xa_recover | 0 |
  | Com_xa_rollback | 0 |
  | Com_xa_start | 0 |
  | Compression | OFF |
  | Connection_errors_accept | 0 |
  | Connection_errors_internal | 0 |
  | Connection_errors_max_connections | 0 |
  | Connection_errors_peer_address | 0 |
  | Connection_errors_select | 0 |
  | Connection_errors_tcpwrap | 0 |
  | Connections | 4 |
  | Cpu_time | 0.000000 |
  | Created_tmp_disk_tables | 0 |
  | Created_tmp_files | 6 |
  | Created_tmp_tables | 2 |
  | Delayed_errors | 0 |
  | Delayed_insert_threads | 0 |
  | Delayed_writes | 0 |
  | Delete_scan | 0 |
  | Empty_queries | 0 |
  | Executed_events | 0 |
  | Executed_triggers | 0 |
  | Feature_delay_key_write | 0 |
  | Feature_dynamic_columns | 0 |
  | Feature_fulltext | 0 |
  | Feature_gis | 0 |
  | Feature_locale | 0 |
  | Feature_subquery | 0 |
  | Feature_timezone | 0 |
  | Feature_trigger | 0 |
  | Feature_xml | 0 |
  | Flush_commands | 1 |
  | Handler_commit | 1 |
  | Handler_delete | 0 |
  | Handler_discover | 0 |
  | Handler_external_lock | 0 |
  | Handler_icp_attempts | 0 |
  | Handler_icp_match | 0 |
  | Handler_mrr_init | 0 |
  | Handler_mrr_key_refills | 0 |
  | Handler_mrr_rowid_refills | 0 |
  | Handler_prepare | 0 |
  | Handler_read_first | 3 |
  | Handler_read_key | 0 |
  | Handler_read_last | 0 |
  | Handler_read_next | 0 |
  | Handler_read_prev | 0 |
  | Handler_read_retry | 0 |
  | Handler_read_rnd | 0 |
  | Handler_read_rnd_deleted | 0 |
  | Handler_read_rnd_next | 537 |
  | Handler_rollback | 0 |
  | Handler_savepoint | 0 |
  | Handler_savepoint_rollback | 0 |
  | Handler_tmp_update | 0 |
  | Handler_tmp_write | 516 |
  | Handler_update | 0 |
  | Handler_write | 0 |
  | Innodb_available_undo_logs | 128 |
  | Innodb_background_log_sync | 222 |
  | Innodb_buffer_pool_bytes_data | 2523136 |
  | Innodb_buffer_pool_bytes_dirty | 0 |
  | Innodb_buffer_pool_dump_status | Dumping buffer pool(s)
  not yet started |
  | Innodb_buffer_pool_load_status | Loading buffer pool(s)
  not yet started |
  | Innodb_buffer_pool_pages_data | 154 |
  | Innodb_buffer_pool_pages_dirty | 0 |
  | Innodb_buffer_pool_pages_flushed | 1 |
  | Innodb_buffer_pool_pages_free | 8037 |
  | Innodb_buffer_pool_pages_lru_flushed | 0 |
  | Innodb_buffer_pool_pages_made_not_young | 0 |
  | Innodb_buffer_pool_pages_made_young | 0 |
  | Innodb_buffer_pool_pages_misc | 0 |
  | Innodb_buffer_pool_pages_old | 0 |
  | Innodb_buffer_pool_pages_total | 8191 |
  | Innodb_buffer_pool_read_ahead | 0 |
  | Innodb_buffer_pool_read_ahead_evicted | 0 |
  | Innodb_buffer_pool_read_ahead_rnd | 0 |
  | Innodb_buffer_pool_read_requests | 558 |
  | Innodb_buffer_pool_reads | 155 |
  | Innodb_buffer_pool_wait_free | 0 |
  | Innodb_buffer_pool_write_requests | 1 |
  | Innodb_checkpoint_age | 0 |
  | Innodb_checkpoint_max_age | 80826164 |
  | Innodb_data_fsyncs | 5 |
  | Innodb_data_pending_fsyncs | 0 |
  | Innodb_data_pending_reads | 0 |
  | Innodb_data_pending_writes | 0 |
  | Innodb_data_read | 2609664 |
  | Innodb_data_reads | 172 |
  | Innodb_data_writes | 5 |
  | Innodb_data_written | 34304 |
  | Innodb_dblwr_pages_written | 1 |
  | Innodb_dblwr_writes | 1 |
  | Innodb_deadlocks | 0 |
  | Innodb_have_atomic_builtins | ON |
  | Innodb_history_list_length | 0 |
  | Innodb_ibuf_discarded_delete_marks | 0 |
  | Innodb_ibuf_discarded_deletes | 0 |
  | Innodb_ibuf_discarded_inserts | 0 |
  | Innodb_ibuf_free_list | 0 |
  | Innodb_ibuf_merged_delete_marks | 0 |
  | Innodb_ibuf_merged_deletes | 0 |
  | Innodb_ibuf_merged_inserts | 0 |
  | Innodb_ibuf_merges | 0 |
  | Innodb_ibuf_segment_size | 2 |
  | Innodb_ibuf_size | 1 |
  | Innodb_log_waits | 0 |
  | Innodb_log_write_requests | 0 |
  | Innodb_log_writes | 1 |
  | Innodb_lsn_current | 1616829 |
  | Innodb_lsn_flushed | 1616829 |
  | Innodb_lsn_last_checkpoint | 1616829 |
  | Innodb_master_thread_active_loops | 0 |
  | Innodb_master_thread_idle_loops | 222 |
  | Innodb_max_trx_id | 2308 |
  | Innodb_mem_adaptive_hash | 2217568 |
  | Innodb_mem_dictionary | 630703 |
  | Innodb_mem_total | 140771328 |
  | Innodb_mutex_os_waits | 1 |
  | Innodb_mutex_spin_rounds | 30 |
  | Innodb_mutex_spin_waits | 1 |
  | Innodb_oldest_view_low_limit_trx_id | 0 |
  | Innodb_os_log_fsyncs | 3 |
  | Innodb_os_log_pending_fsyncs | 0 |
  | Innodb_os_log_pending_writes | 0 |
  | Innodb_os_log_written | 512 |
  | Innodb_page_size | 16384 |
  | Innodb_pages_created | 0 |
  | Innodb_pages_read | 154 |
  | Innodb_pages_written | 1 |
  | Innodb_purge_trx_id | 0 |
  | Innodb_purge_undo_no | 0 |
  | Innodb_read_views_memory | 88 |
  | Innodb_row_lock_current_waits | 0 |
  | Innodb_row_lock_time | 0 |
  | Innodb_row_lock_time_avg | 0 |
  | Innodb_row_lock_time_max | 0 |
  | Innodb_row_lock_waits | 0 |
  | Innodb_rows_deleted | 0 |
  | Innodb_rows_inserted | 0 |
  | Innodb_rows_read | 0 |
  | Innodb_rows_updated | 0 |
  | Innodb_system_rows_deleted | 0 |
  | Innodb_system_rows_inserted | 0 |
  | Innodb_system_rows_read | 0 |
  | Innodb_system_rows_updated | 0 |
  | Innodb_s_lock_os_waits | 2 |
  | Innodb_s_lock_spin_rounds | 60 |
  | Innodb_s_lock_spin_waits | 2 |
  | Innodb_truncated_status_writes | 0 |
  | Innodb_x_lock_os_waits | 0 |
  | Innodb_x_lock_spin_rounds | 0 |
  | Innodb_x_lock_spin_waits | 0 |
  | Innodb_page_compression_saved | 0 |
  | Innodb_page_compression_trim_sect512 | 0 |
  | Innodb_page_compression_trim_sect1024 | 0 |
  | Innodb_page_compression_trim_sect2048 | 0 |
  | Innodb_page_compression_trim_sect4096 | 0 |
  | Innodb_page_compression_trim_sect8192 | 0 |
  | Innodb_page_compression_trim_sect16384 | 0 |
  | Innodb_page_compression_trim_sect32768 | 0 |
  | Innodb_num_index_pages_written | 0 |
  | Innodb_num_non_index_pages_written | 5 |
  | Innodb_num_pages_page_compressed | 0 |
  | Innodb_num_page_compressed_trim_op | 0 |
  | Innodb_num_page_compressed_trim_op_saved | 0 |
  | Innodb_num_pages_page_decompressed | 0 |
  | Innodb_num_pages_page_compression_error | 0 |
  | Innodb_num_pages_encrypted | 0 |
  | Innodb_num_pages_decrypted | 0 |
  | Innodb_have_lz4 | OFF |
  | Innodb_have_lzo | OFF |
  | Innodb_have_lzma | OFF |
  | Innodb_have_bzip2 | OFF |
  | Innodb_have_snappy | OFF |
  | Innodb_defragment_compression_failures | 0 |
  | Innodb_defragment_failures | 0 |
  | Innodb_defragment_count | 0 |
  | Innodb_onlineddl_rowlog_rows | 0 |
  | Innodb_onlineddl_rowlog_pct_used | 0 |
  | Innodb_onlineddl_pct_progress | 0 |
  | Innodb_secondary_index_triggered_cluster_reads | 0 |
  | Innodb_secondary_index_triggered_cluster_reads_avoided | 0
  |
  | Innodb_encryption_rotation_pages_read_from_cache | 0 |
  | Innodb_encryption_rotation_pages_read_from_disk | 0 |
  | Innodb_encryption_rotation_pages_modified | 0 |
  | Innodb_encryption_rotation_pages_flushed | 0 |
  | Innodb_encryption_rotation_estimated_iops | 0 |
  | Innodb_scrub_background_page_reorganizations | 0 |
  | Innodb_scrub_background_page_splits | 0 |
  | Innodb_scrub_background_page_split_failures_underflow | 0
  |
  |
  Innodb_scrub_background_page_split_failures_out_of_filespace
  | 0 |
  | Innodb_scrub_background_page_split_failures_missing_index
  | 0 |
  | Innodb_scrub_background_page_split_failures_unknown | 0 |
  | Key_blocks_not_flushed | 0 |
  | Key_blocks_unused | 107163 |
  | Key_blocks_used | 0 |
  | Key_blocks_warm | 0 |
  | Key_read_requests | 0 |
  | Key_reads | 0 |
  | Key_write_requests | 0 |
  | Key_writes | 0 |
  | Last_query_cost | 0.000000 |
  | Master_gtid_wait_count | 0 |
  | Master_gtid_wait_time | 0 |
  | Master_gtid_wait_timeouts | 0 |
  | Max_statement_time_exceeded | 0 |
  | Max_used_connections | 1 |
  | Memory_used | 273614696 |
  | Not_flushed_delayed_rows | 0 |
  | Open_files | 25 |
  | Open_streams | 0 |
  | Open_table_definitions | 18 |
  | Open_tables | 11 |
  | Opened_files | 77 |
  | Opened_plugin_libraries | 0 |
  | Opened_table_definitions | 18 |
  | Opened_tables | 18 |
  | Opened_views | 0 |
  | Performance_schema_accounts_lost | 0 |
  | Performance_schema_cond_classes_lost | 0 |
  | Performance_schema_cond_instances_lost | 0 |
  | Performance_schema_digest_lost | 0 |
  | Performance_schema_file_classes_lost | 0 |
  | Performance_schema_file_handles_lost | 0 |
  | Performance_schema_file_instances_lost | 0 |
  | Performance_schema_hosts_lost | 0 |
  | Performance_schema_locker_lost | 0 |
  | Performance_schema_mutex_classes_lost | 0 |
  | Performance_schema_mutex_instances_lost | 0 |
  | Performance_schema_rwlock_classes_lost | 0 |
  | Performance_schema_rwlock_instances_lost | 0 |
  | Performance_schema_session_connect_attrs_lost | 0 |
  | Performance_schema_socket_classes_lost | 0 |
  | Performance_schema_socket_instances_lost | 0 |
  | Performance_schema_stage_classes_lost | 0 |
  | Performance_schema_statement_classes_lost | 0 |
  | Performance_schema_table_handles_lost | 0 |
  | Performance_schema_table_instances_lost | 0 |
  | Performance_schema_thread_classes_lost | 0 |
  | Performance_schema_thread_instances_lost | 0 |
  | Performance_schema_users_lost | 0 |
  | Prepared_stmt_count | 0 |
  | Qcache_free_blocks | 1 |
  | Qcache_free_memory | 1031336 |
  | Qcache_hits | 0 |
  | Qcache_inserts | 0 |
  | Qcache_lowmem_prunes | 0 |
  | Qcache_not_cached | 0 |
  | Qcache_queries_in_cache | 0 |
  | Qcache_total_blocks | 1 |
  | Queries | 4 |
  | Questions | 4 |
  | Rows_read | 10 |
  | Rows_sent | 517 |
  | Rows_tmp_read | 516 |
  | Rpl_status | AUTH_MASTER |
  | Select_full_join | 0 |
  | Select_full_range_join | 0 |
  | Select_range | 0 |
  | Select_range_check | 0 |
  | Select_scan | 2 |
  | Slave_connections | 0 |
  | Slave_heartbeat_period | 0.000 |
  | Slave_open_temp_tables | 0 |
  | Slave_received_heartbeats | 0 |
  | Slave_retried_transactions | 0 |
  | Slave_running | OFF |
  | Slave_skipped_errors | 0 |
  | Slaves_connected | 0 |
  | Slaves_running | 0 |
  | Slow_launch_threads | 0 |
  | Slow_queries | 0 |
  | Sort_merge_passes | 0 |
  | Sort_priority_queue_sorts | 0 |
  | Sort_range | 0 |
  | Sort_rows | 0 |
  | Sort_scan | 0 |
  | Ssl_accept_renegotiates | 0 |
  | Ssl_accepts | 0 |
  | Ssl_callback_cache_hits | 0 |
  | Ssl_cipher | |
  | Ssl_cipher_list | |
  | Ssl_client_connects | 0 |
  | Ssl_connect_renegotiates | 0 |
  | Ssl_ctx_verify_depth | 0 |
  | Ssl_ctx_verify_mode | 0 |
  | Ssl_default_timeout | 0 |
  | Ssl_finished_accepts | 0 |
  | Ssl_finished_connects | 0 |
  | Ssl_server_not_after | |
  | Ssl_server_not_before | |
  | Ssl_session_cache_hits | 0 |
  | Ssl_session_cache_misses | 0 |
  | Ssl_session_cache_mode | NONE |
  | Ssl_session_cache_overflows | 0 |
  | Ssl_session_cache_size | 0 |
  | Ssl_session_cache_timeouts | 0 |
  | Ssl_sessions_reused | 0 |
  | Ssl_used_session_cache_entries | 0 |
  | Ssl_verify_depth | 0 |
  | Ssl_verify_mode | 0 |
  | Ssl_version | |
  | Subquery_cache_hit | 0 |
  | Subquery_cache_miss | 0 |
  | Syncs | 2 |
  | Table_locks_immediate | 21 |
  | Table_locks_waited | 0 |
  | Tc_log_max_pages_used | 0 |
  | Tc_log_page_size | 4096 |
  | Tc_log_page_waits | 0 |
  | Threadpool_idle_threads | 0 |
  | Threadpool_threads | 0 |
  | Threads_cached | 0 |
  | Threads_connected | 1 |
  | Threads_created | 2 |
  | Threads_running | 1 |
  | Update_scan | 0 |
  | Uptime | 223 |
  | Uptime_since_flush_status | 223 |
  | wsrep_cluster_conf_id | 18446744073709551615 |
  | wsrep_cluster_size | 0 |
  | wsrep_cluster_state_uuid | |
  | wsrep_cluster_status | Disconnected |
  | wsrep_connected | OFF |
  | wsrep_local_bf_aborts | 0 |
  | wsrep_local_index | 18446744073709551615 |
  | wsrep_provider_name | |
  | wsrep_provider_vendor | |
  | wsrep_provider_version | |
  | wsrep_ready | OFF |
  | wsrep_thread_count | 0 |
  +--------------------------------------------------------------+----------------------------------------+
  516 rows in set (0.00 sec)
   
  Example of filtered output:
   
  SHOW STATUS LIKE 'Key%';
   
  +------------------------+--------+
  | Variable_name | Value |
  +------------------------+--------+
  | Key_blocks_not_flushed | 0 |
  | Key_blocks_unused | 107163 |
  | Key_blocks_used | 0 |
  | Key_blocks_warm | 0 |
  | Key_read_requests | 0 |
  | Key_reads | 0 |
  | Key_write_requests | 0 |
  | Key_writes | 0 |
  +------------------------+--------+
  8 rows in set (0.00 sec)
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-status/dzfxuxSHOW STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-status/dzfxuxdzfxux26dzfxux396qjzxqqvvbqSyntax
  ------ 
  DO expr [, expr] ...
   
  Description
  ----------- 
   DO executes the expressions but does not return any
  results. In most respects, DO is shorthand for
   SELECT expr, ..., but has the advantage that it is slightly
  faster when you do not care about the result.
   
   DO is useful primarily with functions that have side
   effects, such as RELEASE_LOCK().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/do/dzfxuxDOdzfxuxhttps://mariadb.com/kb/en/library/do/dzfxuxdzfxux27dzfxux409qjzxqqvvbqSyntax
  ------ 
  LAST_VALUE(expr,[expr,...])
   
  LAST_VALUE(expr) OVER (
   [ PARTITION BY partition_expression ]
   [ ORDER BY order_list ]
  ) 
   
  Description
  ----------- 
  LAST_VALUE() evaluates all expressions and returns the last.
   
  This is useful together with setting user variables to a
  value with @var:=expr, for example when you want to get data
  of rows updated/deleted without having to do two queries
  against the table.
   
  Since MariaDB 10.2.2, LAST_VALUE can be used as a window
  function.
   
  Returns NULL if no last value exists.
   
  Examples
  -------- 
  CREATE TABLE t1 (a int, b int);
  INSERT INTO t1 VALUES(1,10),(2,20);
  DELETE FROM t1 WHERE a=1 AND last_value(@a:=a,@b:=b,1);
  SELECT @a,@b;
   
  +------+------+
  | @a | @b |
  +------+------+
  | 1 | 10 |
  +------+------+
   
  As a window function:
   
  CREATE TABLE t1 (
   pk int primary key,
   a int,
   b int,
   c char(10),
   d decimal(10, 3),
   e real
  );
   
  INSERT INTO t1 VALUES
  ( 1, 0, 1, 'one', 0.1, 0.001),
  ( 2, 0, 2, 'two', 0.2, 0.002),
  ( 3, 0, 3, 'three', 0.3, 0.003),
  ( 4, 1, 2, 'three', 0.4, 0.004),
  ( 5, 1, 1, 'two', 0.5, 0.005),
  ( 6, 1, 1, 'one', 0.6, 0.006),
  ( 7, 2, NULL, 'n_one', 0.5, 0.007),
  ( 8, 2, 1, 'n_two', NULL, 0.008),
  ( 9, 2, 2, NULL, 0.7, 0.009),
  (10, 2, 0, 'n_four', 0.8, 0.010),
  (11, 2, 10, NULL, 0.9, NULL);
   
  SELECT pk, FIRST_VALUE(pk) OVER (ORDER BY pk) AS first_asc,
   LAST_VALUE(pk) OVER (ORDER BY pk) AS last_asc,
   FIRST_VALUE(pk) OVER (ORDER BY pk DESC) AS first_desc,
   LAST_VALUE(pk) OVER (ORDER BY pk DESC) AS last_desc
  FROM t1
  ORDER BY pk DESC;
   
  +----+-----------+----------+------------+-----------+
  | pk | first_asc | last_asc | first_desc | last_desc |
  +----+-----------+----------+------------+-----------+
  | 11 | 1 | 11 | 11 | 11 |
  | 10 | 1 | 10 | 11 | 10 |
  | 9 | 1 | 9 | 11 | 9 |
  | 8 | 1 | 8 | 11 | 8 |
  | 7 | 1 | 7 | 11 | 7 |
  | 6 | 1 | 6 | 11 | 6 |
  | 5 | 1 | 5 | 11 | 5 |
  | 4 | 1 | 4 | 11 | 4 |
  | 3 | 1 | 3 | 11 | 3 |
  | 2 | 1 | 2 | 11 | 2 |
  | 1 | 1 | 1 | 11 | 1 |
  +----+-----------+----------+------------+-----------+
   
  CREATE OR REPLACE TABLE t1 (i int);
  INSERT INTO t1 VALUES
  (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
   
  SELECT i,
   FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW
  and 1 FOLLOWING) AS f_1f,
   LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN CURRENT ROW and
  1 FOLLOWING) AS l_1f,
   FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING
  AND 1 FOLLOWING) AS f_1p1f,
   LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 PRECEDING AND
  1 FOLLOWING) AS f_1p1f,
   FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING
  AND 1 PRECEDING) AS f_2p1p,
   LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 2 PRECEDING AND
  1 PRECEDING) AS f_2p1p,
   FIRST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING
  AND 2 FOLLOWING) AS f_1f2f,
   LAST_VALUE(i) OVER (ORDER BY i ROWS BETWEEN 1 FOLLOWING AND
  2 FOLLOWING) AS f_1f2f
  FROM t1;
   
  +------+------+------+--------+--------+--------+--------+--------+--------+
  | i | f_1f | l_1f | f_1p1f | f_1p1f | f_2p1p | f_2p1p |
  f_1f2f | f_1f2f |
  +------+------+------+--------+--------+--------+--------+--------+--------+
  | 1 | 1 | 2 | 1 | 2 | NULL | NULL | 2 | 3 |
  | 2 | 2 | 3 | 1 | 3 | 1 | 1 | 3 | 4 |
  | 3 | 3 | 4 | 2 | 4 | 1 | 2 | 4 | 5 |
  | 4 | 4 | 5 | 3 | 5 | 2 | 3 | 5 | 6 |
  | 5 | 5 | 6 | 4 | 6 | 3 | 4 | 6 | 7 |
  | 6 | 6 | 7 | 5 | 7 | 4 | 5 | 7 | 8 |
  | 7 | 7 | 8 | 6 | 8 | 5 | 6 | 8 | 9 |
  | 8 | 8 | 9 | 7 | 9 | 6 | 7 | 9 | 10 |
  | 9 | 9 | 10 | 8 | 10 | 7 | 8 | 10 | 10 |
  | 10 | 10 | 10 | 9 | 10 | 8 | 9 | NULL | NULL |
  +------+------+------+--------+--------+--------+--------+--------+--------+
   


  URL: https://mariadb.com/kb/en/library/last_value/dzfxuxLAST_VALUEdzfxuxhttps://mariadb.com/kb/en/library/last_value/dzfxuxdzfxux17dzfxux213qjzxqqvvbqSyntax
  ------ 
  ROW_COUNT()
   
  Description
  ----------- 
  ROW_COUNT() returns the number of rows updated, inserted or
  deleted
  by the preceding statement. This is the same as the row
  count that the
  mysql client displays and the value from the
  mysql_affected_rows() C
  API function.
   
  Generally:
  For statements which return a result set (such as SELECT,
  SHOW, DESC or HELP), returns -1, even when the result set is
  empty. This is also true for administrative statements, such
  as OPTIMIZE.
  For DML statements other than SELECT and for ALTER TABLE,
  returns the number of affected rows.
  For DDL statements (including TRUNCATE) and for other
  statements which don't return any result set (such as USE,
  DO, SIGNAL or DEALLOCATE PREPARE), returns 0.
   
  For UPDATE, affected rows is by default the number of rows
  that were actually changed. If the CLIENT_FOUND_ROWS flag to
  mysql_real_connect() is specified when connecting to mysqld,
  affected rows is instead the number of rows matched by the
  WHERE clause. 
   
  For REPLACE, deleted rows are also counted. So, if REPLACE
  deletes a row and adds a new row, ROW_COUNT() returns 2.
   
  For INSERT ... ON DUPLICATE KEY, updated rows are counted
  twice. So, if INSERT adds a new rows and modifies another
  row, ROW_COUNT() returns 3.
   
  ROW_COUNT() does not take into account rows that are not
  directly deleted/updated by the last statement. This means
  that rows deleted by foreign keys or triggers are not
  counted.
   
  Warning: You can use ROW_COUNT() with prepared statements,
  but you need to call it after EXECUTE, not after DEALLOCATE
  PREPARE, because the row count for allocate prepare is
  always 0.
   
  Warning: When used after a CALL statement, this function
  returns the number of rows affected by the last statement in
  the procedure, not by the whole procedure.
   
  Warning: After INSERT DELAYED, ROW_COUNT() returns the
  number of the rows you tried to insert, not the number of
  the successful writes.
   
  This information can also be found in the diagnostics area.
   
  Statements using the ROW_COUNT() function are not safe for
  replication.
   
  Examples
  -------- 
  CREATE TABLE t (A INT);
   
  INSERT INTO t VALUES(1),(2),(3);
   
  SELECT ROW_COUNT();
  +-------------+
  | ROW_COUNT() |
  +-------------+
  | 3 |
  +-------------+
   
  DELETE FROM t WHERE A IN(1,2);
   
  SELECT ROW_COUNT(); 
  +-------------+
  | ROW_COUNT() |
  +-------------+
  | 2 |
  +-------------+
   
  Example with prepared statements:
   
  SET @q = 'INSERT INTO t VALUES(1),(2),(3);';
   
  PREPARE stmt FROM @q;
   
  EXECUTE stmt;
   
  Query OK, 3 rows affected (0.39 sec)
  Records: 3 Duplicates: 0 Warnings: 0
   
  SELECT ROW_COUNT();
  +-------------+
  | ROW_COUNT() |
  +-------------+
  | 3 |
  +-------------+
   


  URL: https://mariadb.com/kb/en/library/row_count/dzfxuxROW_COUNTdzfxuxhttps://mariadb.com/kb/en/library/row_count/dzfxuxdzfxux17dzfxux215qjzxqqvvbqDescription
  ----------- 
  You are allowed to specify DUAL as a dummy table name in
  situations where no tables are referenced, such as the
  following SELECT statement:
   
  SELECT 1 + 1 FROM DUAL;
   
  +-------+
  | 1 + 1 |
  +-------+
  | 2 |
  +-------+
   
   DUAL is purely for the convenience of people who require
   that all SELECT statements should have
   FROM and possibly other clauses. MariaDB ignores the
   clauses. MariaDB does not require FROM DUAL if no tables
   are referenced.
   
  FROM DUAL could be used when you only SELECT computed
  values, but require a WHERE clause, perhaps to test that a
  script correctly handles empty resultsets:
   
  SELECT 1 FROM DUAL WHERE FALSE;
   
  Empty set (0.00 sec)
   


  URL: https://mariadb.com/kb/en/library/dual/dzfxuxDUALdzfxuxhttps://mariadb.com/kb/en/library/dual/dzfxuxdzfxux27dzfxux410qjzxqqvvbqThe FOR UPDATE clause of SELECT applies only when autocommit
  is set to 0 or the SELECT is enclosed in a transaction. A
  lock is acquired on the rows, and other transactions are
  prevented from writing the rows, acquire locks, and from
  reading them (unless their isolation level is READ
  UNCOMMITTED).
   
  If autocommit is set to 1, the LOCK IN SHARE MODE and FOR
  UPDATE clauses have no effect.
   
  If the isolation level is set to SERIALIZABLE, all plain
  SELECT statements are converted to SELECT ... LOCK IN SHARE
  MODE.
   
  Example
   
  SELECT * FROM trans WHERE period=2001 FOR UPDATE;
   


  URL: https://mariadb.com/kb/en/library/for-update/dzfxuxFOR UPDATEdzfxuxhttps://mariadb.com/kb/en/library/for-update/dzfxuxdzfxux27dzfxux412qjzxqqvvbqSyntax
  ------ 
  USER()
   
  Description
  ----------- 
  Returns the current MariaDB user name and host name, given
  when authenticating to MariaDB, as a string in the utf8
  character set.
   
  Note that the value of USER() may differ from the value of
  CURRENT_USER(), which is the user used to authenticate the
  current client. 
  CURRENT_ROLE() returns the current active role.
   
  SYSTEM_USER() and SESSION_USER are synonyms for USER().
   
  Statements using the USER() function or one of its synonyms
  are not safe for statement level replication.
   
  Examples
  -------- 
  shell> mysql --user="anonymous"
   
  MariaDB [(none)]> select user(),current_user();
  +---------------------+----------------+
  | user() | current_user() |
  +---------------------+----------------+
  | anonymous@localhost | @localhost |
  +---------------------+----------------+
   


  URL: https://mariadb.com/kb/en/library/user/dzfxuxUSERdzfxuxhttps://mariadb.com/kb/en/library/user/dzfxuxdzfxux17dzfxux219qjzxqqvvbqSyntax
  ------ 
  VERSION()
   
  Description
  ----------- 
  Returns a string that indicates the MariaDB server version.
  The string
  uses the utf8 character set.
   
  Examples
  -------- 
  SELECT VERSION();
  +------------------------------+
  | VERSION() |
  +------------------------------+
  | 10.0.3-MariaDB-1~precise-log |
  +------------------------------+
   
  The VERSION() string may have one or more of the following
  suffixes:
   
  Suffix | Description | 
   
  -embedded | The server is an embedded server (libmysqld). | 
   
  -log | General logging, slow logging or binary (replication)
  logging is enabled. | 
   
  -debug | The server is compiled for debugging. | 
   
  -valgrind | ?The server is compiled to be instrumented with
  valgrind. | 
   
  Changing the Version String
   
  Some old legacy code may break because they are parsing the
  VERSION string and expecting a MySQL string or a simple
  version
  string like Joomla til API17, see MDEV-7780.
   
  In MariaDB 10.2 one can fool these applications by setting
  the version string from the command line or the my.cnf files
  with --version=....
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/version/dzfxuxVERSIONdzfxuxhttps://mariadb.com/kb/en/library/version/dzfxuxdzfxux17dzfxux220qjzxqqvvbqSyntax
  ------ 
  , !=
   
  Description
  ----------- 
  Not equal operator. Evaluates both SQL expressions and
  returns 1 if they are not equal and 0 if they are equal, or
  NULL if either expression is NULL. If the expressions return
  different data types, (for instance, a number and a string),
  performs type conversion.
   
  When used in row comparisons these two queries return the
  same results:
   
  SELECT (t1.a, t1.b) != (t2.x, t2.y) 
  FROM t1 INNER JOIN t2;
   
  SELECT (t1.a != t2.x) OR (t1.b != t2.y)
  FROM t1 INNER JOIN t2;
   
  Examples
  -------- 
  SELECT '.01'  '0.01';
   
  +-----------------+
  | '.01'  '0.01' |
  +-----------------+
  | 1 |
  +-----------------+
   
  SELECT .01  '0.01';
   
  +---------------+
  | .01  '0.01' |
  +---------------+
  | 0 |
  +---------------+
   
  SELECT 'zapp'  'zappp';
   
  +-------------------+
  | 'zapp'  'zappp' |
  +-------------------+
  | 1 |
  +-------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/not-equal/dzfxux!=dzfxuxhttps://mariadb.com/kb/en/library/not-equal/dzfxuxdzfxux18dzfxux221qjzxqqvvbqSyntax
  ------ 

   
  Description
  ----------- 
  NULL-safe equal operator. It performs an equality comparison
  like
  the = operator, but returns 1 rather than NULL if both
  operands are
  NULL, and 0 rather than NULL if one operand is NULL.
   
  a  b is equivalent to a = b OR (a IS NULL AND b IS NULL).
   
  When used in row comparisons these two queries return the
  same results:
   
  SELECT (t1.a, t1.b)  (t2.x, t2.y) 
  FROM t1 INNER JOIN t2;
   
  SELECT (t1.a  t2.x) AND (t1.b  t2.y)
  FROM t1 INNER JOIN t2;
   
  See also NULL Values in MariaDB.
   
  Examples
  -------- 
  SELECT 1  1, NULL  NULL, 1  NULL;
   
  +---------+---------------+------------+
  | 1  1 | NULL  NULL | 1  NULL |
  +---------+---------------+------------+
  | 1 | 1 | 0 |
  +---------+---------------+------------+
   
  SELECT 1 = 1, NULL = NULL, 1 = NULL;
   
  +-------+-------------+----------+
  | 1 = 1 | NULL = NULL | 1 = NULL |
  +-------+-------------+----------+
  | 1 | NULL | NULL |
  +-------+-------------+----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/null-safe-equal/dzfxux<=>dzfxuxhttps://mariadb.com/kb/en/library/null-safe-equal/dzfxuxdzfxux18dzfxux224qjzxqqvvbqSyntax
  ------ 
  left_expr = right_expr
   
  Description
  ----------- 
  Equal operator. Evaluates both SQL expressions and returns 1
  if they are equal, 0 if they are not equal, or NULL if
  either expression is NULL. If the expressions return
  different data types (for example, a number and a string), a
  type conversion is performed.
   
  When used in row comparisons these two queries are
  synonymous and return the same results:
   
  SELECT (t1.a, t1.b) = (t2.x, t2.y) FROM t1 INNER JOIN t2;
   
  SELECT (t1.a = t2.x) AND (t1.b = t2.y) FROM t1 INNER JOIN
  t2;
   
  To perform a NULL-safe comparison, use the  operator.
   
  = can also be used as an assignment operator.
   
  Examples
  -------- 
  SELECT 1 = 0;
   
  +-------+
  | 1 = 0 |
  +-------+
  | 0 |
  +-------+
   
  SELECT '0' = 0;
   
  +---------+
  | '0' = 0 |
  +---------+
  | 1 |
  +---------+
   
  SELECT '0.0' = 0;
   
  +-----------+
  | '0.0' = 0 |
  +-----------+
  | 1 |
  +-----------+
   
  SELECT '0.01' = 0;
   
  +------------+
  | '0.01' = 0 |
  +------------+
  | 0 |
  +------------+
   
  SELECT '.01' = 0.01;
   
  +--------------+
  | '.01' = 0.01 |
  +--------------+
  | 1 |
  +--------------+
   
  SELECT (5 * 2) = CONCAT('1', '0');
  +----------------------------+
  | (5 * 2) = CONCAT('1', '0') |
  +----------------------------+
  | 1 |
  +----------------------------+
   
  SELECT 1 = NULL;
   
  +----------+
  | 1 = NULL |
  +----------+
  | NULL |
  +----------+
   
  SELECT NULL = NULL;
   
  +-------------+
  | NULL = NULL |
  +-------------+
  | NULL |
  +-------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/equal/dzfxux=dzfxuxhttps://mariadb.com/kb/en/library/equal/dzfxuxdzfxux18dzfxux225qjzxqqvvbqSyntax
  ------ 
  HANDLER tbl_name OPEN [ [AS] alias]
  HANDLER tbl_name READ index_name { = | >= | = | 

  URL: https://mariadb.com/kb/en/library/handler-commands/dzfxuxHANDLER Commandsdzfxuxhttps://mariadb.com/kb/en/library/handler-commands/dzfxuxdzfxux27dzfxux414qjzxqqvvbqWhen LOCK IN SHARE MODE is specified in a SELECT statement,
  MariaDB will wait until all transactions that have modified
  the rows are committed. Then, a write lock is acquired. All
  transactions can read the rows, but if they want to modify
  them, they have to wait until your transaction is committed.
   
  InnoDB/XtraDB supports row-level locking. selected rows can
  be locked using LOCK IN SHARE MODE or FOR UPDATE. In both
  cases, a lock is acquired on the rows read by the query, and
  it will be released when the current transaction is
  committed.
   
  If autocommit is set to 1, the LOCK IN SHARE MODE and FOR
  UPDATE clauses have no effect.
   


  URL: https://mariadb.com/kb/en/library/lock-in-share-mode/dzfxuxLOCK IN SHARE MODEdzfxuxhttps://mariadb.com/kb/en/library/lock-in-share-mode/dzfxuxdzfxux27dzfxux428qjzxqqvvbqThe PROCEDURE clause of SELECT passes the whole result set
  to a Procedure which will process it. These Procedures are
  not Stored Procedures, and can only be written in the C
  language, so it is necessary to recompile the server.
   
  Currently, the only available procedure is ANALYSE, which
  examines the resultset and suggests the optimal datatypes
  for each column. It is defined in the sql/sql_analyse.cc
  file, and can be used as an example to create more
  Procedures.
   
  This clause cannot be used in a view's definition.
   


  URL: https://mariadb.com/kb/en/library/procedure/dzfxuxPROCEDUREdzfxuxhttps://mariadb.com/kb/en/library/procedure/dzfxuxdzfxux27dzfxux431qjzxqqvvbqSyntax
  ------ 
  >
   
  Description
  ----------- 
  Greater than operator. Evaluates both SQL expressions and
  returns 1 if the left value is greater than the right value
  and 0 if it is not, or NULL if either expression is NULL. If
  the expressions return different data types, (for instance,
  a number and a string), performs type conversion.
   
  When used in row comparisons these two queries return the
  same results:
   
  SELECT (t1.a, t1.b) > (t2.x, t2.y) 
  FROM t1 INNER JOIN t2;
   
  SELECT (t1.a > t2.x) OR ((t1.a = t2.x) AND (t1.b > t2.y))
  FROM t1 INNER JOIN t2;
   
  Examples
  -------- 
  SELECT 2 > 2;
   
  +-------+
  | 2 > 2 |
  +-------+
  | 0 |
  +-------+
   
  SELECT 'b' > 'a';
   
  +-----------+
  | 'b' > 'a' |
  +-----------+
  | 1 |
  +-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/greater-than/dzfxux>dzfxuxhttps://mariadb.com/kb/en/library/greater-than/dzfxuxdzfxux18dzfxux226qjzxqqvvbqSyntax
  ------ 
  >=
   
  Description
  ----------- 
  Greater than or equal operator. Evaluates both SQL
  expressions and returns 1 if the left value is greater than
  or equal to the right value and 0 if it is not, or NULL if
  either expression is NULL. If the expressions return
  different data types, (for instance, a number and a string),
  performs type conversion.
   
  When used in row comparisons these two queries return the
  same results:
   
  SELECT (t1.a, t1.b) >= (t2.x, t2.y) 
  FROM t1 INNER JOIN t2;
   
  SELECT (t1.a > t2.x) OR ((t1.a = t2.x) AND (t1.b >= t2.y))
  FROM t1 INNER JOIN t2;
   
  Examples
  -------- 
  SELECT 2 >= 2;
   
  +--------+
  | 2 >= 2 |
  +--------+
  | 1 |
  +--------+
   
  SELECT 'A' >= 'a';
   
  +------------+
  | 'A' >= 'a' |
  +------------+
  | 1 |
  +------------+
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/greater-than-or-equal/dzfxux>=dzfxuxhttps://mariadb.com/kb/en/library/greater-than-or-equal/dzfxuxdzfxux18dzfxux227qjzxqqvvbqSyntax
  ------ 
  COALESCE(value,...)
   
  Description
  ----------- 
  Returns the first non-NULL value in the list, or NULL if
  there are no
  non-NULL values. At least one parameter must be passed.
   
  See also NULL Values in MariaDB.
   
  Examples
  -------- 
  SELECT COALESCE(NULL,1);
  +------------------+
  | COALESCE(NULL,1) |
  +------------------+
  | 1 |
  +------------------+
   
  SELECT COALESCE(NULL,NULL,NULL);
  +--------------------------+
  | COALESCE(NULL,NULL,NULL) |
  +--------------------------+
  | NULL |
  +--------------------------+
   
  When two arguments are given, COALESCE() is the same as
  IFNULL():
   
  SET @a=NULL, @b=1;
   
  SELECT COALESCE(@a, @b), IFNULL(@a, @b);
  +------------------+----------------+
  | COALESCE(@a, @b) | IFNULL(@a, @b) |
  +------------------+----------------+
  | 1 | 1 |
  +------------------+----------------+
   
  Hex type confusion:
   
  CREATE TABLE t1 (a INT, b VARCHAR(10));
  INSERT INTO t1 VALUES (0x31, 0x61),(COALESCE(0x31),
  COALESCE(0x61));
   
  SELECT * FROM t1;
   
  +------+------+
  | a | b |
  +------+------+
  | 49 | a |
  | 1 | a |
  +------+------+
   
  The reason for the differing results above is that when 0x31
  is inserted directly to the column, it's treated as a
  number (see Hexadecimal Literals), while when 0x31 is passed
  to COALESCE(), it's treated as a string, because:
  HEX values have a string data type by default.
  COALESCE() has the same data type as the argument. 
   


  URL: https://mariadb.com/kb/en/library/coalesce/dzfxuxCOALESCEdzfxuxhttps://mariadb.com/kb/en/library/coalesce/dzfxuxdzfxux18dzfxux229qjzxqqvvbqSyntax
  ------ 
  expr IN (value,...)
   
  Description
  ----------- 
  Returns 1 if expr is equal to any of the values in the IN
  list, else
  returns 0. If all values are constants, they are evaluated
  according
  to the type of expr and sorted. The search for the item then
  is done
  using a binary search. This means IN is very quick if the IN
  value
  list consists entirely of constants. Otherwise, type
  conversion takes
  place according to the rules described at Type Conversion,
  but
  applied to all the arguments.
   
  If expr is NULL, IN always returns NULL. If at least one of
  the values in the list is NULL, and one of the comparisons
  is true, the result is 1. If at least one of the values in
  the list is NULL and none of the comparisons is true, the
  result is NULL.
   
  Examples
  -------- 
  SELECT 2 IN (0,3,5,7);
  +----------------+
  | 2 IN (0,3,5,7) |
  +----------------+
  | 0 |
  +----------------+
   
  SELECT 'wefwf' IN ('wee','wefwf','weg');
  +----------------------------------+
  | 'wefwf' IN ('wee','wefwf','weg') |
  +----------------------------------+
  | 1 |
  +----------------------------------+ 
   
  Type conversion:
   
  SELECT 1 IN ('1', '2', '3');
  +----------------------+
  | 1 IN ('1', '2', '3') |
  +----------------------+
  | 1 |
  +----------------------+
   
  SELECT NULL IN (1, 2, 3);
  +-------------------+
  | NULL IN (1, 2, 3) |
  +-------------------+
  | NULL |
  +-------------------+
   
  MariaDB [(none)]> SELECT 1 IN (1, 2, NULL);
  +-------------------+
  | 1 IN (1, 2, NULL) |
  +-------------------+
  | 1 |
  +-------------------+
   
  MariaDB [(none)]> SELECT 5 IN (1, 2, NULL);
  +-------------------+
  | 5 IN (1, 2, NULL) |
  +-------------------+
  | NULL |
  +-------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/in/dzfxuxINdzfxuxhttps://mariadb.com/kb/en/library/in/dzfxuxdzfxux18dzfxux231qjzxqqvvbqSyntax
  ------ 
  EXPLAIN tbl_name
   
  Or
   
  EXPLAIN [EXTENDED | PARTITIONS] 
   {SELECT select_options | UPDATE update_options | DELETE
  delete_options}
   
  Description
  ----------- 
  The EXPLAIN statement can be used either as a synonym for
  DESCRIBE or as a way to obtain information about how MariaDB
  executes a SELECT (as well as UPDATE and DELETE since
  MariaDB 10.0.5) statement:
  'EXPLAIN tbl_name' is synonymous with 
   'DESCRIBE tbl_name' or 
   'SHOW COLUMNS FROM tbl_name'.
  When you precede a SELECT statement (or, since MariaDB
  10.0.5, an UPDATE or a DELETE as well) with the keyword 
   EXPLAIN, MariaDB displays information from the optimizer
   about the query execution plan. That is, MariaDB explains
  how it would
   process the SELECT, UPDATE or DELETE, including information
  about how tables
   are joined and in which order. EXPLAIN EXTENDED can be
   used to provide additional information.
  EXPLAIN PARTITIONS has been available since MySQL 5.1.5. It
  is useful only when examining queries involving partitioned
  tables. For details, see Partition pruning and selection.
  ANALYZE statement, which performs the query as well as
  producing EXPLAIN output, and provides actual as well as
  estimated statistics, has been available from MariaDB
  10.1.0.
  Since MariaDB 10.0.5, it has been possible to have EXPLAIN
  output printed in the slow query log. See EXPLAIN in the
  Slow Query Log for details.
   
  Since MariaDB 10.0, SHOW EXPLAIN shows the output of a
  running statement. In some cases, its output can be closer
  to reality than EXPLAIN.
   
  Since MariaDB 10.1, the ANALYZE statement runs a statement
  and returns information about its execution plan. It also
  shows additional columns, to check how much the optimizer's
  estimation about filtering and found rows are close to
  reality.
   
  There is an online EXPLAIN Analyzer that you can use to
  share EXPLAIN and EXPLAIN EXTENDED output with others.
   
  EXPLAIN can acquire metadata locks in the same way that
  SELECT does, as it needs to know table metadata and,
  sometimes, data as well.
   
  The columns in EXPLAIN ... SELECT
   
  Column name | Description | 
   
  id | Sequence number that shows in which order tables are
  joined. | 
   
  select_type | What kind of SELECT the table comes from. | 
   
  table | Alias name of table. Materialized temporary tables
  for sub queries are named  | 
   
  type | How rows are found from the table (join type). | 
   
  possible_keys | keys in table that could be used to find
  rows in the table | 
   
  key | The name of the key that is used to retrieve rows.
  NULL is no key was used. | 
   
  key_len | How many bytes of the key that was used (shows if
  we are using only parts of the multi-column key). | 
   
  ref | The reference that is used to as the key value. | 
   
  rows | An estimate of how many rows we will find in the
  table for each key lookup. | 
   
  Extra | Extra information about this join. | 
   
  Here are descriptions of the values for some of the more
  complex columns in EXPLAIN ... SELECT:
   
  "select_type" column
   
  The select_type column can have the following values:
   
  Value | Description | 
   
  DEPENDENT SUBQUERY | The SUBQUERY is DEPENDENT. | 
   
  DEPENDENT UNION | The UNION is DEPENDENT. | 
   
  DERIVED | The SELECT is DERIVED from the PRIMARY. | 
   
  MATERIALIZED | The SUBQUERY is MATERIALIZED. | 
   
  PRIMARY | The SELECT is a PRIMARY one. | 
   
  SIMPLE | The SELECT is a SIMPLE one. | 
   
  SUBQUERY | The SELECT is a SUBQUERY of the PRIMARY. | 
   
  UNCACHEABLE SUBQUERY | The SUBQUERY is UNCACHEABLE. | 
   
  UNCACHEABLE UNION | The UNION is UNCACHEABLE. | 
   
  UNION | The SELECT is a UNION of the PRIMARY. | 
   
  UNION RESULT | The result of the UNION. | 
   
  "Type" column
   
  This column contains information on how the table is
  accessed.
   
  Value | Description | 
   
  ALL | A full table scan is done for the table (all rows are
  read). This is bad if the table is large and the table is
  joined against a previous table! This happens when the
  optimizer could not find any usable index to access rows. | 
   
  const | There is only one possibly matching row in the
  table. The row is read before the optimization phase and all
  columns in the table are treated as constants. | 
   
  eq_ref | A unique index is used to find the rows. This is
  the best possible plan to find the row. | 
   
  fulltext | A fulltext index is used to access the rows. | 
   
  index_merge | A 'range' access is done for for several
  index and the found rows are merged. The key column shows
  which keys are used. | 
   
  index_subquery | This is similar as ref, but used for sub
  queries that are transformed to key lookups. | 
   
  index | A full scan over the used index. Better than ALL but
  still bad if index is large and the table is joined against
  a previous table. | 
   
  range | The table will be accessed with a key over one or
  more value ranges. | 
   
  ref_or_null | Like 'ref' but in addition another search
  for the 'null' value is done if the first value was not
  found. This happens usually with sub queries. | 
   
  ref | A non unique index or prefix of an unique index is
  used to find the rows. Good if the prefix doesn't match
  many rows. | 
   
  system | The table has 0 or 1 rows. | 
   
  unique_subquery | This is similar as eq_ref, but used for
  sub queries that are transformed to key lookups | 
   
  "Extra" column
   
  This column consists of one or more of the following values,
  separated by ';'
   
   Note that some of these values are detected after the
  optimization phase.
   
  The optimization phase can do the following changes to the
  WHERE clause:
  Add the expressions from the ON and USING clauses to the
  WHERE
   clause.
  Constant propagation: If there is column=constant, replace
  all column
   instances with this constant.
  Replace all columns from 'const' tables with their values.
  Remove the used key columns from the WHERE (as this will be
  tested as
   part of the key lookup).
  Remove impossible constant sub expressions.
   For example WHERE '(a=1 and a=2) OR b=1' becomes 'b=1'.
  Replace columns with other columns that has identical
  values:
   Example: WHERE a=b and a=c may be treated
   as 'WHERE a=b and a=c and b=c'.
  Add extra conditions to detect impossible row conditions
  earlier. This
   happens mainly with OUTER JOIN where we in some cases add
  detection
   of NULL values in the WHERE (Part of 'Not exists'
  optimization).
   This can cause an unexpected 'Using where' in the Extra
  column.
  For each table level we remove expressions that have already
  been tested when
   we read the previous row. Example: When joining tables t1
  with t2
   using the following WHERE 't1.a=1 and t1.a=t2.b', we
  don't have to
   test 't1.a=1' when checking rows in t2 as we already know
  that this
   expression is true. 
   
  Value | Description | 
   
  const row not found | The table was a system table (a table
  with should exactly one row), but no row was found. | 
   
  Distinct | If distinct optimization (remove duplicates) was
  used. This is marked only for the last table in the SELECT.
  | 
   
  Full scan on NULL key | The table is a part of the sub query
  and if the value that is used to match the sub query will be
  NULL, we will do a full table scan. | 
   
  Impossible HAVING | The used HAVING clause is always false
  so the SELECT will return no rows. | 
   
  Impossible WHERE noticed after reading const tables. | The
  used WHERE clause is always false so the SELECT will return
  no rows. This case was detected after we had read all
  'const' tables and used the column values as constant in
  the WHERE clause. For example: WHERE const_column=5 and
  const_column had a value of 4. | 
   
  Impossible WHERE | The used WHERE clause is always false so
  the SELECT will return no rows. For example: WHERE 1=2 | 
   
  No matching min/max row | During early optimization of
  MIN()/MAX() values it was detected that no row could match
  the WHERE clause. The MIN()/MAX() function will return NULL.
  | 
   
  no matching row in const table | The table was a const table
  (a table with only one possible matching row), but no row
  was found. | 
   
  No tables used | The SELECT was a sub query that did not use
  any tables. For example a there was no FROM clause or a FROM
  DUAL clause. | 
   
  Not exists | Stop searching after more row if we find one
  single matching row. This optimization is used with LEFT
  JOIN where one is explicitly searching for rows that
  doesn't exists in the LEFT JOIN TABLE. Example: SELECT *
  FROM t1 LEFT JOIN t2 on (...) WHERE t2.not_null_column IS
  NULL. As t2.not_null_column can only be NULL if there was no
  matching row for on condition, we can stop searching if we
  find a single matching row. | 
   
  Open_frm_only | For information_schema tables. Only the frm
  (table definition file was opened) was opened for each
  matching row. | 
   
  Open_full_table | For information_schema tables. A full
  table open for each matching row is done to retrieve the
  requested information. (Slow) | 
   
  Open_trigger_only | For information_schema tables. Only the
  trigger file definition was opened for each matching row. | 
   
  Range checked for each record (index map: ...) | This only
  happens when there was no good default index to use but
  there may some index that could be used when we can treat
  all columns from previous table as constants. For each row
  combination the optimizer will decide which index to use (if
  any) to fetch a row from this table. This is not fast, but
  faster than a full table scan that is the only other choice.
  The index map is a bitmask that shows which index are
  considered for each row condition. | 
   
  Scanned 0/1/all databases | For information_schema tables.
  Shows how many times we had to do a directory scan. | 
   
  Select tables optimized away | All tables in the join was
  optimized away. This happens when we are only using
  COUNT(*), MIN() and MAX() functions in the SELECT and we
  where able to replace all of these with constants. | 
   
  Skip_open_table | For information_schema tables. The queried
  table didn't need to be opened. | 
   
  unique row not found | The table was detected to be a const
  table (a table with only one possible matching row) during
  the early optimization phase, but no row was found. | 
   
  Using filesort | Filesort is needed to resolve the query.
  This means an extra phase where we first collect all columns
  to sort, sort them with a disk based merge sort and then use
  the sorted set to retrieve the rows in sorted order. If the
  column set is small, we store all the columns in the sort
  file to not have to go to the database to retrieve them
  again. | 
   
  Using index | Only the index is used to retrieve the needed
  information from the table. There is no need to perform an
  extra seek to retrieve the actual record. | 
   
  Using index condition | Like 'Using where' but the where
  condition is pushed down to the table engine for internal
  optimization at the index level. | 
   
  Using index condition(BKA) | Like 'Using index condition'
  but in addition we use batch key access to retrieve rows. | 
   
  Using index for group-by | The index is being used to
  resolve a GROUP BY or DISTINCT query. The rows are not read.
  This is very efficient if the table has a lot of identical
  index entries as duplicates are quickly jumped over. | 
   
  Using intersect(...) | For index_merge joins. Shows which
  index are part of the intersect. | 
   
  Using join buffer | We store previous row combinations in a
  row buffer to be able to match each row against all of the
  rows combinations in the join buffer at one go. | 
   
  Using sort_union(...) | For index_merge joins. Shows which
  index are part of the union. | 
   
  Using temporary | A temporary table is created to hold the
  result. This typically happens if you are using GROUP BY,
  DISTINCT or ORDER BY. | 
   
  Using where | A WHERE expression (in additional to the
  possible key lookup) is used to check if the row should be
  accepted. If you don't have 'Using where' together with a
  join type of ALL, you are probably doing something wrong! | 
   
  Using where with pushed condition | Like 'Using where' but
  the where condition is pushed down to the table engine for
  internal optimization at the row level. | 
   
  Using buffer | The UPDATE statement will first buffer the
  rows, and then run the updates, rather than do updates on
  the fly. See Using Buffer UPDATE Algorithm for a detailed
  explanation. | 
   
  EXPLAIN EXTENDED
   
  The EXTENDED keyword adds another column, filtered, to the
  output. This is a percentage estimate of the table rows that
  will be filtered by the condition.
   
  An EXPLAIN EXTENDED will always throw a warning, as it adds
  extra Message information to a subsequent SHOW WARNINGS
  statement. This includes what the SELECT query would look
  like after optimizing and rewriting rules are applied and
  how the optimizer qualifies columns and tables.
   
  Examples
  -------- 
  As synonym for DESCRIBE or SHOW COLUMNS FROM:
   
  DESCRIBE city;
   
  +------------+----------+------+-----+---------+----------------+
  | Field | Type | Null | Key | Default | Extra |
  +------------+----------+------+-----+---------+----------------+
  | Id | int(11) | NO | PRI | NULL | auto_increment |
  | Name | char(35) | YES | | NULL | |
  | Country | char(3) | NO | UNI | | |
  | District | char(20) | YES | MUL | | |
  | Population | int(11) | YES | | NULL | |
  +------------+----------+------+-----+---------+----------------+
   
  A simple set of examples to see how EXPLAIN can identify
  poor index usage:
   
  CREATE TABLE IF NOT EXISTS `employees_example` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `first_name` varchar(30) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `position` varchar(25) NOT NULL,
   `home_address` varchar(50) NOT NULL,
   `home_phone` varchar(12) NOT NULL,
   `employee_code` varchar(25) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `employee_code` (`employee_code`),
   KEY `first_name` (`first_name`,`last_name`)
  ) ENGINE=Aria;
   
  INSERT INTO `employees_example` (`first_name`, `last_name`,
  `position`, `home_address`, `home_phone`, `employee_code`)
   VALUES
   ('Mustapha', 'Mond', 'Chief Executive Officer', '692
  Promiscuous Plaza', '326-555-3492', 'MM1'),
   ('Henry', 'Foster', 'Store Manager', '314 Savage
  Circle', '326-555-3847', 'HF1'),
   ('Bernard', 'Marx', 'Cashier', '1240 Ambient
  Avenue', '326-555-8456', 'BM1'),
   ('Lenina', 'Crowne', 'Cashier', '281 Bumblepuppy
  Boulevard', '328-555-2349', 'LC1'),
   ('Fanny', 'Crowne', 'Restocker', '1023 Bokanovsky
  Lane', '326-555-6329', 'FC1'),
   ('Helmholtz', 'Watson', 'Janitor', '944 Soma
  Court', '329-555-2478', 'HW1');
   
  SHOW INDEXES FROM employees_example;
   
  +-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
  | Table | Non_unique | Key_name | Seq_in_index | Column_name
  | Collation | Cardinality | Sub_part | Packed | Null |
  Index_type | Comment | Index_comment |
  +-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
  | employees_example | 0 | PRIMARY | 1 | id | A | 7 | NULL |
  NULL | | BTREE | | |
  | employees_example | 0 | employee_code | 1 | employee_code
  | A | 7 | NULL | NULL | | BTREE | | |
  | employees_example | 1 | first_name | 1 | first_name | A |
  NULL | NULL | NULL | | BTREE | | |
  | employees_example | 1 | first_name | 2 | last_name | A |
  NULL | NULL | NULL | | BTREE | | |
  +-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
   
  SELECT on a primary key:
   
  EXPLAIN SELECT * FROM employees_example WHERE id=1;
   
  +------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+
  | id | select_type | table | type | possible_keys | key |
  key_len | ref | rows | Extra |
  +------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+
  | 1 | SIMPLE | employees_example | const | PRIMARY | PRIMARY
  | 4 | const | 1 | |
  +------+-------------+-------------------+-------+---------------+---------+---------+-------+------+-------+
   
  The type is const, which means that only one possible result
  could be returned. 
  Now, returning the same record but searching by their phone
  number:
   
  EXPLAIN SELECT * FROM employees_example WHERE
  home_phone='326-555-3492';
   
  +------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+
  | id | select_type | table | type | possible_keys | key |
  key_len | ref | rows | Extra |
  +------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+
  | 1 | SIMPLE | employees_example | ALL | NULL | NULL | NULL
  | NULL | 6 | Using where |
  +------+-------------+-------------------+------+---------------+------+---------+------+------+-------------+
   
  Here, the type is All, which means no index could be used.
  Looking at the rows count, a full table scan (all six rows)
  had to be performed in order to retrieve the record. If
  it's a requirement to search by phone number, an index will
  have to be created.
   
  SHOW EXPLAIN example:
   
  SHOW EXPLAIN FOR 1;
   
  +------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+
  | id | select_type | table | type | possible_keys | key |
  key_len | ref | rows | Extra |
  +------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+
  | 1 | SIMPLE | tbl | index | NULL | a | 5 | NULL | 1000107 |
  Using index |
  +------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+
  1 row in set, 1 warning (0.00 sec)
   
  Example of ref_or_null optimization
   
  SELECT * FROM table_name
   WHERE key_column=expr OR key_column IS NULL;
   
  ref_or_null is something that often happens when you use
  subqueries with NOT IN as then one has to do an extra check
  for NULL values if the first value didn't have a matching
  row. 
   


  URL: https://mariadb.com/kb/en/library/explain/dzfxuxEXPLAINdzfxuxhttps://mariadb.com/kb/en/library/explain/dzfxuxdzfxux28dzfxux442qjzxqqvvbqThe syntax for the EXPLAIN ANALYZE feature was changed to
  ANALYZE statement, available since MariaDB 10.1.0. See
  ANALYZE statement. 
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/explain-analyze/dzfxuxEXPLAIN ANALYZEdzfxuxhttps://mariadb.com/kb/en/library/explain-analyze/dzfxuxdzfxux28dzfxux443qjzxqqvvbqSyntax
  ------ 
  Contains(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether a geometry g1 completely
  contains geometry g2. CONTAINS() is based on the original
  MySQL implementation and uses object bounding rectangles,
  while ST_CONTAINS() uses object shapes. 
   
  This tests the opposite relationship to Within().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/contains/dzfxuxCONTAINSdzfxuxhttps://mariadb.com/kb/en/library/contains/dzfxuxdzfxux30dzfxux446qjzxqqvvbqSyntax
  ------ 
  Disjoint(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether g1 is spatially disjoint
  from
  (does not intersect) g2.
   
  DISJOINT() tests the opposite relationship to INTERSECTS().
   
  DISJOINT() is based on the original MySQL implementation and
  uses object bounding rectangles, while ST_DISJOINT() uses
  object shapes.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/disjoint/dzfxuxDISJOINTdzfxuxhttps://mariadb.com/kb/en/library/disjoint/dzfxuxdzfxux30dzfxux448qjzxqqvvbqSyntax
  ------ 
  Equals(g1,g2)
   
  From MariaDB 10.2.3:
   
  MBREQUALS(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether g1 is spatially equal to
  g2.
   
  EQUALS() is based on the original MySQL implementation and
  uses object bounding rectangles, while ST_EQUALS() uses
  object shapes.
   
  From MariaDB 10.2.3, MBREQUALS is a synonym for Equals.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/equals/dzfxuxEQUALSdzfxuxhttps://mariadb.com/kb/en/library/equals/dzfxuxdzfxux30dzfxux449qjzxqqvvbqSyntax
  ------ 
  INTERSECTS(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether geometry g1 spatially
  intersects geometry g2.
   
  INTERSECTS() is based on the original MySQL implementation
  and uses object bounding rectangles, while ST_INTERSECTS()
  uses object shapes.
   
  INTERSECTS() tests the opposite relationship to DISJOINT().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/intersects/dzfxuxINTERSECTSdzfxuxhttps://mariadb.com/kb/en/library/intersects/dzfxuxdzfxux30dzfxux450qjzxqqvvbqSyntax
  ------ 
  OVERLAPS(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether g1 spatially overlaps g2.
  The term spatially overlaps is used if two geometries
  intersect and their
  intersection results in a geometry of the same dimension but
  not equal to
  either of the given geometries.
   
  OVERLAPS() is based on the original MySQL implementation and
  uses object bounding rectangles, while ST_OVERLAPS() uses
  object shapes.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/overlaps/dzfxuxOVERLAPSdzfxuxhttps://mariadb.com/kb/en/library/overlaps/dzfxuxdzfxux30dzfxux451qjzxqqvvbqSyntax
  ------ 
  IS boolean_value
   
  Description
  ----------- 
  Tests a value against a boolean value, where boolean_value
  can be
  TRUE, FALSE, or UNKNOWN.
   
  There is an important difference between using IS TRUE or
  comparing a value with TRUE using =. When using =, only 1
  equals to TRUE. But when using IS TRUE, all values which are
  logically true (like a number > 1) return TRUE.
   
  Examples
  -------- 
  SELECT 1 IS TRUE, 0 IS FALSE, NULL IS UNKNOWN;
  +-----------+------------+-----------------+
  | 1 IS TRUE | 0 IS FALSE | NULL IS UNKNOWN |
  +-----------+------------+-----------------+
  | 1 | 1 | 1 |
  +-----------+------------+-----------------+
   
  Difference between = and IS TRUE:
   
  SELECT 2 = TRUE, 2 IS TRUE;
  +----------+-----------+
  | 2 = TRUE | 2 IS TRUE |
  +----------+-----------+
  | 0 | 1 |
  +----------+-----------+
   


  URL: https://mariadb.com/kb/en/library/is/dzfxuxISdzfxuxhttps://mariadb.com/kb/en/library/is/dzfxuxdzfxux18dzfxux233qjzxqqvvbqSyntax
  ------ 
  IS NOT boolean_value
   
  Description
  ----------- 
  Tests a value against a boolean value, where boolean_value
  can be
  TRUE, FALSE, or UNKNOWN. 
   
  Examples
  -------- 
  SELECT 1 IS NOT UNKNOWN, 0 IS NOT UNKNOWN, NULL IS NOT
  UNKNOWN;
  +------------------+------------------+---------------------+
  | 1 IS NOT UNKNOWN | 0 IS NOT UNKNOWN | NULL IS NOT UNKNOWN
  |
  +------------------+------------------+---------------------+
  | 1 | 1 | 0 |
  +------------------+------------------+---------------------+
   
  SELECT NULL IS NOT TRUE, NULL IS NOT FALSE;
  +------------------+-------------------+
  | NULL IS NOT TRUE | NULL IS NOT FALSE |
  +------------------+-------------------+
  | 1 | 1 |
  +------------------+-------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/is-not/dzfxuxIS NOTdzfxuxhttps://mariadb.com/kb/en/library/is-not/dzfxuxdzfxux18dzfxux234qjzxqqvvbqSyntax
  ------ 
  IS NULL
   
  Description
  ----------- 
  Tests whether a value is NULL. See also NULL Values in
  MariaDB.
   
  Examples
  -------- 
  SELECT 1 IS NULL, 0 IS NULL, NULL IS NULL;
  +-----------+-----------+--------------+
  | 1 IS NULL | 0 IS NULL | NULL IS NULL |
  +-----------+-----------+--------------+
  | 0 | 0 | 1 |
  +-----------+-----------+--------------+
   
  Compatibility
   
  Some ODBC applications use the syntax auto_increment_field
  IS NOT NULL to find the latest row that was inserted with an
  autogenerated key value. If your applications need this, you
  can set the sql_auto_is_null variable to 1.
   
  SET @@sql_auto_is_null=1;
  CREATE TABLE t1 (auto_increment_column INT NOT NULL
  AUTO_INCREMENT PRIMARY KEY);
  INSERT INTO t1 VALUES (NULL);
  SELECT * FROM t1 WHERE auto_increment_column IS NULL;
   
  +-----------------------+
  | auto_increment_column |
  +-----------------------+
  | 1 |
  +-----------------------+
   


  URL: https://mariadb.com/kb/en/library/is-null/dzfxuxIS NULLdzfxuxhttps://mariadb.com/kb/en/library/is-null/dzfxuxdzfxux18dzfxux236qjzxqqvvbqSyntax
  ------ 
  LEAST(value1,value2,...)
   
  Description
  ----------- 
  With two or more arguments, returns the smallest
  (minimum-valued)
  argument. The arguments are compared using the following
  rules:
  If the return value is used in an INTEGER context or all
  arguments are integer-valued, they are compared as integers.
  If the return value is used in a REAL context or all
  arguments are real-valued, they are compared as reals.
  If any argument is a case-sensitive string, the arguments
  are compared as case-sensitive strings.
  In all other cases, the arguments are compared as
  case-insensitive strings.
   
  LEAST() returns NULL if any argument is NULL.
   
  Examples
  -------- 
  SELECT LEAST(2,0);
  +------------+
  | LEAST(2,0) |
  +------------+
  | 0 |
  +------------+
   
  SELECT LEAST(34.0,3.0,5.0,767.0);
  +---------------------------+
  | LEAST(34.0,3.0,5.0,767.0) |
  +---------------------------+
  | 3.0 |
  +---------------------------+
   
  SELECT LEAST('B','A','C');
  +--------------------+
  | LEAST('B','A','C') |
  +--------------------+
  | A |
  +--------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/least/dzfxuxLEASTdzfxuxhttps://mariadb.com/kb/en/library/least/dzfxuxdzfxux18dzfxux238qjzxqqvvbqSyntax
  ------ 
  expr NOT BETWEEN min AND max
   
  Description
  ----------- 
  This is the same as NOT (expr BETWEEN min AND max).
   
  Note that the meaning of the alternative form NOT expr
  BETWEEN min AND max is affected by the HIGH_NOT_PRECEDENCE
  SQL_MODE flag.
   
  Examples
  -------- 
  SELECT 1 NOT BETWEEN 2 AND 3;
  +-----------------------+
  | 1 NOT BETWEEN 2 AND 3 |
  +-----------------------+
  | 1 |
  +-----------------------+
   
  SELECT 'b' NOT BETWEEN 'a' AND 'c';
  +-----------------------------+
  | 'b' NOT BETWEEN 'a' AND 'c' |
  +-----------------------------+
  | 0 |
  +-----------------------------+
   
  NULL:
   
  SELECT 1 NOT BETWEEN 1 AND NULL;
  +--------------------------+
  | 1 NOT BETWEEN 1 AND NULL |
  +--------------------------+
  | NULL |
  +--------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/not-between/dzfxuxNOT BETWEENdzfxuxhttps://mariadb.com/kb/en/library/not-between/dzfxuxdzfxux18dzfxux239qjzxqqvvbqSyntax
  ------ 
  expr NOT IN (value,...)
   
  Description
  ----------- 
  This is the same as NOT (expr IN (value,...)).
   
  Examples
  -------- 
  SELECT 2 NOT IN (0,3,5,7);
  +--------------------+
  | 2 NOT IN (0,3,5,7) |
  +--------------------+
  | 1 |
  +--------------------+
   
  SELECT 'wefwf' NOT IN ('wee','wefwf','weg');
  +--------------------------------------+
  | 'wefwf' NOT IN ('wee','wefwf','weg') |
  +--------------------------------------+
  | 0 |
  +--------------------------------------+
   
  SELECT 1 NOT IN ('1', '2', '3');
  +--------------------------+
  | 1 NOT IN ('1', '2', '3') |
  +--------------------------+
  | 0 |
  +--------------------------+
   
  NULL:
   
  SELECT NULL NOT IN (1, 2, 3);
  +-----------------------+
  | NULL NOT IN (1, 2, 3) |
  +-----------------------+
  | NULL |
  +-----------------------+
   
  SELECT 1 NOT IN (1, 2, NULL);
  +-----------------------+
  | 1 NOT IN (1, 2, NULL) |
  +-----------------------+
  | 0 |
  +-----------------------+
   
  SELECT 5 NOT IN (1, 2, NULL);
  +-----------------------+
  | 5 NOT IN (1, 2, NULL) |
  +-----------------------+
  | NULL |
  +-----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/not-in/dzfxuxNOT INdzfxuxhttps://mariadb.com/kb/en/library/not-in/dzfxuxdzfxux18dzfxux240qjzxqqvvbqSyntax
  ------ 
  ST_DIFFERENCE(g1,g2)
   
  Description
  ----------- 
  Returns a geometry representing the point set difference of
  the given geometry values.
   
  Example
   
  SET @g1 = POINT(10,10), @g2 = POINT(20,20);
   
  SELECT ST_AsText(ST_Difference(@g1, @g2));
  +------------------------------------+
  | ST_AsText(ST_Difference(@g1, @g2)) |
  +------------------------------------+
  | POINT(10 10) |
  +------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_difference/dzfxuxST_DIFFERENCEdzfxuxhttps://mariadb.com/kb/en/library/st_difference/dzfxuxdzfxux30dzfxux454qjzxqqvvbqST_DISTANCE() was introduced in MariaDB 5.3.3.
   
  Syntax
  ------ 
  ST_DISTANCE(g1,g2)
   
  Description
  ----------- 
  Returns the distance between two geometries, or null if not
  given valid inputs.
   
  Example
   
  SELECT ST_Distance(POINT(1,2),POINT(2,2));
  +------------------------------------+
  | ST_Distance(POINT(1,2),POINT(2,2)) |
  +------------------------------------+
  | 1 |
  +------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_distance/dzfxuxST_DISTANCEdzfxuxhttps://mariadb.com/kb/en/library/st_distance/dzfxuxdzfxux30dzfxux456qjzxqqvvbqSyntax
  ------ 
  ST_LENGTH(ls)
   
  Description
  ----------- 
  Returns as a double-precision number the length of the
  LineString value ls in its associated spatial reference.
   
  Examples
  -------- 
  SET @ls = 'LineString(1 1,2 2,3 3)';
   
  SELECT ST_LENGTH(ST_GeomFromText(@ls));
  +---------------------------------+
  | ST_LENGTH(ST_GeomFromText(@ls)) |
  +---------------------------------+
  | 2.82842712474619 |
  +---------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_length/dzfxuxST_LENGTHdzfxuxhttps://mariadb.com/kb/en/library/st_length/dzfxuxdzfxux30dzfxux459qjzxqqvvbqParentheses are sometimes called precedence operators - this
  means that they can be used to change the other operator's
  precedence in an expression. The expressions that are
  written between parentheses are computed before the
  expressions that are written outside. Parentheses must
  always contain an expression (that is, they cannot be
  empty), and can be nested.
   
  For example, the following expressions could return
  different results:
  NOT a OR b
  NOT (a OR b)
   
  In the first case, NOT applies to a, so if a is FALSE or b
  is TRUE, the expression returns TRUE. In the second case,
  NOT applies to the result of a OR b, so if at least one of a
  or b is TRUE, the expression is TRUE.
   
  When the precedence of operators is not intuitive, you can
  use parentheses to make it immediately clear for whoever
  reads the statement.
   
  The precedence of the NOT operator can also be affected by
  the HIGH_NOT_PRECEDENCE SQL_MODE flag.
   
  Other uses
   
  Parentheses must always be used to enclose subqueries.
   
  Parentheses can also be used in a JOIN statement between
  multiple tables to determine which tables must be joined
  first.
   
  Also, parentheses are used to enclose the list of parameters
  to be passed to built-in functions, user-defined functions
  and stored routines. However, when no parameter is passed to
  a stored procedure, parentheses are optional. For builtin
  functions and user-defined functions, spaces are not allowed
  between the function name and the open parenthesis, unless
  the IGNORE_SPACE SQL_MODE is set. For stored routines (and
  for functions if IGNORE_SPACE is set) spaces are allowed
  before the open parenthesis, including tab characters and
  new line characters.
   
  Syntax errors
   
  If there are more open parentheses than closed parentheses,
  the error usually looks like this:
   
  ERROR 1064 (42000): You have an error in your SQL syntax;
  check the manual that
  corresponds to your MariaDB server version for the right
  syntax to use near '' a
  t line 1
   
  Note the empty string.
   
  If there are more closed parentheses than open parentheses,
  the error usually looks like this:
   
  ERROR 1064 (42000): You have an error in your SQL syntax;
  check the manual that
  corresponds to your MariaDB server version for the right
  syntax to use near ')'
  at line 1
   
  Note the quoted closed parenthesis.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/parentheses/dzfxuxParenthesesdzfxuxhttps://mariadb.com/kb/en/library/parentheses/dzfxuxdzfxux19dzfxux249qjzxqqvvbqSyntax
  ------ 
  ANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE tbl_name
  [,tbl_name ...] 
   [PERSISTENT FOR [ALL|COLUMNS ([col_name [,col_name ...]])] 
   [INDEXES ([index_name [,index_name ...]])]] 
   
  Description
  ----------- 
  ANALYZE TABLE analyzes and stores the key distribution for a
  table (index statistics). During the analysis, the table is
  locked with a read lock. This statement works with MyISAM,
  Aria and InnoDB tables. For MyISAM tables, this statement is
  equivalent
  to using myisamchk --analyze.
   
  For more information on how the analysis works within
  InnoDB, see
  InnoDB Limitations.
   
  MariaDB uses the stored key distribution to decide the order
  in which
  tables should be joined when you perform a join on something
  other than
  a constant. In addition, key distributions can be used when
  deciding
  which indexes to use for a specific table within a query.
   
  This statement requires SELECT and INSERT privileges for the
  table.
   
  By default, ANALYZE TABLE statements are written to the
  binary log and will be replicated. The NO_WRITE_TO_BINLOG
  keyword (LOCAL is an alias) will ensure the statement is not
  written to the binary log. 
   
  ANALYZE TABLE is also supported for partitioned tables. You
  can use ALTER TABLE ... ANALYZE PARTITION to analyze one or
  more partitions.
   
  Engine-Independent Statistics
   
  MariaDB 10.0.1 extended ANALYZE TABLE to support
  engine-independent statistics.
   
  Engine-independent statistics are collected by doing full
  table and full index scans, and collecting can be quite
  expensive. 
   
  ANALYZE TABLE behavior depends on the value of the
  use_stat_tables system variable.
   
  If use_stat_tables is set to never (default in = MariaDB
  10.4.1), ANALYZE TABLE t will collect storage engine
  statistics, and not engine-independent statistics.
   
  If use_stat_tables is set to complementary or preferably,
  ANALYZE TABLE t will collect engine-independent statistics. 
   
  In order to collect engine-independent statistics when
  use_stat_tables is not set to one of the above two values
  (it is not by default), the extended form of ANALYZE TABLE,
  using PERSISTENT FOR, must be used. This also allows one to
  collect statistics only for particular columns or indexes.
  Note that engine-independent statistics are used by default
  from MariaDB 10.4 (use_stat_tables=preferably_for_queries),
  so you will probably want to use PERSISTENT FOR.
   
  It is recommended to collect engine-independent statistics
  on as-needed basis, so typically one will not have
  engine-independent statistics for all indexes/all columns. 
   
  Note that statistics for blob and text columns are not
  collected. If explicitly specified, a warning is returned.
   
  -- update all engine-independent statistics for all columns
  and indexes
  ANALYZE TABLE tbl PERSISTENT FOR ALL;
   
  -- update specific columns and indexes:
  ANALYZE TABLE tbl PERSISTENT FOR COLUMNS (col1,col2,...)
  INDEXES (idx1,idx2,...);
   
  -- empty lists are allowed:
  ANALYZE TABLE tbl PERSISTENT FOR COLUMNS (col1,col2,...)
  INDEXES ();
  ANALYZE TABLE tbl PERSISTENT FOR COLUMNS () INDEXES
  (idx1,idx2,...);
   
  -- the following will only update mysql.table_stat fields:
  ANALYZE TABLE tbl PERSISTENT FOR COLUMNS () INDEXES ();
   
  -- with use_stat_tables = COMPLEMENTARY, a simple ANALYZE
  TABLE 
  -- collects engine-independent statistics for all columns
  and indexes.
  SET SESSION use_stat_tables='COMPLEMENTARY';
   
  ANALYZE TABLE tbl;
   
  The PERSISTENT FOR is required to update the
  engine-independent statistics even if the table has the
  option STATS_PERSISTENT=1 (which refers to InnoDB Persistent
  Statistics).
   
  The Aria storage engine supports progress reporting for the
  ANALYZE TABLE statement.
   


  URL: https://mariadb.com/kb/en/library/analyze-table/dzfxuxANALYZE TABLEdzfxuxhttps://mariadb.com/kb/en/library/analyze-table/dzfxuxdzfxux20dzfxux251qjzxqqvvbqSyntax
  ------ 
  ST_OVERLAPS(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether geometry g1 spatially
  overlaps geometry g2.
   
  The term spatially overlaps is used if two geometries
  intersect and their
  intersection results in a geometry of the same dimension but
  not equal to
  either of the given geometries.
   
  ST_OVERLAPS() uses object shapes, while OVERLAPS(), based on
  the original MySQL implementation, uses object bounding
  rectangles.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st-overlaps/dzfxuxST_OVERLAPSdzfxuxhttps://mariadb.com/kb/en/library/st-overlaps/dzfxuxdzfxux30dzfxux460qjzxqqvvbqSyntax
  ------ 
  Touches(g1,g2)
   
  Description
  ----------- 
  Returns 1 or 0 to indicate whether g1 spatially touches g2.
  Two
  geometries spatially touch if the interiors of the
  geometries do not intersect,
  but the boundary of one of the geometries intersects either
  the boundary or the
  interior of the other.
   
  TOUCHES() is based on the original MySQL implementation and
  uses object bounding rectangles, while ST_TOUCHES() uses
  object shapes.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/touches/dzfxuxTOUCHESdzfxuxhttps://mariadb.com/kb/en/library/touches/dzfxuxdzfxux30dzfxux463qjzxqqvvbqSyntax
  ------ 
  CURRENT_DATE, CURRENT_DATE()
   
  Description
  ----------- 
  CURRENT_DATE and CURRENT_DATE() are synonyms for CURDATE().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/current_date/dzfxuxCURRENT_DATEdzfxuxhttps://mariadb.com/kb/en/library/current_date/dzfxuxdzfxux31dzfxux469qjzxqqvvbqSyntax
  ------ 
  CHECK TABLE tbl_name [, tbl_name] ... [option] ...
   
  option = {FOR UPGRADE | QUICK | FAST | MEDIUM | EXTENDED |
  CHANGED}
   
  Description
  ----------- 
  CHECK TABLE checks a table or tables for errors. CHECK TABLE
  works for
  Archive, Aria, CSV, InnoDB, and MyISAM tables. For Aria and
  MyISAM tables, the
  key statistics are updated as well. For CSV, see also
  Checking and Repairing CSV Tables.
   
  As an alternative, myisamchk is a commandline tool for
  checking MyISAM tables when the tables are not being
  accessed.
   
  For checking dynamic columns integrity, COLUMN_CHECK() can
  be used.
   
  CHECK TABLE can also check views for problems, such as
  tables
  that are referenced in the view definition that no longer
  exist.
   
  CHECK TABLE is also supported for partitioned tables. You
  can
  use ALTER TABLE ... CHECK PARTITION 
  to check one or more partitions.
   
  The meaning of the different options are as follows - note
  that this can vary a bit between
  storage engines:
   
  FOR UPGRADE | Do a very quick check if the storage format
  for the table has changed so that one needs to do a REPAIR.
  This is only needed when one upgrades between major versions
  of MariaDB or MySQL. This is usually done by running
  mysql_upgrade. | 
   
  FAST | Only check tables that has not been closed properly
  or are marked as corrupt. Only supported by the MyISAM and
  Aria engines. For other engines the table is checked
  normally | 
   
  CHANGED | Check only tables that has changed since last
  REPAIR / CHECK. Only supported by the MyISAM and Aria
  engines. For other engines the table is checked normally. | 
   
  QUICK | Do a fast check. For MyISAM and Aria engine this
  means we skip checking the delete link chain which may take
  some time. | 
   
  MEDIUM | Scan also the data files. Checks integrity between
  data and index files with checksums. In most cases this
  should find all possible errors. | 
   
  EXTENDED | Does a full check to verify every possible error.
  For MyISAM and Aria we verify for each row that all it keys
  exists and points to the row. This may take a long time on
  big tables! | 
   
  For most cases running CHECK TABLE without options or MEDIUM
  should be
  good enough.
   
  Since MariaDB 5.3, the Aria storage engine supports progress
  reporting for this statement.
   
  If you want to know if two tables are identical, take a look
  at CHECKSUM TABLE.
   
  XtraDB/InnoDB
   
  If CHECK TABLE finds an error in an InnoDB table, MariaDB
  might shutdown to prevent the error propagation. In this
  case, the problem will be reported in the error log.
  Otherwise, since MariaDB 5.5, the table or an index might be
  marked as corrupted, to prevent use. This does not happen
  with some minor problems, like a wrong number of entries in
  a secondary index. Those problems are reported in the output
  of CHECK TABLE.
   
  Each tablespace contains a header with metadata. This header
  is not checked by this statement.
   
  During the execution of CHECK TABLE, other threads may be
  blocked.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/sql-commands-check-table/dzfxuxCHECK TABLEdzfxuxhttps://mariadb.com/kb/en/library/sql-commands-check-table/dzfxuxdzfxux20dzfxux252qjzxqqvvbqSyntax
  ------ 
  CHECKSUM TABLE tbl_name [, tbl_name] ... [ QUICK | EXTENDED
  ]
   
  Description
  ----------- 
  CHECKSUM TABLE reports a table checksum. This is very
  useful if you want to know if two tables are the same (for
  example on a master
  and slave).
   
  With QUICK, the live table checksum is reported if it is
  available, or NULL otherwise. This is very fast. A live
  checksum is enabled by specifying the CHECKSUM=1 table
  option when you create the table; currently, this is
  supported
  only for Aria and MyISAM tables.
   
  With EXTENDED, the entire table is read row by row and the
  checksum is calculated. This can be very slow for large
  tables.
   
  If neither QUICK nor EXTENDED is
  specified, MariaDB returns a live checksum if the table
  storage engine supports
  it and scans the table otherwise.
   
  CHECKSUM TABLE requires the SELECT privilege for the table.
   
  For a nonexistent table, CHECKSUM TABLE returns
  NULL and generates a warning.
   
  The table row format affects the checksum value. If the row
  format changes, the checksum will change. This means that
  when a table created with a MariaDB/MySQL version is
  upgraded to another version, the checksum value will
  probably change.
   
  Two identical tables should always match to the same
  checksum value; however, also for non-identical tables there
  is a very slight chance that they will return the same value
  as the hashing algorithm is not completely collision-free.
   
  Differences Between MariaDB and MySQL
   
  CHECKSUM TABLE may give a different result as MariaDB
  doesn't
  ignore NULLs in the columns as MySQL 5.1 does (Later MySQL
  versions should calculate checksums the same way as
  MariaDB). You can get the
  'old style' checksum in MariaDB by starting mysqld with
  the
  --old option. Note however that that the MyISAM and Aria
  storage engines in MariaDB are using the new checksum
  internally, so if you are
  using --old, the CHECKSUM command will be
  slower as it needs to calculate the checksum row by row.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/checksum-table/dzfxuxCHECKSUM TABLEdzfxuxhttps://mariadb.com/kb/en/library/checksum-table/dzfxuxdzfxux20dzfxux254qjzxqqvvbqSyntax
  ------ 
  CURRENT_TIME
  CURRENT_TIME([precision])
   
  Description
  ----------- 
  CURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().
   


  URL: https://mariadb.com/kb/en/library/current_time/dzfxuxCURRENT_TIMEdzfxuxhttps://mariadb.com/kb/en/library/current_time/dzfxuxdzfxux31dzfxux470qjzxqqvvbqSyntax
  ------ 
  CURRENT_TIMESTAMP
  CURRENT_TIMESTAMP([precision])
   
  Description
  ----------- 
  CURRENT_TIMESTAMP and CURRENT_TIMESTAMP() are synonyms for
  NOW().
   


  URL: https://mariadb.com/kb/en/library/current_timestamp/dzfxuxCURRENT_TIMESTAMPdzfxuxhttps://mariadb.com/kb/en/library/current_timestamp/dzfxuxdzfxux31dzfxux471qjzxqqvvbqSyntax
  ------ 
  CURTIME([precision])
   
  Description
  ----------- 
  Returns the current time as a value in 'HH:MM:SS' or
  HHMMSS.uuuuuu format, depending on whether the function is
  used in a string or numeric context. The value is expressed
  in the current time zone.
   
  The optional precision determines the microsecond precision.
  See Microseconds in MariaDB.
   
  Examples
  -------- 
  SELECT CURTIME();
  +-----------+
  | CURTIME() |
  +-----------+
  | 12:45:39 |
  +-----------+
   
  SELECT CURTIME() + 0;
   
  +---------------+
  | CURTIME() + 0 |
  +---------------+
  | 124545.000000 |
  +---------------+
   
  With precision:
   
  SELECT CURTIME(2);
  +-------------+
  | CURTIME(2) |
  +-------------+
  | 09:49:08.09 |
  +-------------+
   


  URL: https://mariadb.com/kb/en/library/curtime/dzfxuxCURTIMEdzfxuxhttps://mariadb.com/kb/en/library/curtime/dzfxuxdzfxux31dzfxux472qjzxqqvvbqSyntax
  ------ 
  DATE(expr)
   
  Description
  ----------- 
  Extracts the date part of the date or datetime expression
  expr.
   
  Examples
  -------- 
  SELECT DATE('2013-07-18 12:21:32');
  +-----------------------------+
  | DATE('2013-07-18 12:21:32') |
  +-----------------------------+
  | 2013-07-18 |
  +-----------------------------+
   
  Error Handling
   
  Until MariaDB 5.5.32, some versions of MariaDB returned
  0000-00-00 when passed an invalid date. From 5.5.32, NULL is
  returned.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/date-function/dzfxuxDATE FUNCTIONdzfxuxhttps://mariadb.com/kb/en/library/date-function/dzfxuxdzfxux31dzfxux473qjzxqqvvbqSyntax
  ------ 
  DAY(date)
   
  Description
  ----------- 
  DAY() is a synonym for DAYOFMONTH().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/day/dzfxuxDAYdzfxuxhttps://mariadb.com/kb/en/library/day/dzfxuxdzfxux31dzfxux478qjzxqqvvbqSyntax
  ------ 
  OPTIMIZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE
   tbl_name [, tbl_name] ...
   [WAIT n | NOWAIT]
   
  Description
  ----------- 
  OPTIMIZE TABLE has two main functions. It can either be used
  to defragment tables, or to update the InnoDB fulltext
  index.
   
  WAIT/NOWAIT
   
  Set the lock wait timeout. See WAIT and NOWAIT.
   
  Defragmenting
   
  OPTIMIZE TABLE works for InnoDB (before MariaDB 10.1.1, only
  if the innodb_file_per_table server system variable is set),
  Aria, MyISAM and ARCHIVE tables, and should be used if you
  have deleted a large part of a table or if you have made
  many changes to a table with variable-length
  rows (tables that have VARCHAR, VARBINARY, BLOB, or TEXT
  columns). Deleted rows are maintained in a
  linked list and subsequent INSERT operations reuse old row
  positions.
   
  This statement requires SELECT and INSERT privileges for the
  table.
   
  By default, OPTIMIZE TABLE statements are written to the
  binary log and will be replicated. The NO_WRITE_TO_BINLOG
  keyword (LOCAL is an alias) will ensure the statement is not
  written to the binary log. 
   
  OPTIMIZE TABLE is also supported for partitioned tables. You
  can use 
  ALTER TABLE ... OPTIMIZE PARTITION 
  to optimize one or more partitions.
   
  You can use OPTIMIZE TABLE to reclaim the unused
  space and to defragment the data file. With other storage
  engines, OPTIMIZE TABLE does nothing by default, and returns
  this message: " The storage engine for the table doesn't
  support optimize". However, if the server has been started
  with the --skip-new option, OPTIMIZE TABLE is linked to
  ALTER TABLE, and recreates the table. This operation frees
  the unused space and updates index statistics.
   
  Since MariaDB 5.3, the Aria storage engine supports progress
  reporting for this statement.
   
  If a MyISAM table is fragmented, concurrent inserts will not
  be performed until an OPTIMIZE TABLE statement is executed
  on that table, unless the concurrent_insert server system
  variable is set to ALWAYS.
   
  Updating an InnoDB fulltext index
   
  When rows are added or deleted to an InnoDB fulltext index,
  the index is not immediately re-organized, as this can be an
  expensive operation. Change statistics are stored in a
  separate location . The fulltext index is only fully
  re-organized when an OPTIMIZE TABLE statement is run.
   
  By default, an OPTIMIZE TABLE will defragment a table. In
  order to use it to update fulltext index statistics, the
  innodb_optimize_fulltext_only system variable must be set to
  1. This is intended to be a temporary setting, and should be
  reset to 0 once the fulltext index has been re-organized.
   
  Since fulltext re-organization can take a long time, the
  innodb_ft_num_word_optimize variable limits the
  re-organization to a number of words (2000 by default). You
  can run multiple OPTIMIZE statements to fully re-organize
  the index.
   
  Defragmenting InnoDB tablespaces
   
  MariaDB 10.1.1 merged the Facebook/Kakao defragmentation
  patch 
   
  MariaDB 10.1.1 merged the Facebook/Kakao defragmentation
  patch, allowing one to use OPTIMIZE TABLE to defragment
  InnoDB tablespaces. For this functionality to be enabled,
  the innodb_defragment system variable must be enabled. No
  new tables are created and there is no need to copy data
  from old tables to new tables. Instead, this feature loads n
  pages (determined by innodb-defragment-n-pages) and tries to
  move records so that pages would be full of records and then
  frees pages that are fully empty after the operation. Note
  that tablespace files (including ibdata1) will not shrink as
  the result of defragmentation, but one will get better
  memory utilization in the InnoDB buffer pool as there are
  fewer data pages in use.
   
  See Defragmenting InnoDB Tablespaces for more details.
   


  URL: https://mariadb.com/kb/en/library/optimize-table/dzfxuxOPTIMIZE TABLEdzfxuxhttps://mariadb.com/kb/en/library/optimize-table/dzfxuxdzfxux20dzfxux255qjzxqqvvbqSyntax
  ------ 
  REPAIR [NO_WRITE_TO_BINLOG | LOCAL] TABLE
   tbl_name [, tbl_name] ...
   [QUICK] [EXTENDED] [USE_FRM]
   
  Description
  ----------- 
  REPAIR TABLE repairs a possibly corrupted table. By default,
  it has the same effect as
   
  myisamchk --recover tbl_name
   
  or
   
  aria_chk --recover tbl_name
   
  See aria_chk and myisamchk for more.
   
  REPAIR TABLE works for Archive, Aria, CSV and MyISAM tables.
  For XtraDB/InnoDB, see recovery modes. For CSV, see also
  Checking and Repairing CSV Tables. For Archive, this
  statement also improves compression. If the storage engine
  does not support this statement, a warning is issued.
   
  This statement requires SELECT and INSERT privileges for the
  table.
   
  By default, REPAIR TABLE statements are written to the
  binary log and will be replicated. The NO_WRITE_TO_BINLOG
  keyword (LOCAL is an alias) will ensure the statement is not
  written to the binary log.
   
  When an index is recreated, the storage engine may use a
  configurable buffer in the process. Incrementing the buffer
  speeds up the index creation. Aria and MyISAM allocate a
  buffer whose size is defined by aria_sort_buffer_size or
  myisam_sort_buffer_size, also used for ALTER TABLE.
   
  REPAIR TABLE is also supported for partitioned tables.
  However, the USE_FRM option cannot be used with this
  statement
  on a partitioned table.
   
   ALTER TABLE ... REPAIR PARTITION can be used
  to repair one or more partitions.
   
  The Aria storage engine supports progress reporting for this
  statement.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/repair-table/dzfxuxREPAIR TABLEdzfxuxhttps://mariadb.com/kb/en/library/repair-table/dzfxuxdzfxux20dzfxux256qjzxqqvvbqSyntax
  ------ 
  DAYOFYEAR(date)
   
  Description
  ----------- 
  Returns the day of the year for date, in the range 1 to 366.
   
  Examples
  -------- 
  SELECT DAYOFYEAR('2018-02-16');
  +-------------------------+
  | DAYOFYEAR('2018-02-16') |
  +-------------------------+
  | 47 |
  +-------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/dayofyear/dzfxuxDAYOFYEARdzfxuxhttps://mariadb.com/kb/en/library/dayofyear/dzfxuxdzfxux31dzfxux482qjzxqqvvbqSyntax
  ------ 
  FROM_DAYS(N)
   
  Description
  ----------- 
  Given a day number N, returns a DATE value. The day count is
  based on the number of days from the start of the standard
  calendar (0000-00-00). 
   
  The function is not designed for use with dates before the
  advent of the Gregorian calendar in October 1582. Results
  will not be reliable since it doesn't account for the lost
  days when the calendar changed from the Julian calendar.
   
  This is the converse of the TO_DAYS() function.
   
  Examples
  -------- 
  SELECT FROM_DAYS(730669);
  +-------------------+
  | FROM_DAYS(730669) |
  +-------------------+
  | 2000-07-03 |
  +-------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/from_days/dzfxuxFROM_DAYSdzfxuxhttps://mariadb.com/kb/en/library/from_days/dzfxuxdzfxux31dzfxux484qjzxqqvvbqSyntax
  ------ 
  LOCALTIME
  LOCALTIME([precision])
   
  Description
  ----------- 
  LOCALTIME and LOCALTIME() are synonyms for NOW().
   


  URL: https://mariadb.com/kb/en/library/localtime/dzfxuxLOCALTIMEdzfxuxhttps://mariadb.com/kb/en/library/localtime/dzfxuxdzfxux31dzfxux489qjzxqqvvbqSyntax
  ------ 
  LOCALTIMESTAMP
  LOCALTIMESTAMP([precision])
   
  Description
  ----------- 
  LOCALTIMESTAMP and LOCALTIMESTAMP() are synonyms for NOW().
   


  URL: https://mariadb.com/kb/en/library/localtimestamp/dzfxuxLOCALTIMESTAMPdzfxuxhttps://mariadb.com/kb/en/library/localtimestamp/dzfxuxdzfxux31dzfxux490qjzxqqvvbqSyntax
  ------ 
  MINUTE(time)
   
  Description
  ----------- 
  Returns the minute for time, in the range 0 to 59. 
   
  Examples
  -------- 
  SELECT MINUTE('2013-08-03 11:04:03');
  +-------------------------------+
  | MINUTE('2013-08-03 11:04:03') |
  +-------------------------------+
  | 4 |
  +-------------------------------+
   
   SELECT MINUTE ('23:12:50');
  +---------------------+
  | MINUTE ('23:12:50') |
  +---------------------+
  | 12 |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/minute/dzfxuxMINUTEdzfxuxhttps://mariadb.com/kb/en/library/minute/dzfxuxdzfxux31dzfxux494qjzxqqvvbqREPAIR VIEW was introduced in MariaDB 10.0.18 and MariaDB
  5.5.43.
   
  Syntax
  ------ 
  REPAIR [NO_WRITE_TO_BINLOG | LOCAL] VIEW view_name[,
  view_name] ... [FROM MYSQL]
   
  Description
  ----------- 
  The REPAIR VIEW statement was introduced to assist with
  fixing MDEV-6916, an issue introduced in MariaDB 5.2 where
  the view algorithms were swapped compared to their MySQL on
  disk representation. It checks whether the view algorithm is
  correct. It is run as part of mysql_upgrade, and should not
  normally be required in regular use.
   
  By default it corrects the checksum and if necessary adds
  the mariadb-version field. If the optional FROM MYSQL clause
  is used, and no mariadb-version field is present, the MERGE
  and TEMPTABLE algorithms are toggled.
   
  By default, REPAIR VIEW statements are written to the binary
  log and will be replicated. The NO_WRITE_TO_BINLOG keyword
  (LOCAL is an alias) will ensure the statement is not written
  to the binary log.
   
  Note that REPAIR VIEW in MariaDB 10.0.18 and MariaDB 5.5.43
  could crash the server (see MDEV-8115). Upgrade to a later
  version.
   


  URL: https://mariadb.com/kb/en/library/repair-view/dzfxuxREPAIR VIEWdzfxuxhttps://mariadb.com/kb/en/library/repair-view/dzfxuxdzfxux20dzfxux257qjzxqqvvbqSyntax
  ------ 
  CREATE [OR REPLACE] [AGGREGATE] FUNCTION [IF NOT EXISTS]
  function_name
   RETURNS {STRING|INTEGER|REAL|DECIMAL}
   SONAME shared_library_name
   
  Description
  ----------- 
  A user-defined function (UDF) is a way to extend MariaDB
  with a new function
  that works like a native (built-in) MariaDB function such as
  ABS() or
  CONCAT().
   
  function_name is the name that should be used in SQL
  statements to invoke
  the function. 
   
  To create a function, you must have the INSERT privilege for
  the
  mysql database. This is necessary because CREATE FUNCTION
  adds a row to the
  mysql.func system table that records the function's name,
  type, and shared library name. If you do not have this
  table, you should run
  the mysql_upgrade command to create it.
   
  UDFs need to be written in C, C++ or another language that
  uses C calling
  conventions, MariaDB needs to have been dynamically
  compiled, and your
  operating system must support dynamic loading.
   
  For an example, see sql/udf_example.cc in the source tree.
  For a collection of existing UDFs see
  http://www.mysqludf.org/.
   
  Statements making use of user-defined functions are not
  safe for replication.
   
  For creating a stored function as opposed to a user-defined
  function, see
  CREATE FUNCTION.
   
  For valid identifiers to use as function names, see
  Identifier Names.
   
  RETURNS
   
  The RETURNS clause indicates the type of the function's
  return value, and can be one of STRING, INTEGER, REAL or
  DECIMAL. DECIMAL functions currently return string values
  and should be written like STRING functions.
   
  shared_library_name
   
  shared_library_name is the basename of the shared object
  file that contains
  the code that implements the function. The file must be
  located in the plugin
  directory. This directory is given by the value of the
  plugin_dir system variable. Note that
  before MariaDB/MySQL 5.1, the shared object could be located
  in any directory
  that was searched by your system's dynamic linker.
   
  AGGREGATE
   
  Aggregate functions are summary functions such as SUM() and
  AVG().
   
  Aggregate UDF functions can be used as window functions.
   
  OR REPLACE
   
  The OR REPLACE clause was added in MariaDB 10.1.3
   
  If the optional OR REPLACE clause is used, it acts as a
  shortcut for:
   
  DROP FUNCTION IF EXISTS function_name;
   
  CREATE FUNCTION name ...;
   
  IF NOT EXISTS
   
  The IF NOT EXISTS clause was added in MariaDB 10.1.3
   
  When the IF NOT EXISTS clause is used, MariaDB will return a
  warning instead of an error if the specified function
  already exists. Cannot be used together with OR REPLACE.
   
  Upgrading a UDF
   
  To upgrade the UDF's shared library, first run a
  DROP FUNCTION statement, then upgrade the shared library and
  finally run the CREATE FUNCTION statement. If you upgrade
  without following
  this process, you may crash the server.
   
  Examples
  -------- 
  CREATE FUNCTION jsoncontains_path RETURNS integer SONAME
  'ha_connect.so';
   
  Query OK, 0 rows affected (0.00 sec)
   
  OR REPLACE and IF NOT EXISTS:
   
  CREATE FUNCTION jsoncontains_path RETURNS integer SONAME
  'ha_connect.so';
   
  ERROR 1125 (HY000): Function 'jsoncontains_path' already
  exists
   
  CREATE OR REPLACE FUNCTION jsoncontains_path RETURNS integer
  SONAME 'ha_connect.so';
   
  Query OK, 0 rows affected (0.00 sec)
   
  CREATE FUNCTION IF NOT EXISTS jsoncontains_path RETURNS
  integer SONAME 'ha_connect.so';
   
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  SHOW WARNINGS;
   
  +-------+------+---------------------------------------------+
  | Level | Code | Message |
  +-------+------+---------------------------------------------+
  | Note | 1125 | Function 'jsoncontains_path' already
  exists |
  +-------+------+---------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/create-function-udf/dzfxuxCREATE FUNCTION UDFdzfxuxhttps://mariadb.com/kb/en/library/create-function-udf/dzfxuxdzfxux21dzfxux258qjzxqqvvbqSyntax
  ------ 
  MONTH(date)
   
  Description
  ----------- 
  Returns the month for date in the range 1 to 12 for January
  to
  December, or 0 for dates such as '0000-00-00' or
  '2008-00-00' that
  have a zero month part.
   
  Examples
  -------- 
  SELECT MONTH('2019-01-03');
  +---------------------+
  | MONTH('2019-01-03') |
  +---------------------+
  | 1 |
  +---------------------+
   
  SELECT MONTH('2019-00-03');
  +---------------------+
  | MONTH('2019-00-03') |
  +---------------------+
  | 0 |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/month/dzfxuxMONTHdzfxuxhttps://mariadb.com/kb/en/library/month/dzfxuxdzfxux31dzfxux495qjzxqqvvbqSyntax
  ------ 
  MONTHNAME(date)
   
  Description
  ----------- 
  Returns the full name of the month for date. The language
  used for the name is controlled by the value of the
  lc_time_names system variable. See server locale for more on
  the supported locales.
   
  Examples
  -------- 
  SELECT MONTHNAME('2019-02-03');
  +-------------------------+
  | MONTHNAME('2019-02-03') |
  +-------------------------+
  | February |
  +-------------------------+
   
  Changing the locale:
   
  SET lc_time_names = 'fr_CA';
   
  SELECT MONTHNAME('2019-05-21');
  +-------------------------+
  | MONTHNAME('2019-05-21') |
  +-------------------------+
  | mai |
  +-------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/monthname/dzfxuxMONTHNAMEdzfxuxhttps://mariadb.com/kb/en/library/monthname/dzfxuxdzfxux31dzfxux496qjzxqqvvbqSyntax
  ------ 
  QUARTER(date)
   
  Description
  ----------- 
  Returns the quarter of the year for date, in the range 1 to
  4. Returns 0 if month contains a zero value, or NULL if the
  given value is not otherwise a valid date (zero values are
  accepted).
   
  Examples
  -------- 
  SELECT QUARTER('2008-04-01');
  +-----------------------+
  | QUARTER('2008-04-01') |
  +-----------------------+
  | 2 |
  +-----------------------+
   
  SELECT QUARTER('2019-00-01');
  +-----------------------+
  | QUARTER('2019-00-01') |
  +-----------------------+
  | 0 |
  +-----------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/quarter/dzfxuxQUARTERdzfxuxhttps://mariadb.com/kb/en/library/quarter/dzfxuxdzfxux31dzfxux500qjzxqqvvbqSyntax
  ------ 
  SECOND(time)
   
  Description
  ----------- 
  Returns the second for a given time (which can include
  microseconds), in the range 0 to 59, or NULL if not given a
  valid time value.
   
  Examples
  -------- 
  SELECT SECOND('10:05:03');
  +--------------------+
  | SECOND('10:05:03') |
  +--------------------+
  | 3 |
  +--------------------+
   
  SELECT SECOND('10:05:01.999999');
  +---------------------------+
  | SECOND('10:05:01.999999') |
  +---------------------------+
  | 1 |
  +---------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/second/dzfxuxSECONDdzfxuxhttps://mariadb.com/kb/en/library/second/dzfxuxdzfxux31dzfxux501qjzxqqvvbqSyntax
  ------ 
  DROP FUNCTION [IF EXISTS] function_name
   
  Description
  ----------- 
  This statement drops the user-defined function (UDF) named
  function_name.
   
  To drop a function, you must have the DELETE privilege for
  the mysql database. This is because DROP FUNCTION removes
  the row from the mysql.func system table that records the
  function's name, type and shared library name.
   
  For dropping a stored function, see DROP FUNCTION.
   
  Upgrading a UDF
   
  To upgrade the UDF's shared library, first run a DROP
  FUNCTION statement, then upgrade the shared library and
  finally run the CREATE FUNCTION statement. If you upgrade
  without following this process, you may crash the server.
   
  Examples
  -------- 
  DROP FUNCTION jsoncontains_path;
   
  IF EXISTS:
   
  DROP FUNCTION jsoncontains_path;
   
  ERROR 1305 (42000): FUNCTION test.jsoncontains_path does not
  exist
   
  DROP FUNCTION IF EXISTS jsoncontains_path;
   
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  SHOW WARNINGS;
   
  +-------+------+------------------------------------------------+
  | Level | Code | Message |
  +-------+------+------------------------------------------------+
  | Note | 1305 | FUNCTION test.jsoncontains_path does not
  exist |
  +-------+------+------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/drop-function-udf/dzfxuxDROP FUNCTION UDFdzfxuxhttps://mariadb.com/kb/en/library/drop-function-udf/dzfxuxdzfxux21dzfxux259qjzxqqvvbqUser-defined functions allow MariaDB to be extended with a
  new function that works like a native (built-in) MariaDB
  function such as ABS() or CONCAT(). There are alternative
  ways to add a new function: writing a native function (which
  requires modifying and compiling the server source code), or
  writing a stored function.
   
  Statements making use of user-defined functions are not safe
  for replication.
   
  Functions are written in C or C++, and to make use of them,
  the operating system must support dynamic loading. 
   
  Each new SQL function requires corresponding functions
  written in C/C++. In the list below, at least the main
  function - x() - and one other, are required. x should be
  replaced by the name of the function you are creating.
   
  All functions need to be thread-safe, so not global or
  static variables that change can be allocated. Memory is
  allocated in x_init()/ and freed in x_deinit(). 
   
  Simple Functions
   
  x()
   
  Required for all UDF's, this is where the results are
  calculated.
   
  C/C++ type | SQL type | 
   
  char * | STRING | 
   
  long long | INTEGER | 
   
  double | REAL | 
   
  DECIMAL functions return string values, and so should be
  written accordingly. It is not possible to create ROW
  functions.
   
  x_init()
   
  Initialization function for x(). Can be used for the
  following:
  Check the number of arguments to X() (the SQL equivalent).
  Verify the argument types, or to force arguments to be of a
  particular type after the function is called.
  Specify whether the result can be NULL.
  Specify the maximum result length.
  For REAL functions, specify the maximum number of decimals
  for the result.
  Allocate any required memory.
   To verify that the arguments are of a required type or,
  alternatively, to tell MySQL to coerce arguments to the
  required types when the main function is called.
   
  x_deinit()
   
  De-initialization function for x(). Used to de-allocate
  memory that was allocated in x_init().
   
  Description
  ----------- 
  Each time the SQL function X() is called:
  MariaDB will first call the C/C++ initialization function,
  x_init(), assuming it exists. All setup will be performed,
  and if it returns an error, the SQL statement is aborted and
  no further functions are called.
  If there is no x_init() function, or it has been called and
  did not return an error, x() is then called once per row.
  After all rows have finished processing, x_deinit() is
  called, if present, to clean up by de-allocating any memory
  that was allocated in x_init().
  See User-defined Functions Calling Sequences for more
  details on the functions.
   
  Aggregate Functions
   
  The following functions are required for aggregate
  functions, such as AVG() and SUM(). 
   
  x_clear()
   
  Used to reset the current aggregate, but without inserting
  the argument as the initial aggregate value for the new
  group.
   
  x_add()
   
  Used to add the argument to the current aggregate. 
   
  x_remove()
   
  Staring from MariaDB 10.4 it improves the support of window
  functions (so it is not obligatory to add it) and should
  remove the argument from the current aggregate.
   
  Description
  ----------- 
  Each time the aggregate SQL function X() is called:
  MariaDB will first call the C/C++ initialization function,
  x_init(), assuming it exists. All setup will be performed,
  and if it returns an error, the SQL statement is aborted and
  no further functions are called.
  If there is no x_init() function, or it has been called and
  did not return an error, x() is then called once per row.
  After all rows have finished processing, x_deinit() is
  called, if present, to clean up by de-allocating any memory
  that was allocated in x_init().
   
  MariaDB will first call the C/C++ initialization function,
  x_init(), assuming it exists. All setup will be performed,
  and if it returns an error, the SQL statement is aborted and
  no further functions are called.
  The table is sorted according to the GROUP BY expression.
  x_clear() is called for the first row of each new group.
  x_add() is called once per row for each row in the same
  group.
  x() is called when the group changes, or after the last row,
  to get the aggregate result. 
  The latter three steps are repeated until all rows have been
  processed.
  After all rows have finished processing, x_deinit() is
  called, if present, to clean up by de-allocating any memory
  that was allocated in x_init().
   
  Examples
  -------- 
  For an example, see sql/udf_example.cc in the source tree.
  For a collection of existing UDFs see
  https://github.com/mysqludf.
   


  URL:
  https://mariadb.com/kb/en/library/creating-user-defined-functions/dzfxuxCreating User-Defined Functionsdzfxuxhttps://mariadb.com/kb/en/library/creating-user-defined-functions/dzfxuxdzfxux21dzfxux260qjzxqqvvbqSyntax
  ------ 
  TIME(expr)
   
  Description
  ----------- 
  Extracts the time part of the time or datetime expression
  expr and
  returns it as a string.
   
  Examples
  -------- 
  SELECT TIME('2003-12-31 01:02:03');
  +-----------------------------+
  | TIME('2003-12-31 01:02:03') |
  +-----------------------------+
  | 01:02:03 |
  +-----------------------------+
   
  SELECT TIME('2003-12-31 01:02:03.000123');
  +------------------------------------+
  | TIME('2003-12-31 01:02:03.000123') |
  +------------------------------------+
  | 01:02:03.000123 |
  +------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/time-function/dzfxuxTIME Functiondzfxuxhttps://mariadb.com/kb/en/library/time-function/dzfxuxdzfxux31dzfxux507qjzxqqvvbqSyntax
  ------ 
  TIME_FORMAT(time,format)
   
  Description
  ----------- 
  This is used like the DATE_FORMAT() function, but the format
  string
  may contain format specifiers only for hours, minutes, and
  seconds.
  Other specifiers produce a NULL value or 0.
   
  Examples
  -------- 
  SELECT TIME_FORMAT('100:00:00', '%H %k %h %I %l');
  +--------------------------------------------+
  | TIME_FORMAT('100:00:00', '%H %k %h %I %l') |
  +--------------------------------------------+
  | 100 100 04 04 4 |
  +--------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/time_format/dzfxuxTIME_FORMATdzfxuxhttps://mariadb.com/kb/en/library/time_format/dzfxuxdzfxux31dzfxux512qjzxqqvvbqThe functions described in Creating User-defined Functions
  are expanded on this page. They are declared as follows:
   
  Simple Functions
   
  x()
   
  If x() returns an integer, it is declared as follows:
   
  long long x(UDF_INIT *initid, UDF_ARGS *args,
   char *is_null, char *error);
   
  If x() returns a string (DECIMAL functions also return
  string values), it is declared as follows:
   
  char *x(UDF_INIT *initid, UDF_ARGS *args,
   char *result, unsigned long *length,
   char *is_null, char *error);
   
  If x() returns a real, it is declared as follows:
   
  double x(UDF_INIT *initid, UDF_ARGS *args,
   char *is_null, char *error);
   
  x_init()
   
  my_bool x_init(UDF_INIT *initid, UDF_ARGS *args, char
  *message);
   
  x_deinit()
   
  void x_deinit(UDF_INIT *initid);
   
  Description
  ----------- 
  initid is a parameter passed to all three functions that
  points to a UDF_INIT structure, used for communicating
  information between the functions. Its structure members
  are:
  my_bool maybe_null
  maybe_null should be set to 1 if x_init can return a NULL
  value, Defaults to 1 if any arguments are declared
  maybe_null.
   
  unsigned int decimals
  Number of decimals after the decimal point. The default, if
  an explicit number of decimals is passed in the arguments to
  the main function, is the maximum number of decimals, so if
  9.5, 9.55 and 9.555 are passed to the function, the default
  would be three (based on 9.555, the maximum). If there are
  no explicit number of decimals, the default is set to 31, or
  one more than the maximum for the DOUBLE, FLOAT and DECIMAL
  types. This default can be changed in the function to suit
  the actual calculation.
   
  unsigned int max_length
  Maximum length of the result. For integers, the default is
  21. For strings, the length of the longest argument. For
  reals, the default is 13 plus the number of decimals
  indicated by initid->decimals. The length includes any signs
  or decimal points. Can also be set to 65KB or 16MB in order
  to return a BLOB. The memory remains unallocated, but this
  is used to decide on the data type to use if the data needs
  to be temporarily stored.
   
  char *ptr
  A pointer for use as required by the function. Commonly,
  initid->ptr is used to communicate allocated memory, with
  x_init() allocating the memory and assigning it to this
  pointer, x() using it, and x_deinit() de-allocating it.
   
  my_bool const_item
  Should be set to 1 in x_init() if x() always returns the
  same value, otherwise 0.
   

  Aggregate Functions
   
  x_clear()
   
  x_clear() is a required function for aggregate functions,
  and is declared as follows:
   
  void x_clear(UDF_INIT *initid, char *is_null, char *error);
   
  It is called when the summary results need to be reset, that
  is at the beginning of each new group. but also to reset the
  values when there were no matching rows.
   
  is_null is set to point to CHAR(0) before calling x_clear().
   
  In the case of an error, you can store the value to which
  the error argument points (a single-byte variable, not a
  string string buffer) in the variable.
   
  x_reset()
   
  x_reset() is declared as follows:
   
  void x_reset(UDF_INIT *initid, UDF_ARGS *args,
   char *is_null, char *error);
   
  It is called on finding the first row in a new group. Should
  reset the summary variables, and then use UDF_ARGS as the
  first value in the group's internal summary value. The
  function is not required if the UDF interface uses
  x_clear().
   
  x_add()
   
  x_add() is declared as follows:
   
  void x_add(UDF_INIT *initid, UDF_ARGS *args,
   char *is_null, char *error);
   
  It is called for all rows belonging to the same group, and
  should be used to add the value in UDF_ARGS to the internal
  summary variable.
   
  x_remove()
   
  x_remove() was added in MariaDB 10.4 and is declared as
  follows (same as x_add()):
   
  void x_remove(UDF_INIT* initid, UDF_ARGS* args,
   char* is_null, char *error );
   
  It adds more efficient support of aggregate UDFs as window
  functions. x_remove() should "subtract" the row (reverse
  x_add()). In MariaDB 10.4 aggregate UDFs will work as WINDOW
  functions without x_remove() but it will not be so
  efficient.
   
  If x_remove() supported (defined) detected automatically.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/user-defined-functions-calling-sequences/dzfxuxUser-Defined Functions Calling Sequencesdzfxuxhttps://mariadb.com/kb/en/library/user-defined-functions-calling-sequences/dzfxuxdzfxux21dzfxux261qjzxqqvvbqThe MariaDB server imposes a number of limitations on
  user-defined functions for security purposes.
  The INSERT privilege for the mysql database is required to
  run CREATE FUNCTION, as a record will be added to the
  mysql.func-table.
  The DELETE privilege for the mysql database is required to
  run DROP FUNCTION as the corresponding record will be
  removed from the mysql.func-table.
  UDF object files can only be placed in the plugin directory,
  as specified by the value of the plugin_dir system variable.
  At least one symbol, beyond the required x() - corresponding
  to an SQL function X()) - is required. These can be
  x_init(), x_deinit(), xxx_reset(), x_clear() and x_add()
  functions (see Creating User-defined Functions). The
  allow-suspicious-udfs mysqld option (by default unset)
  provides a workaround, permitting only one symbol to be
  used. This is not recommended, as it opens the possibility
  of loading shared objects that are not legitimate
  user-defined functions.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/user-defined-functions-security/dzfxuxUser-Defined Functions Securitydzfxuxhttps://mariadb.com/kb/en/library/user-defined-functions-security/dzfxuxdzfxux21dzfxux262qjzxqqvvbqSyntax
  ------ 
  TIME_TO_SEC(time)
   
  Description
  ----------- 
  Returns the time argument, converted to seconds.
   
  The value returned by TIME_TO_SEC is of type DOUBLE. Before
  MariaDB 5.3 (and MySQL 5.6), the type was INT. See
  Microseconds in MariaDB.
   
  Examples
  -------- 
  SELECT TIME_TO_SEC('22:23:00');
  +-------------------------+
  | TIME_TO_SEC('22:23:00') |
  +-------------------------+
  | 80580 |
  +-------------------------+
   
  SELECT TIME_TO_SEC('00:39:38');
  +-------------------------+
  | TIME_TO_SEC('00:39:38') |
  +-------------------------+
  | 2378 |
  +-------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/time_to_sec/dzfxuxTIME_TO_SECdzfxuxhttps://mariadb.com/kb/en/library/time_to_sec/dzfxuxdzfxux31dzfxux513qjzxqqvvbqSyntax
  ------ 
  UTC_DATE, UTC_DATE()
   
  Description
  ----------- 
  Returns the current UTC date as a value in 'YYYY-MM-DD' or
  YYYYMMDD
  format, depending on whether the function is used in a
  string or numeric context. 
   
  Examples
  -------- 
  SELECT UTC_DATE(), UTC_DATE() + 0;
   
  +------------+----------------+
  | UTC_DATE() | UTC_DATE() + 0 |
  +------------+----------------+
  | 2010-03-27 | 20100327 |
  +------------+----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/utc_date/dzfxuxUTC_DATEdzfxuxhttps://mariadb.com/kb/en/library/utc_date/dzfxuxdzfxux31dzfxux517qjzxqqvvbqSyntax
  ------ 
  UTC_TIME
  UTC_TIME([precision])
   
  Description
  ----------- 
  Returns the current UTC time as a value in 'HH:MM:SS' or
  HHMMSS.uuuuuu format, depending on whether the function is
  used in a string or numeric context. 
   
  The optional precision determines the microsecond precision.
  See Microseconds in MariaDB.
   
  Examples
  -------- 
  SELECT UTC_TIME(), UTC_TIME() + 0;
   
  +------------+----------------+
  | UTC_TIME() | UTC_TIME() + 0 |
  +------------+----------------+
  | 17:32:34 | 173234.000000 |
  +------------+----------------+
   
  With precision:
   
  SELECT UTC_TIME(5);
  +----------------+
  | UTC_TIME(5) |
  +----------------+
  | 07:52:50.78369 |
  +----------------+
   


  URL: https://mariadb.com/kb/en/library/utc_time/dzfxuxUTC_TIMEdzfxuxhttps://mariadb.com/kb/en/library/utc_time/dzfxuxdzfxux31dzfxux518qjzxqqvvbqThe mysql.func table stores information about user-defined
  functions (UDFs) created with the CREATE FUNCTION UDF
  statement.
   
  In MariaDB 10.4 and later, this table uses the Aria storage
  engine.
   
  MariaDB until 10.3
   
  In MariaDB 10.3 and before, this table uses the MyISAM
  storage engine.
   
  The mysql.func table contains the following fields:
   
  Field | Type | Null | Key | Default | Description | 
   
  name | char(64) | NO | PRI |  | UDF name | 
   
  ret | tinyint(1) | NO |  | 0 |  | 
   
  dl | char(128) | NO |  |  | Shared library name | 
   
  type | enum('function','aggregate') | NO |  | NULL |
  Type, either function or aggregate. Aggregate functions are
  summary functions such as SUM() and AVG(). | 
   
  Example
   
  SELECT * FROM mysql.func;
  +------------------------------+-----+--------------+-----------+
  | name | ret | dl | type |
  +------------------------------+-----+--------------+-----------+
  | spider_direct_sql | 2 | ha_spider.so | function |
  | spider_bg_direct_sql | 2 | ha_spider.so | aggregate |
  | spider_ping_table | 2 | ha_spider.so | function |
  | spider_copy_tables | 2 | ha_spider.so | function |
  | spider_flush_table_mon_cache | 2 | ha_spider.so | function
  |
  +------------------------------+-----+--------------+-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mysqlfunc-table/dzfxuxmysql.func Tabledzfxuxhttps://mariadb.com/kb/en/library/mysqlfunc-table/dzfxuxdzfxux21dzfxux263qjzxqqvvbqDescription
  ----------- 
  The AUTO_INCREMENT attribute can be used to generate a
  unique identity for new rows. When you insert a new record
  to the table, and the auto_increment field is NULL or
  DEFAULT, the value will automatically be incremented. This
  also applies to 0, unless the NO_AUTO_VALUE_ON_ZERO SQL_MODE
  is enabled.
   
  AUTO_INCREMENT columns start from 1 by default. The
  automatically generated value can never be lower than 0.
   
  Each table can have only one AUTO_INCREMENT column. It must
  defined as a key (not necessarily the PRIMARY KEY or UNIQUE
  key). In some storage engines (including the default
  InnoDB), if the key consists of multiple columns, the
  AUTO_INCREMENT column must be the first column. Storage
  engines that permit the column to be placed elsewhere are
  Aria, MyISAM, MERGE, Spider, TokuDB, BLACKHOLE, FederatedX
  and Federated.
   
  CREATE TABLE animals (
   id MEDIUMINT NOT NULL AUTO_INCREMENT,
   name CHAR(30) NOT NULL,
   PRIMARY KEY (id)
   );
   
  INSERT INTO animals (name) VALUES
   ('dog'),('cat'),('penguin'),
   ('fox'),('whale'),('ostrich');
   
  SELECT * FROM animals;
   
  +----+---------+
  | id | name |
  +----+---------+
  | 1 | dog |
  | 2 | cat |
  | 3 | penguin |
  | 4 | fox |
  | 5 | whale |
  | 6 | ostrich |
  +----+---------+
   
  SERIAL is an alias for BIGINT UNSIGNED NOT NULL
  AUTO_INCREMENT UNIQUE.
   
  CREATE TABLE t (id SERIAL, c CHAR(1)) ENGINE=InnoDB;
   
  SHOW CREATE TABLE t \G
  *************************** 1. row
  ***************************
   Table: t
  Create Table: CREATE TABLE `t` (
   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
   `c` char(1) DEFAULT NULL,
   UNIQUE KEY `id` (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
   
  Setting or Changing the Auto_Increment Value
   
  You can use an ALTER TABLE statement to assign a new value
  to the auto_increment table option, or set the insert_id
  server system variable to change the next AUTO_INCREMENT
  value inserted by the current session.
   
  LAST_INSERT_ID() can be used to see the last AUTO_INCREMENT
  value inserted by the current session.
   
  ALTER TABLE animals AUTO_INCREMENT=8;
   
  INSERT INTO animals (name) VALUES ('aardvark');
   
  SELECT * FROM animals;
   
  +----+-----------+
  | id | name |
  +----+-----------+
  | 1 | dog |
  | 2 | cat |
  | 3 | penguin |
  | 4 | fox |
  | 5 | whale |
  | 6 | ostrich |
  | 8 | aardvark |
  +----+-----------+
   
  SET insert_id=12;
   
  INSERT INTO animals (name) VALUES ('gorilla');
   
  SELECT * FROM animals;
   
  +----+-----------+
  | id | name |
  +----+-----------+
  | 1 | dog |
  | 2 | cat |
  | 3 | penguin |
  | 4 | fox |
  | 5 | whale |
  | 6 | ostrich |
  | 8 | aardvark |
  | 12 | gorilla |
  +----+-----------+
   
  InnoDB/XtraDB
   
  Until MariaDB 10.2.3, InnoDB and XtraDB used an
  auto-increment counter that is stored in memory. When the
  server restarts, the counter is re-initialized to the
  highest value used in the table, which cancels the effects
  of any AUTO_INCREMENT = N option in the table statements.
   
  From MariaDB 10.2.4, this restriction has been lifted and
  AUTO_INCREMENT is persistent.
   
  See also AUTO_INCREMENT Handling in XtraDB/InnoDB.
   
  Setting Explicit Values
   
  It is possible to specify a value for an AUTO_INCREMENT
  column. The value must not exist in the key.
   
  If the new value is higher than the current maximum value,
  the AUTO_INCREMENT value is updated, so the next value will
  be higher. If the new value is lower than the current
  maximum value, the AUTO_INCREMENT value remains unchanged.
   
  The following example demonstrates these behaviours:
   
  CREATE TABLE t (id INTEGER UNSIGNED AUTO_INCREMENT PRIMARY
  KEY) ENGINE = InnoDB;
   
  INSERT INTO t VALUES (NULL);
  SELECT id FROM t;
   
  +----+
  | id |
  +----+
  | 1 |
  +----+
   
  INSERT INTO t VALUES (10); -- higher value
  SELECT id FROM t;
   
  +----+
  | id |
  +----+
  | 1 |
  | 10 |
  +----+
   
  INSERT INTO t VALUES (2); -- lower value
  INSERT INTO t VALUES (NULL); -- auto value
  SELECT id FROM t;
   
  +----+
  | id |
  +----+
  | 1 |
  | 2 |
  | 10 |
  | 11 |
  +----+
   
  The ARCHIVE storage engine does not allow to insert a value
  that is lower than the current maximum.
   
  Missing Values
   
  An AUTO_INCREMENT column normally has missing values. This
  happens because if a row is deleted, or an AUTO_INCREMENT
  value is explicitly updated, old values are never re-used.
  The REPLACE statement also deletes a row, and its value is
  wasted. With InnoDB, values can be reserved by a
  transaction; but if the transaction fails (for example,
  because of a ROLLBACK) the reserved value will be lost.
   
  Thus AUTO_INCREMENT values can be used to sort results in a
  chronological order, but not to create a numeric sequence.
   
  Replication
   
  To make master-master or Galera safe to use AUTO_INCREMENT
  one should use the system variables 
   auto_increment_increment and auto_increment_offset to
  generate unique values for each server.
   
  CHECK Constraints, DEFAULT Values and Virtual Columns
   
  From MariaDB 10.2.6 auto_increment columns are no longer
  permitted in CHECK constraints, DEFAULT value expressions
  and virtual columns. They were permitted in earlier
  versions, but did not work correctly. See MDEV-11117.
   


  URL: https://mariadb.com/kb/en/library/auto_increment/dzfxuxAUTO_INCREMENTdzfxuxhttps://mariadb.com/kb/en/library/auto_increment/dzfxuxdzfxux22dzfxux264qjzxqqvvbqA synonym for ST_AsBinary().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkb-asbinary/dzfxuxAsBinarydzfxuxhttps://mariadb.com/kb/en/library/wkb-asbinary/dzfxuxdzfxux32dzfxux526qjzxqqvvbqA synonym for ST_AsBinary().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/aswkb/dzfxuxAsWKBdzfxuxhttps://mariadb.com/kb/en/library/aswkb/dzfxuxdzfxux32dzfxux527qjzxqqvvbqSyntax
  ------ 
  MLineFromWKB(wkb[,srid])
  MultiLineStringFromWKB(wkb[,srid])
   
  Description
  ----------- 
  Constructs a MULTILINESTRING value using its WKB
  representation and SRID.
   
  MLineFromWKB() and MultiLineStringFromWKB() are synonyms.
   
  Examples
  -------- 
  SET @g = ST_AsBinary(MLineFromText('MULTILINESTRING((10
  48,10 21,10 0),(16 0,16 23,16 48))'));
   
  SELECT ST_AsText(MLineFromWKB(@g));
  +--------------------------------------------------------+
  | ST_AsText(MLineFromWKB(@g)) |
  +--------------------------------------------------------+
  | MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) |
  +--------------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mlinefromwkb/dzfxuxMLineFromWKBdzfxuxhttps://mariadb.com/kb/en/library/mlinefromwkb/dzfxuxdzfxux32dzfxux528qjzxqqvvbqSyntax
  ------ 
  BIGINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A large integer. The signed range is -9223372036854775808 to
  9223372036854775807. The unsigned range is 0 to
  18446744073709551615.
   
  If a column has been set to ZEROFILL, all values will be
  prepended by zeros so that the BIGINT value contains a
  number of M digits.
   
  Note: If the ZEROFILL attribute has been specified, the
  column will automatically become UNSIGNED.
   
  For more details on the attributes, see Numeric Data Type
  Overview.
   
  SERIAL is an alias for:
   
  BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE
   
  Examples
  -------- 
  CREATE TABLE bigints (a BIGINT,b BIGINT UNSIGNED,c BIGINT
  ZEROFILL);
   
  INSERT INTO bigints VALUES (-10,-10,-10);
  Query OK, 1 row affected, 2 warnings (0.08 sec)
  Warning (Code 1264): Out of range value for column 'b' at
  row 1
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO bigints VALUES (-10,10,-10);Query OK, 1 row
  affected, 1 warning (0.08 sec)
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO bigints VALUES (-10,10,10);
   
  INSERT INTO bigints VALUES
  (9223372036854775808,9223372036854775808,9223372036854775808);
  Query OK, 1 row affected, 1 warning (0.07 sec)
  Warning (Code 1264): Out of range value for column 'a' at
  row 1
   
  INSERT INTO bigints VALUES
  (9223372036854775807,9223372036854775808,9223372036854775808);
   
  SELECT * FROM bigints;
  +---------------------+---------------------+----------------------+
  | a | b | c |
  +---------------------+---------------------+----------------------+
  | -10 | 0 | 00000000000000000000 |
  | -10 | 10 | 00000000000000000000 |
  | -10 | 10 | 00000000000000000010 |
  | 9223372036854775807 | 9223372036854775808 |
  09223372036854775808 |
  | 9223372036854775807 | 9223372036854775808 |
  09223372036854775808 |
  +---------------------+---------------------+----------------------+
   


  URL: https://mariadb.com/kb/en/library/bigint/dzfxuxBIGINTdzfxuxhttps://mariadb.com/kb/en/library/bigint/dzfxuxdzfxux22dzfxux265qjzxqqvvbqSyntax
  ------ 
  BINARY(M)
   
  Description
  ----------- 
  The BINARY type is similar to the CHAR type, but stores
  binary
  byte strings rather than non-binary character strings. M
  represents the
  column length in bytes.
   
  It contains no character set, and comparison and sorting are
  based on the numeric value of the bytes.
   
  If the maximum length is exceeded, and SQL strict mode is
  not enabled , the extra characters will be dropped with a
  warning. If strict mode is enabled, an error will occur.
   
  BINARY values are right-padded with 0x00 (the zero byte) to
  the specified length when inserted. The padding is not
  removed on select, so this needs to be taken into account
  when sorting and comparing, where all bytes are significant.
  The zero byte, 0x00 is less than a space for comparison
  purposes.
   
  Examples
  -------- 
  Inserting too many characters, first with strict mode off,
  then with it on:
   
  CREATE TABLE bins (a BINARY(10));
   
  INSERT INTO bins VALUES('12345678901');
  Query OK, 1 row affected, 1 warning (0.04 sec)
   
  SELECT * FROM bins;
   
  +------------+
  | a |
  +------------+
  | 1234567890 |
  +------------+
   
  SET sql_mode='STRICT_ALL_TABLES';
   
  INSERT INTO bins VALUES('12345678901');
  ERROR 1406 (22001): Data too long for column 'a' at row 1
   
  Sorting is performed with the byte value:
   
  TRUNCATE bins;
   
  INSERT INTO bins VALUES('A'),('B'),('a'),('b');
   
  SELECT * FROM bins ORDER BY a;
   
  +------+
  | a |
  +------+
  | A |
  | B |
  | a |
  | b |
  +------+
   
  Using CAST to sort as a CHAR instead:
   
  SELECT * FROM bins ORDER BY CAST(a AS CHAR);
  +------+
  | a |
  +------+
  | a |
  | A |
  | b |
  | B |
  +------+
   
  The field is a BINARY(10), so padding of two '\0's are
  inserted, causing comparisons that don't take this into
  account to fail:
   
  TRUNCATE bins;
   
  INSERT INTO bins VALUES('12345678');
   
  SELECT a = '12345678', a = '12345678\0\0' from bins;
   
  +----------------+--------------------+
  | a = '12345678' | a = '12345678\0\0' |
  +----------------+--------------------+
  | 0 | 1 |
  +----------------+--------------------+
   


  URL: https://mariadb.com/kb/en/library/binary/dzfxuxBINARYdzfxuxhttps://mariadb.com/kb/en/library/binary/dzfxuxdzfxux22dzfxux266qjzxqqvvbqSyntax
  ------ 
  BIT[(M)]
   
  Description
  ----------- 
  A bit-field type. M indicates the number of bits per value,
  from 1 to
  64. The default is 1 if M is omitted.
   
  Bit values can be inserted with b'value' notation, where
  value is the bit value in 0's and 1's.
   
  Bit fields are automatically zero-padded from the left to
  the full length of the bit, so for example in a BIT(4)
  field, '10' is equivalent to '0010'.
   
  Bits are returned as binary, so to display them, either add
  0, or use a function such as HEX, OCT or BIN to convert
  them.
   
  Examples
  -------- 
  CREATE TEMPORARY TABLE b ( b1 BIT(8) );
  INSERT INTO b VALUES
  (b'11111111'),(b'01010101'),(b'1111111111111');
  Query OK, 3 rows affected, 1 warning (0.10 sec)
  Records: 3 Duplicates: 0 Warnings: 1
   
  SHOW WARNINGS;
  +---------+------+---------------------------------------------+
  | Level | Code | Message |
  +---------+------+---------------------------------------------+
  | Warning | 1264 | Out of range value for column 'b1' at
  row 3 |
  +---------+------+---------------------------------------------+
   
  SELECT b1+0, HEX(b1), OCT(b1), BIN(b1) FROM b;
  +------+---------+---------+----------+
  | b1+0 | HEX(b1) | OCT(b1) | BIN(b1) |
  +------+---------+---------+----------+
  | 255 | FF | 377 | 11111111 |
  | 85 | 55 | 125 | 1010101 |
  | 255 | FF | 377 | 11111111 |
  +------+---------+---------+----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bit/dzfxuxBITdzfxuxhttps://mariadb.com/kb/en/library/bit/dzfxuxdzfxux22dzfxux267qjzxqqvvbqSyntax
  ------ 
  MPointFromWKB(wkb[,srid])
  MultiPointFromWKB(wkb[,srid])
   
  Description
  ----------- 
  Constructs a MULTIPOINT value using its WKB representation
  and SRID.
   
  MPointFromWKB() and MultiPointFromWKB() are synonyms.
   
  Examples
  -------- 
  SET @g = ST_AsBinary(MPointFromText('MultiPoint( 1 1, 2 2,
  5 3, 7 2, 9 3, 8 4, 6 6, 6 9, 4 9, 1 5 )'));
   
  SELECT ST_AsText(MPointFromWKB(@g));
  +-----------------------------------------------------+
  | ST_AsText(MPointFromWKB(@g)) |
  +-----------------------------------------------------+
  | MULTIPOINT(1 1,2 2,5 3,7 2,9 3,8 4,6 6,6 9,4 9,1 5) |
  +-----------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mpointfromwkb/dzfxuxMPointFromWKBdzfxuxhttps://mariadb.com/kb/en/library/mpointfromwkb/dzfxuxdzfxux32dzfxux529qjzxqqvvbqA synonym for ST_GeomCollFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkb-geomcollfromwkb/dzfxuxGeomCollFromWKBdzfxuxhttps://mariadb.com/kb/en/library/wkb-geomcollfromwkb/dzfxuxdzfxux32dzfxux531qjzxqqvvbqA synonym for ST_GeomCollFromWKB.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometrycollectionfromwkb/dzfxuxGeometryCollectionFromWKBdzfxuxhttps://mariadb.com/kb/en/library/geometrycollectionfromwkb/dzfxuxdzfxux32dzfxux532qjzxqqvvbqA synonym for ST_GeomFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/geometryfromwkb/dzfxuxGeometryFromWKBdzfxuxhttps://mariadb.com/kb/en/library/geometryfromwkb/dzfxuxdzfxux32dzfxux533qjzxqqvvbqA synonym for ST_GeomFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkb-geomfromwkb/dzfxuxGeomFromWKBdzfxuxhttps://mariadb.com/kb/en/library/wkb-geomfromwkb/dzfxuxdzfxux32dzfxux534qjzxqqvvbqA synonym for ST_LineFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkb-linefromwkb/dzfxuxLineFromWKBdzfxuxhttps://mariadb.com/kb/en/library/wkb-linefromwkb/dzfxuxdzfxux32dzfxux535qjzxqqvvbqA synonym for ST_LineFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/linestringfromwkb/dzfxuxLineStringFromWKBdzfxuxhttps://mariadb.com/kb/en/library/linestringfromwkb/dzfxuxdzfxux32dzfxux536qjzxqqvvbqSyntax
  ------ 
  BLOB[(M)]
   
  Description
  ----------- 
  A BLOB column with a maximum length of 65,535 (216 - 1)
  bytes. Each
  BLOB value is stored using a two-byte length prefix that
  indicates the
  number of bytes in the value.
   
  An optional length M can be given for this type. If this is
  done,
  MariaDB creates the column as the smallest BLOB type large
  enough to
  hold values M bytes long.
   
  BLOBS can also be used to store dynamic columns.
   
  Before MariaDB 10.2.1, BLOB and TEXT columns could not be
  assigned a DEFAULT value. This restriction was lifted in
  MariaDB 10.2.1.
   
  Indexing
   
  In MariaDB 10.4, it is possible to set a Unique index on a
  column that uses the BLOB data type. In previous releases
  this was not possible, as the index would only guarantee the
  uniqueness of a fixed number of characters.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, BLOB is a synonym for
  LONGBLOB.
   


  URL: https://mariadb.com/kb/en/library/blob/dzfxuxBLOBdzfxuxhttps://mariadb.com/kb/en/library/blob/dzfxuxdzfxux22dzfxux268qjzxqqvvbqSyntax
  ------ 
  BOOL, BOOLEAN
   
  Description
  ----------- 
  These types are synonyms for TINYINT(1). 
  A value of zero is considered false. Non-zero values are
  considered true:
   
  mysql> SELECT IF(0, 'true', 'false');
  +------------------------+
  | IF(0, 'true', 'false') |
  +------------------------+
  | false |
  +------------------------+
   
  mysql> SELECT IF(1, 'true', 'false');
  +------------------------+
  | IF(1, 'true', 'false') |
  +------------------------+
  | true |
  +------------------------+
   
  mysql> SELECT IF(2, 'true', 'false');
  +------------------------+
  | IF(2, 'true', 'false') |
  +------------------------+
  | true |
  +------------------------+
   
  However, the values TRUE and FALSE are merely aliases for 1
  and 0,
  respectively, as shown here:
   
  mysql> SELECT IF(0 = FALSE, 'true', 'false');
   
  +--------------------------------+
  | IF(0 = FALSE, 'true', 'false') |
  +--------------------------------+
  | true |
  +--------------------------------+
   
  mysql> SELECT IF(1 = TRUE, 'true', 'false');
  +-------------------------------+
  | IF(1 = TRUE, 'true', 'false') |
  +-------------------------------+
  | true |
  +-------------------------------+
   
  mysql> SELECT IF(2 = TRUE, 'true', 'false');
  +-------------------------------+
  | IF(2 = TRUE, 'true', 'false') |
  +-------------------------------+
  | false |
  +-------------------------------+
   
  mysql> SELECT IF(2 = FALSE, 'true', 'false');
  +--------------------------------+
  | IF(2 = FALSE, 'true', 'false') |
  +--------------------------------+
  | false |
  +--------------------------------+
   
  UNKNOWN is an alias for NULL.
   
  The last two statements display the results shown because 2
  is equal
  to neither 1 nor 0.
   


  URL: https://mariadb.com/kb/en/library/boolean/dzfxuxBOOLEANdzfxuxhttps://mariadb.com/kb/en/library/boolean/dzfxuxdzfxux22dzfxux270qjzxqqvvbqThis article covers the CHAR data type. See CHAR Function
  for the function.
   
  Syntax
  ------ 
  [NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE
  collation_name]
   
  Description
  ----------- 
  A fixed-length string that is always right-padded with
  spaces to the specified
  length when stored. M represents the column length in
  characters. The range
  of M is 0 to 255. If M is omitted, the length is 1.
   
  CHAR(0) columns can contain 2 values: an empty string or
  NULL. Such columns cannot be part of an index. The CONNECT
  storage engine does not support CHAR(0).
   
  Note: Trailing spaces are removed when CHAR values are
  retrieved
  unless the PAD_CHAR_TO_FULL_LENGTH SQL mode is enabled.
   
  Before MariaDB 10.2, all collations were of type PADSPACE,
  meaning that CHAR (as well as VARCHAR and TEXT) values are
  compared without regard for trailing spaces. This does not
  apply to the LIKE pattern-matching operator, which takes
  into account trailing spaces.
   
  If a unique index consists of a column where trailing pad
  characters are stripped or ignored, inserts into that column
  where values differ only by the number of trailing pad
  characters will result in a duplicate-key error.
   
  Examples
  -------- 
  Trailing spaces:
   
  CREATE TABLE strtest (c CHAR(10));
  INSERT INTO strtest VALUES('Maria ');
   
  SELECT c='Maria',c='Maria ' FROM strtest;
   
  +-----------+--------------+
  | c='Maria' | c='Maria ' |
  +-----------+--------------+
  | 1 | 1 |
  +-----------+--------------+
   
  SELECT c LIKE 'Maria',c LIKE 'Maria ' FROM strtest;
   
  +----------------+-------------------+
  | c LIKE 'Maria' | c LIKE 'Maria ' |
  +----------------+-------------------+
  | 1 | 0 |
  +----------------+-------------------+
   
  NO PAD Collations
   
  NO PAD collations regard trailing spaces as normal
  characters. You can get a list of all NO PAD collations by
  querying the Information Schema Collations table, for
  example:
   
  SELECT collation_name FROM information_schema.collations 
   WHERE collation_name LIKE "%nopad%";
   
  +------------------------------+
  | collation_name |
  +------------------------------+
  | big5_chinese_nopad_ci |
  | big5_nopad_bin |
  ...
   


  URL: https://mariadb.com/kb/en/library/char/dzfxuxCHARdzfxuxhttps://mariadb.com/kb/en/library/char/dzfxuxdzfxux22dzfxux271qjzxqqvvbqA synonym for MLineFromWKB().
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/multilinestringfromwkb/dzfxuxMultiLineStringFromWKBdzfxuxhttps://mariadb.com/kb/en/library/multilinestringfromwkb/dzfxuxdzfxux32dzfxux537qjzxqqvvbqA synonym for MPointFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multipointfromwkb/dzfxuxMultiPointFromWKBdzfxuxhttps://mariadb.com/kb/en/library/multipointfromwkb/dzfxuxdzfxux32dzfxux538qjzxqqvvbqSynonym for MPolyFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multipolygonfromwkb/dzfxuxMultiPolygonFromWKBdzfxuxhttps://mariadb.com/kb/en/library/multipolygonfromwkb/dzfxuxdzfxux32dzfxux539qjzxqqvvbqA synonym for ST_PointFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkb-pointfromwkb/dzfxuxPointFromWKBdzfxuxhttps://mariadb.com/kb/en/library/wkb-pointfromwkb/dzfxuxdzfxux32dzfxux540qjzxqqvvbqA synonym for ST_PolyFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/wkb-polyfromwkb/dzfxuxPolyFromWKBdzfxuxhttps://mariadb.com/kb/en/library/wkb-polyfromwkb/dzfxuxdzfxux32dzfxux541qjzxqqvvbqA synonym for ST_PolyFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/polygonfromwkb/dzfxuxPolygonFromWKBdzfxuxhttps://mariadb.com/kb/en/library/polygonfromwkb/dzfxuxdzfxux32dzfxux542qjzxqqvvbqSyntax
  ------ 
  ST_AsBinary(g)
  AsBinary(g)
  ST_AsWKB(g)
  AsWKB(g)
   
  Description
  ----------- 
  Converts a value in internal geometry format to its WKB
  representation and returns the binary result.
   
  ST_AsBinary(), AsBinary(), ST_AsWKB() and AsWKB() are
  synonyms,
   
  Examples
  -------- 
  SET @poly = ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0
  0))');
  SELECT ST_AsBinary(@poly);
   
  SELECT ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly)));
  +--------------------------------------------+
  | ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly))) |
  +--------------------------------------------+
  | POLYGON((0 0,0 1,1 1,1 0,0 0)) |
  +--------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_asbinary/dzfxuxST_AsBinarydzfxuxhttps://mariadb.com/kb/en/library/st_asbinary/dzfxuxdzfxux32dzfxux543qjzxqqvvbqA synonym for ST_AsBinary().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_aswkb/dzfxuxST_AsWKBdzfxuxhttps://mariadb.com/kb/en/library/st_aswkb/dzfxuxdzfxux32dzfxux544qjzxqqvvbqA synonym for ST_GeomCollFromWKB.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/st_geometrycollectionfromwkb/dzfxuxST_GeometryCollectionFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_geometrycollectionfromwkb/dzfxuxdzfxux32dzfxux546qjzxqqvvbqA synonym for ST_GeomFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geometryfromwkb/dzfxuxST_GeometryFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_geometryfromwkb/dzfxuxdzfxux32dzfxux547qjzxqqvvbqSyntax
  ------ 
  DATE
   
  Description
  ----------- 
  A date. The supported range is '1000-01-01' to
  '9999-12-31'. MariaDB
  displays DATE values in 'YYYY-MM-DD' format, but can be
  assigned dates in looser formats, including strings or
  numbers, as long as they make sense. These include a short
  year, YY-MM-DD, no delimiters, YYMMDD, or any other
  acceptable delimiter, for example YYYY/MM/DD. For details,
  see date and time literals.
   
  '0000-00-00' is a permitted special value (zero-date),
  unless the NO_ZERO_DATE SQL_MODE is used. Also, individual
  components of a date can be set to 0 (for example:
  '2015-00-12'), unless the NO_ZERO_IN_DATE SQL_MODE is
  used. In many cases, the result of en expression involving a
  zero-date, or a date with zero-parts, is NULL. If the
  ALLOW_INVALID_DATES SQL_MODE is enabled, if the day part is
  in the range between 1 and 31, the date does not produce any
  error, even for months that have less than 31 days.
   
  Examples
  -------- 
  CREATE TABLE t1 (d DATE);
   
  INSERT INTO t1 VALUES ("2010-01-12"), ("2011-2-28"),
  ('120314'),('13*04*21');
   
  SELECT * FROM t1;
   
  +------------+
  | d |
  +------------+
  | 2010-01-12 |
  | 2011-02-28 |
  | 2012-03-14 |
  | 2013-04-21 |
  +------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/date/dzfxuxDATEdzfxuxhttps://mariadb.com/kb/en/library/date/dzfxuxdzfxux22dzfxux273qjzxqqvvbqSyntax
  ------ 
  DATETIME [(microsecond precision)]
   
  Description
  ----------- 
  A date and time combination. The supported range is
  '1000-01-01 00:00:00.000000' to '9999-12-31
  23:59:59.999999'.
  MariaDB displays DATETIME values in 'YYYY-MM-DD HH:MM:SS'
  format, but
  allows assignment of values to DATETIME columns using either
  strings or
  numbers. For details, see date and time literals.
   
  The microsecond precision can be from 0-6. If not specified
  0 is used.
   
  '0000-00-00' is a permitted special value (zero-date),
  unless the NO_ZERO_DATE SQL_MODE is used. Also, individual
  components of a date can be set to 0 (for example:
  '2015-00-12'), unless the NO_ZERO_IN_DATE SQL_MODE is
  used. In many cases, the result of en expression involving a
  zero-date, or a date with zero-parts, is NULL. If the
  ALLOW_INVALID_DATES SQL_MODE is enabled, if the day part is
  in the range between 1 and 31, the date does not produce any
  error, even for months that have less than 31 days.
   
  Since MariaDB 10.0.1, DATETIME columns also accept
  CURRENT_TIMESTAMP as the default value.
   
  MariaDB 10.1.2 introduced the --mysql56-temporal-format
  option, on by default, which allows MariaDB to store
  DATETMEs using the same low-level format MySQL 5.6 uses. For
  more information, see Internal Format, below.
   
  For storage requirements, see Data Type Storage
  Requirements.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, DATE with a time portion
  is a synonym for DATETIME.
   
  Internal Format
   
  In MariaDB 10.1.2 a new temporal format was introduced from
  MySQL 5.6 that alters how the TIME, DATETIME and TIMESTAMP
  columns operate at lower levels. These changes allow these
  temporal data types to have fractional parts and negative
  values. You can disable this feature using the
  mysql56_temporal_format system variable.
   
  Tables that include TIMESTAMP values that were created on an
  older version of MariaDB or that were created while the
  mysql56_temporal_format system variable was disabled
  continue to store data using the older data type format.
   
  In order to update table columns from the older format to
  the newer format, execute an ALTER TABLE... MODIFY COLUMN
  statement that changes the column to the *same* data type.
  This change may be needed if you want to export the table's
  tablespace and import it onto a server that has
  mysql56_temporal_format=ON set (see MDEV-15225).
   
  For instance, if you have a DATETIME column in your table: 
   
  SHOW VARIABLES LIKE 'mysql56_temporal_format';
   
  +-------------------------+-------+
  | Variable_name | Value |
  +-------------------------+-------+
  | mysql56_temporal_format | ON |
  +-------------------------+-------+
   
  ALTER TABLE example_table MODIFY ts_col DATETIME;
   
  When MariaDB executes the ALTER TABLE statement, it converts
  the data from the older temporal format to the newer one. 
   
  In the event that you have several tables and columns using
  temporal data types that you want to switch over to the new
  format, make sure the system variable is enabled, then
  perform a dump and restore using mysqldump. The columns
  using relevant temporal data types are restored using the
  new temporal format.
   
  Examples
  -------- 
  CREATE TABLE t1 (d DATETIME);
   
  INSERT INTO t1 VALUES ("2011-03-11"), ("2012-04-19
  13:08:22"),
   ("2013-07-18 13:44:22.123456");
   
  SELECT * FROM t1;
   
  +---------------------+
  | d |
  +---------------------+
  | 2011-03-11 00:00:00 |
  | 2012-04-19 13:08:22 |
  | 2013-07-18 13:44:22 |
  +---------------------+
   
  CREATE TABLE t2 (d DATETIME(6));
   
  INSERT INTO t2 VALUES ("2011-03-11"), ("2012-04-19
  13:08:22"),
   ("2013-07-18 13:44:22.123456");
   
  SELECT * FROM t2;
   
  +----------------------------+
  | d |
  +----------------------------+
  | 2011-03-11 00:00:00.000000 |
  | 2012-04-19 13:08:22.000000 |
  | 2013-07-18 13:44:22.123456 |
  +----------------------------++
   
  Strings used in datetime context are automatically converted
  to datetime(6). If you want to have a datetime without
  seconds, you should use CONVERT(..,datetime).
   
  SELECT CONVERT('2007-11-30 10:30:19',datetime);
  +-----------------------------------------+
  | CONVERT('2007-11-30 10:30:19',datetime) |
  +-----------------------------------------+
  | 2007-11-30 10:30:19 |
  +-----------------------------------------+
   
  SELECT CONVERT('2007-11-30 10:30:19',datetime(6));
  +--------------------------------------------+
  | CONVERT('2007-11-30 10:30:19',datetime(6)) |
  +--------------------------------------------+
  | 2007-11-30 10:30:19.000000 |
  +--------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/datetime/dzfxuxDATETIMEdzfxuxhttps://mariadb.com/kb/en/library/datetime/dzfxuxdzfxux22dzfxux274qjzxqqvvbqSyntax
  ------ 
  ST_GeomFromWKB(wkb[,srid])
  ST_GeometryFromWKB(wkb[,srid])
  GeomFromWKB(wkb[,srid])
  GeometryFromWKB(wkb[,srid])
   
  Description
  ----------- 
  Constructs a geometry value of any type using its WKB
  representation and SRID.
   
  ST_GeomFromWKB(), ST_GeometryFromWKB(), GeomFromWKB() and
  GeometryFromWKB() are synonyms.
   
  Examples
  -------- 
  SET @g = ST_AsBinary(ST_LineFromText('LINESTRING(0 4, 4
  6)'));
   
  SELECT ST_AsText(ST_GeomFromWKB(@g));
  +-------------------------------+
  | ST_AsText(ST_GeomFromWKB(@g)) |
  +-------------------------------+
  | LINESTRING(0 4,4 6) |
  +-------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geomfromwkb/dzfxuxST_GeomFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_geomfromwkb/dzfxuxdzfxux32dzfxux548qjzxqqvvbqSyntax
  ------ 
  ST_LineFromWKB(wkb[,srid])
  LineFromWKB(wkb[,srid])
  ST_LineStringFromWKB(wkb[,srid])
  LineStringFromWKB(wkb[,srid])
   
  Description
  ----------- 
  Constructs a LINESTRING value using its WKB representation
  and SRID.
   
  ST_LineFromWKB(), LineFromWKB(), ST_LineStringFromWKB(), and
  LineStringFromWKB() are synonyms.
   
  Examples
  -------- 
  SET @g = ST_AsBinary(ST_LineFromText('LineString(0 4,4
  6)'));
   
  SELECT ST_AsText(ST_LineFromWKB(@g)) AS l;
   
  +---------------------+
  | l |
  +---------------------+
  | LINESTRING(0 4,4 6) |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_linefromwkb/dzfxuxST_LineFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_linefromwkb/dzfxuxdzfxux32dzfxux549qjzxqqvvbqSyntax
  ------ 
  DECIMAL[(M[,D])] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A packed "exact" fixed-point number. M is the total number
  of digits (the
  precision) and D is the number of digits after the decimal
  point (the
  scale). The decimal point and (for negative numbers) the
  "-" sign are not
  counted in M. If D is 0, values have no decimal point or
  fractional
  part and on INSERT the value will be rounded to the nearest
  DECIMAL. The maximum number of digits (M) for DECIMAL is 65.
  The maximum number of supported decimals (D) is 30 before
  MariadB 10.2.1 and 38 afterwards. If D is omitted, the
  default is 0. If M is omitted, the default is 10.
   
  UNSIGNED, if specified, disallows negative values.
   
  ZEROFILL, if specified, pads the number with zeros, up to
  the total number
  of digits specified by M.
   
  All basic calculations (+, -, *, /) with DECIMAL columns are
  done with
  a precision of 65 digits.
   
  For more details on the attributes, see Numeric Data Type
  Overview.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, NUMBER is a synonym.
   
  Examples
  -------- 
  CREATE TABLE t1 (d DECIMAL UNSIGNED ZEROFILL);
   
  INSERT INTO t1 VALUES (1),(2),(3),(4.0),(5.2),(5.7);
  Query OK, 6 rows affected, 2 warnings (0.16 sec)
  Records: 6 Duplicates: 0 Warnings: 2
   
  Note (Code 1265): Data truncated for column 'd' at row 5
  Note (Code 1265): Data truncated for column 'd' at row 6
   
  SELECT * FROM t1;
   
  +------------+
  | d |
  +------------+
  | 0000000001 |
  | 0000000002 |
  | 0000000003 |
  | 0000000004 |
  | 0000000005 |
  | 0000000006 |
  +------------+
   
  INSERT INTO t1 VALUES (-7);
  ERROR 1264 (22003): Out of range value for column 'd' at
  row 1
   


  URL: https://mariadb.com/kb/en/library/decimal/dzfxuxDECIMALdzfxuxhttps://mariadb.com/kb/en/library/decimal/dzfxuxdzfxux22dzfxux275qjzxqqvvbqSyntax
  ------ 
  ENUM('value1','value2',...) [CHARACTER SET charset_name]
  [COLLATE collation_name]
   
  Description
  ----------- 
  An enumeration. A string object that can have only one
  value, chosen
  from the list of values 'value1', 'value2', ..., NULL or
  the special 
  '' error value. In theory, an ENUM column can have a
  maximum of 65,535 distinct
  values; in practice, the real maximum depends on many
  factors. ENUM values are represented internally as integers.
   
  Trailing spaces are automatically stripped from ENUM values
  on table creation.
   
  ENUMs require relatively little storage space compared to
  strings, either one or two bytes depending on the number of
  enumeration values.
   
  NULL and empty values
   
  An ENUM can also contain NULL and empty values. If the ENUM
  column is declared to permit NULL values, NULL becomes a
  valid value, as well as the default value (see below). If
  strict SQL Mode is not enabled, and an invalid value is
  inserted into an ENUM, a special empty string, with an index
  value of zero (see Numeric index, below), is inserted, with
  a warning. This may be confusing, because the empty string
  is also a possible value, and the only difference if that in
  this case its index is not 0. Inserting will fail with an
  error if strict mode is active.
   
  If a DEFAULT clause is missing, the default value will be:
  NULL is the column is nullable;
  otherwise, the first value in the enumaration.
   
  Numeric index
   
  ENUM values are indexed numerically in the order they are
  defined, and sorting will be performed in this numeric
  order. We suggest not using ENUM to store numerals, as there
  is little to no storage space benefit, and it is easy to
  confuse the enum integer with the enum numeral value by
  leaving out the quotes.
   
  An ENUM defined as ENUM('apple','orange','pear') would
  have the following index values:
   
  Index | Value | 
   
  NULL | NULL | 
   
  0 | '' | 
   
  1 | 'apple' | 
   
  2 | 'orange' | 
   
  3 | 'pear' | 
   
  Examples
  -------- 
  CREATE TABLE fruits (
   id INT NOT NULL auto_increment PRIMARY KEY,
   fruit ENUM('apple','orange','pear'),
   bushels INT);
   
  DESCRIBE fruits;
   
  +---------+-------------------------------+------+-----+---------+----------------+
  | Field | Type | Null | Key | Default | Extra |
  +---------+-------------------------------+------+-----+---------+----------------+
  | id | int(11) | NO | PRI | NULL | auto_increment |
  | fruit | enum('apple','orange','pear') | YES | | NULL
  | |
  | bushels | int(11) | YES | | NULL | |
  +---------+-------------------------------+------+-----+---------+----------------+
   
  INSERT INTO fruits
   (fruit,bushels) VALUES
   ('pear',20),
   ('apple',100),
   ('orange',25);
   
  INSERT INTO fruits
   (fruit,bushels) VALUES
   ('avocado',10);
  ERROR 1265 (01000): Data truncated for column 'fruit' at
  row 1
   
  SELECT * FROM fruits;
   
  +----+--------+---------+
  | id | fruit | bushels |
  +----+--------+---------+
  | 1 | pear | 20 |
  | 2 | apple | 100 |
  | 3 | orange | 25 |
  +----+--------+---------+
   
  Selecting by numeric index:
   
  SELECT * FROM fruits WHERE fruit=2;
   
  +----+--------+---------+
  | id | fruit | bushels |
  +----+--------+---------+
  | 3 | orange | 25 |
  +----+--------+---------+
   
  Sorting is according to the index value:
   
  CREATE TABLE enums (a ENUM('2','1'));
   
  INSERT INTO enums VALUES ('1'),('2');
   
  SELECT * FROM enums ORDER BY a ASC;
   
  +------+
  | a |
  +------+
  | 2 |
  | 1 |
  +------+
   
  It's easy to get confused between returning the enum
  integer with the stored value, so we don't suggest using
  ENUM to store numerals. The first example returns the 1st
  indexed field ('2' has an index value of 1, as it's
  defined first), while the second example returns the string
  value '1'.
   
  SELECT * FROM enums WHERE a=1;
   
  +------+
  | a |
  +------+
  | 2 |
  +------+
   
  SELECT * FROM enums WHERE a='1';
   
  +------+
  | a |
  +------+
  | 1 |
  +------+
   


  URL: https://mariadb.com/kb/en/library/enum/dzfxuxENUMdzfxuxhttps://mariadb.com/kb/en/library/enum/dzfxuxdzfxux22dzfxux276qjzxqqvvbqA synonym for ST_LineFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_linestringfromwkb/dzfxuxST_LineStringFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_linestringfromwkb/dzfxuxdzfxux32dzfxux550qjzxqqvvbqSyntax
  ------ 
  ST_PointFromWKB(wkb[,srid])
  PointFromWKB(wkb[,srid])
   
  Description
  ----------- 
  Constructs a POINT value using its WKB representation and
  SRID.
   
  ST_PointFromWKB() and PointFromWKB() are synonyms.
   
  Examples
  -------- 
  SET @g = ST_AsBinary(ST_PointFromText('POINT(0 4)'));
   
  SELECT ST_AsText(ST_PointFromWKB(@g)) AS p;
   
  +------------+
  | p |
  +------------+
  | POINT(0 4) |
  +------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_pointfromwkb/dzfxuxST_PointFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_pointfromwkb/dzfxuxdzfxux32dzfxux551qjzxqqvvbqSyntax
  ------ 
  ST_PolyFromWKB(wkb[,srid])
  ST_PolygonFromWKB(wkb[,srid])
  PolyFromWKB(wkb[,srid])
  PolygonFromWKB(wkb[,srid])
   
  Description
  ----------- 
  Constructs a POLYGON value using its WKB representation and
  SRID.
   
  ST_PolyFromWKB(), ST_PolygonFromWKB(), PolyFromWKB() and
  PolygonFromWKB() are synonyms.
   
  Examples
  -------- 
  SET @g = ST_AsBinary(ST_PolyFromText('POLYGON((1 1,1 5,4
  9,6 9,9 3,7 2,1 1))'));
   
  SELECT ST_AsText(ST_PolyFromWKB(@g)) AS p;
   
  +----------------------------------------+
  | p |
  +----------------------------------------+
  | POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |
  +----------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_polyfromwkb/dzfxuxST_PolyFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_polyfromwkb/dzfxuxdzfxux32dzfxux552qjzxqqvvbqA synonym for ST_PolyFromWKB.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_polygonfromwkb/dzfxuxST_PolygonFromWKBdzfxuxhttps://mariadb.com/kb/en/library/st_polygonfromwkb/dzfxuxdzfxux32dzfxux553qjzxqqvvbqSyntax
  ------ 
  DOUBLE[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]
  DOUBLE PRECISION[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]
  REAL[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A normal-size (double-precision) floating-point number (see
  FLOAT for a single-precision floating-point number).
   
  Allowable values are:
  -1.7976931348623157E+308 to -2.2250738585072014E-308
  0
  2.2250738585072014E-308 to 1.7976931348623157E+308
   
  These are the theoretical limits, based on the IEEE
  standard. The actual range
  might be slightly smaller depending on your hardware or
  operating system.
   
  M is the total number of digits and D is the number of
  digits
  following the decimal point. If M and D are omitted, values
  are stored
  to the limits allowed by the hardware. A double-precision
  floating-point number is accurate to approximately 15
  decimal places.
   
  UNSIGNED, if specified, disallows negative values.
   
  ZEROFILL, if specified, pads the number with zeros, up to
  the total number
  of digits specified by M.
   
  REAL and DOUBLE PRECISION are synonyms, unless the
  REAL_AS_FLOAT SQL mode is enabled, in which case REAL is a
  synonym for FLOAT rather than DOUBLE.
   
  See Floating Point Accuracy for issues when using
  floating-point numbers.
   
  For more details on the attributes, see Numeric Data Type
  Overview.
   
  Examples
  -------- 
  CREATE TABLE t1 (d DOUBLE(5,0) zerofill);
   
  INSERT INTO t1 VALUES (1),(2),(3),(4);
   
  SELECT * FROM t1;
   
  +-------+
  | d |
  +-------+
  | 00001 |
  | 00002 |
  | 00003 |
  | 00004 |
  +-------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/double/dzfxuxDOUBLEdzfxuxhttps://mariadb.com/kb/en/library/double/dzfxuxdzfxux22dzfxux277qjzxqqvvbqSyntax
  ------ 
  FLOAT[(M,D)] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A small (single-precision) floating-point number (see DOUBLE
  for a regular-size floating point number). Allowable values
  are:
  -3.402823466E+38 to -1.175494351E-38
  0
  1.175494351E-38 to 3.402823466E+38. 
   
  These are the theoretical limits, based on the IEEE 
  standard. The actual range might be slightly smaller
  depending on your
  hardware or operating system.
   
  M is the total number of digits and D is the number of
  digits
  following the decimal point. If M and D are omitted, values
  are stored
  to the limits allowed by the hardware. A single-precision
  floating-point number is accurate to approximately 7 decimal
  places.
   
  UNSIGNED, if specified, disallows negative values.
   
  Using FLOAT might give you some unexpected problems because
  all
  calculations in MariaDB are done with double precision. See
  Floating Point Accuracy.
   
  For more details on the attributes, see Numeric Data Type
  Overview.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/float/dzfxuxFLOATdzfxuxhttps://mariadb.com/kb/en/library/float/dzfxuxdzfxux22dzfxux278qjzxqqvvbqThe JSON alias was added in MariaDB 10.2.7. This was done to
  make it possible to use JSON columns in statement based
  replication from MySQL to MariaDB and to make it possible
  for MariaDB to read mysqldumps from MySQL.
   
  JSON is an alias for LONGTEXT introduced for compatibility
  reasons with MySQL's JSON data type. MariaDB implements
  this as a LONGTEXT rather, as the JSON data type contradicts
  the SQL standard, and MariaDB's benchmarks indicate that
  performance is at least equivalent.
   
  In order to ensure that a a valid json document is inserted,
  the JSON_VALID function can be used as a CHECK constraint.
  This constraint is automatically included for types using
  the JSON alias from MariaDB 10.4.3.
   
  Examples
  -------- 
  CREATE TABLE t (j JSON);
   
  DESC t;
  +-------+----------+------+-----+---------+-------+
  | Field | Type | Null | Key | Default | Extra |
  +-------+----------+------+-----+---------+-------+
  | j | longtext | YES | | NULL | |
  +-------+----------+------+-----+---------+-------+
   
  With validation:
   
  CREATE TABLE t2 (
   j JSON 
   CHECK (JSON_VALID(j))
  );
   
  INSERT INTO t2 VALUES ('invalid');
  ERROR 4025 (23000): CONSTRAINT `j` failed for `test`.`t2`
   
  INSERT INTO t2 VALUES ('{"id": 1, "name":
  "Monty"}');
  Query OK, 1 row affected (0.13 sec)
   
  Replicating JSON Data Between MySQL and MariaDB
   
  The JSON type in MySQL stores the JSON object in a compact
  form, not as LONGTEXT as in MariaDB.
  This means that row based replication will not work for JSON
  types from MySQL to MariaDB.
   
  There are a a few different ways to solve this:
  Use statement based replication.
  Change the JSON column to type TEXT in MySQL
   
  Converting a MySQL TABLE with JSON Fields to MariaDB
   
  MariaDB can't directly access MySQL JSON format.
   
  There is a a few different ways to move the table to
  MariaDB:
  Change the JSON column to type TEXT in MySQL. After this
  MariaDB can directly use the table without any need for a
  dump and restore.
  Use mysqldump to copy the table.
   
  Differences Between MySQL JSON Strings and MariaDB JSON
  Strings
   
  In MySQL, JSON is an object and is compared according to
  json values. In MariaDB JSON strings are normal strings and
  compared as strings. One exception is when using
  JSON_EXTRACT() in which case strings are unescaped before
  comparison.
   


  URL: https://mariadb.com/kb/en/library/json-data-type/dzfxuxJSON Data Typedzfxuxhttps://mariadb.com/kb/en/library/json-data-type/dzfxuxdzfxux22dzfxux280qjzxqqvvbqA synonym for ST_BOUNDARY.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-boundary/dzfxuxBOUNDARYdzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-boundary/dzfxuxdzfxux36dzfxux554qjzxqqvvbqA synonym for ST_DIMENSION.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/dimension/dzfxuxDIMENSIONdzfxuxhttps://mariadb.com/kb/en/library/dimension/dzfxuxdzfxux36dzfxux555qjzxqqvvbqA synonym for ST_ENVELOPE.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-envelope/dzfxuxENVELOPEdzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-envelope/dzfxuxdzfxux36dzfxux556qjzxqqvvbqA synonym for ST_GeometryN.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-geometryn/dzfxuxGeometryNdzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-geometryn/dzfxuxdzfxux36dzfxux557qjzxqqvvbqA synonym for ST_GeometryType.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-geometrytype/dzfxuxGeometryTypedzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-geometrytype/dzfxuxdzfxux36dzfxux558qjzxqqvvbqA synonym for ST_IsClosed.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/isclosed/dzfxuxIsCloseddzfxuxhttps://mariadb.com/kb/en/library/isclosed/dzfxuxdzfxux36dzfxux559qjzxqqvvbqA synonym for ST_IsEmpty.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-isempty/dzfxuxIsEmptydzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-isempty/dzfxuxdzfxux36dzfxux560qjzxqqvvbqA synonym for ST_IsRing.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/isring/dzfxuxIsRingdzfxuxhttps://mariadb.com/kb/en/library/isring/dzfxuxdzfxux36dzfxux561qjzxqqvvbqA synonym for ST_IsSImple.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-issimple/dzfxuxIsSimpledzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-issimple/dzfxuxdzfxux36dzfxux562qjzxqqvvbqA synonym for ST_NumGeometries.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-numgeometries/dzfxuxNumGeometriesdzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-numgeometries/dzfxuxdzfxux36dzfxux563qjzxqqvvbqA synonym for ST_SRID.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/geometry-properties-srid/dzfxuxSRIDdzfxuxhttps://mariadb.com/kb/en/library/geometry-properties-srid/dzfxuxdzfxux36dzfxux564qjzxqqvvbqSyntax
  ------ 
  ST_Dimension(g)
  Dimension(g)
   
  Description
  ----------- 
  Returns the inherent dimension of the geometry value g. The
  result can
  be
   
  Dimension | Definition | 
   
   -1 | empty geometry | 
   
   0 | geometry with no length or area | 
   
   1 | geometry with no area but nonzero length | 
   
   2 | geometry with nonzero area | 
   
  ST_Dimension() and Dimension() are synonyms.
   
  Examples
  -------- 
  SELECT Dimension(GeomFromText('LineString(1 1,2 2)'));
  +------------------------------------------------+
  | Dimension(GeomFromText('LineString(1 1,2 2)')) |
  +------------------------------------------------+
  | 1 |
  +------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_dimension/dzfxuxST_DIMENSIONdzfxuxhttps://mariadb.com/kb/en/library/st_dimension/dzfxuxdzfxux36dzfxux566qjzxqqvvbqDescription
  ----------- 
  MariaDB provides a standard way of creating spatial columns
  for geometry types,
  for example, with CREATE TABLE or ALTER TABLE.
  Currently, spatial columns are supported for MyISAM, InnoDB,
  NDB, and ARCHIVE
  tables. See also SPATIAL INDEX.
   
  The basic geometry type is GEOMETRY. But the type can be
  more specific. The following types are supported:
   
  Geometry Types | 
   
  POINT | 
   
  LINESTRING | 
   
  POLYGON | 
   
  MULTIPOINT | 
   
  MULTILINESTRING | 
   
  MULTIPOLYGON | 
   
  GEOMETRYCOLLECTION | 
   
  GEOMETRY | 
   
  Examples
  -------- 
  Note: For clarity, only one type is listed per table in the
  examples below, but a table
  row can contain multiple types. For example:
   
  CREATE TABLE object (shapeA POLYGON, shapeB LINESTRING);
   
  POINT
   
  CREATE TABLE gis_point (g POINT);
  SHOW FIELDS FROM gis_point;
   
  INSERT INTO gis_point VALUES
   (PointFromText('POINT(10 10)')),
   (PointFromText('POINT(20 10)')),
   (PointFromText('POINT(20 20)')),
   (PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
   
  LINESTRING
   
  CREATE TABLE gis_line (g LINESTRING);
  SHOW FIELDS FROM gis_line;
   
  INSERT INTO gis_line VALUES
   (LineFromText('LINESTRING(0 0,0 10,10 0)')),
   (LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10
  10)')),
   (LineStringFromWKB(AsWKB(LineString(Point(10, 10),
  Point(40, 10)))));
   
  POLYGON
   
  CREATE TABLE gis_polygon (g POLYGON);
  SHOW FIELDS FROM gis_polygon;
   
  INSERT INTO gis_polygon VALUES
   (PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10
  10))')),
   (PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10
  10,20 10,20 20,10 20,10 10))')),
   (PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0),
  Point(30, 0), Point(30, 30), Point(0, 0))))));
   
  MULTIPOINT
   
  CREATE TABLE gis_multi_point (g MULTIPOINT);
  SHOW FIELDS FROM gis_multi_point;
   
  INSERT INTO gis_multi_point VALUES
   (MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20
  20)')),
   (MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
   (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4,
  10)))));
   
  MULTILINESTRING
   
  CREATE TABLE gis_multi_line (g MULTILINESTRING);
  SHOW FIELDS FROM gis_multi_line;
   
  INSERT INTO gis_multi_line VALUES
   (MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10
  0),(16 0,16 23,16 48))')),
   (MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
   (MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2),
  Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21,
  7))))));
   
  MULTIPOLYGON
   
  CREATE TABLE gis_multi_polygon (g MULTIPOLYGON);
  SHOW FIELDS FROM gis_multi_polygon;
   
  INSERT INTO gis_multi_polygon VALUES
   (MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84
  42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67
  13,59 13,59 18)))')),
   (MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28
  26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59
  13,59 18)))')),
   (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,
  3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
   
  GEOMETRYCOLLECTION
   
  CREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);
  SHOW FIELDS FROM gis_geometrycollection;
   
  INSERT INTO gis_geometrycollection VALUES
   (GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0),
  LINESTRING(0 0,10 10))')),
   (GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6),
  LineString(Point(3, 6), Point(7, 9)))))),
   (GeomFromText('GeometryCollection()')),
   (GeomFromText('GeometryCollection EMPTY'));
   
  GEOMETRY
   
  CREATE TABLE gis_geometry (g GEOMETRY);
  SHOW FIELDS FROM gis_geometry;
   
  INSERT into gis_geometry SELECT * FROM gis_point;
   
  INSERT into gis_geometry SELECT * FROM gis_line;
   
  INSERT into gis_geometry SELECT * FROM gis_polygon;
   
  INSERT into gis_geometry SELECT * FROM gis_multi_point;
   
  INSERT into gis_geometry SELECT * FROM gis_multi_line;
   
  INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
   
  INSERT into gis_geometry SELECT * FROM
  gis_geometrycollection;
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/geometry-types/dzfxuxGeometry Typesdzfxuxhttps://mariadb.com/kb/en/library/geometry-types/dzfxuxdzfxux22dzfxux279qjzxqqvvbqSyntax
  ------ 
  LONGTEXT [CHARACTER SET charset_name] [COLLATE
  collation_name]
   
  Description
  ----------- 
  A TEXT column with a maximum length of 4,294,967,295 or 4GB
  (232 - 1) characters. The effective maximum length is less
  if the value contains multi-byte characters. The effective
  maximum length of LONGTEXT columns also depends on the
  configured maximum packet size in the client/server protocol
  and available memory. Each LONGTEXT value is stored using a
  four-byte length prefix that indicates the number of bytes
  in the value.
   
  From MariaDB 10.2.7, JSON is an alias for LONGTEXT. See JSON
  Data Type for details.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, CLOB is a synonym for
  LONGTEXT.
   


  URL: https://mariadb.com/kb/en/library/longtext/dzfxuxLONGTEXTdzfxuxhttps://mariadb.com/kb/en/library/longtext/dzfxuxdzfxux22dzfxux282qjzxqqvvbqSyntax
  ------ 
  MEDIUMINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A medium-sized integer. The signed range is -8388608 to
  8388607. The
  unsigned range is 0 to 16777215.
   
  ZEROFILL pads the integer with zeroes and assumes UNSIGNED
  (even if UNSIGNED is not specified).
   
  For details on the attributes, see Numeric Data Type
  Overview.
   
  Examples
  -------- 
  CREATE TABLE mediumints (a MEDIUMINT,b MEDIUMINT UNSIGNED,c
  MEDIUMINT ZEROFILL);
   
  DESCRIBE mediumints;
  +-------+--------------------------------+------+-----+---------+-------+
  | Field | Type | Null | Key | Default | Extra |
  +-------+--------------------------------+------+-----+---------+-------+
  | a | mediumint(9) | YES | | NULL | |
  | b | mediumint(8) unsigned | YES | | NULL | |
  | c | mediumint(8) unsigned zerofill | YES | | NULL | |
  +-------+--------------------------------+------+-----+---------+-------+
   
  INSERT INTO mediumints VALUES (-10,-10,-10);
  Query OK, 1 row affected, 2 warnings (0.05 sec)
  Warning (Code 1264): Out of range value for column 'b' at
  row 1
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO mediumints VALUES (-10,10,-10);
  Query OK, 1 row affected, 1 warning (0.08 sec)
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO mediumints VALUES (-10,10,10);
   
  INSERT INTO mediumints VALUES (8388608,8388608,8388608);
  Query OK, 1 row affected, 1 warning (0.05 sec)
  Warning (Code 1264): Out of range value for column 'a' at
  row 1
   
  INSERT INTO mediumints VALUES (8388607,8388608,8388608);
   
  SELECT * FROM mediumints;
  +---------+---------+----------+
  | a | b | c |
  +---------+---------+----------+
  | -10 | 0 | 00000000 |
  | -10 | 0 | 00000000 |
  | -10 | 10 | 00000000 |
  | -10 | 10 | 00000010 |
  | 8388607 | 8388608 | 08388608 |
  | 8388607 | 8388608 | 08388608 |
  +---------+---------+----------+
   


  URL: https://mariadb.com/kb/en/library/mediumint/dzfxuxMEDIUMINTdzfxuxhttps://mariadb.com/kb/en/library/mediumint/dzfxuxdzfxux22dzfxux284qjzxqqvvbqSyntax
  ------ 
  ST_GeometryN(gc,N)
  GeometryN(gc,N)
   
  Description
  ----------- 
  Returns the N-th geometry in the GeometryCollection gc.
  Geometries are numbered beginning with 1.
   
  ST_GeometryN() and GeometryN() are synonyms.
   
  Example
   
  SET @gc = 'GeometryCollection(Point(1 1),LineString(12 14,
  9 11))';
   
  SELECT AsText(GeometryN(GeomFromText(@gc),1));
  +----------------------------------------+
  | AsText(GeometryN(GeomFromText(@gc),1)) |
  +----------------------------------------+
  | POINT(1 1) |
  +----------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geometryn/dzfxuxST_GEOMETRYNdzfxuxhttps://mariadb.com/kb/en/library/st_geometryn/dzfxuxdzfxux36dzfxux568qjzxqqvvbqThere are a number of numeric data types:
  TINYINT
  BOOLEAN - Synonym for TINYINT(1)
  SMALLINT
  MEDIUMINT
  INT, INTEGER
  BIGINT
  DECIMAL, DEC, NUMERIC, FIXED
  FLOAT
  DOUBLE, DOUBLE PRECISION, REAL
  BIT
   
  See the specific articles for detailed information on each.
   
  SIGNED, UNSIGNED and ZEROFILL
   
  Most numeric types can be defined as SIGNED, UNSIGNED or
  ZEROFILL, for example:
   
  TINYINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]
   
  If SIGNED, or no attribute, is specified, a portion of the
  numeric type will be reserved for the sign (plus or minus).
  For example, a TINYINT SIGNED can range from -128 to 127. 
   
  If UNSIGNED is specified, no portion of the numeric type is
  reserved for the sign, so for integer types range can be
  larger. For example, a TINYINT UNSIGNED can range from 0 to
  255. Floating point and fixed-point types also can be
  UNSIGNED, but this only prevents negative values from being
  stored and doesn't alter the range. 
   
  If ZEROFILL is specified, the column will be set to UNSIGNED
  and the spaces used by default to pad the field are replaced
  with zeros. ZEROFILL is ignored in expressions or as part of
  a UNION. ZEROFILL is a non-standard MySQL and MariaDB
  enhancement.
   
  Note that although the preferred syntax indicates that the
  attributes are exclusive, more than one attribute can be
  specified.
   
  Until MariaDB 10.2.7 (MDEV-8659), any combination of the
  attributes could be used in any order, with duplicates. In
  this case:
  the presence of ZEROFILL makes the column UNSIGNED ZEROFILL.
  the presence of UNSIGNED makes the column UNSIGNED.
   
  From MariaDB 10.2.8, only the following combinations are
  supported:
  SIGNED
  UNSIGNED
  ZEROFILL
  UNSIGNED ZEROFILL
  ZEROFILL UNSIGNED
   
  The latter two should be replaced with simply ZEROFILL, but
  are still accepted by the parser.
   
  Examples
  -------- 
  CREATE TABLE zf (
   i1 TINYINT SIGNED,
   i2 TINYINT UNSIGNED,
   i3 TINYINT ZEROFILL
  );
   
  INSERT INTO zf VALUES (2,2,2);
   
  SELECT * FROM zf;
   
  +------+------+------+
  | i1 | i2 | i3 |
  +------+------+------+
  | 2 | 2 | 002 |
  +------+------+------+
   
  Range
   
  When attempting to add a value that is out of the valid
  range for the numeric type, MariaDB will react depending on
  the strict SQL_MODE setting.
   
  If strict_mode has been set (the default from MariaDB
  10.2.4), MariaDB will return an error.
   
  If strict_mode has not been set (the default until MariaDB
  10.2.3), MariaDB will adjust the number to fit in the field,
  returning a warning.
   
  Examples
  -------- 
  With strict_mode set:
   
  SHOW VARIABLES LIKE 'sql_mode';
   
  +---------------+-------------------------------------------------------------------------------------------+
  | Variable_name | Value |
  +---------------+-------------------------------------------------------------------------------------------+
  | sql_mode |
  STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  |
  +---------------+-------------------------------------------------------------------------------------------+
   
  CREATE TABLE ranges (i1 TINYINT, i2 SMALLINT, i3 TINYINT
  UNSIGNED);
   
  INSERT INTO ranges VALUES (257,257,257);
  ERROR 1264 (22003): Out of range value for column 'i1' at
  row 1
   
  SELECT * FROM ranges;
   
  Empty set (0.10 sec)
   
  With strict_mode unset:
   
  SHOW VARIABLES LIKE 'sql_mode%';
   
  +---------------+-------+
  | Variable_name | Value |
  +---------------+-------+
  | sql_mode | |
  +---------------+-------+
   
  CREATE TABLE ranges (i1 TINYINT, i2 SMALLINT, i3 TINYINT
  UNSIGNED);
   
  INSERT INTO ranges VALUES (257,257,257);
  Query OK, 1 row affected, 2 warnings (0.00 sec)
   
  SHOW WARNINGS;
   
  +---------+------+---------------------------------------------+
  | Level | Code | Message |
  +---------+------+---------------------------------------------+
  | Warning | 1264 | Out of range value for column 'i1' at
  row 1 |
  | Warning | 1264 | Out of range value for column 'i3' at
  row 1 |
  +---------+------+---------------------------------------------+
  2 rows in set (0.00 sec)
   
  SELECT * FROM ranges;
   
  +------+------+------+
  | i1 | i2 | i3 |
  +------+------+------+
  | 127 | 257 | 255 |
  +------+------+------+
   
  Auto_increment
   
  The AUTO_INCREMENT attribute can be used to generate a
  unique identity for new rows. For more details, see
  auto_increment.
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/numeric-data-type-overview/dzfxuxNumeric Data Type Overviewdzfxuxhttps://mariadb.com/kb/en/library/numeric-data-type-overview/dzfxuxdzfxux22dzfxux286qjzxqqvvbqSyntax
  ------ 
  SMALLINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A small integer. The signed range is -32768 to 32767. The
  unsigned range is 0 to 65535.
   
  If a column has been set to ZEROFILL, all values will be
  prepended by zeros so that the SMALLINT value contains a
  number of M digits.
   
  Note: If the ZEROFILL attribute has been specified, the
  column will automatically become UNSIGNED.
   
  For more details on the attributes, see Numeric Data Type
  Overview.
   
  Examples
  -------- 
  CREATE TABLE smallints (a SMALLINT,b SMALLINT UNSIGNED,c
  SMALLINT ZEROFILL);
   
  INSERT INTO smallints VALUES (-10,-10,-10);
  Query OK, 1 row affected, 2 warnings (0.09 sec)
  Warning (Code 1264): Out of range value for column 'b' at
  row 1
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO smallints VALUES (-10,10,-10);
  Query OK, 1 row affected, 1 warning (0.08 sec)
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO smallints VALUES (-10,10,10);
   
  INSERT INTO smallints VALUES (32768,32768,32768);
  Query OK, 1 row affected, 1 warning (0.04 sec)
  Warning (Code 1264): Out of range value for column 'a' at
  row 1
   
  INSERT INTO smallints VALUES (32767,32768,32768);
   
  SELECT * FROM smallints;
  +-------+-------+-------+
  | a | b | c |
  +-------+-------+-------+
  | -10 | 0 | 00000 |
  | -10 | 10 | 00000 |
  | -10 | 10 | 00010 |
  | 32767 | 32768 | 32768 |
  | 32767 | 32768 | 32768 |
  +-------+-------+-------+
   


  URL: https://mariadb.com/kb/en/library/smallint/dzfxuxSMALLINTdzfxuxhttps://mariadb.com/kb/en/library/smallint/dzfxuxdzfxux22dzfxux289qjzxqqvvbqSyntax
  ------ 
  ST_GeometryType(g)
  GeometryType(g)
   
  Description
  ----------- 
  Returns as a string the name of the geometry type of which
  the
  geometry instance g is a member. The name corresponds to one
  of the
  instantiable Geometry subclasses.
   
  ST_GeometryType() and GeometryType() are synonyms.
   
  Examples
  -------- 
  SELECT GeometryType(GeomFromText('POINT(1 1)'));
  +------------------------------------------+
  | GeometryType(GeomFromText('POINT(1 1)')) |
  +------------------------------------------+
  | POINT |
  +------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_geometrytype/dzfxuxST_GEOMETRYTYPEdzfxuxhttps://mariadb.com/kb/en/library/st_geometrytype/dzfxuxdzfxux36dzfxux569qjzxqqvvbqSyntax
  ------ 
  ST_IsEmpty(g)
  IsEmpty(g)
   
  Description
  ----------- 
  IsEmpty is a function defined by the OpenGIS specification,
  but is not fully implemented by MariaDB or MySQL. 
   
  Since MariaDB and MySQL do not support GIS EMPTY values such
  as POINT EMPTY, as implemented it simply returns 1 if the
  geometry value g is invalid, 0 if it is valid, and NULL if
  the argument is NULL.
   
  ST_IsEmpty() and IsEmpty() are synonyms.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_isempty/dzfxuxST_ISEMPTYdzfxuxhttps://mariadb.com/kb/en/library/st_isempty/dzfxuxdzfxux36dzfxux571qjzxqqvvbqThe ST_IsRing function was introduced in MariaDB 10.1.2
   
  Syntax
  ------ 
  ST_IsRing(g)
  IsRing(g)
   
  Description
  ----------- 
  Returns true if a given LINESTRING is a ring, that is, both
  ST_IsClosed and ST_IsSimple. A simple curve does not pass
  through the same point more than once. However, see
  MDEV-7510.
   
  St_IsRing() and IsRing() are synonyms.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_isring/dzfxuxST_IsRingdzfxuxhttps://mariadb.com/kb/en/library/st_isring/dzfxuxdzfxux36dzfxux572qjzxqqvvbqStrings are sequences of characters and are enclosed with
  quotes.
   
  The syntax is:
   
  [_charset_name]'string' [COLLATE collation_name]
   
  For example:
   
  'The MariaDB Foundation'
  _utf8 'Foundation' COLLATE utf8_unicode_ci;
   
  Strings can either be enclosed in single quotes or in double
  quotes (the same character must be used to both open and
  close the string).
   
  The ANSI SQL-standard does not permit double quotes for
  enclosing strings, and although MariaDB does by default, if
  the MariaDB server has enabled the ANSI_QUOTES_SQL SQL_MODE,
  double quotes will be treated as being used for identifiers
  instead of strings.
   
  Strings that are next to each other are automatically
  concatenated. For example:
   
  'The ' 'MariaDB ' 'Foundation'
   
  and
   
  'The MariaDB Foundation'
   
  are equivalent.
   
  The \ (backslash character) is used to escape characters.
  For example:
   
  'MariaDB's new features'
   
  is not a valid string because of the single quote in the
  middle of the string, which is treated as if it closes the
  string, but is actually meant as part of the string, an
  apostrophe. The backslash character helps in situations like
  this:
   
  'MariaDB\'s new features'
   
  is now a valid string, and if displayed, will appear without
  the backslash.
   
  SELECT 'MariaDB\'s new features';
  +------------------------+
  | MariaDB's new features |
  +------------------------+
  | MariaDB's new features |
  +------------------------+
   
  Another way to escape the quoting character is repeating it
  twice:
   
  SELECT 'I''m here', """Double""";
  +----------+----------+
  | I'm here | "Double" |
  +----------+----------+
  | I'm here | "Double" |
  +----------+----------+
   
  Escape sequences
   
  There are other escape sequences also. Here is a full list:
   
  Escape sequence | Character | 
   
  \0 | ASCII NUL (0x00). | 
   
  \' | Single quote (“'”). | 
   
  \" | Double quote (“"”). | 
   
  \b | Backspace. | 
   
  \n | Newline, or linefeed,. | 
   
  \r | Carriage return. | 
   
  \t | Tab. | 
   
  \Z | ASCII 26 (Control+Z). See note following the table. | 
   
  \\ | Backslash (“\”). | 
   
  \% | “%” character. See note following the table. | 
   
  \_ | A “_” character. See note following the table. | 
   
  Escaping the % and _ characters can be necessary when using
  the LIKE operator, which treats them as special characters.
   
  The ASCII 26 character (\Z) needs to be escaped when
  included in a batch file which needs to be executed in
  Windows. The reason is that ASCII 26, in Windows, is the end
  of file (EOF).
   
  Backslash (\), if not used as an escape character, must
  always be escaped. When followed by a character that is not
  in the above table, backslashes will simply be ignored.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/string-literals/dzfxuxString Literalsdzfxuxhttps://mariadb.com/kb/en/library/string-literals/dzfxuxdzfxux22dzfxux290qjzxqqvvbqSyntax
  ------ 
  TEXT[(M)] [CHARACTER SET charset_name] [COLLATE
  collation_name]
   
  Description
  ----------- 
  A TEXT column with a maximum length of 65,535 (216 - 1)
  characters. The effective maximum length is less if the
  value contains
  multi-byte characters. Each TEXT value is stored using a
  two-byte length
  prefix that indicates the number of bytes in the value. If
  you need a bigger storage, consider using MEDIUMTEXT
  instead.
   
  An optional length M can be given for this type. If this is
  done, MariaDB
  creates the column as the smallest TEXT type large enough to
  hold values
  M characters long.
   
  Before MariaDB 10.2, all MariaDB collations were of type
  PADSPACE, meaning that TEXT (as well as VARCHAR and CHAR
  values) are compared without regard for trailing spaces.
  This does not apply to the LIKE pattern-matching operator,
  which takes into account trailing spaces.
   
  Before MariaDB 10.2.1, BLOB and TEXT columns could not be
  assigned a DEFAULT value. This restriction was lifted in
  MariaDB 10.2.1.
   
  Examples
  -------- 
  Trailing spaces:
   
  CREATE TABLE strtest (d TEXT(10));
  INSERT INTO strtest VALUES('Maria ');
   
  SELECT d='Maria',d='Maria ' FROM strtest;
  +-----------+--------------+
  | d='Maria' | d='Maria ' |
  +-----------+--------------+
  | 1 | 1 |
  +-----------+--------------+
   
  SELECT d LIKE 'Maria',d LIKE 'Maria ' FROM strtest;
  +----------------+-------------------+
  | d LIKE 'Maria' | d LIKE 'Maria ' |
  +----------------+-------------------+
  | 0 | 1 |
  +----------------+-------------------+
   
  Difference between VARCHAR and TEXT
   
  VARCHAR columns can be fully indexed. TEXT columns can only
  be indexed over a specified length.
  Using TEXT or BLOB in a SELECT query that uses temporary
  tables for storing intermediate results will force the
  temporary table to be disk based (using the Aria storage
  engine instead of the memory storage engine, which is a bit
  slower. This is not that bad as the Aria storage engine
  caches the rows in memory. To get the benefit of this, one
  should ensure that the aria_pagecache_buffer_size variable
  is big enough to hold most of the row and index data for
  temporary tables.
   
  For Storage Engine Developers
   
  Internally the full length of the VARCHAR column is
  allocated inside each TABLE objects record[] structure. As
  there are three such buffers, each open table will allocate
  3 times max-length-to-store-varchar bytes of memory.
  TEXT and BLOB columns are stored with a pointer (4 or 8
  bytes) + a 1-4 bytes length. The TEXT data is only stored
  once. This means that internally TEXT uses less memory for
  each open table but instead has the additional overhead that
  each TEXT object needs to be allocated and freed for each
  row access (with some caching in between).
   


  URL: https://mariadb.com/kb/en/library/text/dzfxuxTEXTdzfxuxhttps://mariadb.com/kb/en/library/text/dzfxuxdzfxux22dzfxux291qjzxqqvvbqSyntax
  ------ 
  ST_IsSimple(g)
  IsSimple(g)
   
  Description
  ----------- 
  Returns true if the given Geometry has no anomalous
  geometric points, false if it does, or NULL if given a NULL
  value.
   
  ST_IsSimple() and IsSimple() are synonyms.
   
  Examples
  -------- 
  A POINT is always simple.
   
  SET @g = 'Point(1 2)';
   
  SELECT ST_ISSIMPLE(GEOMFROMTEXT(@g));
  +-------------------------------+
  | ST_ISSIMPLE(GEOMFROMTEXT(@g)) |
  +-------------------------------+
  | 1 |
  +-------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_issimple/dzfxuxST_IsSimpledzfxuxhttps://mariadb.com/kb/en/library/st_issimple/dzfxuxdzfxux36dzfxux573qjzxqqvvbqSyntax
  ------ 
  ST_NumGeometries(gc)
  NumGeometries(gc)
   
  Description
  ----------- 
  Returns the number of geometries in the GeometryCollection
  gc.
   
  ST_NumGeometries() and NumGeometries() are synonyms.
   
  Example
   
  SET @gc = 'GeometryCollection(Point(1 1),LineString(2 2, 3
  3))';
   
  SELECT NUMGEOMETRIES(GeomFromText(@gc));
  +----------------------------------+
  | NUMGEOMETRIES(GeomFromText(@gc)) |
  +----------------------------------+
  | 2 |
  +----------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_numgeometries/dzfxuxST_NUMGEOMETRIESdzfxuxhttps://mariadb.com/kb/en/library/st_numgeometries/dzfxuxdzfxux36dzfxux574qjzxqqvvbqThe ST_RELATE() function was introduced in MariaDB 10.1.2
   
  Syntax
  ------ 
  ST_Relate(g1, g2, i)
   
  Description
  ----------- 
  Returns true if Geometry g1 is spatially related to
  Geometryg2 by testing for intersections between the
  interior, boundary and exterior of the two geometries as
  specified by the values in intersection matrix pattern i.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_relate/dzfxuxST_RELATEdzfxuxhttps://mariadb.com/kb/en/library/st_relate/dzfxuxdzfxux36dzfxux575qjzxqqvvbqSyntax
  ------ 
  ST_SRID(g)
  SRID(g)
   
  Description
  ----------- 
  Returns an integer indicating the Spatial Reference System
  ID for the
  geometry value g.
   
  In MariaDB, the SRID value is just an integer associated
  with the
  geometry value. All calculations are done assuming Euclidean
  (planar)
  geometry.
   
  ST_SRID() and SRID() are synonyms.
   
  Examples
  -------- 
  SELECT SRID(GeomFromText('LineString(1 1,2 2)',101));
  +-----------------------------------------------+
  | SRID(GeomFromText('LineString(1 1,2 2)',101)) |
  +-----------------------------------------------+
  | 101 |
  +-----------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_srid/dzfxuxST_SRIDdzfxuxhttps://mariadb.com/kb/en/library/st_srid/dzfxuxdzfxux36dzfxux576qjzxqqvvbqSyntax
  ------ 
  TIME [()]
   
  Description
  ----------- 
  A time. The range is '-838:59:59.999999' to
  '838:59:59.999999'. Microsecond precision can be from 0-6;
  if not specified 0 is used. Microseconds have been available
  since MariaDB 5.3. 
   
  MariaDB displays TIME values in 'HH:MM:SS.ssssss' format,
  but allows assignment of times in looser formats, including
  'D HH:MM:SS', 'HH:MM:SS', 'HH:MM', 'D HH:MM', 'D
  HH', 'SS', or 'HHMMSS', as well as permitting dropping
  of any leading zeros when a delimiter is provided, for
  example '3:9:10'. For details, see date and time literals.
   
  MariaDB 10.1.2 introduced the --mysql56-temporal-format
  option, on by default, which allows MariaDB to store TIMEs
  using the same low-level format MySQL 5.6 uses.
   
  Internal Format
   
  In MariaDB 10.1.2 a new temporal format was introduced from
  MySQL 5.6 that alters how the TIME, DATETIME and TIMESTAMP
  columns operate at lower levels. These changes allow these
  temporal data types to have fractional parts and negative
  values. You can disable this feature using the
  mysql56_temporal_format system variable.
   
  Tables that include TIMESTAMP values that were created on an
  older version of MariaDB or that were created while the
  mysql56_temporal_format system variable was disabled
  continue to store data using the older data type format.
   
  In order to update table columns from the older format to
  the newer format, execute an ALTER TABLE... MODIFY COLUMN
  statement that changes the column to the *same* data type.
  This change may be needed if you want to export the table's
  tablespace and import it onto a server that has
  mysql56_temporal_format=ON set (see MDEV-15225).
   
  For instance, if you have a TIME column in your table: 
   
  SHOW VARIABLES LIKE 'mysql56_temporal_format';
   
  +-------------------------+-------+
  | Variable_name | Value |
  +-------------------------+-------+
  | mysql56_temporal_format | ON |
  +-------------------------+-------+
   
  ALTER TABLE example_table MODIFY ts_col TIME;
   
  When MariaDB executes the ALTER TABLE statement, it converts
  the data from the older temporal format to the newer one. 
   
  In the event that you have several tables and columns using
  temporal data types that you want to switch over to the new
  format, make sure the system variable is enabled, then
  perform a dump and restore using mysqldump. The columns
  using relevant temporal data types are restored using the
  new temporal format.
   
  Examples
  -------- 
  INSERT INTO time VALUES ('90:00:00'), ('800:00:00'),
  (800), (22), (151413), ('9:6:3'), ('12 09');
   
  SELECT * FROM time;
  +-----------+
  | t |
  +-----------+
  | 90:00:00 |
  | 800:00:00 |
  | 00:08:00 |
  | 00:00:22 |
  | 15:14:13 |
  | 09:06:03 |
  | 297:00:00 |
  +-----------+
   


  URL: https://mariadb.com/kb/en/library/time/dzfxuxTIMEdzfxuxhttps://mariadb.com/kb/en/library/time/dzfxuxdzfxux22dzfxux292qjzxqqvvbqSyntax
  ------ 
  TINYINT[(M)] [SIGNED | UNSIGNED | ZEROFILL]
   
  Description
  ----------- 
  A very small integer. The signed range is -128 to 127. The
  unsigned range is 0 to 255. For details on the attributes,
  see Numeric Data Type Overview.
   
  Examples
  -------- 
  CREATE TABLE tinyints (a TINYINT,b TINYINT UNSIGNED,c
  TINYINT ZEROFILL);
  Query OK, 0 rows affected (0.43 sec)
   
  INSERT INTO tinyints VALUES (-10,-10,-10);
  Query OK, 1 row affected, 2 warnings (0.08 sec)
  Warning (Code 1264): Out of range value for column 'b' at
  row 1
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO tinyints VALUES (-10,10,-10);
  Query OK, 1 row affected, 1 warning (0.11 sec)
  Warning (Code 1264): Out of range value for column 'c' at
  row 1
   
  INSERT INTO tinyints VALUES (-10,10,10);
   
  SELECT * FROM tinyints;
  +------+------+------+
  | a | b | c |
  +------+------+------+
  | -10 | 0 | 000 |
  | -10 | 10 | 000 |
  | -10 | 10 | 010 |
  +------+------+------+
   
  INSERT INTO tinyints VALUES (128,128,128);
  Query OK, 1 row affected, 1 warning (0.19 sec)
  Warning (Code 1264): Out of range value for column 'a' at
  row 1
   
  INSERT INTO tinyints VALUES (127,128,128);
   
  SELECT * FROM tinyints;
  +------+------+------+
  | a | b | c |
  +------+------+------+
  | -10 | 0 | 000 |
  | -10 | 10 | 000 |
  | -10 | 10 | 010 |
  | 127 | 128 | 128 |
  | 127 | 128 | 128 |
  +------+------+------+
   


  URL: https://mariadb.com/kb/en/library/tinyint/dzfxuxTINYINTdzfxuxhttps://mariadb.com/kb/en/library/tinyint/dzfxuxdzfxux22dzfxux295qjzxqqvvbqSyntax
  ------ 
  VARBINARY(M)
   
  Description
  ----------- 
  The VARBINARY type is similar to the VARCHAR type, but
  stores binary byte strings rather than non-binary character
  strings. M represents the maximum column length in bytes. 
   
  It contains no character set, and comparison and sorting are
  based on the numeric value of the bytes.
   
  If the maximum length is exceeded, and SQL strict mode is
  not enabled , the extra characters will be dropped with a
  warning. If strict mode is enabled, an error will occur.
   
  Unlike BINARY values, VARBINARYs are not right-padded when
  inserting.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, RAW is a synonym for
  VARBINARY.
   
  Examples
  -------- 
  Inserting too many characters, first with strict mode off,
  then with it on:
   
  CREATE TABLE varbins (a VARBINARY(10));
   
  INSERT INTO varbins VALUES('12345678901');
  Query OK, 1 row affected, 1 warning (0.04 sec)
   
  SELECT * FROM varbins;
   
  +------------+
  | a |
  +------------+
  | 1234567890 |
  +------------+
   
  SET sql_mode='STRICT_ALL_TABLES';
   
  INSERT INTO varbins VALUES('12345678901');
  ERROR 1406 (22001): Data too long for column 'a' at row 1
   
  Sorting is performed with the byte value:
   
  TRUNCATE varbins;
   
  INSERT INTO varbins VALUES('A'),('B'),('a'),('b');
   
  SELECT * FROM varbins ORDER BY a;
   
  +------+
  | a |
  +------+
  | A |
  | B |
  | a |
  | b |
  +------+
   
  Using CAST to sort as a CHAR instead:
   
  SELECT * FROM varbins ORDER BY CAST(a AS CHAR);
  +------+
  | a |
  +------+
  | a |
  | A |
  | b |
  | B |
  +------+
   


  URL: https://mariadb.com/kb/en/library/varbinary/dzfxuxVARBINARYdzfxuxhttps://mariadb.com/kb/en/library/varbinary/dzfxuxdzfxux22dzfxux297qjzxqqvvbqSyntax
  ------ 
  ASCII(str)
   
  Description
  ----------- 
  Returns the numeric ASCII value of the leftmost character of
  the string argument. Returns 0 if the given string is empty
  and NULL if it is NULL.
   
  ASCII() works for 8-bit characters.
   
  Examples
  -------- 
  SELECT ASCII(9);
  +----------+
  | ASCII(9) |
  +----------+
  | 57 |
  +----------+
   
  SELECT ASCII('9');
  +------------+
  | ASCII('9') |
  +------------+
  | 57 |
  +------------+
   
  SELECT ASCII('abc');
  +--------------+
  | ASCII('abc') |
  +--------------+
  | 97 |
  +--------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/ascii/dzfxuxASCIIdzfxuxhttps://mariadb.com/kb/en/library/ascii/dzfxuxdzfxux37dzfxux577qjzxqqvvbqSyntax
  ------ 
  BIN(N)
   
  Description
  ----------- 
  Returns a string representation of the binary value of the
  given longlong (that is, BIGINT) number. This is equivalent
  to CONV(N,10,2). The argument should be positive. If it is a
  FLOAT, it will be truncated. Returns NULL if the argument is
  NULL.
   
  Examples
  -------- 
  SELECT BIN(12);
  +---------+
  | BIN(12) |
  +---------+
  | 1100 |
  +---------+
   


  URL: https://mariadb.com/kb/en/library/bin/dzfxuxBINdzfxuxhttps://mariadb.com/kb/en/library/bin/dzfxuxdzfxux37dzfxux578qjzxqqvvbqSyntax
  ------ 
  BIT_LENGTH(str)
   
  Description
  ----------- 
  Returns the length of the given string argument in bits. If
  the argument is not a string, it will be converted to
  string. If the argument is NULL, it returns NULL.
   
  Examples
  -------- 
  SELECT BIT_LENGTH('text');
  +--------------------+
  | BIT_LENGTH('text') |
  +--------------------+
  | 32 |
  +--------------------+
   
  SELECT BIT_LENGTH('');
  +----------------+
  | BIT_LENGTH('') |
  +----------------+
  | 0 |
  +----------------+
   
  Compatibility
   
  PostgreSQL and Sybase support BIT_LENGTH().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/bit_length/dzfxuxBIT_LENGTHdzfxuxhttps://mariadb.com/kb/en/library/bit_length/dzfxuxdzfxux37dzfxux580qjzxqqvvbqSyntax
  ------ 
  [NATIONAL] VARCHAR(M) [CHARACTER SET charset_name] [COLLATE
  collation_name]
   
  Description
  ----------- 
  A variable-length string. M represents the maximum column
  length in
  characters. The range of M is 0 to 65,532. The effective
  maximum
  length of a VARCHAR is subject to the maximum row size and
  the character set used. For
  example, utf8 characters can require up to three bytes per
  character,
  so a VARCHAR column that uses the utf8 character set can be
  declared
  to be a maximum of 21,844 characters.
   
  MariaDB stores VARCHAR values as a one-byte or two-byte
  length prefix
  plus data. The length prefix indicates the number of bytes
  in the
  value. A VARCHAR column uses one length byte if values
  require no more
  than 255 bytes, two length bytes if values may require more
  than 255
  bytes.
   
  Note: MariaDB 5.1 and later follow the standard SQL
  specification, 
  and do not remove trailing spaces from VARCHAR values.
   
  VARCHAR(0) columns can contain 2 values: an empty string or
  NULL. Such columns cannot be part of an index. The CONNECT
  storage engine does not support VARCHAR(0).
   
  VARCHAR is shorthand for CHARACTER VARYING. NATIONAL VARCHAR
  is the
  standard SQL way to define that a VARCHAR column should use
  some
  predefined character set. MariaDB uses utf8 as this
  predefined character set, as does MySQL 4.1 and up.
  NVARCHAR is shorthand for NATIONAL VARCHAR.
   
  Before MariaDB 10.2, all MariaDB collations were of type
  PADSPACE, meaning that VARCHAR (as well as CHAR and TEXT
  values) are compared without regard for trailing spaces.
  This does not apply to the LIKE pattern-matching operator,
  which takes into account trailing spaces. From MariaDB 10.2,
  a number of NO PAD collations are available.
   
  If a unique index consists of a column where trailing pad
  characters are stripped or ignored, inserts into that column
  where values differ only by the number of trailing pad
  characters will result in a duplicate-key error.
   
  Examples
  -------- 
  The following are equivalent:
   
  VARCHAR(30) CHARACTER SET utf8
  NATIONAL VARCHAR(30)
  NVARCHAR(30)
  NCHAR VARCHAR(30)
  NATIONAL CHARACTER VARYING(30)
  NATIONAL CHAR VARYING(30)
   
  Trailing spaces:
   
  CREATE TABLE strtest (v VARCHAR(10));
  INSERT INTO strtest VALUES('Maria ');
   
  SELECT v='Maria',v='Maria ' FROM strtest;
  +-----------+--------------+
  | v='Maria' | v='Maria ' |
  +-----------+--------------+
  | 1 | 1 |
  +-----------+--------------+
   
  SELECT v LIKE 'Maria',v LIKE 'Maria ' FROM strtest;
  +----------------+-------------------+
  | v LIKE 'Maria' | v LIKE 'Maria ' |
  +----------------+-------------------+
  | 0 | 1 |
  +----------------+-------------------+
   
  Truncation
   
  Depending on whether or not strict sql mode is set, you will
  either get a warning or an error if you try to insert a
  string that is too long into a VARCHAR column. If the extra
  characters are spaces, the spaces that can't fit will be
  removed and you will always get a warning, regardless of the
  sql mode setting.
   
  Difference Between VARCHAR and TEXT
   
  VARCHAR columns can be fully indexed. TEXT columns can only
  be indexed over a specified length.
  Using TEXT or BLOB in a SELECT query that uses temporary
  tables for storing intermediate results will force the
  temporary table to be disk based (using the Aria storage
  engine instead of the memory storage engine, which is a bit
  slower. This is not that bad as the Aria storage engine
  caches the rows in memory. To get the benefit of this, one
  should ensure that the aria_pagecache_buffer_size variable
  is big enough to hold most of the row and index data for
  temporary tables.
   
  Oracle Mode
   
  In Oracle mode from MariaDB 10.3, VARCHAR2 is a synonym.
   
  For Storage Engine Developers
   
  Internally the full length of the VARCHAR column is
  allocated inside each TABLE objects record[] structure. As
  there are three such buffers, each open table will allocate
  3 times max-length-to-store-varchar bytes of memory.
  TEXT and BLOB columns are stored with a pointer (4 or 8
  bytes) + a 1-4 bytes length. The TEXT data is only stored
  once. This means that internally TEXT uses less memory for
  each open table but instead has the additional overhead that
  each TEXT object needs to be allocated and freed for each
  row access (with some caching in between).
   


  URL: https://mariadb.com/kb/en/library/varchar/dzfxuxVARCHARdzfxuxhttps://mariadb.com/kb/en/library/varchar/dzfxuxdzfxux22dzfxux298qjzxqqvvbqSyntax
  ------ 
  YEAR[(4)]
   
  Description
  ----------- 
  A year in two-digit or four-digit format. The default is
  four-digit format. Note that the two-digit format has been
  deprecated since 5.5.27. 
   
  In four-digit format, the allowable values are 1901 to 2155,
  and 0000. In two-digit format, the allowable values are 70
  to 69,
  representing years from 1970 to 2069. MariaDB displays YEAR
  values in
  YYYY format, but allows you to assign values to YEAR columns
  using
  either strings or numbers.
   
  Inserting numeric zero has a different result for YEAR(4)
  and YEAR(2). For YEAR(2), the value 00 reflects the year
  2000. For YEAR(4), the value 0000 reflects the year zero.
  This only applies to numeric zero. String zero always
  reflects the year 2000.
   
  Examples
  -------- 
  Accepting a string or a number:
   
  CREATE TABLE y(y YEAR);
   
  INSERT INTO y VALUES (1990),('2012');
   
  SELECT * FROM y;
  +------+
  | y |
  +------+
  | 1990 |
  | 2012 |
  +------+
   
  Out of range:
   
  INSERT INTO y VALUES (1005),('3080');
  Query OK, 2 rows affected, 2 warnings (0.05 sec)
  Records: 2 Duplicates: 0 Warnings: 2
   
  SHOW WARNINGS;
  +---------+------+--------------------------------------------+
  | Level | Code | Message |
  +---------+------+--------------------------------------------+
  | Warning | 1264 | Out of range value for column 'y' at
  row 1 |
  | Warning | 1264 | Out of range value for column 'y' at
  row 2 |
  +---------+------+--------------------------------------------+
   
  SELECT * FROM y;
  +------+
  | y |
  +------+
  | 1990 |
  | 2012 |
  | 0000 |
  | 0000 |
  +------+
   
  Truncating:
   
  INSERT INTO y VALUES ('2013-12-12');
  Query OK, 1 row affected, 1 warning (0.05 sec)
   
  SHOW WARNINGS;
  +---------+------+----------------------------------------+
  | Level | Code | Message |
  +---------+------+----------------------------------------+
  | Warning | 1265 | Data truncated for column 'y' at row 1
  |
  +---------+------+----------------------------------------+
   
  SELECT * FROM y;
  +------+
  | y |
  +------+
  | 1990 |
  | 2012 |
  | 0000 |
  | 0000 |
  | 2013 |
  +------+
   
  Difference between YEAR(2) and YEAR(4), and string and
  numeric zero:
   
  CREATE TABLE y2(y YEAR(4), y2 YEAR(2));
  Query OK, 0 rows affected, 1 warning (0.40 sec)
   
  Note (Code 1287): 'YEAR(2)' is deprecated and will be
  removed in a future release. Please use YEAR(4) instead
   
  INSERT INTO y2 VALUES(0,0),('0','0');
   
  SELECT YEAR(y),YEAR(y2) FROM y;
  +---------+----------+
  | YEAR(y) | YEAR(y2) |
  +---------+----------+
  | 0 | 2000 |
  | 2000 | 2000 |
  +---------+----------+
   


  URL: https://mariadb.com/kb/en/library/year-data-type/dzfxuxYEAR Data Typedzfxuxhttps://mariadb.com/kb/en/library/year-data-type/dzfxuxdzfxux22dzfxux299qjzxqqvvbqSyntax
  ------ 
  CHARACTER_LENGTH(str)
   
  Description
  ----------- 
  CHARACTER_LENGTH() is a synonym for CHAR_LENGTH().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/character_length/dzfxuxCHARACTER_LENGTHdzfxuxhttps://mariadb.com/kb/en/library/character_length/dzfxuxdzfxux37dzfxux583qjzxqqvvbqSyntax
  ------ 
  INSTR(str,substr)
   
  Description
  ----------- 
  Returns the position of the first occurrence of substring
  substr in
  string str. This is the same as the two-argument form of
  LOCATE(),
  except that the order of the arguments is reversed.
   
  INSTR() performs a case-insensitive search.
   
  If any argument is NULL, returns NULL.
   
  Examples
  -------- 
  SELECT INSTR('foobarbar', 'bar');
  +---------------------------+
  | INSTR('foobarbar', 'bar') |
  +---------------------------+
  | 4 |
  +---------------------------+
   
  SELECT INSTR('My', 'Maria');
  +----------------------+
  | INSTR('My', 'Maria') |
  +----------------------+
  | 0 |
  +----------------------+
   


  URL: https://mariadb.com/kb/en/library/instr/dzfxuxINSTRdzfxuxhttps://mariadb.com/kb/en/library/instr/dzfxuxdzfxux37dzfxux598qjzxqqvvbqSyntax
  ------ 
  [begin_label:] BEGIN [NOT ATOMIC]
   [statement_list]
  END [end_label]
   
  NOT ATOMIC is required when used outside of a stored
  procedure. Inside stored procedures or within an anonymous
  block, BEGIN alone starts a new anonymous block.
   
  Description
  ----------- 
  BEGIN ... END syntax is used for writing compound
  statements. A compound statement can contain multiple
  statements, enclosed by the BEGIN and END keywords.
  statement_list represents a list of one or more statements,
  each
  terminated by a semicolon (i.e., ;) statement delimiter.
  statement_list is
  optional, which means that the empty compound statement
  (BEGIN END) is
  legal.
   
  Note that END will perform a commit. If you are running in
  autocommit mode, every statement will be committed
  separately. If you are not running in autocommit mode, you
  must execute a COMMIT or ROLLBACK after END to get the
  database up to date.
   
  Use of multiple statements requires that a client is able to
  send statement strings containing the ; statement delimiter.
  This is handled in the mysql command-line client with the
  DELIMITER command.
  Changing the ; end-of-statement delimiter (for example, to
  //) allows ; to be used in a program body.
   
  A compound statement within a stored program can be
  labeled. end_label cannot be given unless begin_label also
  is present. If both are present, they must be the same.
   
  BEGIN ... END constructs can be nested. Each block can
  define its own variables, a CONDITION, a HANDLER and a
  CURSOR, which don't exist in the outer blocks. The most
  local declarations override the outer objects which use the
  same name (see example below).
   
  The declarations order is the following:
  DECLARE local variables;
  DECLARE CONDITIONs;
  DECLARE CURSORs;
  DECLARE HANDLERs;
   
  Note that DECLARE HANDLER contains another BEGIN ... END
  construct.
   
  Here is an example of a very simple, anonymous block:
   
  BEGIN NOT ATOMIC
  SET @a=1;
   
  CREATE TABLE test.t1(a INT);
  END|
   
  Below is an example of nested blocks in a stored procedure:
   
  CREATE PROCEDURE t( )
  BEGIN
   DECLARE x TINYINT UNSIGNED DEFAULT 1;
   
   BEGIN
   DECLARE x CHAR(2) DEFAULT '02';
   
   DECLARE y TINYINT UNSIGNED DEFAULT 10;
   
   SELECT x, y;
   
   END;
   
   SELECT x;
   
  END;
   
  In this example, a TINYINT variable, x is declared in the
  outter block. But in the inner block x is re-declared as a
  CHAR and an y variable is declared. The inner SELECT shows
  the "new" value of x, and the value of y. But when x is
  selected in the outer block, the "old" value is returned.
  The final SELECT doesn't try to read y, because it doesn't
  exist in that context.
   


  URL: https://mariadb.com/kb/en/library/begin-end/dzfxuxBEGIN ENDdzfxuxhttps://mariadb.com/kb/en/library/begin-end/dzfxuxdzfxux23dzfxux300qjzxqqvvbqSyntax
  ------ 
  CASE case_value
   WHEN when_value THEN statement_list
   [WHEN when_value THEN statement_list] ...
   [ELSE statement_list]
  END CASE
   
  Or:
   
  CASE
   WHEN search_condition THEN statement_list
   [WHEN search_condition THEN statement_list] ...
   [ELSE statement_list] 
  END CASE
   
  Description
  ----------- 
  The CASE statement for stored programs implements a complex
  conditional
  construct. If a search_condition evaluates to true, the
  corresponding SQL
  statement list is executed. If no search condition matches,
  the statement list
  in the ELSE clause is executed. Each statement_list consists
  of one or
  more statements.
   
  If no when_value or search_condition matches the value
  tested and the CASE
  statement contains no ELSE clause, a Case not found for CASE
  statement
  error results.
   
  Each statement_list consists of one or more statements; an
  empty
  statement_list is not allowed. To handle situations where no
  value is
  matched by any WHEN clause, use an ELSE containing an
  empty BEGIN ... END block, as shown in this example:
   
  DELIMITER |
  CREATE PROCEDURE p()
  BEGIN
   DECLARE v INT DEFAULT 1;
   
   CASE v
   WHEN 2 THEN SELECT v;
   
   WHEN 3 THEN SELECT 0;
   
   ELSE BEGIN END;
   
   END CASE;
   
  END;
   
  |
   
  The indentation used here in the ELSE clause is for purposes
  of clarity only,
  and is not otherwise significant. See Delimiters in the
  mysql client for more on the use of the delimiter command.
   
  Note: The syntax of the CASE statement used inside stored
  programs
  differs slightly from that of the SQL CASE expression
  described in
  CASE OPERATOR.
  The CASE statement cannot have an ELSE NULL clause, and it
  is
  terminated with END CASE instead of END.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/case-statement/dzfxuxCASE Statementdzfxuxhttps://mariadb.com/kb/en/library/case-statement/dzfxuxdzfxux23dzfxux301qjzxqqvvbqSyntax
  ------ 
  DECLARE condition_name CONDITION FOR condition_value
   
  condition_value:
   SQLSTATE [VALUE] sqlstate_value
   | mysql_error_code
   
  Description
  ----------- 
  The DECLARE ... CONDITION statement defines a named error
  condition.
  It specifies a condition that needs specific handling and
  associates a
  name with that condition. Later, the name can be used in a
  DECLARE ... HANDLER, SIGNAL or RESIGNAL statement (as long
  as the statement is located in the same BEGIN ... END
  block).
   
  Conditions must be declared after local variables, but
  before CURSORs and HANDLERs.
   
  A condition_value for DECLARE ... CONDITION can be an
  SQLSTATE value (a
  5-character string literal) or a MySQL error code (a
  number). You should not
  use SQLSTATE value '00000' or MySQL error code 0, because
  those indicate sucess
  rather than an error condition. If you try, or if you
  specify an invalid SQLSTATE value, an error like this is
  produced:
   
  ERROR 1407 (42000): Bad SQLSTATE: '00000'
   
  For a list of SQLSTATE values and MariaDB error
  codes, see MariaDB Error Codes.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/declare-condition/dzfxuxDECLARE CONDITIONdzfxuxhttps://mariadb.com/kb/en/library/declare-condition/dzfxuxdzfxux23dzfxux303qjzxqqvvbqSyntax
  ------ 
  LCASE(str)
   
  Description
  ----------- 
  LCASE() is a synonym for LOWER().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/lcase/dzfxuxLCASEdzfxuxhttps://mariadb.com/kb/en/library/lcase/dzfxuxdzfxux37dzfxux599qjzxqqvvbqSyntax
  ------ 
  LEFT(str,len)
   
  Description
  ----------- 
  Returns the leftmost len characters from the string str, or
  NULL if
  any argument is NULL.
   
  Examples
  -------- 
  SELECT LEFT('MariaDB', 5);
  +--------------------+
  | LEFT('MariaDB', 5) |
  +--------------------+
  | Maria |
  +--------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/left/dzfxuxLEFTdzfxuxhttps://mariadb.com/kb/en/library/left/dzfxuxdzfxux37dzfxux600qjzxqqvvbqIntroduced in MariaDB 10.3.1 as part of the Oracle
  compatibility enhancements.
   
  Syntax
  ------ 
  LENGTHB(str)
   
  Description
  ----------- 
  LENGTHB() is a synonym for LENGTH().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/lengthb/dzfxuxLENGTHBdzfxuxhttps://mariadb.com/kb/en/library/lengthb/dzfxuxdzfxux37dzfxux602qjzxqqvvbqSyntax
  ------ 
  MID(str,pos,len)
   
  Description
  ----------- 
  MID(str,pos,len) is a synonym for SUBSTRING(str,pos,len).
   
  Examples
  -------- 
  SELECT MID('abcd',4,1);
  +-----------------+
  | MID('abcd',4,1) |
  +-----------------+
  | d |
  +-----------------+
   
  SELECT MID('abcd',2,2);
  +-----------------+
  | MID('abcd',2,2) |
  +-----------------+
  | bc |
  +-----------------+
   
  A negative starting position:
   
  SELECT MID('abcd',-2,4);
  +------------------+
  | MID('abcd',-2,4) |
  +------------------+
  | cd |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/mid/dzfxuxMIDdzfxuxhttps://mariadb.com/kb/en/library/mid/dzfxuxdzfxux37dzfxux611qjzxqqvvbqSyntax
  ------ 
  expr NOT LIKE pat [ESCAPE 'escape_char']
   
  Description
  ----------- 
  This is the same as NOT (expr LIKE pat [ESCAPE
  'escape_char']).
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/not-like/dzfxuxNOT LIKEdzfxuxhttps://mariadb.com/kb/en/library/not-like/dzfxuxdzfxux37dzfxux612qjzxqqvvbqSyntax
  ------ 
  DECLARE handler_type HANDLER
   FOR condition_value [, condition_value] ...
   statement
   
  handler_type:
   CONTINUE
   | EXIT 
   | UNDO
   
  condition_value:
   SQLSTATE [VALUE] sqlstate_value
   | condition_name
   | SQLWARNING
   | NOT FOUND
   | SQLEXCEPTION
   | mariadb_error_code
   
  Description
  ----------- 
  The DECLARE ... HANDLER statement specifies handlers that
  each may
  deal with one or more conditions. If one of these conditions
  occurs,
  the specified statement is executed. statement can be a
  simple
  statement (for example, SET var_name = value), or it can be
  a compound
  statement written using BEGIN and END.
   
  Handlers must be declared after local variables, a CONDITION
  and a CURSOR.
   
  For a CONTINUE handler, execution of the current program
  continues
  after execution of the handler statement. For an EXIT
  handler,
  execution terminates for the BEGIN ... END compound
  statement in which
  the handler is declared. (This is true even if the condition
  occurs in
  an inner block.) The UNDO handler type statement is not
  supported.
   
  If a condition occurs for which no handler has been
  declared, the
  default action is EXIT.
   
  A condition_value for DECLARE ... HANDLER can be any of the
  following
  values:
  An SQLSTATE value (a 5-character string literal) or a
  MariaDB error
  code (a number). You should not use SQLSTATE value '00000'
  or MariaDB
  error code 0, because those indicate sucess rather than an
  error
  condition. For a list of SQLSTATE values and MariaDB error
  codes, see
  MariaDB Error Codes.
  A condition name previously specified with DECLARE ...
  CONDITION. It must be in the same stored program. See
  DECLARE CONDITION.
  SQLWARNING is shorthand for the class of SQLSTATE values
  that begin
  with '01'.
  NOT FOUND is shorthand for the class of SQLSTATE values that
  begin
  with '02'. This is relevant only the context of cursors
  and is used to
  control what happens when a cursor reaches the end of a data
  set. If
  no more rows are available, a No Data condition occurs with
  SQLSTATE
  value 02000. To detect this condition, you can set up a
  handler for it
  (or for a NOT FOUND condition). An example is shown in
  Cursor Overview. This condition also occurs for SELECT ...
  INTO var_list statements that retrieve no
  rows.
  SQLEXCEPTION is shorthand for the class of SQLSTATE values
  that do
  not begin with '00', '01', or '02'.
   
  When an error raises, in some cases it could be handled by
  multiple HANDLERs. For example, there may be an handler for
  1050 error, a separate handler for the 42S01 SQLSTATE, and
  another separate handler for the SQLEXCEPTION class: in
  theory all occurrences of HANDLER may catch the 1050 error,
  but MariaDB chooses the HANDLER with the highest precedence.
  Here are the precedence rules:
  Handlers which refer to an error code have the highest
  precedence.
  Handlers which refer to a SQLSTATE come next.
  Handlers which refer to an error class have the lowest
  precedence.
   
  In some cases, a statement could produce multiple errors. If
  this happens, in some cases multiple handlers could have the
  highest precedence. In such cases, the choice of the handler
  is indeterminate.
   
  Note that if an error occurs within a CONTINUE HANDLER
  block, it can be handled by another HANDLER. However, a
  HANDLER which is already in the stack (that is, it has been
  called to handle an error and its execution didn't finish
  yet) cannot handle new errors—this prevents endless loops.
  For example, suppose that a stored procedure contains a
  CONTINUE HANDLER for SQLWARNING and another CONTINUE HANDLER
  for NOT FOUND. At some point, a NOT FOUND error occurs, and
  the execution enters the NOT FOUND HANDLER. But within that
  handler, a warning occurs, and the execution enters the
  SQLWARNING HANDLER. If another NOT FOUND error occurs, it
  cannot be handled again by the NOT FOUND HANDLER, because
  its execution is not finished.
   
  When a DECLARE HANDLER block can handle more than one error
  condition, it may be useful to know which errors occurred.
  To do so, you can use the GET DIAGNOSTICS statement.
   
  An error that is handled by a DECLARE HANDLER construct can
  be issued again using the RESIGNAL statement.
   
  Below is an example using DECLARE HANDLER:
   
  CREATE TABLE test.t (s1 INT, PRIMARY KEY (s1));
   
  DELIMITER //
   
  CREATE PROCEDURE handlerdemo ( )
   BEGIN
   DECLARE CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 =
  1;
   
   SET @x = 1;
   
   INSERT INTO test.t VALUES (1);
   SET @x = 2;
   
   INSERT INTO test.t VALUES (1);
   SET @x = 3;
   
   END;
   
   //
   
  DELIMITER ;
   
  CALL handlerdemo( );
   
  SELECT @x;
   
  +------+
  | @x |
  +------+
  | 3 |
  +------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/declare-handler/dzfxuxDECLARE HANDLERdzfxuxhttps://mariadb.com/kb/en/library/declare-handler/dzfxuxdzfxux23dzfxux305qjzxqqvvbqSyntax
  ------ 
  DECLARE var_name [, var_name] ... [[ROW] TYPE OF]] type
  [DEFAULT value]
   
  Description
  ----------- 
  This statement is used to declare local variables within
  stored programs. To
  provide a default value for the variable, include a DEFAULT
  clause. The
  value can be specified as an expression (even subqueries are
  permitted); it need not be a constant. If the
  DEFAULT clause is missing, the initial value is NULL.
   
  Local variables are treated like stored routine parameters
  with respect to data
  type and overflow checking. See CREATE PROCEDURE.
   
  Local variables must be declared before CONDITIONs, CURSORs
  and HANDLERs.
   
  Local variable names are not case sensitive.
   
  The scope of a local variable is within the BEGIN ... END
  block where it is
  declared. The variable can be referred to in blocks nested
  within the declaring
  block, except those blocks that declare a variable with the
  same name.
   
  TYPE OF / ROW TYPE OF
   
  TYPE OF and ROW TYPE OF anchored data types for stored
  routines were introduced in MariaDB 10.3.
   
  Anchored data types allow a data type to be defined based on
  another object, such as a table row, rather than
  specifically set in the declaration. If the anchor object
  changes, so will the anchored data type. This can lead to
  routines being easier to maintain, so that if the data type
  in the table is changed, it will automatically be changed in
  the routine as well.
   
  Variables declared with ROW TYPE OF will have the same
  features as implicit ROW variables. It is not possible to
  use ROW TYPE OF variables in a LIMIT clause.
   
  The real data type of TYPE OF and ROW TYPE OF table_name
  will become known at the very beginning of the stored
  routine call. ALTER TABLE or DROP TABLE statements performed
  inside the current routine on the tables that appear in
  anchors won't affect the data type of the anchored
  variables, even if the variable is declared after an ALTER
  TABLE or DROP TABLE statement.
   
  The real data type of a ROW TYPE OF cursor_name variable
  will become known when execution enters into the block where
  the variable is declared. Data type instantiation will
  happen only once. In a cursor ROW TYPE OF variable that is
  declared inside a loop, its data type will become known on
  the very first iteration and won't change on further loop
  iterations.
   
  The tables referenced in TYPE OF and ROW TYPE OF
  declarations will be checked for existence at the beginning
  of the stored routine call. CREATE PROCEDURE or CREATE
  FUNCTION will not check the referenced tables for existence.
   
  Examples
  -------- 
  TYPE OF and ROW TYPE OF from MariaDB 10.3:
   
  DECLARE tmp TYPE OF t1.a;
   -- Get the data type from the column {{a}} in the table
  {{t1}}
   
  DECLARE rec1 ROW TYPE OF t1;
   -- Get the row data type from the table {{t1}}
   
  DECLARE rec2 ROW TYPE OF cur1;
   -- Get the row data type from the cursor {{cur1}}
   


  URL: https://mariadb.com/kb/en/library/declare-variable/dzfxuxDECLARE Variabledzfxuxhttps://mariadb.com/kb/en/library/declare-variable/dzfxuxdzfxux23dzfxux306qjzxqqvvbqFOR loops were introduced in MariaDB 10.3.
   
  Syntax
  ------ 
  Integer range FOR loop:
   
  [begin_label:]
  FOR var_name IN [ REVERSE ] lower_bound .. upper_bound
  DO statement_list
  END FOR [ end_label ]
   
  Explicit cursor FOR loop
   
  [begin_label:]
  FOR record_name IN cursor_name [ (
  cursor_actual_parameter_list)]
  DO statement_list
  END FOR [ end_label ]
   
  Explicit cursor FOR loop (Oracle mode)
   
  [begin_label:]
  FOR record_name IN cursor_name [ (
  cursor_actual_parameter_list)]
  LOOP
   statement_list
  END LOOP [ end_label ]
   
  Implicit cursor FOR loop
   
  [begin_label:]
  FOR record_name IN ( select_statement )
  DO statement_list
  END FOR [ end_label ]
   
  Description
  ----------- 
  FOR loops allow code to be executed a fixed number of times.
   
  In an integer range FOR loop, MariaDB will compare the lower
  bound and upper bound values, and assign the lower bound
  value to a counter. If REVERSE is not specified, and the
  upper bound value is greater than or equal to the counter,
  the counter will be incremented and the statement will
  continue, after which the loop is entered again. If the
  upper bound value is greater than the counter, the loop will
  be exited.
   
  If REVERSE is specified, the counter is decremented, and the
  upper bound value needs to be less than or equal for the
  loop to continue.
   
  Examples
  -------- 
  Intger range FOR loop:
   
  CREATE TABLE t1 (a INT);
   
  DELIMITER //
   
  FOR i IN 1..3
  DO
   INSERT INTO t1 VALUES (i);
  END FOR;
   
  //
   
  DELIMITER ;
   
  SELECT * FROM t1;
   
  +------+
  | a |
  +------+
  | 1 |
  | 2 |
  | 3 |
  +------+
   
  REVERSE integer range FOR loop:
   
  CREATE OR REPLACE TABLE t1 (a INT);
   
  DELIMITER //
  FOR i IN REVERSE 12..4
   DO
   INSERT INTO t1 VALUES (i);
  END FOR;
   
  //
  Query OK, 9 rows affected (0.422 sec)
   
  DELIMITER ;
   
  SELECT * FROM t1;
   
  +------+
  | a |
  +------+
  | 12 |
  | 11 |
  | 10 |
  | 9 |
  | 8 |
  | 7 |
  | 6 |
  | 5 |
  | 4 |
  +------+
   
  Explicit cursor in Oracle mode:
   
  SET sql_mode=ORACLE;
   
  CREATE OR REPLACE TABLE t1 (a INT, b VARCHAR(32));
   
  INSERT INTO t1 VALUES (10,'b0');
  INSERT INTO t1 VALUES (11,'b1');
  INSERT INTO t1 VALUES (12,'b2');
   
  DELIMITER //
   
  CREATE OR REPLACE PROCEDURE p1(pa INT) AS 
   CURSOR cur(va INT) IS
   SELECT a, b FROM t1 WHERE a=va;
   
  BEGIN
   FOR rec IN cur(pa)
   LOOP
   SELECT rec.a, rec.b;
   
   END LOOP;
   
  END;
   
  //
   
  DELIMITER ;
   
  CALL p1(10);
  +-------+-------+
  | rec.a | rec.b |
  +-------+-------+
  | 10 | b0 |
  +-------+-------+
   
  CALL p1(11);
  +-------+-------+
  | rec.a | rec.b |
  +-------+-------+
  | 11 | b1 |
  +-------+-------+
   
  CALL p1(12);
  +-------+-------+
  | rec.a | rec.b |
  +-------+-------+
  | 12 | b2 |
  +-------+-------+
   
  CALL p1(13);
  Query OK, 0 rows affected (0.000 sec)
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/for/dzfxuxFORdzfxuxhttps://mariadb.com/kb/en/library/for/dzfxuxdzfxux23dzfxux308qjzxqqvvbqSyntax
  ------ 
  label: 
  [label]
   
  Labels are MariaDB identifiers which can be used to identify
  a BEGIN ... END construct or a loop. They have a maximum
  length of 16 characters and can be quoted with backticks
  (i.e.., `).
   
  Labels have a start part and an end part. The start part
  must precede the portion of code it refers to, must be
  followed by a colon (:) and can be on the same or different
  line. The end part is optional and adds nothing, but can
  make the code more readable. If used, the end part must
  precede the construct's delimiter (;). Constructs
  identified by a label can be nested. Each construct can be
  identified by only one label.
   
  Labels need not be unique in the stored program they belong
  to. However, a label for an inner loop cannot be identical
  to a label for an outer loop. In this case, the following
  error would be produced:
   
  ERROR 1309 (42000): Redefining label 
   
  LEAVE and ITERATE statements can be used to exit or repeat a
  portion of code identified by a label. They must be in the
  same Stored Routine, Trigger or Event which contains the
  target label.
   
  Below is an example using a simple label that is used to
  exit a LOOP:
   
  CREATE PROCEDURE `test_sp`()
  BEGIN
   `my_label`:
   LOOP
   SELECT 'looping';
   
   LEAVE `my_label`;
   
   END LOOP;
   
   SELECT 'out of loop';
   
  END;
   
  The following label is used to exit a procedure, and has an
  end part:
   
  CREATE PROCEDURE `test_sp`()
  `my_label`:
  BEGIN
   IF @var = 1 THEN
   LEAVE `my_label`;
   
   END IF;
   
   DO something();
  END `my_label`;
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/labels/dzfxuxLabelsdzfxuxhttps://mariadb.com/kb/en/library/labels/dzfxuxdzfxux23dzfxux312qjzxqqvvbqSyntax
  ------ 
  LEAVE label
   
  This statement is used to exit the flow control construct
  that has the
  given label. The label must be in the same stored program,
  not in a caller procedure. LEAVE can be used within BEGIN
  ... END or loop constructs
  (LOOP, REPEAT, WHILE). In Stored Procedures, Triggers and
  Events, LEAVE can refer to the outmost BEGIN ... END
  construct; in that case, the program exits the procedure. In
  Stored Functions, RETURN can be used instead.
   
  Note that LEAVE cannot be used to exit a DECLARE HANDLER
  block.
   
  If you try to LEAVE a non-existing label, or if you try to
  LEAVE a HANDLER block, the following error will be produced:
   
  ERROR 1308 (42000): LEAVE with no matching label: 
   
  The following example uses LEAVE to exit the procedure if a
  condition is true:
   
  CREATE PROCEDURE proc(IN p TINYINT)
  CONTAINS SQL
  `whole_proc`:
  BEGIN
   SELECT 1;
   
   IF p 

  URL: https://mariadb.com/kb/en/library/leave/dzfxuxLEAVEdzfxuxhttps://mariadb.com/kb/en/library/leave/dzfxuxdzfxux23dzfxux313qjzxqqvvbqSyntax
  ------ 
  expr NOT REGEXP pat, expr NOT RLIKE pat
   
  Description
  ----------- 
  This is the same as NOT (expr REGEXP pat).
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/not-regexp/dzfxuxNOT REGEXPdzfxuxhttps://mariadb.com/kb/en/library/not-regexp/dzfxuxdzfxux37dzfxux613qjzxqqvvbqSyntax
  ------ 
  OCTET_LENGTH(str)
   
  Description
  ----------- 
  OCTET_LENGTH() is normally a synonym for LENGTH(). When
  running Oracle mode from MariaDB 10.3, they are not
  synonyms, but OCTET_LENGTH() behaves as LENGTH() would when
  not in Oracle mode.
   


  URL: https://mariadb.com/kb/en/library/octet_length/dzfxuxOCTET_LENGTHdzfxuxhttps://mariadb.com/kb/en/library/octet_length/dzfxuxdzfxux37dzfxux614qjzxqqvvbqSyntax
  ------ 
  ORD(str)
   
  Description
  ----------- 
  If the leftmost character of the string str is a multi-byte
  character,
  returns the code for that character, calculated from the
  numeric
  values of its constituent bytes using this formula:
   
   (1st byte code)
  + (2nd byte code x 256)
  + (3rd byte code x 256 x 256) ...
   
  If the leftmost character is not a multi-byte character,
  ORD() returns
  the same value as the ASCII() function.
   
  Examples
  -------- 
  SELECT ORD('2');
  +----------+
  | ORD('2') |
  +----------+
  | 50 |
  +----------+
   


  URL: https://mariadb.com/kb/en/library/ord/dzfxuxORDdzfxuxhttps://mariadb.com/kb/en/library/ord/dzfxuxdzfxux37dzfxux615qjzxqqvvbqSyntax
  ------ 
  POSITION(substr IN str)
   
  Description
  ----------- 
  POSITION(substr IN str) is a synonym for LOCATE(substr,str).
   
  It's part of ODBC 3.0.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/position/dzfxuxPOSITIONdzfxuxhttps://mariadb.com/kb/en/library/position/dzfxuxdzfxux37dzfxux616qjzxqqvvbqSyntax
  ------ 
  QUOTE(str)
   
  Description
  ----------- 
  Quotes a string to produce a result that can be used as a
  properly escaped data
  value in an SQL statement. The string is returned enclosed
  by single quotes and
  with each instance of single quote ("'"), backslash
  ("\"),
  ASCII NUL, and Control-Z preceded by a backslash. If the
  argument
  is NULL, the return value is the word "NULL" without
  enclosing single
  quotes.
   
  Examples
  -------- 
  SELECT QUOTE("Don't!");
  +-----------------+
  | QUOTE("Don't!") |
  +-----------------+
  | 'Don\'t!' |
  +-----------------+
   
  SELECT QUOTE(NULL); 
  +-------------+
  | QUOTE(NULL) |
  +-------------+
  | NULL |
  +-------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/quote/dzfxuxQUOTEdzfxuxhttps://mariadb.com/kb/en/library/quote/dzfxuxdzfxux37dzfxux617qjzxqqvvbqSyntax
  ------ 
  [begin_label:] REPEAT
   statement_list
  UNTIL search_condition
  END REPEAT [end_label]
   
  The statement list within a REPEAT statement is repeated
  until the
  search_condition is true. Thus, a REPEAT always enters the
  loop at
  least once. statement_list consists of one or more
  statements, each
  terminated by a semicolon (i.e., ;) statement delimiter.
   
  A REPEAT statement can be labeled. end_label cannot be given
  unless
  begin_label also is present. If both are present, they must
  be the
  same.
   
  See Delimiters in the mysql client for more on client
  delimiter usage.
   
  DELIMITER //
   
  CREATE PROCEDURE dorepeat(p1 INT)
   BEGIN
   SET @x = 0;
   
   REPEAT SET @x = @x + 1;
   UNTIL @x > p1 END REPEAT;
   
   END
  //
   
  CALL dorepeat(1000)//
   
  SELECT @x//
  +------+
  | @x |
  +------+
  | 1001 |
  +------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/repeat-loop/dzfxuxREPEAT LOOPdzfxuxhttps://mariadb.com/kb/en/library/repeat-loop/dzfxuxdzfxux23dzfxux316qjzxqqvvbqSIGNAL and RESIGNAL were both introduced in MariaDB 5.5.
   
  Syntax
  ------ 
  RESIGNAL [error_condition]
   [SET error_property
   [, error_property] ...]
   
  error_condition:
   SQLSTATE [VALUE] 'sqlstate_value'
   | condition_name
   
  error_property:
   error_property_name = 
   
  error_property_name:
   CLASS_ORIGIN
   | SUBCLASS_ORIGIN
   | MESSAGE_TEXT
   | MYSQL_ERRNO
   | CONSTRAINT_CATALOG
   | CONSTRAINT_SCHEMA
   | CONSTRAINT_NAME
   | CATALOG_NAME
   | SCHEMA_NAME
   | TABLE_NAME
   | COLUMN_NAME
   | CURSOR_NAME
   
  Description
  ----------- 
  The syntax of RESIGNAL and its semantics are very similar to
  SIGNAL. This statement can only be used within an error
  HANDLER. It produces an error, like SIGNAL. RESIGNAL clauses
  are the same as SIGNAL, except that they all are optional,
  even SQLSTATE. All the properties which are not specified in
  RESIGNAL, will be identical to the properties of the error
  that was received by the error HANDLER. For a description of
  the clauses, see diagnostics area.
   
  Note that RESIGNAL does not empty the diagnostics area: it
  just appends another error condition.
   
  RESIGNAL, without any clauses, produces an error which is
  identical to the error that was received by HANDLER.
   
  If used out of a HANDLER construct, RESIGNAL produces the
  following error:
   
  ERROR 1645 (0K000): RESIGNAL when handler not active
   
  In MariaDB 5.5, if a HANDLER contained a CALL to another
  procedure, that procedure could use RESIGNAL. Since MariaDB
  10.0, trying to do this raises the above error.
   
  For a list of SQLSTATE values and MariaDB error codes, see
  MariaDB Error Codes.
   
  The following procedure tries to query two tables which
  don't exist, producing a 1146 error in both cases. Those
  errors will trigger the HANDLER. The first time the error
  will be ignored and the client will not receive it, but the
  second time, the error is re-signaled, so the client will
  receive it.
   
  CREATE PROCEDURE test_error( )
  BEGIN
   DECLARE CONTINUE HANDLER
   FOR 1146
   BEGIN
   IF @hide_errors IS FALSE THEN
   RESIGNAL;
   
   END IF;
   
   END;
   
   SET @hide_errors = TRUE;
   
   SELECT 'Next error will be ignored' AS msg;
   
   SELECT `c` FROM `temptab_one`;
   
   SELECT 'Next error won''t be ignored' AS msg;
   
   SET @hide_errors = FALSE;
   
   SELECT `c` FROM `temptab_two`;
   
  END;
   
  CALL test_error( );
   
  +----------------------------+
  | msg |
  +----------------------------+
  | Next error will be ignored |
  +----------------------------+
   
  +-----------------------------+
  | msg |
  +-----------------------------+
  | Next error won't be ignored |
  +-----------------------------+
   
  ERROR 1146 (42S02): Table 'test.temptab_two' doesn't
  exist
   
  The following procedure re-signals an error, modifying only
  the error message to clarify the cause of the problem.
   
  CREATE PROCEDURE test_error()
  BEGIN
   DECLARE CONTINUE HANDLER
   FOR 1146
   BEGIN
   RESIGNAL SET
   MESSAGE_TEXT = '`temptab` does not exist';
   
   END;
   
   SELECT `c` FROM `temptab`;
   
  END;
   
  CALL test_error( );
  ERROR 1146 (42S02): `temptab` does not exist
   
  As explained above, this works on MariaDB 5.5, but produces
  a 1645 error since 10.0.
   
  CREATE PROCEDURE handle_error()
  BEGIN
   RESIGNAL;
   
  END;
   
  CREATE PROCEDURE p()
  BEGIN
   DECLARE EXIT HANDLER FOR SQLEXCEPTION CALL p();
   SIGNAL SQLSTATE '45000';
   
  END;
   


  URL: https://mariadb.com/kb/en/library/resignal/dzfxuxRESIGNALdzfxuxhttps://mariadb.com/kb/en/library/resignal/dzfxuxdzfxux23dzfxux317qjzxqqvvbqSyntax
  ------ 
  SELECT col_name [, col_name] ...
   INTO var_name [, var_name] ...
   table_expr
   
  Description
  ----------- 
  SELECT ... INTO enables selected columns to be stored
  directly
  into variables. No resultset is produced. The query should
  return a single row. If the query
  returns no rows, a warning with error code 1329 occurs (No
  data), and
  the variable values remain unchanged. If the query returns
  multiple
  rows, error 1172 occurs (Result consisted of more than one
  row). If it
  is possible that the statement may retrieve multiple rows,
  you can use
  LIMIT 1 to limit the result set to a single row.
   
  The INTO clause can also be specified at the end of the
  statement.
   
  In the context of such statements that occur as part of
  events
  executed by the Event Scheduler, diagnostics messages (not
  only
  errors, but also warnings) are written to the error log,
  and, on
  Windows, to the application event log.
   
  This statement can be used with both local variables and
  user-defined variables.
   
  For the complete syntax, see SELECT.
   
  Another way to set a variable's value is the SET statement.
   
  SELECT ... INTO results are not stored in the query cache
  even if SQL_CACHE is specified.
   
  Examples
  -------- 
  SELECT id, data INTO @x,@y 
  FROM test.t1 LIMIT 1;
   


  URL: https://mariadb.com/kb/en/library/selectinto/dzfxuxSELECT INTOdzfxuxhttps://mariadb.com/kb/en/library/selectinto/dzfxuxdzfxux23dzfxux319qjzxqqvvbqSyntax
  ------ 
  REPEAT(str,count)
   
  Description
  ----------- 
  Returns a string consisting of the string str repeated count
  times. If
  count is less than 1, returns an empty string. Returns NULL
  if str or
  count are NULL.
   
  Examples
  -------- 
  SELECT QUOTE(REPEAT('MariaDB ',4));
  +------------------------------------+
  | QUOTE(REPEAT('MariaDB ',4)) |
  +------------------------------------+
  | 'MariaDB MariaDB MariaDB MariaDB ' |
  +------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/repeat-function/dzfxuxREPEAT Functiondzfxuxhttps://mariadb.com/kb/en/library/repeat-function/dzfxuxdzfxux37dzfxux621qjzxqqvvbqSyntax
  ------ 
  REPLACE(str,from_str,to_str)
   
  Description
  ----------- 
  Returns the string str with all occurrences of the string
  from_str
  replaced by the string to_str. REPLACE() performs a
  case-sensitive
  match when searching for from_str.
   
  Examples
  -------- 
  SELECT REPLACE('www.mariadb.org', 'w', 'Ww');
  +---------------------------------------+
  | REPLACE('www.mariadb.org', 'w', 'Ww') |
  +---------------------------------------+
  | WwWwWw.mariadb.org |
  +---------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/replace-function/dzfxuxREPLACE Functiondzfxuxhttps://mariadb.com/kb/en/library/replace-function/dzfxuxdzfxux37dzfxux622qjzxqqvvbqSyntax
  ------ 
  REVERSE(str)
   
  Description
  ----------- 
  Returns the string str with the order of the characters
  reversed.
   
  Examples
  -------- 
  SELECT REVERSE('desserts');
  +---------------------+
  | REVERSE('desserts') |
  +---------------------+
  | stressed |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/reverse/dzfxuxREVERSEdzfxuxhttps://mariadb.com/kb/en/library/reverse/dzfxuxdzfxux37dzfxux623qjzxqqvvbqSyntax
  ------ 
  RIGHT(str,len)
   
  Description
  ----------- 
  Returns the rightmost len characters from the string str, or
  NULL if
  any argument is NULL.
   
  Examples
  -------- 
  SELECT RIGHT('MariaDB', 2);
  +---------------------+
  | RIGHT('MariaDB', 2) |
  +---------------------+
  | DB |
  +---------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/right/dzfxuxRIGHTdzfxuxhttps://mariadb.com/kb/en/library/right/dzfxuxdzfxux37dzfxux624qjzxqqvvbqSIGNAL and RESIGNAL were both introduced in MariaDB 5.5.
   
  Syntax
  ------ 
  SIGNAL error_condition
   [SET error_property
   [, error_property] ...]
   
  error_condition:
   SQLSTATE [VALUE] 'sqlstate_value'
   | condition_name
   
  error_property:
   error_property_name = 
   
  error_property_name:
   CLASS_ORIGIN
   | SUBCLASS_ORIGIN
   | MESSAGE_TEXT
   | MYSQL_ERRNO
   | CONSTRAINT_CATALOG
   | CONSTRAINT_SCHEMA
   | CONSTRAINT_NAME
   | CATALOG_NAME
   | SCHEMA_NAME
   | TABLE_NAME
   | COLUMN_NAME
   | CURSOR_NAME
   
  SIGNAL empties the diagnostics area and produces a custom
  error. This statement can be used anywhere, but is generally
  useful when used inside a stored program. When the error is
  produced, it can be caught by a HANDLER. If not, the current
  stored program, or the current statement, will terminate
  with the specified error.
   
  Sometimes an error HANDLER just needs to SIGNAL the same
  error it received, optionally with some changes. Usually the
  RESIGNAL statement is the most convenient way to do this.
   
  error_condition can be an SQLSTATE value or a named error
  condition defined via DECLARE CONDITION. SQLSTATE must be a
  constant string consisting of five characters. These codes
  are standard to ODBC and ANSI SQL. For customized errors,
  the recommended SQLSTATE is '45000'. For a list of
  SQLSTATE values used by MariaDB, see the MariaDB Error Codes
  page. The SQLSTATE can be read via the API method
  mysql_sqlstate( ). 
   
  To specify error properties user-defined variables and local
  variables can be used, as well as character set conversions
  (but you can't set a collation).
   
  The error properties, their type and their default values
  are explained in the diagnostics area page.
   
  Errors
   
  If the SQLSTATE is not valid, the following error like this
  will be produced:
   
  ERROR 1407 (42000): Bad SQLSTATE: '123456'
   
  If a property is specified more than once, an error like
  this will be produced:
   
  ERROR 1641 (42000): Duplicate condition information item
  'MESSAGE_TEXT'
   
  If you specify a condition name which is not declared, an
  error like this will be produced:
   
  ERROR 1319 (42000): Undefined CONDITION: cond_name
   
  If MYSQL_ERRNO is out of range, you will get an error like
  this:
   
  ERROR 1231 (42000): Variable 'MYSQL_ERRNO' can't be set
  to the value of '0'
   
  Examples
  -------- 
  Here's what happens if SIGNAL is used in the client to
  generate errors:
   
  SIGNAL SQLSTATE '01000';
   
  Query OK, 0 rows affected, 1 warning (0.00 sec)
   
  SHOW WARNINGS;
   
  +---------+------+------------------------------------------+
  | Level | Code | Message |
  +---------+------+------------------------------------------+
  | Warning | 1642 | Unhandled user-defined warning condition
  |
  +---------+------+------------------------------------------+
  1 row in set (0.06 sec)
   
  SIGNAL SQLSTATE '02000';
   
  ERROR 1643 (02000): Unhandled user-defined not found
  condition
   
  How to specify MYSQL_ERRNO and MESSAGE_TEXT properties:
   
  SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001,
  MESSAGE_TEXT='H
  ello, world!';
   
  ERROR 30001 (45000): Hello, world!
   
  The following code shows how to use user variables, local
  variables and character set conversion with SIGNAL:
   
  CREATE PROCEDURE test_error(x INT)
  BEGIN
   DECLARE errno SMALLINT UNSIGNED DEFAULT 31001;
   
   SET @errmsg = 'Hello, world!';
   
   IF x = 1 THEN
   SIGNAL SQLSTATE '45000' SET
   MYSQL_ERRNO = errno,
   MESSAGE_TEXT = @errmsg;
   
   ELSE
   SIGNAL SQLSTATE '45000' SET
   MYSQL_ERRNO = errno,
   MESSAGE_TEXT = _utf8'Hello, world!';
   
   END IF;
   
  END;
   
  How to use named error conditions:
   
  CREATE PROCEDURE test_error(n INT)
  BEGIN
   DECLARE `too_big` CONDITION FOR SQLSTATE '45000';
   
   IF n > 10 THEN
   SIGNAL `too_big`;
   
   END IF;
   
  END;
   
  In this example, we'll define a HANDLER for an error code.
  When the error occurs, we SIGNAL a more informative error
  which makes sense for our procedure:
   
  CREATE PROCEDURE test_error()
  BEGIN
   DECLARE EXIT HANDLER
   FOR 1146
   BEGIN
   SIGNAL SQLSTATE '45000' SET
   MESSAGE_TEXT = 'Temporary tables not found; did you call
  init() procedure?';
   
   END;
   
   -- this will produce a 1146 error
   SELECT `c` FROM `temptab`;
   
  END;
   


  URL: https://mariadb.com/kb/en/library/signal/dzfxuxSIGNALdzfxuxhttps://mariadb.com/kb/en/library/signal/dzfxuxdzfxux23dzfxux320qjzxqqvvbqSyntax
  ------ 
  LineString(pt1,pt2,...)
   
  Description
  ----------- 
  Constructs a WKB LineString value from a number of WKB Point
  arguments. If any argument is not a WKB Point, the return
  value is
  NULL. If the number of Point arguments is less than two, the
  return value is NULL.
   
  Examples
  -------- 
  SET @ls = 'LineString(1 1,2 2,3 3)';
   
  SELECT AsText(EndPoint(GeomFromText(@ls)));
  +-------------------------------------+
  | AsText(EndPoint(GeomFromText(@ls))) |
  +-------------------------------------+
  | POINT(3 3) |
  +-------------------------------------+
   
  CREATE TABLE gis_line (g LINESTRING);
  INSERT INTO gis_line VALUES
   (LineFromText('LINESTRING(0 0,0 10,10 0)')),
   (LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10
  10)')),
   (LineStringFromWKB(AsWKB(LineString(Point(10, 10),
  Point(40, 10)))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/linestring/dzfxuxLINESTRINGdzfxuxhttps://mariadb.com/kb/en/library/linestring/dzfxuxdzfxux24dzfxux325qjzxqqvvbqSyntax
  ------ 
  expr1 SOUNDS LIKE expr2
   
  Description
  ----------- 
  This is the same as SOUNDEX(expr1) = SOUNDEX(expr2).
   
  Example
   
  SELECT givenname, surname FROM users WHERE givenname SOUNDS
  LIKE "robert";
   
  +-----------+---------+
  | givenname | surname |
  +-----------+---------+
  | Roberto | Castro |
  +-----------+---------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/sounds-like/dzfxuxSOUNDS LIKEdzfxuxhttps://mariadb.com/kb/en/library/sounds-like/dzfxuxdzfxux37dzfxux628qjzxqqvvbqSyntax
  ------ 
  SPACE(N)
   
  Description
  ----------- 
  Returns a string consisting of N space characters. If N is
  NULL, returns NULL.
   
  Examples
  -------- 
  SELECT QUOTE(SPACE(6));
  +-----------------+
  | QUOTE(SPACE(6)) |
  +-----------------+
  | ' ' |
  +-----------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/space/dzfxuxSPACEdzfxuxhttps://mariadb.com/kb/en/library/space/dzfxuxdzfxux37dzfxux629qjzxqqvvbqSyntax
  ------ 
  STRCMP(expr1,expr2)
   
  Description
  ----------- 
  STRCMP() returns 0 if the strings are the same, -1 if the
  first
  argument is smaller than the second according to the current
  sort order,
  and 1 otherwise.
   
  Examples
  -------- 
  SELECT STRCMP('text', 'text2');
  +-------------------------+
  | STRCMP('text', 'text2') |
  +-------------------------+
  | -1 |
  +-------------------------+
   
  SELECT STRCMP('text2', 'text');
  +-------------------------+
  | STRCMP('text2', 'text') |
  +-------------------------+
  | 1 |
  +-------------------------+
   
  SELECT STRCMP('text', 'text');
  +------------------------+
  | STRCMP('text', 'text') |
  +------------------------+
  | 0 |
  +------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/strcmp/dzfxuxSTRCMPdzfxuxhttps://mariadb.com/kb/en/library/strcmp/dzfxuxdzfxux37dzfxux630qjzxqqvvbqDescription
  ----------- 
  SUBSTR() is a synonym for SUBSTRING().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/substr/dzfxuxSUBSTRdzfxuxhttps://mariadb.com/kb/en/library/substr/dzfxuxdzfxux37dzfxux631qjzxqqvvbqSyntax
  ------ 
  UCASE(str)
   
  Description
  ----------- 
  UCASE() is a synonym for UPPER().
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/ucase/dzfxuxUCASEdzfxuxhttps://mariadb.com/kb/en/library/ucase/dzfxuxdzfxux37dzfxux636qjzxqqvvbqSyntax
  ------ 
  UPPER(str)
   
  Description
  ----------- 
  Returns the string str with all characters changed to
  uppercase
  according to the current character set mapping. The default
  is latin1
  (cp1252 West European).
   
  SELECT UPPER(surname), givenname FROM users ORDER BY
  surname;
   
  +----------------+------------+
  | UPPER(surname) | givenname |
  +----------------+------------+
  | ABEL | Jacinto |
  | CASTRO | Robert |
  | COSTA | Phestos |
  | MOSCHELLA | Hippolytos |
  +----------------+------------+
   
  UPPER() is ineffective when applied to binary strings
  (BINARY,
  VARBINARY, BLOB). The description of 
  LOWER() shows how to
  perform lettercase conversion of binary strings.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/upper/dzfxuxUPPERdzfxuxhttps://mariadb.com/kb/en/library/upper/dzfxuxdzfxux37dzfxux639qjzxqqvvbqSyntax
  ------ 
  MultiPolygon(poly1,poly2,...)
   
  Description
  ----------- 
  Constructs a WKB MultiPolygon value from a set of WKB
  Polygon arguments. If any argument is not a WKB Polygon, the
  return value is NULL.
   
  Example
   
  CREATE TABLE gis_multi_polygon (g MULTIPOLYGON);
  INSERT INTO gis_multi_polygon VALUES
   (MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84
  42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67
  13,59 13,59 18)))')),
   (MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28
  26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59
  13,59 18)))')),
   (MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0,
  3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/multipolygon/dzfxuxMULTIPOLYGONdzfxuxhttps://mariadb.com/kb/en/library/multipolygon/dzfxuxdzfxux24dzfxux328qjzxqqvvbqSyntax
  ------ 
  Polygon(ls1,ls2,...)
   
  Description
  ----------- 
  Constructs a WKB Polygon value from a number of WKB
  LineString
  arguments. If any argument does not represent the WKB of a
  LinearRing (that is,
  not a closed and simple LineString) the return value is
  NULL.
   
  Note that according to the OpenGIS standard, a POLYGON
  should have exactly one ExteriorRing and all other rings
  should lie within that ExteriorRing and thus be the
  InteriorRings. Practically, however, some systems, including
  MariaDB's, permit polygons to have several
  'ExteriorRings'. In the case of there being multiple,
  non-overlapping exterior rings ST_NUMINTERIORRINGS() will
  return 1.
   
  Examples
  -------- 
  SET @g = ST_GEOMFROMTEXT('POLYGON((1 1,1 5,4 9,6 9,9 3,7
  2,1 1))');
   
  CREATE TABLE gis_polygon (g POLYGON);
  INSERT INTO gis_polygon VALUES
   (PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10
  10))')),
   (PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10
  10,20 10,20 20,10 20,10 10))')),
   (PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0),
  Point(30, 0), Point(30, 30), Point(0, 0))))));
   
  Non-overlapping 'polygon':
   
  SELECT ST_NumInteriorRings(ST_PolyFromText('POLYGON((0 0,10
  0,10 10,0 10,0 0),
   (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))')) AS NumInteriorRings;
   
  +------------------+
  | NumInteriorRings |
  +------------------+
  | 1 |
  +------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/polygon/dzfxuxPOLYGONdzfxuxhttps://mariadb.com/kb/en/library/polygon/dzfxuxdzfxux24dzfxux331qjzxqqvvbqSyntax
  ------ 
  ST_BUFFER(g1,r)
  BUFFER(g1,r)
   
  Description
  ----------- 
  Returns a geometry that represents all points whose distance
  from geometry g1 is less than or equal to distance, or
  radius, r.
   
  Uses for this function could include creating for example a
  new geometry representing a buffer zone around an island.
   
  BUFFER() is a synonym.
   
  Examples
  -------- 
  Determining whether a point is within a buffer zone:
   
  SET @g1 = ST_GEOMFROMTEXT('POLYGON((10 10, 10 20, 20 20, 20
  10, 10 10))');
   
  SET @g2 = ST_GEOMFROMTEXT('POINT(8 8)');
   
  SELECT ST_WITHIN(@g2,ST_BUFFER(@g1,5));
  +---------------------------------+
  | ST_WITHIN(@g2,ST_BUFFER(@g1,5)) |
  +---------------------------------+
  | 1 |
  +---------------------------------+
   
  SELECT ST_WITHIN(@g2,ST_BUFFER(@g1,1));
  +---------------------------------+
  | ST_WITHIN(@g2,ST_BUFFER(@g1,1)) |
  +---------------------------------+
  | 0 |
  +---------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_buffer/dzfxuxST_BUFFERdzfxuxhttps://mariadb.com/kb/en/library/st_buffer/dzfxuxdzfxux24dzfxux332qjzxqqvvbqST_ConvexHull() was introduced in MariaDB 10.1.2
   
  Syntax
  ------ 
  ST_ConvexHull(g)
  ConvexHull(g)
   
  Description
  ----------- 
  Given a geometry, returns a geometry that is the minimum
  convex geometry enclosing all geometries within the set.
  Returns NULL if the geometry value is NULL or an empty
  value.
   
  ST_ConvexHull() and ConvexHull() are synonyms.
   
  Examples
  -------- 
  The ConvexHull of a single point is simply the single point:
   
  SET @g = ST_GEOMFROMTEXT('Point(0 0)');
   
  SELECT ST_ASTEXT(ST_CONVEXHULL(@g));
  +------------------------------+
  | ST_ASTEXT(ST_CONVEXHULL(@g)) |
  +------------------------------+
  | POINT(0 0) |
  +------------------------------+
   
  SET @g = ST_GEOMFROMTEXT('MultiPoint(0 0, 1 2, 2 3)');
   
  SELECT ST_ASTEXT(ST_CONVEXHULL(@g));
  +------------------------------+
  | ST_ASTEXT(ST_CONVEXHULL(@g)) |
  +------------------------------+
  | POLYGON((0 0,1 2,2 3,0 0)) |
  +------------------------------+
   
  SET @g = ST_GEOMFROMTEXT('MultiPoint( 1 1, 2 2, 5 3, 7 2, 9
  3, 8 4, 6 6, 6 9, 4 9, 1 5 )');
   
  SELECT ST_ASTEXT(ST_CONVEXHULL(@g));
  +----------------------------------------+
  | ST_ASTEXT(ST_CONVEXHULL(@g)) |
  +----------------------------------------+
  | POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |
  +----------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_convexhull/dzfxuxST_CONVEXHULLdzfxuxhttps://mariadb.com/kb/en/library/st_convexhull/dzfxuxdzfxux24dzfxux333qjzxqqvvbqSyntax
  ------ 
  ST_SYMDIFFERENCE(g1,g2)
   
  Description
  ----------- 
  Returns a geometry that represents the portions of geometry
  g1 and geometry g2 that don't intersect.
   
  Examples
  -------- 
  SET @g1 = ST_GEOMFROMTEXT('LINESTRING(10 20, 10 40)');
   
  SET @g2 = ST_GEOMFROMTEXT('LINESTRING(10 15, 10 25)');
   
  SELECT ASTEXT(ST_SYMDIFFERENCE(@g1,@g2));
  +----------------------------------------------+
  | ASTEXT(ST_SYMDIFFERENCE(@g1,@g2)) |
  +----------------------------------------------+
  | MULTILINESTRING((10 15,10 20),(10 25,10 40)) |
  +----------------------------------------------+
   
  SET @g2 = ST_GeomFromText('LINESTRING(10 20, 10 41)');
   
  SELECT ASTEXT(ST_SYMDIFFERENCE(@g1,@g2));
  +-----------------------------------+
  | ASTEXT(ST_SYMDIFFERENCE(@g1,@g2)) |
  +-----------------------------------+
  | LINESTRING(10 40,10 41) |
  +-----------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_symdifference/dzfxuxST_SYMDIFFERENCEdzfxuxhttps://mariadb.com/kb/en/library/st_symdifference/dzfxuxdzfxux24dzfxux336qjzxqqvvbqSyntax
  ------ 
  ALTER LOGFILE GROUP logfile_group
   ADD UNDOFILE 'file_name'
   [INITIAL_SIZE [=] size]
   [WAIT]
   ENGINE [=] engine_name
   
  The ALTER LOGFILE GROUP statement is not supported by
  MariaDB. It was originally inherited from MySQL NDB Cluster.
  See MDEV-19295 for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/alter-logfile-group/dzfxuxALTER LOGFILE GROUPdzfxuxhttps://mariadb.com/kb/en/library/alter-logfile-group/dzfxuxdzfxux39dzfxux644qjzxqqvvbqSyntax
  ------ 
  ALTER SERVER server_name
   OPTIONS (option [, option] ...)
   
  Description
  ----------- 
  Alters the server information for server_name, adjusting the
  specified
  options as per the CREATE SERVER command. The corresponding
  fields in the mysql.servers table are updated accordingly.
  This statement requires the SUPER privilege.
   
  Examples
  -------- 
  ALTER SERVER s OPTIONS (USER 'sally');
   


  URL: https://mariadb.com/kb/en/library/alter-server/dzfxuxALTER SERVERdzfxuxhttps://mariadb.com/kb/en/library/alter-server/dzfxuxdzfxux39dzfxux646qjzxqqvvbqSyntax
  ------ 
  ALTER [ONLINE] [IGNORE] TABLE tbl_name
   [WAIT n | NOWAIT]
   alter_specification [, alter_specification] ...
   
  alter_specification:
   table_option ...
   | ADD [COLUMN] [IF NOT EXISTS] col_name column_definition
   [FIRST | AFTER col_name ]
   | ADD [COLUMN] [IF NOT EXISTS] (col_name
  column_definition,...)
   | ADD {INDEX|KEY} [IF NOT EXISTS] [index_name]
   [index_type] (index_col_name,...) [index_option] ...
   | ADD [CONSTRAINT [symbol]] PRIMARY KEY
   [index_type] (index_col_name,...) [index_option] ...
   | ADD [CONSTRAINT [symbol]]
   UNIQUE [INDEX|KEY] [index_name]
   [index_type] (index_col_name,...) [index_option] ...
   | ADD FULLTEXT [INDEX|KEY] [index_name]
   (index_col_name,...) [index_option] ...
   | ADD SPATIAL [INDEX|KEY] [index_name]
   (index_col_name,...) [index_option] ...
   | ADD [CONSTRAINT [symbol]]
   FOREIGN KEY [IF NOT EXISTS] [index_name]
  (index_col_name,...)
   reference_definition
   | ADD PERIOD FOR SYSTEM_TIME (start_column_name,
  end_column_name)
   | ALTER [COLUMN] col_name SET DEFAULT literal
  |?(expression)
   | ALTER [COLUMN] col_name DROP DEFAULT
   | CHANGE [COLUMN] [IF EXISTS] old_col_name new_col_name
  column_definition
   [FIRST|AFTER col_name]
   | MODIFY [COLUMN] [IF EXISTS] col_name column_definition
   [FIRST | AFTER col_name]
   | DROP [COLUMN] [IF EXISTS] col_name [RESTRICT|CASCADE]
   | DROP PRIMARY KEY
   | DROP {INDEX|KEY} [IF EXISTS] index_name
   | DROP FOREIGN KEY [IF EXISTS] fk_symbol
   | DROP CONSTRAINT [IF EXISTS] constraint_name
   | DISABLE KEYS
   | ENABLE KEYS
   | RENAME [TO] new_tbl_name
   | ORDER BY col_name [, col_name] ...
   | CONVERT TO CHARACTER SET charset_name [COLLATE
  collation_name]
   | [DEFAULT] CHARACTER SET [=] charset_name
   | [DEFAULT] COLLATE [=] collation_name
   | DISCARD TABLESPACE
   | IMPORT TABLESPACE
   | ALGORITHM [=] {DEFAULT|INPLACE|COPY|NOCOPY|INSTANT}
   | LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}
   | FORCE
   | partition_options
   | ADD PARTITION (partition_definition)
   | DROP PARTITION partition_names
   | COALESCE PARTITION number
   | REORGANIZE PARTITION [partition_names INTO
  (partition_definitions)]
   | ANALYZE PARTITION partition_names
   | CHECK PARTITION partition_names
   | OPTIMIZE PARTITION partition_names
   | REBUILD PARTITION partition_names
   | REPAIR PARTITION partition_names
   | EXCHANGE PARTITION partition_name WITH TABLE tbl_name
   | REMOVE PARTITIONING
   | ADD SYSTEM VERSIONING
   | DROP SYSTEM VERSIONING
   
  index_col_name:
   col_name [(length)] [ASC | DESC]
   
  index_type:
   USING {BTREE | HASH | RTREE}
   
  index_option:
   KEY_BLOCK_SIZE [=] value
   | index_type
   | WITH PARSER parser_name
   | COMMENT 'string'
   | CLUSTERING={YES| NO}
   
  table_options:
   table_option [[,] table_option] ...
  In MariaDB 10.0.2 and later, IF EXISTS and IF NOT EXISTS
  clauses have been added for the following:
   
  ADD COLUMN [IF NOT EXISTS]
  ADD INDEX [IF NOT EXISTS]
  ADD FOREIGN KEY [IF NOT EXISTS]
  ADD PARTITION [IF NOT EXISTS]
  CREATE INDEX [IF NOT EXISTS]
   
  DROP COLUMN [IF EXISTS]
  DROP INDEX [IF EXISTS]
  DROP FOREIGN KEY [IF EXISTS]
  DROP PARTITION [IF EXISTS]
  CHANGE COLUMN [IF EXISTS]
  MODIFY COLUMN [IF EXISTS]
  DROP INDEX [IF EXISTS]
  When IF EXISTS and IF NOT EXISTS are used in clauses,
  queries will not
  report errors when the condition is triggered for that
  clause. A warning with
  the same message text will be issued and the ALTER will move
  on to the next
  clause in the statement (or end if finished).
   
  This was done in MDEV-318.
   
  Description
  ----------- 
  ALTER TABLE enables you to change the structure of an
  existing table.
  For example, you can add or delete columns, create or
  destroy indexes,
  change the type of existing columns, or rename columns or
  the table
  itself. You can also change the comment for the table and
  the storage engine of the
  table.
   
  If another connection is using the table, a metadata lock is
  active, and this statement will wait until the lock is
  released. This is also true for non-transactional tables.
   
  When adding a UNIQUE index on a column (or a set of columns)
  which have duplicated values, an error will be produced and
  the statement will be stopped. To suppress the error and
  force the creation of UNIQUE indexes, discarding duplicates,
  the IGNORE option can be specified. This can be useful if a
  column (or a set of columns) should be UNIQUE but it
  contains duplicate values; however, this technique provides
  no control on which rows are preserved and which are
  deleted. Also, note that IGNORE is accepted but ignored in
  ALTER TABLE ... EXCHANGE PARTITION statements.
   
  This statement can also be used to rename a table. For
  details see RENAME TABLE.
   
  When an index is created, the storage engine may use a
  configurable buffer in the process. Incrementing the buffer
  speeds up the index creation. Aria and MyISAM allocate a
  buffer whose size is defined by aria_sort_buffer_size or
  myisam_sort_buffer_size, also used for REPAIR TABLE.
  InnoDB/XtraDB allocates three buffers whose size is defined
  by innodb_sort_buffer_size.
   
  Privileges
   
  Executing the ALTER TABLE statement generally requires at
  least the ALTER privilege for the table or the database..
   
  If you are renaming a table, then it also requires the DROP,
  CREATE and INSERT privileges for the table or the database
  as well.
   
  Online DDL
   
  In MariaDB 10.0 and later, online DDL is supported with the
  ALGORITHM and LOCK clauses.
   
  See InnoDB Online DDL Overview for more information on
  online DDL with InnoDB.
   
  ALTER ONLINE TABLE
   
  ALTER ONLINE TABLE has also worked for partitioned tables
  since MariaDB 10.0.11.
   
  Online ALTER TABLE is available by executing the following:
   
  ALTER ONLINE TABLE ...;
   
  This statement has the following semantics:
   
  In MariaDB 10.0.12 and later, this statement is equivalent
  to the following:
   
  ALTER TABLE ... LOCK=NONE;
   
  See the LOCK alter specification for more information.
   
  In MariaDB 10.0.11, this statement is equivalent to the
  following:
   
  ALTER TABLE ... ALGORITHM=INPLACE;
   
  See the ALGORITHM alter specification for more information.
   
  MariaDB until 10.0.10
   
  In MariaDB 10.0.10 and before, this statement ensures that
  the ALTER TABLE statement does not make a copy of the table.
   
  WAIT/NOWAIT
   
  Set the lock wait timeout. See WAIT and NOWAIT.
   
  Column Definitions
   
  See CREATE TABLE: Column Definitions for information about
  column definitions.
   
  Index Definitions
   
  See CREATE TABLE: Index Definitions for information about
  index definitions.
   
  The CREATE INDEX and DROP INDEX statements can also be used
  to add or remove an index.
   
  Character Sets and Collations
   
  CONVERT TO CHARACTER SET charset_name [COLLATE
  collation_name]
  [DEFAULT] CHARACTER SET [=] charset_name
  [DEFAULT] COLLATE [=] collation_name
  See Setting Character Sets and Collations for details on
  setting the character sets and collations.
   
  Alter Specifications
   
  Table Options
   
  See CREATE TABLE: Table Options for information about table
  options.
   
  ADD COLUMN
   
  ... ADD COLUMN [IF NOT EXISTS] (col_name
  column_definition,...)
  Adds a column to the table. The syntax is the same as in
  CREATE TABLE.
  If you are using IF NOT_EXISTS the column will not be added
  if it was not there already. This is very useful when doing
  scripts to modify tables.
   
  The FIRST and AFTER clauses affect the physical order of
  columns in the datafile. Use FIRST to add a column in the
  first (leftmost) position, or AFTER followed by a column
  name to add the new column in any other position. Note that,
  nowadays, the physical position of a column is usually
  irrelevant.
   
  See also Instant ADD COLUMN for InnoDB.
   
  DROP COLUMN
   
  ... DROP COLUMN [IF EXISTS] col_name [CASCADE|RESTRICT]
  Drops the column from the table.
  If you are using IF EXISTS you will not get an error if the
  column didn't exist.
  If the column is part of any index, the column will be
  dropped from them, except if you add a new column with
  identical name at the same time. The index will be dropped
  if all columns from the index were dropped.
  If the column was used in a view or trigger, you will get an
  error next time the view or trigger is accessed.
   
  Dropping a column that is part of a multi-column UNIQUE
  constraint is not permitted. For example:
   
  CREATE TABLE a (
   a int,
   b int,
   primary key (a,b)
  );
   
  ALTER TABLE x DROP COLUMN a;
  [42000][1072] Key column 'A' doesn't exist in table
   
  The reason is that dropping column a would result in the new
  constraint that all values in column b be unique. In order
  to drop the column, an explicit DROP PRIMARY KEY and ADD
  PRIMARY KEY would be required. Up until MariaDB 10.2.7, the
  column was dropped and the additional constraint applied,
  resulting in the following structure:
   
  ALTER TABLE x DROP COLUMN a;
  Query OK, 0 rows affected (0.46 sec)
   
  DESC x;
  +-------+---------+------+-----+---------+-------+
  | Field | Type | Null | Key | Default | Extra |
  +-------+---------+------+-----+---------+-------+
  | b | int(11) | NO | PRI | NULL | |
  +-------+---------+------+-----+---------+-------+
   
  MariaDB 10.4.0 supports instant DROP COLUMN. DROP COLUMN of
  an indexed column would imply DROP INDEX (and in the case of
  a non-UNIQUE multi-column index, possibly ADD INDEX). These
  will not be allowed with ALGORITHM=INSTANT, but unlike
  before, they can be allowed with ALGORITHM=NOCOPY
   
  RESTRICT and CASCADE are allowed to make porting from other
  database systems easier. In MariaDB, they do nothing.
   
  MODIFY COLUMN
   
  Allows you to modify the type of a column. The column will
  be at the same place as the original column and all indexes
  on the column will be kept. Note that when modifying column,
  you should specify all attributes for the new column.
   
  CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, PRIMARY
  KEY((a));
  ALTER TABLE t1 MODIFY a BIGINT UNSIGNED AUTO_INCREMENT;
   
  CHANGE COLUMN
   
  Works like MODIFY COLUMN except that you can also change the
  name of the column. The column will be at the same place as
  the original column and all index on the column will be
  kept.
   
  CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, PRIMARY
  KEY(a));
  ALTER TABLE t1 CHANGE a b BIGINT UNSIGNED AUTO_INCREMENT;
   
  ALTER COLUMN
   
  This lets you change column options.
   
  CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT, b
  varchar(50), PRIMARY KEY(a));
  ALTER TABLE t1 ALTER b SET DEFAULT 'hello';
   
  ADD PRIMARY KEY
   
  Add a primary key.
   
  For PRIMARY KEY indexes, you can specify a name for the
  index, but it is silently ignored, and the name of the index
  is always PRIMARY.
   
  See Getting Started with Indexes: Primary Key for more
  information.
   
  DROP PRIMARY KEY
   
  Drop a primary key.
   
  For PRIMARY KEY indexes, you can specify a name for the
  index, but it is silently ignored, and the name of the index
  is always PRIMARY.
   
  See Getting Started with Indexes: Primary Key for more
  information.
   
  ADD FOREIGN KEY
   
  Add a foreign key.
   
  For FOREIGN KEY indexes, a reference definition must be
  provided.
   
  For FOREIGN KEY indexes, you can specify a name for the
  constraint, using the CONSTRAINT keyword. That name will be
  used in error messages.
   
  First, you have to specify the name of the target (parent)
  table and a column or a column list which must be indexed
  and whose values must match to the foreign key's values.
  The MATCH clause is accepted to improve the compatibility
  with other DBMS's, but has no meaning in MariaDB. The ON
  DELETE and ON UPDATE clauses specify what must be done when
  a DELETE (or a REPLACE) statements attempts to delete a
  referenced row from the parent table, and when an UPDATE
  statement attempts to modify the referenced foreign key
  columns in a parent table row, respectively. The following
  options are allowed:
  RESTRICT: The delete/update operation is not performed. The
  statement terminates with a 1451 error (SQLSTATE '2300').
  NO ACTION: Synonym for RESTRICT.
  CASCADE: The delete/update operation is performed in both
  tables.
  SET NULL: The update or delete goes ahead in the parent
  table, and the corresponding foreign key fields in the child
  table are set to NULL. (They must not be defined as NOT NULL
  for this to succeed).
   
  MariaDB until 5.3
  SET DEFAULT: This option is currently implemented only for
  the PBXT storage engine, which is disabled by default and no
  longer maintained. It sets the child table's foreign key
  fields to their DEFAULT values when the referenced parent
  table key entries are updated or deleted.
   
  If either clause is omitted, the default behavior for the
  omitted clause is RESTRICT.
   
  See Foreign Keys for more information.
   
  DROP FOREIGN KEY
   
  Drop a foreign key.
   
  See Foreign Keys for more information.
   
  ADD INDEX
   
  Add a plain index.
   
  Plain indexes are regular indexes that are not unique, and
  are not acting as a primary key or a foreign key. They are
  also not the "specialized" FULLTEXT or SPATIAL indexes.
   
  See Getting Started with Indexes: Plain Indexes for more
  information.
   
  DROP INDEX
   
  Drop a plain index.
   
  Plain indexes are regular indexes that are not unique, and
  are not acting as a primary key or a foreign key. They are
  also not the "specialized" FULLTEXT or SPATIAL indexes.
   
  See Getting Started with Indexes: Plain Indexes for more
  information.
   
  ADD UNIQUE INDEX
   
  Add a unique index.
   
  The UNIQUE keyword means that the index will not accept
  duplicated values, except for NULLs. An error will raise if
  you try to insert duplicate values in a UNIQUE index.
   
  For UNIQUE indexes, you can specify a name for the
  constraint, using the CONSTRAINT keyword. That name will be
  used in error messages.
   
  See Getting Started with Indexes: Unique Index for more
  information.
   
  DROP UNIQUE INDEX
   
  Drop a unique index.
   
  The UNIQUE keyword means that the index will not accept
  duplicated values, except for NULLs. An error will raise if
  you try to insert duplicate values in a UNIQUE index.
   
  For UNIQUE indexes, you can specify a name for the
  constraint, using the CONSTRAINT keyword. That name will be
  used in error messages.
   
  See Getting Started with Indexes: Unique Index for more
  information.
   
  ADD FULLTEXT INDEX
   
  Add a FULLTEXT index.
   
  See Full-Text Indexes for more information.
   
  DROP FULLTEXT INDEX
   
  Drop a FULLTEXT index.
   
  See Full-Text Indexes for more information.
   
  ADD SPATIAL INDEX
   
  Add a SPATIAL index.
   
  See SPATIAL INDEX for more information.
   
  DROP SPATIAL INDEX
   
  Drop a SPATIAL index.
   
  See SPATIAL INDEX for more information.
   
  ENABLE/ DISABLE KEYS
   
  DISABLE KEYS will disable all non unique keys for the table
  for storage engines that support this (at least MyISAM and
  Aria). This can be used to speed up inserts into empty
  tables.
   
  ENABLE KEYS will enable all disabled keys.
   
  RENAME TO
   
  Renames the table. See also RENAME TABLE.
   
  ADD CONSTRAINT
   
  Modifies the table adding a constraint on a particular
  column or columns.
   
  MariaDB 10.2.1 introduced new ways to define a constraint.
   
  Note: Before MariaDB 10.2.1, constraint expressions were
  accepted in syntax, but ignored.
   
  ALTER TABLE table_name 
  ADD CONSTRAINT [constraint_name] CHECK(expression);
  Before a row is inserted or updated, all constraints are
  evaluated in the order they are defined. If any constraint
  fails, then the row will not be updated. One can use most
  deterministic functions in a constraint, including UDF's.
   
  CREATE TABLE account_ledger (
   id INT PRIMARY KEY AUTO_INCREMENT,
   transaction_name VARCHAR(100),
   credit_account VARCHAR(100),
   credit_amount INT,
   debit_account VARCHAR(100),
   debit_amount INT);
   
  ALTER TABLE account_ledger 
  ADD CONSTRAINT is_balanced 
   CHECK((debit_amount + credit_amount) = 0);
   
  The constraint_name is optional. If you don't provide one
  in the ALTER TABLE statement, MariaDB auto-generates a name
  for you. This is done so that you can remove it later using
  DROP CONSTRAINT clause.
   
  You can disable all constraint expression checks by setting
  the variable check_constraint_checks to OFF. You may find
  this useful when loading a table that violates some
  constraints that you want to later find and fix in SQL.
   
  To view constraints on a table, query
  information_schema.TABLE_CONSTRAINTS:
   
  SELECT CONSTRAINT_NAME, TABLE_NAME, CONSTRAINT_TYPE 
  FROM information_schema.TABLE_CONSTRAINTS
  WHERE TABLE_NAME = 'account_ledger';
   
  +-----------------+----------------+-----------------+
  | CONSTRAINT_NAME | TABLE_NAME | CONSTRAINT_TYPE |
  +-----------------+----------------+-----------------+
  | is_balanced | account_ledger | CHECK |
  +-----------------+----------------+-----------------+
   
  DROP CONSTRAINT
   
  DROP CONSTRAINT for UNIQUE and FOREIGN KEY constraints was
  introduced in MariaDB 10.2.22 and MariaDB 10.3.13.
   
  DROP CONSTRAINT for CHECK constraints was introduced in
  MariaDB 10.2.1
   
  Modifies the table, removing the given constraint.
   
  ALTER TABLE table_name
  DROP CONSTRAINT constraint_name;
   
  When you add a constraint to a table, whether through a
  CREATE TABLE or ALTER TABLE...ADD CONSTRAINT statement, you
  can either set a constraint_name yourself, or allow MariaDB
  to auto-generate one for you. To view constraints on a
  table, query information_schema.TABLE_CONSTRAINTS. For
  instance,
   
  CREATE TABLE t (
   a INT,
   b INT,
   c INT,
   CONSTRAINT CHECK(a > b),
   CONSTRAINT check_equals CHECK(a = c)); 
   
  SELECT CONSTRAINT_NAME, TABLE_NAME, CONSTRAINT_TYPE 
  FROM information_schema.TABLE_CONSTRAINTS
  WHERE TABLE_NAME = 't';
   
  +-----------------+----------------+-----------------+
  | CONSTRAINT_NAME | TABLE_NAME | CONSTRAINT_TYPE |
  +-----------------+----------------+-----------------+
  | check_equals | t | CHECK |
  | CONSTRAINT_1 | t | CHECK |
  +-----------------+----------------+-----------------+
   
  To remove a constraint from the table, issue an ALTER
  TABLE...DROP CONSTRAINT statement. For example,
   
  ALTER TABLE t DROP CONSTRAINT is_unique;
   
  ADD SYSTEM VERSIONING
   
  System-versioned tables was added in MariaDB 10.3.4.
   
  Add system versioning.
   
  DROP SYSTEM VERSIONING
   
  System-versioned tables was added in MariaDB 10.3.4.
   
  Drop system versioning.
   
  ADD PERIOD FOR SYSTEM_TIME
   
  System-versioned tables was added in MariaDB 10.3.4.
   
  FORCE
   
  ALTER TABLE ... FORCE can force MariaDB to re-build the
  table.
   
  In MariaDB 5.5 and before, this could only be done by
  setting the ENGINE table option to its old value. For
  example, for an InnoDB table, one could execute the
  following:
   
  ALTER TABLE tab_name ENGINE = InnoDB;
   
  In MariaDB 10.0 and later, the FORCE option can be used
  instead. For example, :
   
  ALTER TABLE tab_name FORCE;
   
  With InnoDB, the table rebuild will only reclaim unused
  space (i.e. the space previously used for deleted rows) if
  the innodb_file_per_table system variable is set to ON. If
  the system variable is OFF, then the space will not be
  reclaimed, but it will be-re-used for new data that's later
  added.
   
  EXCHANGE PARTITION
   
  ALTER TABLE ... EXCHANGE PARTITION was introduced in MariaDB
  10.0.4
   
  This is used to exchange the tablespace files between a
  partition and another table.
   
  See copying InnoDB's transportable tablespaces for more
  information.
   
  DISCARD TABLESPACE
   
  This is used to discard an InnoDB table's tablespace.
   
  See copying InnoDB's transportable tablespaces for more
  information.
   
  IMPORT TABLESPACE
   
  This is used to import an InnoDB table's tablespace. The
  tablespace should have been copied from its original server
  after executing FLUSH TABLES FOR EXPORT.
   
  See copying InnoDB's transportable tablespaces for more
  information.
   
  ALTER TABLE ... IMPORT only applies to InnoDB tables. Most
  other popular storage engines, such as Aria and MyISAM, will
  recognize their data files as soon as they've been placed
  in the proper directory under the datadir, and no special
  DDL is required to import them.
   
  ALGORITHM
   
  In MariaDB 5.5 and before, ALTER TABLE operations required
  making a temporary copy of the table, which can be slow for
  large tables.
   
  In MariaDB 10.0 and later, the ALTER TABLE statement
  supports the ALGORITHM clause. This clause is one of the
  clauses that is used to implement online DDL. ALTER TABLE
  supports several different algorithms. An algorithm can be
  explicitly chosen for an ALTER TABLE operation by setting
  the ALGORITHM clause. The supported values are:
  ALGORITHM=DEFAULT - This implies the default behavior for
  the specific statement, such as if no ALGORITHM clause is
  specified.
  ALGORITHM=COPY
  ALGORITHM=INPLACE
  ALGORITHM=NOCOPY - This was added in MariaDB 10.3.7.
  ALGORITHM=INSTANT - This was added in MariaDB 10.3.7.
   
  See InnoDB Online DDL Overview: ALGORITHM for information on
  how the ALGORITHM clause affects InnoDB.
   
  ALGORITHM=DEFAULT
   
  The default behavior, which occurs if ALGORITHM=DEFAULT is
  specified, or if ALGORITHM is not specified at all, usually
  only makes a copy if the operation doesn't support being
  done in-place at all. In this case, the most efficient
  available algorithm will usually be used.
   
  However, in MariaDB 10.3.6 and before, if the value of the
  old_alter_table system variable is set to ON, then the
  default behavior is to perform ALTER TABLE operations by
  making a copy of the table using the old algorithm.
   
  In MariaDB 10.3.7 and later, the old_alter_table system
  variable is deprecated. Instead, the alter_algorithm system
  variable defines the default algorithm for ALTER TABLE
  operations.
   
  ALGORITHM=COPY
   
  ALGORITHM=COPY was introduced in MariaDB 10.0 as the name
  for the original ALTER TABLE algorithm.
   
  When ALGORITHM=INPLACE is set, MariaDB essentially does the
  following operations:
   
  -- Create a temporary table with the new definition
  CREATE TEMPORARY TABLE tmp_tab (
  ...
  );
   
  -- Copy the data from the original table
  INSERT INTO tmp_tab
   SELECT * FROM original_tab;
   
  -- Drop the original table
  DROP TABLE original_tab;
   
  -- Rename the temporary table, so that it replaces the
  original one
  RENAME TABLE tmp_tab TO original_tab;
   
  This algorithm is very inefficient, but it is generic, so it
  works for all storage engines.
   
  If ALGORITHM=COPY is specified, then the copy algorithm will
  be used even if it is not necessary. This can result in a
  lengthy table copy. If multiple ALTER TABLE operations are
  required that each require the table to be rebuilt, then it
  is best to specify all operations in a single ALTER TABLE
  statement, so that the table is only rebuilt once.
   
  ALGORITHM=INPLACE
   
  ALGORITHM=INPLACE was introduced in MariaDB 10.0.
   
  ALGORITHM=COPY can be incredibly slow, because the whole
  table has to be copied and rebuilt. ALGORITHM=INPLACE was
  introduced as a way to avoid this by performing operations
  in-place and avoiding the table copy and rebuild, when
  possible.
   
  When ALGORITHM=INPLACE is set, the underlying storage engine
  uses optimizations to perform the operation while avoiding
  the table copy and rebuild. However, INPLACE is a bit of a
  misnomer, since some operations may still require the table
  to be rebuilt for some storage engines. Regardless, several
  operations can be performed without a full copy of the table
  for some storage engines.
   
  A more accurate name would have been ALGORITHM=ENGINE, where
  ENGINE refers to an "engine-specific" algorithm.
   
  If an ALTER TABLE operation supports ALGORITHM=INPLACE, then
  it can be performed using optimizations by the underlying
  storage engine, but it may rebuilt.
   
  See InnoDB Online DDL Operations with ALGORITHM=INPLACE for
  more.
   
  ALGORITHM=NOCOPY
   
  ALGORITHM=NOCOPY was introduced in MariaDB 10.3.7.
   
  ALGORITHM=INPLACE can sometimes be surprisingly slow in
  instances where it has to rebuild the clustered index,
  because when the clustered index has to be rebuilt, the
  whole table has to be rebuilt. ALGORITHM=NOCOPY was
  introduced as a way to avoid this. 
   
  If an ALTER TABLE operation supports ALGORITHM=NOCOPY, then
  it can be performed without rebuilding the clustered index.
   
  If ALGORITHM=NOCOPY is specified for an ALTER TABLE
  operation that does not support ALGORITHM=NOCOPY, then an
  error will be raised. In this case, raising an error is
  preferable, if the alternative is for the operation to
  rebuild the clustered index, and perform unexpectedly
  slowly.
   
  See InnoDB Online DDL Operations with ALGORITHM=NOCOPY for
  more.
   
  ALGORITHM=INSTANT
   
  ALGORITHM=INSTANT was introduced in MariaDB 10.3.7.
   
  ALGORITHM=INPLACE can sometimes be surprisingly slow in
  instances where it has to modify data files.
  ALGORITHM=INSTANT was introduced as a way to avoid this.
   
  If an ALTER TABLE operation supports ALGORITHM=INSTANT, then
  it can be performed without modifying any data files.
   
  If ALGORITHM=INSTANT is specified for an ALTER TABLE
  operation that does not support ALGORITHM=INSTANT, then an
  error will be raised. In this case, raising an error is
  preferable, if the alternative is for the operation to
  modify data files, and perform unexpectedly slowly.
   
  See InnoDB Online DDL Operations with ALGORITHM=INSTANT for
  more.
   
  LOCK
   
  In MariaDB 10.0 and later, the ALTER TABLE statement
  supports the LOCK clause. This clause is one of the clauses
  that is used to implement online DDL. ALTER TABLE supports
  several different locking strategies. A locking strategy can
  be explicitly chosen for an ALTER TABLE operation by setting
  the LOCK clause. The supported values are:
  DEFAULT: Acquire the least restrictive lock on the table
  that is supported for the specific operation. Permit the
  maximum amount of concurrency that is supported for the
  specific operation.
  NONE: Acquire no lock on the table. Permit all concurrent
  DML. If this locking strategy is not permitted for an
  operation, then an error is raised.
  SHARED: Acquire a read lock on the table. Permit read-only
  concurrent DML. If this locking strategy is not permitted
  for an operation, then an error is raised.
  EXCLUSIVE: Acquire a write lock on the table. Do not permit
  concurrent DML.
   
  Different storage engines support different locking
  strategies for different operations. If a specific locking
  strategy is chosen for an ALTER TABLE operation, and that
  table's storage engine does not support that locking
  strategy for that specific operation, then an error will be
  raised.
   
  If the LOCK clause is not explicitly set, then the operation
  uses LOCK=DEFAULT.
   
  ALTER ONLINE TABLE is equivalent to LOCK=NONE. Therefore,
  the ALTER ONLINE TABLE statement can be used to ensure that
  your ALTER TABLE operation allows all concurrent DML.
   
  See InnoDB Online DDL Overview: LOCK for information on how
  the LOCK clause affects InnoDB.
   
  Progress Reporting
   
  MariaDB provides progress reporting for ALTER TABLE
  statement for clients
  that support the new progress reporting protocol. For
  example, if you were using the mysql client, then the
  progress report might look like this::
   
  ALTER TABLE test ENGINE=Aria;
  Stage: 1 of 2 'copy to tmp table' 46% of stage
   
  The progress report is also shown in the output of the SHOW
  PROCESSLIST statement and in the contents of the
  information_schema.PROCESSLIST table.
   
  See Progress Reporting for more information.
   
  Aborting ALTER TABLE Operations
   
  If an ALTER TABLE operation is being performed and the
  connection is killed, the changes will be rolled back in a
  controlled manner. The rollback can be a slow operation as
  the time it takes is relative to how far the operation has
  progressed.
   
  Aborting ALTER TABLE ... ALGORITHM=COPY was made faster by
  removing excessive undo logging (MDEV-11415). This
  significantly shortens the time it takes to abort a running
  ALTER TABLE operation.
   
  Examples
  -------- 
  Adding a new column:
   
  ALTER TABLE t1 ADD x INT;
   
  Dropping a column:
   
  ALTER TABLE t1 DROP x;
   
  Modifying the type of a column:
   
  ALTER TABLE t1 MODIFY x bigint unsigned;
   
  Changing the name and type of a column:
   
  ALTER TABLE t1 CHANGE a b bigint unsigned auto_increment;
   
  Combining multiple clauses in a single ALTER TABLE
  statement, separated by commas:
   
  ALTER TABLE t1 DROP x, ADD x2 INT, CHANGE y y2 INT;
   
  Changing the storage engine:
   
  ALTER TABLE t1 ENGINE = InnoDB;
   
  Rebuilding the table (the previous example will also rebuild
  the table if it was already InnoDB):
   
  ALTER TABLE t1 FORCE;
   


  URL: https://mariadb.com/kb/en/library/alter-table/dzfxuxALTER TABLEdzfxuxhttps://mariadb.com/kb/en/library/alter-table/dzfxuxdzfxux39dzfxux647qjzxqqvvbqThe ALTER TABLESPACE statement is not supported by MariaDB.
  It was originally inherited from MySQL NDB Cluster. In MySQL
  5.7 and later, the statement is also supported for InnoDB.
  However, MariaDB has chosen not to include that specific
  feature. See MDEV-19294 for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/alter-tablespace/dzfxuxALTER TABLESPACEdzfxuxhttps://mariadb.com/kb/en/library/alter-tablespace/dzfxuxdzfxux39dzfxux648qjzxqqvvbqSyntax
  ------ 
  CREATE [OR REPLACE]
   [DEFINER = {user | CURRENT_USER | role | CURRENT_ROLE }]
   [AGGREGATE] FUNCTION [IF NOT EXISTS] func_name
  ([func_parameter[,...]])
   RETURNS type
   [characteristic ...]
   RETURN func_body
   
  func_parameter:
   param_name type
   
  type:
   Any valid MariaDB data type
   
  characteristic:
   LANGUAGE SQL
   | [NOT] DETERMINISTIC
   | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL
  DATA }
   | SQL SECURITY { DEFINER | INVOKER }
   | COMMENT 'string'
   
  func_body:
   Valid SQL procedure statement
   
  Description
  ----------- 
  Use the CREATE FUNCTION statement to create a new stored
  function. You must have
  the CREATE ROUTINE database privilege to use CREATE
  FUNCTION.
  A function takes any number of arguments and returns a value
  from the function body. The
  function body can be any valid SQL expression as you would
  use, for example, in any select
  expression. If you have the appropriate privileges, you can
  call the function exactly as you
  would any built-in function. See Security below for details
  on privileges.
   
  You can also use a variant of the CREATE FUNCTION statement
  to install a user-defined
  function (UDF) defined by a plugin. See CREATE FUNCTION
  (UDF)
  for details.
   
  You can use a SELECT statement for the function body by
  enclosing it in
  parentheses, exactly as you would to use a subselect for any
  other expression. The SELECT
  statement must return a single value. If more than one
  column is returned when the function is called,
  error 1241 results. If more than one row is returned when
  the function is called, error 1242
  results. Use a LIMIT clause to ensure only one row is
  returned.
   
  You can also replace the RETURN clause with a BEGIN...END
  compound
  statement. The compound statement must contain a RETURN
  statement. When the function is
  called, the RETURN statement immediately returns its result,
  and any statements after RETURN
  are effectively ignored.
   
  By default, a function is associated with the default
  database. To associate the function explicitly
  with a given database, specify the fully-qualified name as
  db_name.func_name
  when you create it. If the function name is the same as the
  name of a built-in function, you must
  use the fully qualified name when you call it.
   
  The parameter list enclosed within parentheses must always
  be present.
  If there are no parameters, an empty parameter list of ()
  should be
  used. Parameter names are not case sensitive.
   
  Each parameter can be declared to use any valid data type,
  except that
  the COLLATE attribute cannot be used.
   
  For valid identifiers to use as function names, see
  Identifier Names.
   
  AGGREGATE
   
  From MariaDB 10.3.3, it is possible to create stored
  aggregate functions as well. See Stored Aggregate Functions
  for details.
   
  RETURNS
   
  The RETURNS clause specifies the return type of the
  function. NULL values are permitted with all return types.
   
  What happens if the RETURN clause returns a value of a
  different type? It depends on the SQL_MODE in effect at the
  moment of the function creation.
   
  If the SQL_MODE is strict (STRICT_ALL_TABLES or
  STRICT_TRANS_TABLES flags are specified), a 1366 error will
  be produced.
   
  Otherwise, the value is coerced to the proper type. For
  example, if a function
  specifies an ENUM or SET value in the RETURNS clause, but
  the RETURN
  clause returns an integer, the value returned from the
  function is the string for the corresponding ENUM
  member of set of SET members.
   
  MariaDB stores the SQL_MODE system variable setting that is
  in effect at the
  time a routine is created, and always executes the routine
  with this setting in
  force, regardless of the server SQL mode in effect when the
  routine is invoked.
   
  LANGUAGE SQL
   
  LANGUAGE SQL is a standard SQL clause, and it can be used in
  MariaDB for portability. However that clause has no meaning,
  because SQL is the only supported language for stored
  functions.
   
  A function is deterministic if it can produce only one
  result for a given list of parameters. If the result may be
  affected by stored data, server variables, random numbers or
  any value that is not explicitly passed, then the function
  is not deterministic. Also, a function is non-deterministic
  if it uses non-deterministic functions like NOW() or
  CURRENT_TIMESTAMP(). The optimizer may choose a faster
  execution plan if it known that the function is
  deterministic. In such cases, you should declare the routine
  using the DETERMINISTIC keyword. If you want to explicitly
  state that the function is not deterministic (which is the
  default) you can use the NOT DETERMINISTIC keywords.
   
  If you declare a non-deterministic function as
  DETERMINISTIC, you may get incorrect results. If you declare
  a deterministic function as NOT DETERMINISTIC, in some cases
  the queries will be slower.
   
  OR REPLACE
   
  If the optional OR REPLACE clause is used, it acts as a
  shortcut for:
   
  DROP FUNCTION IF EXISTS function_name;
   
  CREATE FUNCTION function_name ...;
   
  with the exception that any existing privileges for the
  function are not dropped.
   
  IF NOT EXISTS
   
  If the IF NOT EXISTS clause is used, MariaDB will return a
  warning instead of an error if the function already exists.
  Cannot be used together with OR REPLACE.
   
  [NOT] DETERMINISTIC
   
  The [NOT] DETERMINISTIC clause also affects binary logging,
  because the STATEMENT format can not be used to store or
  replicate non-deterministic statements.
   
  CONTAINS SQL, NO SQL, READS SQL DATA, and MODIFIES SQL DATA
  are informative clauses that tell the server what the
  function does. MariaDB does not check in any way whether the
  specified clause is correct. If none of these clauses are
  specified, CONTAINS SQL is used by default.
   
  MODIFIES SQL DATA
   
  MODIFIES SQL DATA means that the function contains
  statements that may modify data stored in databases. This
  happens if the function contains statements like DELETE,
  UPDATE, INSERT, REPLACE or DDL.
   
  READS SQL DATA
   
  READS SQL DATA means that the function reads data stored in
  databases, but does not modify any data. This happens if
  SELECT statements are used, but there no write operations
  are executed.
   
  CONTAINS SQL
   
  CONTAINS SQL means that the function contains at least one
  SQL statement, but it does not read or write any data stored
  in a database. Examples include SET or DO.
   
  NO SQL
   
  NO SQL means nothing, because MariaDB does not currently
  support any language other than SQL.
   
  Oracle Mode
   
  From MariaDB 10.3, a subset of Oracle's PL/SQL language has
  been supported in addition to the traditional SQL/PSM-based
  MariaDB syntax. See Oracle mode from MariaDB 10.3 for
  details on changes when running Oracle mode.
   
  Security
   
  You must have the EXECUTE privilege on a function to call
  it.
  MariaDB automatically grants the EXECUTE and ALTER ROUTINE
  privileges to the
  account that called CREATE FUNCTION, even if the DEFINER
  clause was used.
   
  Each function has an account associated as the definer. By
  default, the definer is the account
  that created the function. Use the DEFINER clause to specify
  a different account as the
  definer. You must have the SUPER privilege to use the
  DEFINER
  clause. See Account Names for details on specifying
  accounts.
   
  The SQL SECURITY clause specifies what privileges are used
  when a function is called.
  If SQL SECURITY is INVOKER, the function body will be
  evaluated using the privileges
  of the user calling the function. If SQL SECURITY is
  DEFINER, the function body is
  always evaluated using the privileges of the definer
  account. DEFINER is the default.
   
  This allows you to create functions that grant limited
  access to certain data. For example, say
  you have a table that stores some employee information, and
  that you've granted SELECT
  privileges only on certain columns to the user account
  roger.
   
  CREATE TABLE employees (name TINYTEXT, dept TINYTEXT, salary
  INT);
  GRANT SELECT (name, dept) ON employees TO roger;
   
  To allow the user the get the maximum salary for a
  department, define a function and grant
  the EXECUTE privilege:
   
  CREATE FUNCTION max_salary (dept TINYTEXT) RETURNS INT
  RETURN
   (SELECT MAX(salary) FROM employees WHERE employees.dept =
  dept);
  GRANT EXECUTE ON FUNCTION max_salary TO roger;
   
  Since SQL SECURITY defaults to DEFINER, whenever the user
  roger calls
  this function, the subselect will execute with your
  privileges. As long as you have privileges to
  select the salary of each employee, the caller of the
  function will be able to get the maximum
  salary for each department without being able to see
  individual salaries.
   
  Character sets and collations
   
  Function return types can be declared to use any valid
  character set and collation. If used, the COLLATE attribute
  needs to be preceded by a CHARACTER SET attribute.
   
  If the character set and collation are not specifically set
  in the statement, the database defaults at the time of
  creation will be used. If the database defaults change at a
  later stage, the stored function character set/collation
  will not be changed at the same time; the stored function
  needs to be dropped and recreated to ensure the same
  character set/collation as the database is used.
   
  Examples
  -------- 
  The following example function takes a parameter, performs
  an operation using
  an SQL function, and returns the result.
   
  CREATE FUNCTION hello (s CHAR(20))
   RETURNS CHAR(50) DETERMINISTIC
   RETURN CONCAT('Hello, ',s,'!');
   
  SELECT hello('world');
  +----------------+
  | hello('world') |
  +----------------+
  | Hello, world! |
  +----------------+
   
  You can use a compound statement in a function to manipulate
  data with statements
  like INSERT and UPDATE. The following example creates a
  counter function
  that uses a temporary table to store the current value.
  Because the compound statement
  contains statements terminated with semicolons, you have to
  first change the statement
  delimiter with the DELIMITER statement to allow the
  semicolon to be used in the
  function body. See Delimiters in the mysql client for more.
   
  CREATE TEMPORARY TABLE counter (c INT);
  INSERT INTO counter VALUES (0);
  DELIMITER //
  CREATE FUNCTION counter () RETURNS INT
   BEGIN
   UPDATE counter SET c = c + 1;
   
   RETURN (SELECT c FROM counter LIMIT 1);
   END //
  DELIMITER ;
   
  Character set and collation:
   
  CREATE FUNCTION hello2 (s CHAR(20))
   RETURNS CHAR(50) CHARACTER SET 'utf8' COLLATE
  'utf8_bin' DETERMINISTIC
   RETURN CONCAT('Hello, ',s,'!');
   


  URL: https://mariadb.com/kb/en/library/create-function/dzfxuxCREATE FUNCTIONdzfxuxhttps://mariadb.com/kb/en/library/create-function/dzfxuxdzfxux39dzfxux653qjzxqqvvbqSyntax
  ------ 
  CREATE
   [OR REPLACE]
   [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]
   PROCEDURE sp_name ([proc_parameter[,...]])
   [characteristic ...] routine_body
   
  proc_parameter:
   [ IN | OUT | INOUT ] param_name type
   
  type:
   Any valid MariaDB data type
   
  characteristic:
   LANGUAGE SQL
   | [NOT] DETERMINISTIC
   | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL
  DATA }
   | SQL SECURITY { DEFINER | INVOKER }
   | COMMENT 'string'
   
  routine_body:
   Valid SQL procedure statement
   
  Description
  ----------- 
  Creates a stored procedure. By default, a routine is
  associated with the default database. To associate the
  routine
  explicitly with a given database, specify the name as
  db_name.sp_name
  when you create it.
   
  When the routine is invoked, an implicit USE db_name is
  performed (and
  undone when the routine terminates). The causes the routine
  to have
  the given default database while it executes. USE statements
  within
  stored routines are disallowed.
   
  When a stored procedure has been created, you invoke it by
  using the CALL statement (see CALL).
   
  To execute the CREATE PROCEDURE statement, it is
  necessary to have the CREATE ROUTINE privilege. By default,
  MariaDB
  automatically grants the ALTER ROUTINE and EXECUTE
  privileges to the
  routine creator. See also Stored Routine Privileges.
   
  The DEFINER and SQL SECURITY clauses specify the security
  context to
  be used when checking access privileges at routine execution
  time, as
  described later.
   
  If the routine name is the same as the name of a built-in
  SQL
  function, you must use a space between the name and the
  following
  parenthesis when defining the routine, or a syntax error
  occurs. This
  is also true when you invoke the routine later. For this
  reason, we
  suggest that it is better to avoid re-using the names of
  existing SQL
  functions for your own stored routines.
   
  The IGNORE_SPACE SQL mode applies to built-in functions, not
  to stored
  routines. It is always allowable to have spaces after a
  routine name,
  regardless of whether IGNORE_SPACE is enabled.
   
  The parameter list enclosed within parentheses must always
  be present.
  If there are no parameters, an empty parameter list of ()
  should be
  used. Parameter names are not case sensitive.
   
  Each parameter can be declared to use any valid data type,
  except that
  the COLLATE attribute cannot be used.
   
  For valid identifiers to use as procedure names, see
  Identifier Names.
   
  IN/OUT/INOUT
   
  Each parameter is an IN parameter by default. To specify
  otherwise for
  a parameter, use the keyword OUT or INOUT before the
  parameter name.
   
  An IN parameter passes a value into a procedure. The
  procedure might
  modify the value, but the modification is not visible to the
  caller
  when the procedure returns. An OUT parameter passes a value
  from the
  procedure back to the caller. Its initial value is NULL
  within the
  procedure, and its value is visible to the caller when the
  procedure
  returns. An INOUT parameter is initialized by the caller,
  can be
  modified by the procedure, and any change made by the
  procedure is
  visible to the caller when the procedure returns.
   
  For each OUT or INOUT parameter, pass a user-defined
  variable in the
  CALL statement that invokes the procedure so that you can
  obtain its
  value when the procedure returns. If you are calling the
  procedure
  from within another stored procedure or function, you can
  also pass a
  routine parameter or local routine variable as an IN or
  INOUT
  parameter.
   
  DETERMINISTIC/NOT DETERMINISTIC
   
  DETERMINISTIC and NOT DETERMINISTIC apply only to functions.
  Specifying DETERMINISTC or NON-DETERMINISTIC in procedures
  has no effect. The default value is NOT DETERMINISTIC.
  Functions are DETERMINISTIC when they always return the same
  value for the same input. For example, a truncate or
  substring function. Any function involving data, therefore,
  is always NOT DETERMINISTIC.
   
  CONTAINS SQL/NO SQL/READS SQL DATA/MODIFIES SQL DATA
   
  CONTAINS SQL, NO SQL, READS SQL DATA, and MODIFIES SQL DATA
  are informative clauses that tell the server what the
  function does. MariaDB does not check in any way whether the
  specified clause is correct. If none of these clauses are
  specified, CONTAINS SQL is used by default.
   
  MODIFIES SQL DATA means that the function contains
  statements that may modify data stored in databases. This
  happens if the function contains statements like DELETE,
  UPDATE, INSERT, REPLACE or DDL.
   
  READS SQL DATA means that the function reads data stored in
  databases, but does not modify any data. This happens if
  SELECT statements are used, but there no write operations
  are executed.
   
  CONTAINS SQL means that the function contains at least one
  SQL statement, but it does not read or write any data stored
  in a database. Examples include SET or DO.
   
  NO SQL means nothing, because MariaDB does not currently
  support any language other than SQL.
   
  The routine_body consists of a valid SQL procedure
  statement. This can
  be a simple statement such as SELECT or INSERT, or it can be
  a
  compound statement written using BEGIN and END. Compound
  statements
  can contain declarations, loops, and other control structure
  statements. See Programmatic and Compound Statements for
  syntax details.
   
  MariaDB allows routines to contain DDL statements, such as
  CREATE and
  DROP. MariaDB also allows stored procedures (but not stored
  functions)
  to contain SQL transaction statements such as COMMIT.
   
  For additional information about statements that are not
  allowed in
  stored routines, see Stored Routine Limitations.
   
  Invoking stored procedure from within programs
   
  For information about invoking stored procedures from within
  programs written in a language that has a MariaDB/MySQL
  interface, see CALL.
   
  OR REPLACE
   
  If the optional OR REPLACE clause is used, it acts as a
  shortcut for:
   
  DROP PROCEDURE IF EXISTS name;
   
  CREATE PROCEDURE name ...;
   
  with the exception that any existing privileges for the
  procedure are not dropped.
   
  sql_mode
   
  MariaDB stores the sql_mode system variable setting that is
  in effect at the time a routine is created, and always
  executes the routine with this setting in force, regardless
  of the server SQL mode in effect when the routine is
  invoked.
   
  Character Sets and Collations
   
  Procedure parameters can be declared with any character
  set/collation. If the character set and collation are not
  specifically set, the database defaults at the time of
  creation will be used. If the database defaults change at a
  later stage, the stored procedure character set/collation
  will not be changed at the same time; the stored procedure
  needs to be dropped and recreated to ensure the same
  character set/collation as the database is used.
   
  Oracle Mode
   
  From MariaDB 10.3, a subset of Oracle's PL/SQL language has
  been supported in addition to the traditional SQL/PSM-based
  MariaDB syntax. See Oracle mode from MariaDB 10.3 for
  details on changes when running Oracle mode.
   
  Examples
  -------- 
  The following example shows a simple stored procedure that
  uses an OUT
  parameter. It uses the DELIMITER command to set a new
  delimiter for the duration of the process — see Delimiters
  in the mysql client.
   
  DELIMITER //
   
  CREATE PROCEDURE simpleproc (OUT param1 INT)
   BEGIN
   SELECT COUNT(*) INTO param1 FROM t;
   END;
  //
   
  DELIMITER ;
   
  CALL simpleproc(@a);
   
  SELECT @a;
  +------+
  | @a |
  +------+
  | 1 |
  +------+
   
  Character set and collation:
   
  DELIMITER //
   
  CREATE PROCEDURE simpleproc2 (
   OUT param1 CHAR(10) CHARACTER SET 'utf8' COLLATE
  'utf8_bin'
  )
   BEGIN
   SELECT CONCAT('a'),f1 INTO param1 FROM t;
   END;
  //
   
  DELIMITER ;
   
  CREATE OR REPLACE:
   
  DELIMITER //
   
  CREATE PROCEDURE simpleproc2 (
   OUT param1 CHAR(10) CHARACTER SET 'utf8' COLLATE
  'utf8_bin'
  )
   BEGIN
   SELECT CONCAT('a'),f1 INTO param1 FROM t;
   
   END;
   
  //
  ERROR 1304 (42000): PROCEDURE simpleproc2 already exists
   
  DELIMITER ;
   
  DELIMITER //
   
  CREATE OR REPLACE PROCEDURE simpleproc2 (
   OUT param1 CHAR(10) CHARACTER SET 'utf8' COLLATE
  'utf8_bin'
  )
   BEGIN
   SELECT CONCAT('a'),f1 INTO param1 FROM t;
   
   END;
   
  //
  ERROR 1304 (42000): PROCEDURE simpleproc2 already exists
   
  DELIMITER ;
   
  Query OK, 0 rows affected (0.03 sec)
   


  URL: https://mariadb.com/kb/en/library/create-procedure/dzfxuxCREATE PROCEDUREdzfxuxhttps://mariadb.com/kb/en/library/create-procedure/dzfxuxdzfxux39dzfxux657qjzxqqvvbqSyntax
  ------ 
  ST_UNION(g1,g2)
   
  Description
  ----------- 
  Returns a geometry that is the union of the geometry g1 and
  geometry g2.
   
  Examples
  -------- 
  SET @g1 = GEOMFROMTEXT('POINT (0 2)');
   
  SET @g2 = GEOMFROMTEXT('POINT (2 0)');
   
  SELECT ASTEXT(ST_UNION(@g1,@g2));
  +---------------------------+
  | ASTEXT(ST_UNION(@g1,@g2)) |
  +---------------------------+
  | MULTIPOINT(2 0,0 2) |
  +---------------------------+
   
  SET @g1 = GEOMFROMTEXT('POLYGON((0 0,0 3,3 3,3 0,0 0))');
   
  SET @g2 = GEOMFROMTEXT('POLYGON((2 2,4 2,4 4,2 4,2 2))');
   
  SELECT ASTEXT(ST_UNION(@g1,@g2));
  +------------------------------------------------+
  | ASTEXT(ST_UNION(@g1,@g2)) |
  +------------------------------------------------+
  | POLYGON((0 0,0 3,2 3,2 4,4 4,4 2,3 2,3 0,0 0)) |
  +------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/st_union/dzfxuxST_UNIONdzfxuxhttps://mariadb.com/kb/en/library/st_union/dzfxuxdzfxux24dzfxux337qjzxqqvvbqSyntax
  ------ 
  CACHE INDEX 
   tbl_index_list [, tbl_index_list] ...
   IN key_cache_name 
   
  tbl_index_list:
   tbl_name [[INDEX|KEY] (index_name[, index_name] ...)]
   
  Description
  ----------- 
  The CACHE INDEX statement assigns table indexes to a
  specific key
  cache. It is used only for MyISAM tables.
   
  A default key cache exists and cannot be destroyed. To
  create more key caches, the key_buffer_size server system
  variable.
   
  The associations between tables indexes and key caches are
  lost on server restart. To recreate them automatically, it
  is necessary to configure caches in a configuration file and
  include some CACHE INDEX (and optionally LOAD INDEX)
  statements in the init file.
   
  Examples
  -------- 
  The following statement assigns indexes from the tables t1,
  t2, and t3
  to the key cache named hot_cache:
   
  CACHE INDEX t1, t2, t3 IN hot_cache;
  +---------+--------------------+----------+----------+
  | Table | Op | Msg_type | Msg_text |
  +---------+--------------------+----------+----------+
  | test.t1 | assign_to_keycache | status | OK |
  | test.t2 | assign_to_keycache | status | OK |
  | test.t3 | assign_to_keycache | status | OK |
  +---------+--------------------+----------+----------+
   
  Implementation (for MyISAM)
   
  Normally CACHE INDEX should not take a long time to execute.
  Internally it's implemented the following way:
  Find the right key cache (under
  LOCK_global_system_variables)
  Open the table with a TL_READ_NO_INSERT lock.
  Flush the original key cache for the given file (under key
  cache lock)
  Flush the new key cache for the given file (safety)
  Move the file to the new key cache (under file share lock)
   
  The only possible long operations are getting the locks for
  the table and flushing the original key cache, if there were
  many key blocks for the file in it.
   
  We plan to also add CACHE INDEX for Aria tables if there is
  a need for this.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/cache-index/dzfxuxCACHE INDEXdzfxuxhttps://mariadb.com/kb/en/library/cache-index/dzfxuxdzfxux26dzfxux339qjzxqqvvbqFLUSH TABLES ... FOR EXPORT was introduced in MariaDB
  10.0.8.
   
  Syntax
  ------ 
  FLUSH TABLES table_name [, table_name] FOR EXPORT
   
  Description
  ----------- 
  FLUSH TABLES ... FOR EXPORT flushes changes to the specified
  tables to disk so that binary copies can be made while the
  server is still running. This works for Archive, Aria, CSV,
  InnoDB, MyISAM, MERGE, and XtraDB tables.
   
  The table is read locked until one has issued UNLOCK TABLES.
   
  If a storage engine does not support FLUSH TABLES FOR
  EXPORT, a 1031 error (SQLSTATE 'HY000') is produced.
   
  If FLUSH TABLES ... FOR EXPORT is in effect in the session,
  the following statements will produce an error if attempted:
  FLUSH TABLES WITH READ LOCK
  FLUSH TABLES ... WITH READ LOCK
  FLUSH TABLES ... FOR EXPORT
  Any statement trying to update any table
   
  If any of the following statements is in effect in the
  session, attempting  FLUSH TABLES ... FOR EXPORT will
  produce an error.
  FLUSH TABLES ... WITH READ LOCK
  FLUSH TABLES ... FOR EXPORT
  LOCK TABLES ... READ
  LOCK TABLES ... WRITE
   
  FLUSH FOR EXPORT is not written to the binary log.
   
  This statement requires the RELOAD and the LOCK TABLES
  privileges.
   
  If one of the specified tables cannot be locked, none of the
  tables will be locked.
   
  If a table does not exist, an error like the following will
  be produced:
   
  ERROR 1146 (42S02): Table 'test.xxx' doesn't exist
   
  If a table is a view, an error like the following will be
  produced:
   
  ERROR 1347 (HY000): 'test.v' is not BASE TABLE
   
  Example
   
  FLUSH TABLES test.t1 FOR EXPORT;
  # Copy files related to the table (see below)
  UNLOCK TABLES;
   
  For a full description, please see copying MariaDB tables.
   


  URL:
  https://mariadb.com/kb/en/library/flush-tables-for-export/dzfxuxFLUSH TABLES FOR EXPORTdzfxuxhttps://mariadb.com/kb/en/library/flush-tables-for-export/dzfxuxdzfxux26dzfxux342qjzxqqvvbqSyntax
  ------ 
  HELP search_string
   
  Description
  ----------- 
  The HELP command can be used in any MariaDB client, such as
  the mysql command-line client, to get basic syntax help and
  a short description for most commands and functions. 
   
  If you provide an argument to the HELP command, the mysql
  client uses it as a search string to access server-side
  help. The proper operation of this command requires that the
  help tables in the mysql database be initialized with help
  topic information.
   
  If there is no match for the search string, the search
  fails. Use help contents to see a list of the help
  categories:
   
  HELP contents
  You asked for help about help category: "Contents"
  For more information, type 'help ', where  is one of the
  following
  categories:
   
   Account Management
   Administration
   Compound Statements
   Data Definition
   Data Manipulation
   Data Types
   Functions
   Functions and Modifiers for Use with GROUP BY
   Geographic Features
   Language Structure
   Plugins
   Table Maintenance
   Transactions
   User-Defined Functions
   Utility
   
  If a search string matches multiple items, MariaDB shows a
  list of matching topics:
   
  HELP create
  Many help items for your request exist.
  To make a more specific request, please type 'help ',
  where  is one of the following
  topics:
   CREATE DATABASE
   CREATE EVENT
   CREATE FUNCTION
   CREATE FUNCTION UDF
   CREATE INDEX
   CREATE PROCEDURE
   CREATE SERVER
   CREATE TABLE
   CREATE TABLESPACE
   CREATE TRIGGER
   CREATE USER
   CREATE VIEW
   SHOW
   SHOW CREATE DATABASE
   SHOW CREATE EVENT
   SHOW CREATE FUNCTION
   SHOW CREATE PROCEDURE
   SHOW CREATE TABLE
   SPATIAL
   
  Then you can enter a topic as the search string to see the
  help entry for that topic.
   
  The help is provided with the MariaDB server and makes use
  of four help tables found in the mysql database:
  help_relation, help_topic, help_category and help_keyword.
  These tables are populated by the mysql_install_db or
  fill_help_table.sql scripts which currently contain data
  generated from an old version of MySQL.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/help-command/dzfxuxHELP Commanddzfxuxhttps://mariadb.com/kb/en/library/help-command/dzfxuxdzfxux26dzfxux343qjzxqqvvbqSyntax
  ------ 
  CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]
  tbl_name
   (create_definition,...) [table_options ]...
  [partition_options]
  CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]
  tbl_name
   [(create_definition,...)] [table_options ]...
  [partition_options]
   select_statement
  CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]
  tbl_name
   { LIKE old_table_name | (LIKE old_table_name) }
   
  select_statement:
   [IGNORE | REPLACE] [AS] SELECT ... (Some legal select
  statement)
   
  Description
  ----------- 
  Use the CREATE TABLE statement to create a table with the
  given name.
   
  In its most basic form, the CREATE TABLE statement provides
  a table name
  followed by a list of columns, indexes, and constraints. By
  default, the table
  is created in the default database. Specify a database with
  db_name.tbl_name.
  If you quote the table name, you must quote the database
  name and table name
  separately as `db_name`.`tbl_name`. This is particularly
  useful for CREATE TABLE ... SELECT, because it allows to
  create a table into a database, which contains data from
  other databases. See Identifier Qualifiers.
   
  If a table with the same name exists, error 1050 results.
  Use IF NOT EXISTS
  to suppress this error and issue a note instead. Use SHOW
  WARNINGS
  to see notes.
   
  The CREATE TABLE statement automatically commits the current
  transaction,
  except when using the TEMPORARY keyword.
   
  For valid identifiers to use as table names, see Identifier
  Names.
   
  Note: if the default_storage_engine is set to ColumnStore
  then it needs setting on all UMs. Otherwise when the tables
  using the default engine are replicated across UMs they will
  use the wrong engine. You should therefore not use this
  option as a session variable with ColumnStore.
   
  Microsecond precision can be between 0-6. If no precision is
  specified it is assumed to be 0, for backward compatibility
  reasons.
   
  Privileges
   
  Executing the CREATE TABLE statement requires the CREATE
  privilege for the table or the database.
   
  CREATE OR REPLACE TABLE ...
   
  The OR REPLACE clause was added in MariaDB 10.0.8.
   
  If the OR REPLACE clause is used and if the table already
  exists, then instead of returning an error, the server will
  drop the existing table and replace it with the newly
  defined table.
   
  This syntax was originally added to make replication more
  robust if it has to rollback and repeat statements such as
  CREATE ... SELECT on slaves.
   
  CREATE OR REPLACE TABLE table_name (a int);
   
  is basically the same as:
   
  DROP TABLE IF EXISTS table_name;
  CREATE TABLE table_name (a int);
   
  with the following exceptions:
  If table_name was locked with LOCK TABLES it will continue
  to be locked after the statement.
  Temporary tables are only dropped if the TEMPORARY keyword
  was used. (With DROP TABLE, temporary tables are preferred
  to be dropped before normal tables).
   
  Things to be Aware of With CREATE OR REPLACE
   
  The table is dropped first (if it existed), after that the
  CREATE is done. Because of this, if the CREATE fails, then
  the table will not exist anymore after the statement. If the
  table was used with LOCK TABLES it will be unlocked.
  One can't use OR REPLACE together with IF EXISTS.
  Slaves in replication will by default use CREATE OR REPLACE
  when replicating CREATE statements that don''t use IF
  EXISTS. This can be changed by setting the variable
  slave-ddl-exec-mode to STRICT.
   
  CREATE TABLE IF NOT EXISTS ...
   
  If the IF NOT EXISTS clause is used, then the index will
  only be created if an index with the same name does not
  already exist. If the index already exists, then a warning
  will be triggered by default.
   
  CREATE TEMPORARY TABLE ...
   
  Use the TEMPORARY keyword to create a temporary table that
  is only available to your current session. Temporary tables
  are dropped when the your session ends. Temporary table
  names are specific to your session. They will not conflict
  with other temporary tables from other session even if they
  share the same name. They will shadow names of non-temporary
  tables or views, if they are identical. A temporary table
  can have the same name as a non-temporary table which is
  located in the same database. In that case, their name will
  reference the temporary table when used in SQL statements.
  You must have the CREATE TEMPORARY TABLES privilege on the
  database to create temporary tables. If no storage engine is
  specified, the default_tmp_storage_engine setting will
  determine the engine.
   
  CREATE TABLE ... LIKE
   
  Use the LIKE clause instead of a full table definition to
  create a table with the same definition as another table,
  including columns, indexes, and table options. Foreign key
  definitions, as well as any DATA DIRECTORY or INDEX
  DIRECTORY table options specified on the original table,
  will not be created.
   
  CREATE TABLE ... SELECT
   
  You can create a table containing data from other tables
  using the CREATE ... SELECT statement. Columns will be
  created in the table for each field returned by the SELECT
  query.
   
  You can also define some columns normally and add other
  columns from a SELECT. You can also create columns in the
  normal way and assign them some values using the query, this
  is done to force a certain type or other field
  characteristics. The columns that are not named in the query
  will be placed before the others. For example:
   
  CREATE TABLE test (a INT NOT NULL, b CHAR(10)) ENGINE=MyISAM
   SELECT 5 AS b, c, d FROM another_table;
   
  Remember that the query just returns data. If you want to
  use the same indexes, or the same columns attributes ([NOT]
  NULL, DEFAULT, AUTO_INCREMENT) in the new table, you need to
  specify them manually. Types and sizes are not automatically
  preserved if no data returned by the SELECT requires the
  full size, and VARCHAR could be converted into CHAR. The
  CAST() function can be used to forcee the new table to use
  certain types.
   
  Aliases (AS) are taken into account, and they should always
  be used when you SELECT an expression (function,
  arithmetical operation, etc).
   
  If an error occurs during the query, the table will not be
  created at all.
   
  If the new table has a primary key or UNIQUE indexes, you
  can use the IGNORE or REPLACE keywords to handle duplicate
  key errors during the query. IGNORE means that the newer
  values must not be inserted an identical value exists in the
  index. REPLACE means that older values must be overwritten.
   
  If the columns in the new table are more than the rows
  returned by the query, the columns populated by the query
  will be placed after other columns. Note that if the strict
  SQL_MODE is on, and the columns that are not names in the
  query do not have a DEFAULT value, an error will raise and
  no rows will be copied.
   
  Concurrent inserts are not used during the execution of a
  CREATE ... SELECT.
   
  If the table already exists, an error similar to the
  following will be returned:
   
  ERROR 1050 (42S01): Table 't' already exists
   
  If the IF NOT EXISTS clause is used and the table exists, a
  note will be produced instead of an error.
   
  To insert rows from a query into an existing table, INSERT
  ... SELECT can be used.
   
  Column Definitions
   
  create_definition:
   { col_name column_definition | index_definition |
  period_definition | CHECK (expr) }
   
  column_definition:
   data_type
   [NOT NULL | NULL] [DEFAULT default_value | (expression)]
   [AUTO_INCREMENT] [ZEROFILL] [UNIQUE [KEY] | [PRIMARY] KEY]
   [INVISIBLE] [{WITH|WITHOUT} SYSTEM VERSIONING]
   [COMMENT 'string']
   [COLUMN_FORMAT {FIXED|DYNAMIC|DEFAULT}]
   [reference_definition]
   | data_type [GENERATED ALWAYS] AS { { ROW {START|END} } | {
  (expression) [VIRTUAL | PERSISTENT | STORED] } }
   [UNIQUE [KEY]] [COMMENT 'string']
   
  constraint_definition:
   CONSTRAINT [constraint_name] CHECK (expression)
  Note: MariaDB accepts the REFERENCES clause in ALTER TABLE
  and CREATE TABLE column definitions, but that syntax does
  nothing. MariaDB simply parses it without returning any
  error or warning, for compatibility with other DBMS's.
  Before MariaDB 10.2.1 this was also true for CHECK
  constraints. Only the syntax for indexes described below
  creates foreign keys.
   
  Each definition either creates a column in the table or
  specifies and index or
  constraint on one or more columns. See Indexes below for
  details
  on creating indexes.
   
  Create a column by specifying a column name and a data type,
  optionally
  followed by column options. See Data Types for a full list
  of data types allowed in MariaDB.
   
  NULL and NOT NULL
   
  Use the NULL or NOT NULL options to specify that values in
  the column
  may or may not be NULL, respectively. By default, values may
  be NULL. See also NULL Values in MariaDB.
   
  DEFAULT Column Option
   
  The DEFAULT clause was enhanced in MariaDB 10.2.1. Some
  enhancements include
  BLOB and TEXT columns now support DEFAULT.
  The DEFAULT clause can now be used with an expression or
  function.
   
  Specify a default value using the DEFAULT clause. If you
  don't specify DEFAULT then the following rules apply:
  If the column is not defined with NOT NULL, AUTO_INCREMENT
  or TIMESTAMP, an explicit DEFAULT NULL will be added.
  Note that in MySQL and in MariaDB before 10.1.6, you may get
  an explicit DEFAULT for primary key parts, if not specified
  with NOT NULL.
   
  The default value will be used if you INSERT a row without
  specifying a value for that column, or if you specify
  DEFAULT for that column.
  Before MariaDB 10.2.1 you couldn't usually provide an
  expression or function to evaluate at
  insertion time. You had to provide a constant default value
  instead. The one
  exception is that you may use CURRENT_TIMESTAMP as
  the default value for a TIMESTAMP column to use the current
  timestamp at insertion time.
   
  CURRENT_TIMESTAMP may also be used as
  the default value for a DATETIME
   
  From MariaDB 10.2.1 you can use most functions in DEFAULT.
  Expressions should have parentheses around them. If you use
  a non deterministic function in DEFAULT then all inserts to
  the table will be replicated in row mode. You can even refer
  to earlier columns in the DEFAULT expression:
   
  CREATE TABLE t1 (a int DEFAULT (1+1), b int DEFAULT (a+1));
  CREATE TABLE t2 (a bigint primary key DEFAULT UUID_SHORT());
   
  The DEFAULT clause cannot contain any stored functions or
  subqueries, and a column used in the clause must already
  have been defined earlier in the statement.
   
  Since MariaDB 10.2.1, it is possible to assign BLOB or TEXT
  columns a DEFAULT value. In earlier versions, assigning a
  default to these columns was not possible.
   
  Starting from 10.3.3 you can also use DEFAULT (NEXT VALUE
  FOR sequence)
   
  AUTO_INCREMENT Column Option
   
  Use AUTO_INCREMENT to create a column whose value can
  can be set automatically from a simple counter. You can only
  use AUTO_INCREMENT
  on a column with an integer type. The column must be a key,
  and there can only be
  one AUTO_INCREMENT column in a table. If you insert a row
  without specifying
  a value for that column (or if you specify 0, NULL, or
  DEFAULT
  as the value), the actual value will be taken from the
  counter, with each insertion
  incrementing the counter by one. You can still insert a
  value explicitly. If you
  insert a value that is greater than the current counter
  value, the counter is
  set based on the new value. An AUTO_INCREMENT column is
  implicitly NOT NULL.
  Use LAST_INSERT_ID to get the AUTO_INCREMENT value
  most recently used by an INSERT statement.
   
  ZEROFILL Column Option
   
  If the ZEROFILL column option is specified for a column
  using a numeric data type, then the column will be set to
  UNSIGNED and the spaces used by default to pad the field are
  replaced with zeros. ZEROFILL is ignored in expressions or
  as part of a UNION. ZEROFILL is a non-standard MySQL and
  MariaDB enhancement.
   
  PRIMARY KEY Column Option
   
  Use PRIMARY KEY (or just KEY) to make a column a primary
  key. A primary key is a special type of a unique key. There
  can be at most one primary key per table, and it is
  implicitly NOT NULL.
   
  Specifying a column as a unique key creates a unique index
  on that column. See the Index Definitions section below for
  more information.
   
  UNIQUE KEY Column Option
   
  Use UNIQUE KEY (or just UNIQUE) to specify that all values
  in the column
  must be distinct from each other. Unless the column is NOT
  NULL, there may be
  multiple rows with NULL in the column. 
   
  Specifying a column as a unique key creates a unique index
  on that column. See the Index Definitions section below for
  more information.
   
  COMMENT Column Option
   
  You can provide a comment for each column using the COMMENT
  clause. The maximum length is 1024 characters (it was 255
  characters before MariaDB 5.5). Use
  the SHOW FULL COLUMNS statement to see column comments.
   
  Generated Columns
   
  A generated column is a column in a table that cannot
  explicitly be set to a specific value in a DML query.
  Instead, its value is automatically generated based on an
  expression. This expression might generate the value based
  on the values of other columns in the table, or it might
  generate the value by calling built-in functions or
  user-defined functions (UDFs).
   
  There are two types of generated columns:
  PERSISTENT or STORED: This type's value is actually stored
  in the table.
  VIRTUAL: This type's value is not stored at all. Instead,
  the value is generated dynamically when the table is
  queried. This type is the default.
   
  Generated columns are also sometimes called computed columns
  or virtual columns.
   
  For a complete description about generated columns and their
  limitations, see Generated (Virtual and Persistent/Stored)
  Columns.
   
  COLUMN_FORMAT
   
  COLUMN_FORMAT is only used by MySQL Cluster, and is silently
  ignored in MariaDB.
   
  COMPRESSED
   
  Certain columns may be compressed. See Storage-Engine
  Independent Column Compression.
   
  INVISIBLE
   
  Columns may be made invisible, and hidden in certain
  contexts. See Invisible Columns.
   
  WITH SYSTEM VERSIONING Column Option
   
  Columns may be explicitly marked as included from system
  versioning. See System-versioned tables for details.
   
  WITHOUT SYSTEM VERSIONING Column Option
   
  Columns may be explicitly marked as excluded from system
  versioning. See System-versioned tables for details.
   
  Index Definitions
   
  index_definition:
   {INDEX|KEY} [index_name] [index_type] (index_col_name,...)
  [index_option] ...
   | {FULLTEXT|SPATIAL} [INDEX|KEY] [index_name]
  (index_col_name,...) [index_option] ...
   | [CONSTRAINT [symbol]] PRIMARY KEY [index_type]
  (index_col_name,...) [index_option] ...
   | [CONSTRAINT [symbol]] UNIQUE [INDEX|KEY] [index_name]
  [index_type] (index_col_name,...) [index_option] ...
   | [CONSTRAINT [symbol]] FOREIGN KEY [index_name]
  (index_col_name,...) reference_definition
   
  index_col_name:
   col_name [(length)] [ASC | DESC]
   
  index_type:
   USING {BTREE | HASH | RTREE}
   
  index_option:
   KEY_BLOCK_SIZE [=] value
   | index_type
   | WITH PARSER parser_name
   | COMMENT 'string'
   | CLUSTERING={YES| NO}
   
  reference_definition:
   REFERENCES tbl_name (index_col_name,...)
   [MATCH FULL | MATCH PARTIAL | MATCH SIMPLE]
   [ON DELETE reference_option]
   [ON UPDATE reference_option]
   
  reference_option:
   RESTRICT | CASCADE | SET NULL | NO ACTION
  INDEX and KEY are synonyms. 
   
  Index names are optional, if not specified an automatic name
  will be assigned. Index name are needed to drop indexes and
  appear in error messages when a constraint is violated.
   
  Index Categories
   
  Plain Indexes
   
  Plain indexes are regular indexes that are not unique, and
  are not acting as a primary key or a foreign key. They are
  also not the "specialized" FULLTEXT or SPATIAL indexes.
   
  See Getting Started with Indexes: Plain Indexes for more
  information.
   
  PRIMARY KEY
   
  For PRIMARY KEY indexes, you can specify a name for the
  index, but it is silently ignored, and the name of the index
  is always PRIMARY.
   
  See Getting Started with Indexes: Primary Key for more
  information.
   
  UNIQUE
   
  The UNIQUE keyword means that the index will not accept
  duplicated values, except for NULLs. An error will raise if
  you try to insert duplicate values in a UNIQUE index.
   
  For UNIQUE indexes, you can specify a name for the
  constraint, using the CONSTRAINT keyword. That name will be
  used in error messages.
   
  See Getting Started with Indexes: Unique Index for more
  information.
   
  FOREIGN KEY
   
  For FOREIGN KEY indexes, a reference definition must be
  provided.
   
  For FOREIGN KEY indexes, you can specify a name for the
  constraint, using the CONSTRAINT keyword. That name will be
  used in error messages.
   
  First, you have to specify the name of the target (parent)
  table and a column or a column list which must be indexed
  and whose values must match to the foreign key's values.
  The MATCH clause is accepted to improve the compatibility
  with other DBMS's, but has no meaning in MariaDB. The ON
  DELETE and ON UPDATE clauses specify what must be done when
  a DELETE (or a REPLACE) statements attempts to delete a
  referenced row from the parent table, and when an UPDATE
  statement attempts to modify the referenced foreign key
  columns in a parent table row, respectively. The following
  options are allowed:
  RESTRICT: The delete/update operation is not performed. The
  statement terminates with a 1451 error (SQLSTATE '2300').
  NO ACTION: Synonym for RESTRICT.
  CASCADE: The delete/update operation is performed in both
  tables.
  SET NULL: The update or delete goes ahead in the parent
  table, and the corresponding foreign key fields in the child
  table are set to NULL. (They must not be defined as NOT NULL
  for this to succeed).
  SET DEFAULT: This option is currently implemented only for
  the PBXT storage engine, which is disabled by default and no
  longer maintained. It sets the child table's foreign key
  fields to their DEFAULT values when the referenced parent
  table key entries are updated or deleted.
   
  If either clause is omitted, the default behavior for the
  omitted clause is RESTRICT.
   
  See Foreign Keys for more information.
   
  FULLTEXT
   
  Use the FULLTEXT keyword to create full-text indexes.
   
  See Full-Text Indexes for more information.
   
  SPATIAL
   
  Use the SPATIAL keyword to create geometric indexes.
   
  See SPATIAL INDEX for more information.
   
  Index Options
   
  KEY_BLOCK_SIZE Index Option
   
  The KEY_BLOCK_SIZE index option is similar to the
  KEY_BLOCK_SIZE table option.
   
  With the InnoDB storage engine, if you specify a non-zero
  value for the KEY_BLOCK_SIZE table option for the whole
  table, then the table will implicitly be created with the
  ROW_FORMAT table option set to COMPRESSED. However, this
  does not happen if you just set the KEY_BLOCK_SIZE index
  option for one or more indexes in the table. The InnoDB
  storage engine ignores the KEY_BLOCK_SIZE index option.
  However, the SHOW CREATE TABLE statement may still report it
  for the index.
   
  For information about the KEY_BLOCK_SIZE index option, see
  the KEY_BLOCK_SIZE table option below.
   
  Index Types
   
  Each storage engine supports some or all index types. See
  Storage Engine Index Types for details on permitted index
  types for each storage engine.
   
  Different index types are optimized for different kind of
  operations:
  BTREE is the default type, and normally is the best choice.
  It is supported by all storage engines. It can be used to
  compare a column's value with a value using the =, >, >=,
  0) ,b int check (b> 0), constraint abc check (a>b));
   
  If you use the second format and you don't give a name to
  the constraint, then the constraint will get a auto
  generated name. This is done so that you can later delete
  the constraint with ALTER TABLE DROP constraint_name.
   
  One can disable all constraint expression checks by setting
  the variable check_constraint_checks to OFF. This is useful
  for example when loading a table that violates some
  constraints that you want to later find and fix in SQL.
   
  See CONSTRAINT for more information.
   
  Table Options
   
  For each individual table you create (or alter), you can set
  some table options. The general syntax for setting options
  is:
   
    = , [ =  ...]
   
  The equal sign is optional.
   
  Some options are supported by the server and can be used for
  all tables, no matter what storage engine they use; other
  options can be specified for all storage engines, but have a
  meaning only for some engines. Also, engines can extend
  CREATE TABLE with new options.
   
  If the IGNORE_BAD_TABLE_OPTIONS SQL_MODE is enabled, wrong
  table options generate a warning; otherwise, they generate
  an error.
   
  table_option: 
   [STORAGE] ENGINE [=] engine_name
   | AUTO_INCREMENT [=] value
   | AVG_ROW_LENGTH [=] value
   | [DEFAULT] CHARACTER SET [=] charset_name
   | CHECKSUM [=] {0 | 1}
   | [DEFAULT] COLLATE [=] collation_name
   | COMMENT [=] 'string'
   | CONNECTION [=] 'connect_string'
   | DATA DIRECTORY [=] 'absolute path to directory'
   | DELAY_KEY_WRITE [=] {0 | 1}
   | ENCRYPTED [=] {YES | NO}
   | ENCRYPTION_KEY_ID [=] value
   | IETF_QUOTES [=] {YES | NO}
   | INDEX DIRECTORY [=] 'absolute path to directory'
   | INSERT_METHOD [=] { NO | FIRST | LAST }
   | KEY_BLOCK_SIZE [=] value
   | MAX_ROWS [=] value
   | MIN_ROWS [=] value
   | PACK_KEYS [=] {0 | 1 | DEFAULT}
   | PAGE_CHECKSUM [=] {0 | 1}
   | PAGE_COMPRESSED [=] {0 | 1}
   | PAGE_COMPRESSION_LEVEL [=] {0 .. 9}
   | PASSWORD [=] 'string'
   | ROW_FORMAT [=]
  {DEFAULT|DYNAMIC|FIXED|COMPRESSED|REDUNDANT|COMPACT|PAGE}
   | SEQUENCE [=] {0|1}
   | STATS_AUTO_RECALC [=] {DEFAULT|0|1}
   | STATS_PERSISTENT [=] {DEFAULT|0|1}
   | STATS_SAMPLE_PAGES [=] {DEFAULT|value}
   | TABLESPACE tablespace_name
   | TRANSACTIONAL [=] {0 | 1}
   | UNION [=] (tbl_name[,tbl_name]...)
   | WITH SYSTEM VERSIONING
   
  [STORAGE] ENGINE
   
  [STORAGE] ENGINE specifies a storage engine for the table.
  If this option is not used, the default storage engine is
  used instead. That is, the default_storage_engine session option
  value if it is set, or the value specified for the
  --default-storage-engine mysqld startup options, or InnoDB.
  If the specified storage engine is not installed and active,
  the default value will be used, unless the
  NO_ENGINE_SUBSTITUTION SQL MODE is set (default since
  MariaDB 10.0). This is only true for CREATE TABLE, not for
  ALTER TABLE. For a list of storage engines that are present
  in your server, issue a SHOW ENGINES.
   
  AUTO_INCREMENT
   
  AUTO_INCREMENT specifies the initial value for the
  AUTO_INCREMENT primary key. This works for MyISAM, Aria,
  InnoDB/XtraDB, MEMORY, and ARCHIVE tables. You can change
  this option with ALTER TABLE, but in that case the new value
  must be higher than the highest value which is present in
  the AUTO_INCREMENT column. If the storage engine does not
  support this option, you can insert (and then delete) a row
  having the wanted value - 1 in the AUTO_INCREMENT column.
   
  AVG_ROW_LENGTH
   
  AVG_ROW_LENGTH is the average rows size. It only applies to
  tables using MyISAM and Aria storage engines that have the
  ROW_FORMAT table option set to FIXED format.
   
  MyISAM uses MAX_ROWS and AVG_ROW_LENGTH to decide the
  maximum size of a table (default: 256TB, or the maximum file
  size allowed by the system).
   
  [DEFAULT] CHARACTER SET/CHARSET
   
  [DEFAULT] CHARACTER SET (or [DEFAULT] CHARSET) is used to
  set a default character set for the table. This is the
  character set used for all columns where an explicit
  character set is not specified. If this option is omitted or
  DEFAULT is specified, database's default character set will
  be used. See Setting Character Sets and Collations for
  details on setting the character sets.
   
  CHECKSUM/TABLE_CHECKSUM
   
  CHECKSUM (or TABLE_CHECKSUM) can be set to 1 to maintain a
  live checksum for all table's rows. This makes write
  operations slower, but CHECKSUM TABLE will be very fast.
  This option is only supported for MyISAM and Aria tables.
   
  [DEFAULT] COLLATE
   
  [DEFAULT] COLLATE is used to set a default collation for the
  table. This is the collation used for all columns where an
  explicit character set is not specified. If this option is
  omitted or DEFAULT is specified, database's default option
  will be used. See Setting Character Sets and Collations for
  details on setting the collations
   
  COMMENT
   
  COMMENT is a comment for the table. Maximum length is 2048
  characters (before mariaDB 5.5 it was 60 characters). Also
  used to define table parameters when creating a Spider
  table.
   
  CONNECTION
   
  CONNECTION is used to specify a server name or a connection
  string for a Spider, CONNECT, Federated or FederatedX table.
   
  DATA DIRECTORY/INDEX DIRECTORY
   
  DATA DIRECTORY and INDEX DIRECTORY were only supported for
  MyISAM and Aria, before MariaDB 5.5. Since 5.5, DATA
  DIRECTORY has also been supported by InnoDB if the
  innodb_file_per_table server system variable is enabled, but
  only in CREATE TABLE, not in ALTER TABLE. So, carefully
  choose a path for InnoDB tables at creation time, because it
  cannot be changed without dropping and re-creating the
  table. These options specify the paths for data files and
  index files, respectively. If these options are omitted, the
  database's directory will be used to store data files and
  index files. Note that these table options do not work for
  partitioned tables (use the partition options instead), or
  if the server has been invoked with the
  --skip-symbolic-links startup option. To avoid the
  overwriting of old files with the same name that could be
  present in the directories, you can use the
  --keep_files_on_create option (an error will be issued if
  files already exist). These options are ignored if the
  NO_DIR_IN_CREATE SQL_MODE is enabled (useful for replication
  slaves). Also note that symbolic links cannot be used for
  InnoDB tables.
   
  DATA DIRECTORY works by creating symlinks from where the
  table would normally have been (inside the datadir) to where
  the option specifies. For security reasons, to avoid
  bypassing the privilege system, the server does not permit
  symlinks inside the datadir. Therefore, DATA DIRECTORY
  cannot be used to specify a location inside the datadir. An
  attempt to do so will result in an error 1210 (HY000)
  Incorrect arguments to DATA DIRECTORY.
   
  DELAY_KEY_WRITE
   
  DELAY_KEY_WRITE is supported by MyISAM and Aria, and can be
  set to 1 to speed up write operations. In that case, when
  data are modified, the indexes are not updated until the
  table is closed. Writing the changes to the index file
  altogether can be much faster. However, note that this
  option is applied only if the delay_key_write server
  variable is set to 'ON'. If it is 'OFF' the delayed
  index writes are always disabled, and if it is 'ALL' the
  delayed index writes are always used, disregarding the value
  of DELAY_KEY_WRITE.
   
  ENCRYPTED
   
  The ENCRYPTED table option was added in MariaDB 10.1.4
   
  The ENCRYPTED table option can be used to manually set the
  encryption status of an InnoDB table. See InnoDB / XtraDB
  Encryption for more information.
   
  Aria does not currently support the ENCRYPTED table option.
  See MDEV-18049 about that.
   
  See Data-at-Rest Encryption for more information.
   
  ENCRYPTION_KEY_ID
   
  The ENCRYPTION_KEY_ID table option was added in MariaDB
  10.1.4
   
  The ENCRYPTION_KEY_ID table option can be used to manually
  set the encryption key of an InnoDB table. See InnoDB /
  XtraDB Encryption for more information.
   
  Aria does not currently support the ENCRYPTION_KEY_ID table
  option. See MDEV-18049 about that.
   
  See Data-at-Rest Encryption for more information.
   
  IETF_QUOTES
   
  The IETF_QUOTES option was added in MariaDB 10.1.8
   
  For the CSV storage engine, the IETF_QUOTES option, when set
  to YES, enables IETF-compatible parsing of embedded quote
  and comma characters. Enabling this option for a table
  improves compatibility with other tools that use CSV, but is
  not compatible with MySQL CSV tables, or MariaDB CSV tables
  created without this option. Disabled by default.
   
  INSERT_METHOD
   
  INSERT_METHOD is only used with MERGE tables. This option
  determines in which underlying table the new rows should be
  inserted. If you set it to 'NO' (which is the default) no
  new rows can be added to the table (but you will still be
  able to perform INSERTs directly against the underlying
  tables). FIRST means that the rows are inserted into the
  first table, and LAST means that thet are inserted into the
  last table.
   
  KEY_BLOCK_SIZE
   
  KEY_BLOCK_SIZE is used to determine the size of key blocks,
  in bytes or kilobytes. However, this value is just a hint,
  and the storage engine could modify or ignore it. If
  KEY_BLOCK_SIZE is set to 0, the storage engine's default
  value will be used.
   
  With the InnoDB storage engine, if you specify a non-zero
  value for the KEY_BLOCK_SIZE table option for the whole
  table, then the table will implicitly be created with the
  ROW_FORMAT table option set to COMPRESSED.
   
  MIN_ROWS/MAX_ROWS
   
  MIN_ROWS and MAX_ROWS let the storage engine know how many
  rows you are planning to store as a minimum and as a
  maximum. These values will not be used as real limits, but
  they help the storage engine to optimize the table. MIN_ROWS
  is only used by MEMORY storage engine to decide the minimum
  memory that is always allocated. MAX_ROWS is used to decide
  the minimum size for indexes.
   
  PACK_KEYS
   
  PACK_KEYS can be used to determine whether the indexes will
  be compressed. Set it to 1 to compress all keys. With a
  value of 0, compression will not be used. With the DEFAULT
  value, only long strings will be compressed. Uncompressed
  keys are faster.
   
  PAGE_CHECKSUM
   
  PAGE_CHECKSUM is only applicable to Aria tables, and
  determines whether indexes and data should use page
  checksums for extra safety. 
   
  PAGE_COMPRESSED
   
  PAGE_COMPRESSED is used to enable InnoDB page compression
  for InnoDB tables.
   
  PAGE_COMPRESSION_LEVEL
   
  PAGE_COMPRESSION_LEVEL is used to set the compression level
  for InnoDB page compression for InnoDB tables. The table
  must also have the PAGE_COMPRESSED table option set to 1.
   
  Valid values for PAGE_COMPRESSION_LEVEL are 1 (the best
  speed) through 9 (the best compression), .
   
  PASSWORD
   
  PASSWORD is unused.
   
  RAID_TYPE
   
  RAID_TYPE is an obsolete option, as the raid support has
  been disabled since MySQL 5.0.
   
  ROW_FORMAT
   
  The ROW_FORMAT table option specifies the row format for the
  data file. Possible values are engine-dependent.
   
  Supported MyISAM Row Formats
   
  For MyISAM, the supported row formats are: 
  FIXED
  DYNAMIC
  COMPRESSED
   
  The COMPRESSED row format can only be set by the myisampack
  command line tool.
   
  See MyISAM Storage Formats for more information.
   
  Supported Aria Row Formats
   
  For Aria, the supported row formats are:
  PAGE
  FIXED
  DYNAMIC.
   
  See Aria Storage Formats for more information.
   
  Supported InnoDB Row Formats
   
  For InnoDB/XtraDB, the supported row formats are:
  COMPACT
  REDUNDANT
  COMPRESSED
  DYNAMIC.
   
  If the ROW_FORMAT table option is set to FIXED for an InnoDB
  table, then the server will either return an error or a
  warning depending on the value of the innodb_strict_mode
  system variable. If the innodb_strict_mode system variable
  is set to OFF, then a warning is issued, and MariaDB will
  create the table using the default row format for the
  specific MariaDB server version. If the innodb_strict_mode
  system variable is set to ON, then an error will be raised.
   
  See XtraDB/InnoDB Storage Formats for more information.
   
  Other Storage Engines and ROW_FORMAT
   
  Other storage engines do not support the ROW_FORMAT table
  option.
   
  SEQUENCE
   
  If the table is a sequence, then it will have the SEQUENCE
  set to 1.
   
  STATS_AUTO_RECALC
   
  STATS_AUTO_RECALC is available only in MariaDB 10.0+. It
  indicates whether to automatically recalculate persistent
  statistics (see STATS_PERSISTENT, below) for an InnoDB
  table.
  If set to 1, statistics will be recalculated when more than
  10% of the data has changed. When set to 0, stats will be
  recalculated only when an ANALYZE TABLE is run. If set to
  DEFAULT, or left out, the value set by the
  innodb_stats_auto_recalc system variable applies. See InnoDB
  Persistent Statistics.
   
  STATS_PERSISTENT
   
  STATS_PERSISTENT is available only in MariaDB 10.0+. It
  indicates whether the InnoDB statistics created by ANALYZE
  TABLE will remain on disk or not. It can be set to 1 (on
  disk), 0 (not on disk, the pre-MariaDB 10 behavior), or
  DEFAULT (the same as leaving out the option), in which case
  the value set by the innodb_stats_persistent system variable
  will apply. Persistent statistics stored on disk allow the
  statistics to survive server restarts, and provide better
  query plan stability. See InnoDB Persistent Statistics.
   
  STATS_SAMPLE_PAGES
   
  STATS_SAMPLE_PAGES is available only in MariaDB 10.0+. It
  indicates how many pages are used to sample index
  statistics. If 0 or DEFAULT, the default value, the
  innodb_stats_sample_pages value is used. See InnoDB
  Persistent Statistics.
   
  TRANSACTIONAL
   
  TRANSACTIONAL is only applicable for Aria tables. In future
  Aria tables created with this option will be fully
  transactional, but currently this provides a form of crash
  protection. See Aria Storage Engine for more details.
   
  UNION
   
  UNION must be specified when you create a MERGE table. This
  option contains a comma-separated list of MyISAM tables
  which are accessed by the new table. The list is enclosed
  between parenthesis. Example: UNION = (t1,t2)
   
  WITH SYSTEM VERSIONING
   
  WITH SYSTEM VERSIONING is used for creating System-versioned
  tables.
   
  Partitions
   
  partition_options:
   PARTITION BY
   { [LINEAR] HASH(expr)
   | [LINEAR] KEY(column_list)
   | RANGE(expr)
   | LIST(expr)
   | SYSTEM_TIME [INTERVAL time_quantity time_unit] [LIMIT
  num] }
   [PARTITIONS num]
   [SUBPARTITION BY
   { [LINEAR] HASH(expr)
   | [LINEAR] KEY(column_list) }
   [SUBPARTITIONS num]
   ]
   [(partition_definition [, partition_definition] ...)]
   
  partition_definition:
   PARTITION partition_name
   [VALUES {LESS THAN {(expr) | MAXVALUE} | IN (value_list)}]
   [[STORAGE] ENGINE [=] engine_name]
   [COMMENT [=] 'comment_text' ]
   [DATA DIRECTORY [=] 'data_dir']
   [INDEX DIRECTORY [=] 'index_dir']
   [MAX_ROWS [=] max_number_of_rows]
   [MIN_ROWS [=] min_number_of_rows]
   [TABLESPACE [=] tablespace_name]
   [NODEGROUP [=] node_group_id]
   [(subpartition_definition [, subpartition_definition] ...)]
   
  subpartition_definition:
   SUBPARTITION logical_name
   [[STORAGE] ENGINE [=] engine_name]
   [COMMENT [=] 'comment_text' ]
   [DATA DIRECTORY [=] 'data_dir']
   [INDEX DIRECTORY [=] 'index_dir']
   [MAX_ROWS [=] max_number_of_rows]
   [MIN_ROWS [=] min_number_of_rows]
   [TABLESPACE [=] tablespace_name]
   [NODEGROUP [=] node_group_id]
  If the PARTITION BY clause is used, the table will be
  partitioned. A partition method must be explicitly indicated
  for partitions and subpartitions. Partition methods are:
  [LINEAR] HASH creates a hash key which will be used to read
  and write rows. The partition function can be any valid SQL
  expression which returns an INTEGER number. Thus, it is
  possible to use the HASH method on an integer column, or on
  functions which accept integer columns as an argument.
  However, VALUES LESS THAN and VALUES IN clauses can not be
  used with HASH. An example:
   
  CREATE TABLE t1 (a INT, b CHAR(5), c DATETIME)
   PARTITION BY HASH ( YEAR(c) );
   
   [LINEAR] HASH can be used for subpartitions, too.
  [LINEAR] KEY is similar to HASH, but the index has an even
  distribution of data. Also, the expression can only be a
  column or a list of columns. VALUES LESS THAN and VALUES IN
  clauses can not be used with KEY.
  RANGE partitions the rows using on a range of values, using
  the VALUES LESS THAN operator. VALUES IN is not allowed with
  RANGE. The partition function can be any valid SQL
  expression which returns a single value.
  LIST assignes partitions based on a table's column with a
  restricted set of possible values. It is similar to RANGE,
  but VALUES IN must be used for at least 1 columns, and
  VALUES LESS THAN is disallowed.
  SYSTEM_TIME partitioning is used for System-versioned tables
  to store historical data separately from current data.
   
  Only HASH and KEY can be used for subpartitions, and they
  can be [LINEAR].
   
  It is possible to define up to 1024 partitions and
  subpartitions.
   
  The number of defined partitions can be optionally specified
  as PARTITION count. This can be done to avoid specifying all
  partitions individually. But you can also declare each
  individual partition and, additionally, specify a PARTITIONS
  count clause; in the case, the number of PARTITIONs must
  equal count.
   
  Also see Partitioning Types Overview.
   
  Sequences
   
  CREATE TABLE can also be used to create a SEQUENCE. See
  CREATE SEQUENCE and Sequence Overview.
   
  Examples
  -------- 
  create table if not exists test (
  a bigint auto_increment primary key,
  name varchar(128) charset utf8,
  key name (name(32))
  ) engine=InnoDB default charset latin1;
   
  This example shows a couple of things:
  Usage of IF NOT EXISTS; If the table already existed, it
  will not be created. There will not be any error for the
  client, just a warning.
  How to create a PRIMARY KEY that is automatically generated.
  How to specify a table-specific character set and another
  for a column.
  How to create an index (name) that is only partly indexed
  (to save space).
   
  The following clauses will work from MariaDB 10.2.1 only.
   
  CREATE TABLE t1(
   a int DEFAULT (1+1),
   b int DEFAULT (a+1),
   expires DATETIME DEFAULT(NOW() + INTERVAL 1 YEAR),
   x BLOB DEFAULT USER()
  );
   


  URL: https://mariadb.com/kb/en/library/create-table/dzfxuxCREATE TABLEdzfxuxhttps://mariadb.com/kb/en/library/create-table/dzfxuxdzfxux39dzfxux660qjzxqqvvbqThe CREATE TABLESPACE statement is not supported by MariaDB.
  It was originally inherited from MySQL NDB Cluster. In MySQL
  5.7 and later, the statement is also supported for InnoDB.
  However, MariaDB has chosen not to include that specific
  feature. See MDEV-19294 for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/create-tablespace/dzfxuxCREATE TABLESPACEdzfxuxhttps://mariadb.com/kb/en/library/create-tablespace/dzfxuxdzfxux39dzfxux661qjzxqqvvbqSyntax
  ------ 
  FLUSH [NO_WRITE_TO_BINLOG | LOCAL]
   flush_option [, flush_option] ...
   
  or when flushing tables:
   
  FLUSH [NO_WRITE_TO_BINLOG | LOCAL] TABLES [table_list]
  [table_flush_option]
   
  where table_list is a list of tables separated by , (comma).
   
  Description
  ----------- 
  The FLUSH statement clears or reloads various internal
  caches used by
  MariaDB. To execute FLUSH, you must have the RELOAD
  privilege. See GRANT.
   
  The RESET statement is similar to FLUSH. See
  RESET.
   
  You cannot issue a FLUSH statement from within a stored
  function or a trigger. Doing so within a stored procedure is
  permitted, as long as it is not called by a stored function
  or trigger. See Stored Routine Limitations, Stored Function
  Limitations and Trigger Limitations.
   
  If a listed table is a view, an error like the following
  will be produced:
   
  ERROR 1347 (HY000): 'test.v' is not BASE TABLE
   
  By default, FLUSH statements are written to the binary log
  and will be replicated. The NO_WRITE_TO_BINLOG keyword
  (LOCAL is an alias) will ensure the statement is not written
  to the binary log. 
   
  The different flush options are:
   
  Option | Description | 
   
  CHANGED_PAGE_BITMAPS | Internal command used for backup
  purposes. See the Information Schema CHANGED_PAGE_BITMAPS
  Table. | 
   
  CLIENT_STATISTICS | Reset client statistics (see SHOW
  CLIENT_STATISTICS). | 
   
  DES_KEY_FILE | Reloads the DES key file (Specified with the
  --des-key-file startup option). | 
   
  HOSTS | Flush the hostname cache (used for converting ip to
  host names and for unblocking blocked hosts. See
  max_connect_errors) | 
   
  INDEX_STATISTICS | Reset index statistics (see SHOW
  INDEX_STATISTICS). | 
   
  [ERROR | ENGINE | GENERAL | SLOW | BINARY | RELAY] LOGS |
  Close and reopen the specified log type, or all log types if
  none are specified. FLUSH RELAY LOGS [connection-name] can
  be used to flush the relay logs for a specific connection.
  Only one connection can be specified per FLUSH command. See
  Multi-source replication. FLUSH ENGINE LOGS will delete all
  unneeded Aria redo logs. | 
   
  MASTER | Deprecated option, use RESET MASTER instead. | 
   
  PRIVILEGES | Reload all privileges from the privilege tables
  in the mysql database. If the server is started with
  --skip-grant-table option, this will activate the privilege
  tables again. | 
   
  QUERY CACHE | Defragment the query cache to better utilize
  its memory. If you want to reset the query cache, you can do
  it with RESET QUERY CACHE. | 
   
  QUERY_RESPONSE_TIME | See the QUERY_RESPONSE_TIME plugin. | 
   
  SLAVE | Deprecated option, use RESET SLAVE instead. | 
   
  SSL | Used to dynamically reinitialize the server's TLS
  context by reloading the files defined by several TLS system
  variables. See FLUSH SSL for more information. This command
  was first added in MariaDB 10.4.1. | 
   
  STATUS | Resets all server status variables that can be
  reset to 0. Not all global status variables support this, so
  not all global values are reset. See FLUSH STATUS for more
  information. | 
   
  TABLE | Close tables given as options or all open tables if
  no table list was used. From MariaDB 10.4.1, using without
  any table list will only close tables not in use, and tables
  not locked by the FLUSH TABLES connection. If there are no
  locked tables, FLUSH TABLES will be instant and will not
  cause any waits, as it no longer waits for tables in use.
  When a table list is provided, from MariaDB 10.4.1, the
  server will wait for the end of any transactions that are
  using the tables. Previously, FLUSH TABLES only waited for
  the statements to complete. | 
   
  TABLES | Same as FLUSH TABLE. | 
   
  TABLES ... FOR EXPORT | For InnoDB tables, flushes table
  changes to disk to permit binary table copies while the
  server is running. Introduced in MariaDB 10.0.8. See FLUSH
  TABLES ... FOR EXPORT for more. | 
   
  TABLES WITH READ LOCK | Closes all open tables. New tables
  are only allowed to be opened with read locks until an
  UNLOCK TABLES is given. | 
   
  TABLES WITH READ LOCK AND DISABLE CHECKPOINT | As TABLES
  WITH READ LOCK but also disable all checkpoint writes by
  transactional table engines. This is useful when doing a
  disk snapshot of all tables. | 
   
  TABLE_STATISTICS | Reset table statistics (see SHOW
  TABLE_STATISTICS). | 
   
  USER_RESOURCES | Resets all per hour user resources. This
  enables clients that have exhausted their resources to
  connect again. | 
   
  USER_STATISTICS | Reset user statistics (see SHOW
  USER_STATISTICS). | 
   
  You can also use the mysqladmin client to flush things. Use
  mysqladmin --help to examine what flush commands it
  supports.
   
  FLUSH STATUS
   
  Server status variables can be reset by executing the
  following:
   
  FLUSH STATUS;
   
  Global Status Variables that Support FLUSH STATUS
   
  Not all global status variables support being reset by FLUSH
  STATUS. Currently, the following status variables are reset
  by FLUSH STATUS:
  Aborted_clients
  Aborted_connects
  Aria_pagecache_blocks_not_flushed
  Aria_pagecache_blocks_unused
  Aria_pagecache_blocks_used
  Binlog_cache_disk_use
  Binlog_cache_use
  Binlog_stmt_cache_disk_use
  Binlog_stmt_cache_use
  Connection_errors_accept
  Connection_errors_internal
  Connection_errors_max_connections
  Connection_errors_peer_address
  Connection_errors_select
  Connection_errors_tcpwrap
  Created_tmp_files
  Delayed_errors
  Delayed_writes
  Feature_check_constraint
  Feature_delay_key_write
  Max_used_connections
  Opened_plugin_libraries
  Performance_schema_accounts_lost
  Performance_schema_cond_instances_lost
  Performance_schema_digest_lost
  Performance_schema_file_handles_lost
  Performance_schema_file_instances_lost
  Performance_schema_hosts_lost
  Performance_schema_locker_lost
  Performance_schema_mutex_instances_lost
  Performance_schema_rwlock_instances_lost
  Performance_schema_session_connect_attrs_lost
  Performance_schema_socket_instances_lost
  Performance_schema_stage_classes_lost
  Performance_schema_statement_classes_lost
  Performance_schema_table_handles_lost
  Performance_schema_table_instances_lost
  Performance_schema_thread_instances_lost
  Performance_schema_users_lost
  Qcache_hits
  Qcache_inserts
  Qcache_lowmem_prunes
  Qcache_not_cached
  Rpl_semi_sync_master_no_times
  Rpl_semi_sync_master_no_tx
  Rpl_semi_sync_master_timefunc_failures
  Rpl_semi_sync_master_wait_pos_backtraverse
  Rpl_semi_sync_master_yes_tx
  Rpl_transactions_multi_engine
  Server_audit_writes_failed
  Slave_retried_transactions
  Slow_launch_threads
  Ssl_accept_renegotiates
  Ssl_accepts
  Ssl_callback_cache_hits
  Ssl_client_connects
  Ssl_connect_renegotiates
  Ssl_ctx_verify_depth
  Ssl_ctx_verify_mode
  Ssl_finished_accepts
  Ssl_finished_connects
  Ssl_session_cache_hits
  Ssl_session_cache_misses
  Ssl_session_cache_overflows
  Ssl_session_cache_size
  Ssl_session_cache_timeouts
  Ssl_sessions_reused
  Ssl_used_session_cache_entries
  Subquery_cache_hit
  Subquery_cache_miss
  Table_locks_immediate
  Table_locks_waited
  Tc_log_max_pages_used
  Tc_log_page_waits
  Transactions_gtid_foreign_engine
  Transactions_multi_engine
   
  FLUSH SSL
   
  The FLUSH SSL command was first added in MariaDB 10.4.
   
  In MariaDB 10.4 and later, the FLUSH SSL command can be used
  to dynamically reinitialize the server's TLS context. This
  is most useful if you need to replace a certificate that is
  about to expire without restarting the server.
   
  This operation is performed by reloading the files defined
  by the following TLS system variables:
  ssl_cert
  ssl_key
  ssl_ca
  ssl_capath
  ssl_crl
  ssl_crlpath
   
  These TLS system variables are not dynamic, so their values
  can not be changed without restarting the server.
   
  If you want to dynamically reinitialize the server's TLS
  context, then you need to change the certificate and key
  files at the relevant paths defined by these TLS system
  variables, without actually changing the values of the
  variables. See MDEV-19341 for more information.
   
  Reducing Memory Usage
   
  To flush some of the global caches that take up memory, you
  could execute the following command:
   
  FLUSH LOCAL HOSTS,
   QUERY CACHE, 
   TABLE_STATISTICS, 
   INDEX_STATISTICS, 
   USER_STATISTICS;
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/flush/dzfxuxFLUSHdzfxuxhttps://mariadb.com/kb/en/library/flush/dzfxuxdzfxux26dzfxux340qjzxqqvvbqSyntax
  ------ 
  KILL [HARD | SOFT] [CONNECTION | QUERY [ID] ] [thread_id |
  USER user_name | query_id]
   
  MariaDB 5.3.2
   
  The options HARD | SOFT and USER username were introduced in
  MariaDB 5.3.2
   
  MariaDB 10.0.5
   
  KILL QUERY ID query_id, which permits killing a query by
  query id rather than thread id, was introduced in MariaDB
  10.0.5.
   
  Description
  ----------- 
  Each connection to mysqld runs in a separate thread. You can
  see which threads
  are running with the SHOW PROCESSLIST statement and kill a
  thread with the KILL thread_id statement. 
  KILL allows the optional CONNECTION or
  QUERY modifier:
  KILL CONNECTION is the same as KILL with no
   modifier: It terminates the connection associated with the
  given thread or query id.
  KILL QUERY terminates the statement that the connection
  thread_id is
   currently executing, but leaves the connection itself
  intact.
  KILL QUERY ID (introduced in MariaDB 10.0.5) terminates the
  query by query_id, leaving the connection intact.
   
  If a connection is terminated that has an active
  transaction, the transaction will be rolled back. If only a
  query is killed, the current transaction will stay active.
  See also idle_transaction_timeout.
   
  If you have the PROCESS privilege, you can see all threads.
  If
  you have the SUPER privilege, you can kill all threads and
  statements. Otherwise, you can see and kill only your own
  threads and
  statements.
   
  Killing queries that repair or create indexes on MyISAM and
  Aria tables may result in corrupted tables. Use the SOFT
  option to avoid this!
   
  The HARD option (default) kills a command as soon as
  possible. If you use
  SOFT, then critical operations that may leave a table in an
  inconsistent state will not be interrupted. Such operations
  include REPAIR and INDEX creation for MyISAM and Aria tables
  (REPAIR TABLE, OPTIMIZE TABLE).
   
  KILL ... USER username will kill all connections/queries for
  a
  given user. USER can be specified one of the following ways:
  username (Kill without regard to hostname)
  username@hostname
  CURRENT_USER or CURRENT_USER()
   
  If you specify a thread id and that thread does not exist,
  you get the following error:
   
  ERROR 1094 (HY000): Unknown thread id: 
   
  If you specify a query id that doesn't exist, you get the
  following error:
   
  ERROR 1957 (HY000): Unknown query id: 
   
  However, if you specify a user name, no error is issued for
  non-connected (or even non-existing) users. To check if the
  connection/query has been killed, you can use the
  ROW_COUNT() function.
   
  A client whose connection is killed receives the following
  error:
   
  ERROR 1317 (70100): Query execution was interrupted
   
  To obtain a list of existing sessions, use the SHOW
  PROCESSLIST statement or query the Information Schema
  PROCESSLIST table.
   
  Note: You cannot use KILL with the Embedded MySQL Server
  library because the embedded server merely runs inside the
  threads of the host
  application. It does not create any connection threads of
  its own.
   
  Note: You can also use 
  mysqladmin kill thread_id [,thread_id...]
  to kill connections. To get a list of running queries,
  use mysqladmin processlist. See mysqladmin.
   
  Percona Toolkit contains a program, pt-kill that can be used
  to automatically kill connections that match certain
  criteria. For example, it can be used to terminate idle
  connections, or connections that have been busy for more
  than 60 seconds.
   


  URL:
  https://mariadb.com/kb/en/library/data-manipulation-kill-connection-query/dzfxuxKILL [CONNECTION |?QUERY]dzfxuxhttps://mariadb.com/kb/en/library/data-manipulation-kill-connection-query/dzfxuxdzfxux26dzfxux344qjzxqqvvbqSyntax
  ------ 
  RESET reset_option [, reset_option] ...
   
  Description
  ----------- 
  The RESET statement is used to clear the state of various
  server
  operations. You must have the RELOAD privilege to execute
  RESET.
   
  RESET acts as a stronger version of the FLUSH statement.
   
  The different RESET options are:
   
  Option | Description | 
   
  SLAVE ["connection_name"] [ALL] | Deletes all relay logs
  from the slave and reset the replication position in the
  master binary log. | 
   
  MASTER | Deletes all old binary logs, makes the binary index
  file (--log-bin-index) empty and creates a new binary log
  file. This is useful when you want to reset the master to an
  initial state. If you want to just delete old, not used
  binary logs, you should use the PURGE BINARY LOGS command. |

   
  QUERY CACHE | Removes all queries from the query cache. See
  also FLUSH QUERY CACHE. | 
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/reset/dzfxuxRESETdzfxuxhttps://mariadb.com/kb/en/library/reset/dzfxuxdzfxux26dzfxux346qjzxqqvvbqSHOW has many forms that provide information about
  databases, tables, columns, or status information about the
  server. These include:
  SHOW AUTHORS
  SHOW CHARACTER SET [like_or_where]
  SHOW COLLATION [like_or_where]
  SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name]
  [like_or_where]
  SHOW CONTRIBUTORS
  SHOW CREATE DATABASE db_name
  SHOW CREATE EVENT event_name
  SHOW CREATE PACKAGE package_name
  SHOW CREATE PACKAGE BODY package_name
  SHOW CREATE PROCEDURE proc_name
  SHOW CREATE TABLE tbl_name
  SHOW CREATE TRIGGER trigger_name
  SHOW CREATE VIEW view_name
  SHOW DATABASES [like_or_where]
  SHOW ENGINE engine_name {STATUS | MUTEX}
  SHOW [STORAGE] ENGINES
  SHOW ERRORS [LIMIT [offset,] row_count]
  SHOW [FULL] EVENTS
  SHOW FUNCTION CODE func_name
  SHOW FUNCTION STATUS [like_or_where]
  SHOW GRANTS FOR user
  SHOW INDEX FROM tbl_name [FROM db_name]
  SHOW INNODB STATUS
  SHOW OPEN TABLES [FROM db_name] [like_or_where]
  SHOW PLUGINS
  SHOW PROCEDURE CODE proc_name
  SHOW PROCEDURE STATUS [like_or_where]
  SHOW PRIVILEGES
  SHOW [FULL] PROCESSLIST
  SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
  SHOW PROFILES
  SHOW [GLOBAL | SESSION] STATUS [like_or_where]
  SHOW TABLE STATUS [FROM db_name] [like_or_where]
  SHOW TABLES [FROM db_name] [like_or_where]
  SHOW TRIGGERS [FROM db_name] [like_or_where]
  SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
  SHOW WARNINGS [LIMIT [offset,] row_count]
   
  like_or_where:
   LIKE 'pattern'
   | WHERE expr
   
  If the syntax for a given SHOW statement includes a
  LIKE 'pattern' part, 'pattern' is a
  string that can contain the SQL "%" and
  "_" wildcard characters. The pattern is useful for
  restricting statement output to matching values.
   
  Several SHOW statements also accept a
  WHERE clause that provides more flexibility in specifying
  which rows to display. See Extended Show.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/about-show/dzfxuxAbout SHOWdzfxuxhttps://mariadb.com/kb/en/library/about-show/dzfxuxdzfxux26dzfxux348qjzxqqvvbqSyntax
  ------ 
  CREATE
   [OR REPLACE]
   [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
   [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]
   [SQL SECURITY { DEFINER | INVOKER }]
   VIEW [IF NOT EXISTS] view_name [(column_list)]
   AS select_statement
   [WITH [CASCADED | LOCAL] CHECK OPTION]
   
  Description
  ----------- 
  The CREATE VIEW statement creates a new view, or replaces an
  existing
  one if the OR REPLACE clause is given. If the view does not
  exist, CREATE OR
  REPLACE VIEW is the same as CREATE VIEW. If the view does
  exist, CREATE OR
  REPLACE VIEW is the same as ALTER VIEW.
   
  The select_statement is a SELECT statement that provides the
  definition of
  the view. (When you select from the view, you select in
  effect using the SELECT
  statement.) select_statement can select from base tables or
  other views.
   
  The view definition is "frozen" at creation time, so
  changes to the underlying
  tables afterwards do not affect the view definition. For
  example, if a view is
  defined as SELECT * on a table, new columns added to the
  table later do not
  become part of the view. A SHOW CREATE VIEW shows that
  such queries are rewritten and column names are included in
  the view
  definition.
   
  The view definition must be a query that does not return
  errors at view
  creation times. However, the base tables used by the views
  might be altered
  later and the query may not be valid anymore. In this case,
  querying the view
  will result in an error. CHECK TABLE helps in finding this
  kind
  of problems.
   
  The ALGORITHM clause affects how MariaDB processes the
  view. The DEFINER and SQL SECURITY clauses specify the
  security context to be
  used when checking access privileges at view invocation
  time. The WITH CHECK
  OPTION clause can be given to constrain inserts or updates
  to rows in tables
  referenced by the view. These clauses are described later in
  this section.
   
  The CREATE VIEW statement requires the CREATE VIEW privilege
  for the
  view, and some privilege for each column selected by the
  SELECT
  statement. For columns used elsewhere in the SELECT
  statement you must
  have the SELECT privilege. If the OR REPLACE clause is
  present, you
  must also have the DROP privilege for the view.
   
  A view belongs to a database. By default, a new view is
  created in the
  default database. To create the view explicitly in a given
  database,
  specify the name as db_name.view_name when you create it.
   
  CREATE VIEW test.v AS SELECT * FROM t;
   
  Base tables and views share the same namespace within a
  database, so a
  database cannot contain a base table and a view that have
  the same
  name.
   
  Views must have unique column names with no duplicates, just
  like base
  tables. By default, the names of the columns retrieved by
  the SELECT
  statement are used for the view column names. To define
  explicit names
  for the view columns, the optional column_list clause can be
  given as
  a list of comma-separated identifiers. The number of names
  in
  column_list must be the same as the number of columns
  retrieved by the
  SELECT statement.
   
  MySQL until 5.1.28
   
  Prior to MySQL 5.1.29, When you modify an existing view, the
  current view definition is backed up and saved. It is stored
  in that
  table's database directory, in a subdirectory named arc.
  The backup
  file for a view v is named v.frm-00001. If you alter the
  view again,
  the next backup is named v.frm-00002. The three latest view
  backup
  definitions are stored. Backed up view definitions are not
  preserved
  by mysqldump, or any other such programs, but you can retain
  them
  using a file copy operation. However, they are not needed
  for anything
  but to provide you with a backup of your previous view
  definition. It
  is safe to remove these backup definitions, but only while
  mysqld is
  not running. If you delete the arc subdirectory or its files
  while
  mysqld is running, you will receive an error the next time
  you try to
  alter the view: 
   
  MariaDB [test]> ALTER VIEW v AS SELECT * FROM t; 
  ERROR 6 (HY000): Error on delete of
  '.\test\arc/v.frm-0004' (Errcode: 2)
   
  Columns retrieved by the SELECT statement can be simple
  references to
  table columns. They can also be expressions that use
  functions,
  constant values, operators, and so forth.
   
  Unqualified table or view names in the SELECT statement are
  interpreted with respect to the default database. A view can
  refer to
  tables or views in other databases by qualifying the table
  or view
  name with the proper database name.
   
  A view can be created from many kinds of SELECT statements.
  It can
  refer to base tables or other views. It can use joins,
  UNION, and
  subqueries. The SELECT need not even refer to any tables.
  The
  following example defines a view that selects two columns
  from another
  table, as well as an expression calculated from those
  columns:
   
  CREATE TABLE t (qty INT, price INT);
   
  INSERT INTO t VALUES(3, 50);
   
  CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM
  t;
   
  SELECT * FROM v;
  +------+-------+-------+
  | qty | price | value |
  +------+-------+-------+
  | 3 | 50 | 150 |
  +------+-------+-------+
   
  A view definition is subject to the following restrictions:
  The SELECT statement cannot contain a subquery in the FROM
  clause.
  The SELECT statement cannot refer to system or user
  variables.
  Within a stored program, the definition cannot refer to
  program parameters or local variables.
  The SELECT statement cannot refer to prepared statement
  parameters.
  Any table or view referred to in the definition must exist.
  However, after a view has been created, it is possible to
  drop a table or view that the definition refers to. In this
  case, use of the view results in an error. To check a view
  definition for problems of this kind, use the CHECK TABLE
  statement.
  The definition cannot refer to a TEMPORARY table, and you
  cannot create a TEMPORARY view.
  Any tables named in the view definition must exist at
  definition time.
  You cannot associate a trigger with a view.
  For valid identifiers to use as view names, see Identifier
  Names.
   
  ORDER BY is allowed in a view definition, but it is ignored
  if you
  select from a view using a statement that has its own ORDER
  BY.
   
  For other options or clauses in the definition, they are
  added to the
  options or clauses of the statement that references the
  view, but the
  effect is undefined. For example, if a view definition
  includes a
  LIMIT clause, and you select from the view using a statement
  that has
  its own LIMIT clause, it is undefined which limit applies.
  This same
  principle applies to options such as ALL, DISTINCT, or
  SQL_SMALL_RESULT that follow the SELECT keyword, and to
  clauses such
  as INTO, FOR UPDATE, and LOCK IN SHARE MODE.
   
  The PROCEDURE clause cannot be used in a view definition,
  and it cannot be used if a view is referenced in the FROM
  clause.
   
  If you create a view and then change the query processing
  environment
  by changing system variables, that may affect the results
  that you get
  from the view:
   
  CREATE VIEW v (mycol) AS SELECT 'abc';
   
  SET sql_mode = '';
   
  SELECT "mycol" FROM v;
  +-------+
  | mycol |
  +-------+
  | mycol | 
  +-------+
   
  SET sql_mode = 'ANSI_QUOTES';
   
  SELECT "mycol" FROM v;
  +-------+
  | mycol |
  +-------+
  | abc | 
  +-------+
   
  The DEFINER and SQL SECURITY clauses determine which MariaDB
  account to
  use when checking access privileges for the view when a
  statement is
  executed that references the view. They were added in MySQL
  5.1.2.
  The legal SQL SECURITY characteristic values are DEFINER and
  INVOKER.
  These indicate that the required privileges must be held by
  the user
  who defined or invoked the view, respectively. The default
  SQL
  SECURITY value is DEFINER.
   
  If a user value is given for the DEFINER clause, it should
  be a MariaDB
  account in 'user_name'@'host_name' format (the same
  format used in the
  GRANT statement). The user_name and host_name values both
  are
  required. The definer can also be given as CURRENT_USER or
  CURRENT_USER(). The default DEFINER value is the user who
  executes the
  CREATE VIEW statement. This is the same as specifying
  DEFINER =
  CURRENT_USER explicitly.
   
  If you specify the DEFINER clause, these rules determine the
  legal
  DEFINER user values:
  If you do not have the SUPER privilege, the only legal user
  value is your own account, either specified literally or by
  using CURRENT_USER. You cannot set the definer to some other
  account.
  If you have the SUPER privilege, you can specify any
  syntactically legal account name. If the account does not
  actually exist, a warning is generated.
  If the SQL SECURITY value is DEFINER but the definer account
  does not exist when the view is referenced, an error occurs.
   
  Within a view definition, CURRENT_USER returns the view's
  DEFINER
  value by default. Before MySQL 5.1.12, and for views
  defined with the SQL SECURITY INVOKER characteristic,
  CURRENT_USER
  returns the account for the view's invoker. For information
  about user
  auditing within views, see
  http://dev.mysql.com/doc/refman/5.1/en/account-activity-auditing.html.
   
  Within a stored routine that is defined with the SQL
  SECURITY DEFINER
  characteristic, CURRENT_USER returns the routine's DEFINER
  value. This
  also affects a view defined within such a program, if the
  view
  definition contains a DEFINER value of CURRENT_USER.
   
  View privileges are checked like this:
  At view definition time, the view creator must have the
  privileges needed to use the top-level objects accessed by
  the view. For example, if the view definition refers to
  table columns, the creator must have privileges for the
  columns, as described previously. If the definition refers
  to a stored function, only the privileges needed to invoke
  the function can be checked. The privileges required when
  the function runs can be checked only as it executes: For
  different invocations of the function, different execution
  paths within the function might be taken.
  When a view is referenced, privileges for objects accessed
  by the view are checked against the privileges held by the
  view creator or invoker, depending on whether the SQL
  SECURITY characteristic is DEFINER or INVOKER, respectively.
  If reference to a view causes execution of a stored
  function, privilege checking for statements executed within
  the function depend on whether the function is defined with
  a SQL SECURITY characteristic of DEFINER or INVOKER. If the
  security characteristic is DEFINER, the function runs with
  the privileges of its creator. If the characteristic is
  INVOKER, the function runs with the privileges determined by
  the view's SQL SECURITY characteristic.
   
  MySQL until 5.1.1
   
  Prior to MySQL 5.1.2 (before the DEFINER and SQL SECURITY
  clauses were
  implemented), privileges required for objects used in a view
  are
  checked at view creation time.
   
  Example: A view might depend on a stored function, and that
  function
  might invoke other stored routines. For example, the
  following view
  invokes a stored function f():
   
  CREATE VIEW v AS SELECT * FROM t WHERE t.id = f(t.name);
   
  Suppose that f() contains a statement such as this:
   
  IF name IS NULL then
   CALL p1();
  ELSE
   CALL p2();
  END IF;
   
  The privileges required for executing statements within f()
  need to be
  checked when f() executes. This might mean that privileges
  are needed
  for p1() or p2(), depending on the execution path within
  f(). Those
  privileges must be checked at runtime, and the user who must
  possess
  the privileges is determined by the SQL SECURITY values of
  the view v
  and the function f().
   
  The DEFINER and SQL SECURITY clauses for views are
  extensions to
  standard SQL. In standard SQL, views are handled using the
  rules for
  SQL SECURITY INVOKER.
   
  If you invoke a view that was created before MySQL 5.1.2, it
  is
  treated as though it was created with a SQL SECURITY DEFINER
  clause
  and with a DEFINER value that is the same as your account.
  However,
  because the actual definer is unknown, MySQL issues a
  warning. To make
  the warning go away, it is sufficient to re-create the view
  so that
  the view definition includes a DEFINER clause.
   
  The optional ALGORITHM clause is an extension to standard
  SQL. It
  affects how MariaDB processes the view. ALGORITHM takes
  three values:
  MERGE, TEMPTABLE, or UNDEFINED. The default algorithm is
  UNDEFINED if
  no ALGORITHM clause is present. See View Algorithms for more
  information.
   
  Some views are updatable. That is, you can use them in
  statements such
  as UPDATE, DELETE, or INSERT to update the contents of the
  underlying
  table. For a view to be updatable, there must be a
  one-to-one
  relationship between the rows in the view and the rows in
  the
  underlying table. There are also certain other constructs
  that make a
  view non-updatable. See Inserting and Updating with Views.
   
  WITH CHECK OPTION
   
  The WITH CHECK OPTION clause can be given for an updatable
  view to
  prevent inserts or updates to rows except those for which
  the WHERE
  clause in the select_statement is true.
   
  In a WITH CHECK OPTION clause for an updatable view, the
  LOCAL and
  CASCADED keywords determine the scope of check testing when
  the view
  is defined in terms of another view. The LOCAL keyword
  restricts the
  CHECK OPTION only to the view being defined. CASCADED causes
  the
  checks for underlying views to be evaluated as well. When
  neither
  keyword is given, the default is CASCADED.
   
  For more information about updatable views and the WITH
  CHECK OPTION
  clause, see
  Inserting and Updating with Views.
   
  IF NOT EXISTS
   
  The IF NOT EXISTS clause was added in MariaDB 10.1.3
   
  When the IF NOT EXISTS clause is used, MariaDB will return a
  warning instead of an error if the specified view already
  exists. Cannot be used together with the OR REPLACE clause.
   
  Examples
  -------- 
  CREATE TABLE t (a INT, b INT) ENGINE = InnoDB;
   
  INSERT INTO t VALUES (1,1), (2,2), (3,3);
   
  CREATE VIEW v AS SELECT a, a*2 AS a2 FROM t;
   
  SELECT * FROM v;
   
  +------+------+
  | a | a2 |
  +------+------+
  | 1 | 2 |
  | 2 | 4 |
  | 3 | 6 |
  +------+------+
   
  OR REPLACE and IF NOT EXISTS:
   
  CREATE VIEW v AS SELECT a, a*2 AS a2 FROM t;
   
  ERROR 1050 (42S01): Table 'v' already exists
   
  CREATE OR REPLACE VIEW v AS SELECT a, a*2 AS a2 FROM t;
   
  Query OK, 0 rows affected (0.04 sec)
   
  CREATE VIEW IF NOT EXISTS v AS SELECT a, a*2 AS a2 FROM t;
   
  Query OK, 0 rows affected, 1 warning (0.01 sec)
   
  SHOW WARNINGS;
   
  +-------+------+--------------------------+
  | Level | Code | Message |
  +-------+------+--------------------------+
  | Note | 1050 | Table 'v' already exists |
  +-------+------+--------------------------+
   


  URL: https://mariadb.com/kb/en/library/create-view/dzfxuxCREATE VIEWdzfxuxhttps://mariadb.com/kb/en/library/create-view/dzfxuxdzfxux39dzfxux663qjzxqqvvbqOracle-style packages were introduced in MariaDB 10.3.5.
   
  Syntax
  ------ 
  DROP PACKAGE [IF EXISTS] [ db_name . ] package_name
   
  Description
  ----------- 
  The DROP PACKAGE statement can be used when Oracle SQL_MODE
  is set.
   
  The DROP PACKAGE statement drops a stored package entirely:
  Drops the package specification (earlier created using the
  CREATE PACKAGE statement).
  Drops the package implementation, if the implementation was
  already created using the CREATE PACKAGE BODY statement.
   


  URL: https://mariadb.com/kb/en/library/drop-package/dzfxuxDROP PACKAGEdzfxuxhttps://mariadb.com/kb/en/library/drop-package/dzfxuxdzfxux39dzfxux668qjzxqqvvbqOracle-style packages were introduced in MariaDB 10.3.5.
   
  Syntax
  ------ 
  DROP PACKAGE BODY [IF EXISTS] [ db_name . ] package_name
   
  Description
  ----------- 
  The DROP PACKAGE BODY statement can be used when Oracle
  SQL_MODE is set.
   
  The DROP PACKAGE BODY statement drops the package body (i.e
  the implementation), previously created using the CREATE
  PACKAGE BODY statement.
   
  Note, DROP PACKAGE BODY drops only the package
  implementation, but does not drop the package specification.
  Use DROP PACKAGE to drop the package entirely (i.e. both
  implementation and specification).
   


  URL: https://mariadb.com/kb/en/library/drop-package-body/dzfxuxDROP PACKAGE BODYdzfxuxhttps://mariadb.com/kb/en/library/drop-package-body/dzfxuxdzfxux39dzfxux669qjzxqqvvbqSyntax
  ------ 
  SET variable_assignment [, variable_assignment] ...
   
  variable_assignment:
   user_var_name = expr
   | [GLOBAL | SESSION] system_var_name = expr
   | [@@global. | @@session. | @@]system_var_name = expr
   
  One can also set a user variable in any expression with this
  syntax:
   
  user_var_name:= expr
   
  Description
  ----------- 
  The SET statement assigns values to different types of
  variables that affect the operation of the server or your
  client. Older
  versions of MySQL employed SET OPTION, but this syntax was
  deprecated in favor of SET without OPTION, and was removed
  in MariaDB 10.0.
   
  Changing a system variable by using the SET statement does
  not make the change permanently. To do so, the change must
  be made in a configuration file.
   
  For setting variables on a per-query basis (from MariaDB
  10.1.2), see SET STATEMENT.
   
  See SHOW VARIABLES for documentation on viewing server
  system variables.
   
  See Server System Variables for a list of all the system
  variables.
   
  GLOBAL / SESSION
   
  When setting a system variable, the scope can be specified
  as either GLOBAL or SESSION.
   
  A global variable change affects all new sessions. It does
  not affect any currently open sessions, including the one
  that made the change. 
   
  A session variable change affects the current session only.
   
  If the variable has a session value, not specifying either
  GLOBAL or SESSION will be the same as specifying SESSION. If
  the variable only has a global value, not specifying GLOBAL
  or SESSION will apply to the change to the global value.
   
  DEFAULT
   
  Setting a global variable to DEFAULT will restore it to the
  server default, and setting a session variable to DEFAULT
  will restore it to the current global value.
   
  Examples
  -------- 
  innodb_sync_spin_loops is a global variable.
  skip_parallel_replication is a session variable.
  max_error_count is both global and session.
   
  SELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM
   INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE 
   VARIABLE_NAME LIKE 'max_error_count' OR 
   VARIABLE_NAME LIKE 'skip_parallel_replication' OR 
   VARIABLE_NAME LIKE 'innodb_sync_spin_loops';
   
  +---------------------------+---------------+--------------+
  | VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |
  +---------------------------+---------------+--------------+
  | MAX_ERROR_COUNT | 64 | 64 |
  | SKIP_PARALLEL_REPLICATION | OFF | NULL |
  | INNODB_SYNC_SPIN_LOOPS | NULL | 30 |
  +---------------------------+---------------+--------------+
   
  Setting the session values:
   
  SET max_error_count=128;
  Query OK, 0 rows affected (0.000 sec)
   
  SET skip_parallel_replication=ON;
  Query OK, 0 rows affected (0.000 sec)
   
  SET innodb_sync_spin_loops=60;
   
  ERROR 1229 (HY000): Variable 'innodb_sync_spin_loops' is a
  GLOBAL variable 
   and should be set with SET GLOBAL
   
  SELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM
   INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE 
   VARIABLE_NAME LIKE 'max_error_count' OR 
   VARIABLE_NAME LIKE 'skip_parallel_replication' OR 
   VARIABLE_NAME LIKE 'innodb_sync_spin_loops';
   
  +---------------------------+---------------+--------------+
  | VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |
  +---------------------------+---------------+--------------+
  | MAX_ERROR_COUNT | 128 | 64 |
  | SKIP_PARALLEL_REPLICATION | ON | NULL |
  | INNODB_SYNC_SPIN_LOOPS | NULL | 30 |
  +---------------------------+---------------+--------------+
   
  Setting the global values:
   
  SET GLOBAL max_error_count=256;
   
  SET GLOBAL skip_parallel_replication=ON;
   
  ERROR 1228 (HY000): Variable 'skip_parallel_replication'
  is a SESSION variable 
   and can't be used with SET GLOBAL
   
  SET GLOBAL innodb_sync_spin_loops=120;
   
  SELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM
   INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE 
   VARIABLE_NAME LIKE 'max_error_count' OR 
   VARIABLE_NAME LIKE 'skip_parallel_replication' OR 
   VARIABLE_NAME LIKE 'innodb_sync_spin_loops';
   
  +---------------------------+---------------+--------------+
  | VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |
  +---------------------------+---------------+--------------+
  | MAX_ERROR_COUNT | 128 | 256 |
  | SKIP_PARALLEL_REPLICATION | ON | NULL |
  | INNODB_SYNC_SPIN_LOOPS | NULL | 120 |
  +---------------------------+---------------+--------------+
   
  SHOW VARIABLES will by default return the session value
  unless the variable is global only.
   
  SHOW VARIABLES LIKE 'max_error_count';
   
  +-----------------+-------+
  | Variable_name | Value |
  +-----------------+-------+
  | max_error_count | 128 |
  +-----------------+-------+
   
  SHOW VARIABLES LIKE 'skip_parallel_replication';
   
  +---------------------------+-------+
  | Variable_name | Value |
  +---------------------------+-------+
  | skip_parallel_replication | ON |
  +---------------------------+-------+
   
  SHOW VARIABLES LIKE 'innodb_sync_spin_loops';
   
  +------------------------+-------+
  | Variable_name | Value |
  +------------------------+-------+
  | innodb_sync_spin_loops | 120 |
  +------------------------+-------+
   
  Using the inplace syntax:
   
  SELECT (@a:=1);
  +---------+
  | (@a:=1) |
  +---------+
  | 1 |
  +---------+
   
  SELECT @a;
   
  +------+
  | @a |
  +------+
  | 1 |
  +------+
   


  URL: https://mariadb.com/kb/en/library/set/dzfxuxSETdzfxuxhttps://mariadb.com/kb/en/library/set/dzfxuxdzfxux26dzfxux347qjzxqqvvbqThe DROP TABLESPACE statement is not supported by MariaDB.
  It was originally inherited from MySQL NDB Cluster. In MySQL
  5.7 and later, the statement is also supported for InnoDB.
  However, MariaDB has chosen not to include that specific
  feature. See MDEV-19294 for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/drop-tablespace/dzfxuxDROP TABLESPACEdzfxuxhttps://mariadb.com/kb/en/library/drop-tablespace/dzfxuxdzfxux39dzfxux674qjzxqqvvbqLASTVAL is a synonym for PREVIOUS VALUE for sequence_name.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/lastval/dzfxuxLASTVALdzfxuxhttps://mariadb.com/kb/en/library/lastval/dzfxuxdzfxux40dzfxux680qjzxqqvvbqNEXTVAL is a synonym for NEXT VALUE for sequence_name.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/nextval/dzfxuxNEXTVALdzfxuxhttps://mariadb.com/kb/en/library/nextval/dzfxuxdzfxux40dzfxux682qjzxqqvvbqJSON functions were added in MariaDB 10.2.3.
   
  Syntax
  ------ 
  JSON_ARRAY([value[, value2] ...])
   
  Description
  ----------- 
  Returns a JSON array containing the listed values. The list
  can be empty.
   
  Example
   
  SELECT Json_Array(56, 3.1416, 'My name is "Foo"', NULL);
  +--------------------------------------------------+
  | Json_Array(56, 3.1416, 'My name is "Foo"', NULL) |
  +--------------------------------------------------+
  | [56, 3.1416, "My name is \"Foo\"", null] |
  +--------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_array/dzfxuxJSON_ARRAYdzfxuxhttps://mariadb.com/kb/en/json_array/dzfxuxdzfxux41dzfxux686qjzxqqvvbqThis function was added in MariaDB 10.2.4.
   
  Syntax
  ------ 
  JSON_COMPACT(json_doc)
   
  Description
  ----------- 
  Removes all unnecessary spaces so the json document is as
  short as possible.
   
  Example
   
  SET @j = '{ "A": 1, "B": [2, 3]}';
   
  SELECT JSON_COMPACT(@j), @j;
  +-------------------+------------------------+
  | JSON_COMPACT(@j) | @j |
  +-------------------+------------------------+
  | {"A":1,"B":[2,3]} | { "A": 1, "B": [2, 3]} |
  +-------------------+------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_compact/dzfxuxJSON_COMPACTdzfxuxhttps://mariadb.com/kb/en/json_compact/dzfxuxdzfxux41dzfxux689qjzxqqvvbqThis function was added in MariaDB 10.2.4.
   
  Syntax
  ------ 
  JSON_DETAILED(json_doc[, tab_size])
   
  Description
  ----------- 
  Represents JSON in the most understandable way emphasizing
  nested structures.
   
  Example
   
  SET @j = '{ "A":1,"B":[2,3]}';
   
  SELECT @j;
  +--------------------+
  | @j |
  +--------------------+
  | { "A":1,"B":[2,3]} |
  +--------------------+
   
  SELECT JSON_DETAILED(@j);
  +------------------------------------------------------------+
  | JSON_DETAILED(@j) |
  +------------------------------------------------------------+
  | {
   "A": 1,
   "B": 
   [
   2,
   3
   ]
  } |
  +------------------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_detailed/dzfxuxJSON_DETAILEDdzfxuxhttps://mariadb.com/kb/en/json_detailed/dzfxuxdzfxux41dzfxux693qjzxqqvvbqSyntax
  ------ 
  SHOW AUTHORS
   
  Description
  ----------- 
  The SHOW AUTHORS statement displays information about the
  people who work on MariaDB. For each author, it displays
  Name, Location, and
  Comment values. All columns are encoded as latin1.
   
  In MariaDB 5.5 this is in somewhat random order.
   
  In MariaDB 10.0.5 and later you have:
  First the active people in MariaDB are listed.
  Then the active people in MySQL.
  Last the people that has contributed to MariaDB/MySQL in the
  past.
   
  The order is somewhat related to importance of the
  contribution given to the MariaDB project, but this is not
  100% accurate. There is still room for improvements and
  debate...
   
  Example
   
  SHOW AUTHORS;
  +--------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
  | Name | Location | Comment |
  +--------------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
  | Michael (Monty) Widenius | Tusby, Finland | Lead developer
  and main author |
  | Sergei Golubchik | Kerpen, Germany | Architect, Full-text
  search, precision math, plugin framework, merges etc |
  | Igor Babaev | Bellevue, USA | Optimizer, keycache, core
  work |
  | Sergey Petrunia | St. Petersburg, Russia | Optimizer |
  | Oleksandr Byelkin | Lugansk, Ukraine | Query Cache (4.0),
  Subqueries (4.1), Views (5.0) |
  | Timour Katchaounov | Sofia , Bulgaria | Optimizer |
  | Kristian Nielsen | Copenhagen, Denmark | Replication,
  Async client prototocol, General buildbot stuff |
  | Alexander (Bar) Barkov | Izhevsk, Russia | Unicode and
  character sets |
  | Alexey Botchkov (Holyfoot) | Izhevsk, Russia | GIS
  extensions, embedded server, precision math |
  | Daniel Bartholomew | Raleigh, USA | MariaDB documentation
  |
  | Colin Charles | Selangor, Malesia | MariaDB documentation,
  talks at a LOT of conferences |
  | Sergey Vojtovich | Izhevsk, Russia | initial
  implementation of plugin architecture, maintained native
  storage engines (MyISAM, MEMORY, ARCHIVE, etc), rewrite of
  table cache |
  | Vladislav Vaintroub | Mannheim, Germany | MariaDB Java
  connector, new thread pool, Windows optimizations |
  | Elena Stepanova | Sankt Petersburg, Russia | QA, test
  cases |
  | Georg Richter | Heidelberg, Germany | New LGPL C
  connector, PHP connector |
  | Jan Lindstr?m | Yl?mylly, Finland | Working on InnoDB |
  | Lixun Peng | Hangzhou, China | Multi Source replication |
  | Percona | CA, USA | XtraDB, microslow patches, extensions
  to slow log 
  ...
   
  See Also
   
  SHOW CONTRIBUTORS. This list all members and sponsors of the
  MariaDB Foundation and other sponsors.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-authors/dzfxuxSHOW AUTHORSdzfxuxhttps://mariadb.com/kb/en/library/show-authors/dzfxuxdzfxux26dzfxux349qjzxqqvvbqSyntax
  ------ 
  SHOW BINARY LOGS
  SHOW MASTER LOGS
   
  Description
  ----------- 
  Lists the binary log files on the server. This statement is
  used as part of the
  procedure described in 
  PURGE BINARY LOGS, that shows how to
  determine which logs can be purged.
   
  Examples
  -------- 
  SHOW BINARY LOGS;
  +--------------------+-----------+
  | Log_name | File_size |
  +--------------------+-----------+
  | mariadb-bin.000001 | 19039 |
  | mariadb-bin.000002 | 717389 |
  | mariadb-bin.000003 | 300 |
  | mariadb-bin.000004 | 333 |
  | mariadb-bin.000005 | 899 |
  | mariadb-bin.000006 | 125 |
  | mariadb-bin.000007 | 18907 |
  | mariadb-bin.000008 | 19530 |
  | mariadb-bin.000009 | 151 |
  | mariadb-bin.000010 | 151 |
  | mariadb-bin.000011 | 125 |
  | mariadb-bin.000012 | 151 |
  | mariadb-bin.000013 | 151 |
  | mariadb-bin.000014 | 125 |
  | mariadb-bin.000015 | 151 |
  | mariadb-bin.000016 | 314 |
  +--------------------+-----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-binary-logs/dzfxuxSHOW BINARY LOGSdzfxuxhttps://mariadb.com/kb/en/library/show-binary-logs/dzfxuxdzfxux26dzfxux350qjzxqqvvbqSyntax
  ------ 
  SHOW BINLOG EVENTS
   [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
   
  Description
  ----------- 
  Shows the events in the binary log. If you do not specify
  'log_name',
  the first binary log is displayed.
   
  Example
   
  SHOW BINLOG EVENTS IN 'mysql_sandbox10019-bin.000002';
  +-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+
  | Log_name | Pos | Event_type | Server_id | End_log_pos |
  Info |
  +-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+
  | mysql_sandbox10019-bin.000002 | 4 | Format_desc | 1 | 248
  | Server ver: 10.0.19-MariaDB-log, Binlog ver: 4 |
  | mysql_sandbox10019-bin.000002 | 248 | Gtid_list | 1 | 273
  | [] |
  | mysql_sandbox10019-bin.000002 | 273 | Binlog_checkpoint |
  1 | 325 | mysql_sandbox10019-bin.000002 |
  | mysql_sandbox10019-bin.000002 | 325 | Gtid | 1 | 363 |
  GTID 0-1-1 |
  | mysql_sandbox10019-bin.000002 | 363 | Query | 1 | 446 |
  CREATE DATABASE blog |
  | mysql_sandbox10019-bin.000002 | 446 | Gtid | 1 | 484 |
  GTID 0-1-2 |
  | mysql_sandbox10019-bin.000002 | 484 | Query | 1 | 571 |
  use `blog`; CREATE TABLE bb (id INT) |
  +-------------------------------+-----+-------------------+-----------+-------------+------------------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-binlog-events/dzfxuxSHOW BINLOG EVENTSdzfxuxhttps://mariadb.com/kb/en/library/show-binlog-events/dzfxuxdzfxux26dzfxux351qjzxqqvvbqThis function was added in MariaDB 10.2.4.
   
  Syntax
  ------ 
  JSON_LOOSE(json_doc)
   
  Description
  ----------- 
  Adds spaces to a JSON document to make it look more
  readable.
   
  Example
   
  SET @j = '{ "A":1,"B":[2,3]}';
   
  SELECT JSON_LOOSE(@j), @j;
  +-----------------------+--------------------+
  | JSON_LOOSE(@j) | @j |
  +-----------------------+--------------------+
  | {"A": 1, "B": [2, 3]} | { "A":1,"B":[2,3]} |
  +-----------------------+--------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_loose/dzfxuxJSON_LOOSEdzfxuxhttps://mariadb.com/kb/en/json_loose/dzfxuxdzfxux41dzfxux699qjzxqqvvbqJSON functions were added in MariaDB 10.2.3.
   
  Syntax
  ------ 
  JSON_MERGE(json_doc, json_doc[, json_doc] ...)
   
  Description
  ----------- 
  Merges the given JSON documents.
   
  Returns the merged result,or NULL if any argument is NULL.
   
  An error occurs if any of the arguments are not valid JSON
  documents.
   
  Example
   
  SET @json1 = '[1, 2]';
   
  SET @json2 = '[3, 4]';
   
  SELECT JSON_MERGE(@json1,@json2);
  +---------------------------+
  | JSON_MERGE(@json1,@json2) |
  +---------------------------+
  | [1, 2, 3, 4] |
  +---------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_merge/dzfxuxJSON_MERGEdzfxuxhttps://mariadb.com/kb/en/json_merge/dzfxuxdzfxux41dzfxux700qjzxqqvvbqJSON functions were added in MariaDB 10.2.3.
   
  Syntax
  ------ 
  JSON_OBJECT([key, value[, key, value] ...])
   
  Description
  ----------- 
  Returns a JSON object containing the given key/value pairs.
  The key/value list can be empty.
   
  An error will occur if there are an odd number of arguments,
  or any key name is NULL.
   
  Example
   
  SELECT JSON_OBJECT("id", 1, "name", "Monty");
  +---------------------------------------+
  | JSON_OBJECT("id", 1, "name", "Monty") |
  +---------------------------------------+
  | {"id": 1, "name": "Monty"} |
  +---------------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_object/dzfxuxJSON_OBJECTdzfxuxhttps://mariadb.com/kb/en/json_object/dzfxuxdzfxux41dzfxux701qjzxqqvvbqSyntax
  ------ 
  SHOW CHARACTER SET
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  The SHOW CHARACTER SET statement shows all available
  character sets. The LIKE clause, if present on its own,
  indicates which character
  set names to match. The WHERE and LIKE clauses can be given
  to select rows using more general conditions, as discussed
  in Extended SHOW.
   
  The same information can be queried from the
  information_schema.CHARACTER_SETS table.
   
  See Setting Character Sets and Collations for details on
  specifying the character set at the server, database, table
  and column levels.
   
  Examples
  -------- 
  SHOW CHARACTER SET LIKE 'latin%';
  +---------+-----------------------------+-------------------+--------+
  | Charset | Description | Default collation | Maxlen |
  +---------+-----------------------------+-------------------+--------+
  | latin1 | cp1252 West European | latin1_swedish_ci | 1 |
  | latin2 | ISO 8859-2 Central European | latin2_general_ci |
  1 |
  | latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |
  | latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |
  +---------+-----------------------------+-------------------+--------+
   
  SHOW CHARACTER SET WHERE Maxlen LIKE '2';
  +---------+---------------------------+-------------------+--------+
  | Charset | Description | Default collation | Maxlen |
  +---------+---------------------------+-------------------+--------+
  | big5 | Big5 Traditional Chinese | big5_chinese_ci | 2 |
  | sjis | Shift-JIS Japanese | sjis_japanese_ci | 2 |
  | euckr | EUC-KR Korean | euckr_korean_ci | 2 |
  | gb2312 | GB2312 Simplified Chinese | gb2312_chinese_ci | 2
  |
  | gbk | GBK Simplified Chinese | gbk_chinese_ci | 2 |
  | ucs2 | UCS-2 Unicode | ucs2_general_ci | 2 |
  | cp932 | SJIS for Windows Japanese | cp932_japanese_ci | 2
  |
  +---------+---------------------------+-------------------+--------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-character-set/dzfxuxSHOW CHARACTER SETdzfxuxhttps://mariadb.com/kb/en/library/show-character-set/dzfxuxdzfxux26dzfxux352qjzxqqvvbqMariaDB 5.2 introduced the User Statistics feature.
   
  Syntax
  ------ 
  SHOW CLIENT_STATISTICS
   
  Description
  ----------- 
  The SHOW CLIENT_STATISTICS statement was introduced in
  MariaDB 5.2 as part of the User Statistics feature. It was
  removed as a separate statement in MariaDB 10.1.1, but
  effectively replaced by the generic SHOW
  information_schema_table statement. The
  information_schema.CLIENT_STATISTICS table holds statistics
  about client connections.
   
  The userstat system variable must be set to 1 to activate
  this feature. See the User Statistics and
  information_schema.CLIENT_STATISTICS articles for more
  information.
   
  Example
   
  From MariaDB 10.0:
   
  SHOW CLIENT_STATISTICS\G
  *************************** 1. row
  ***************************
   Client: localhost
   Total_connections: 35
  Concurrent_connections: 0
   Connected_time: 708
   Busy_time: 2.5557979999999985
   Cpu_time: 0.04123740000000002
   Bytes_received: 3883
   Bytes_sent: 21595
   Binlog_bytes_written: 0
   Rows_read: 18
   Rows_sent: 115
   Rows_deleted: 0
   Rows_inserted: 0
   Rows_updated: 0
   Select_commands: 70
   Update_commands: 0
   Other_commands: 0
   Commit_transactions: 1
   Rollback_transactions: 0
   Denied_connections: 0
   Lost_connections: 0
   Access_denied: 0
   Empty_queries: 35
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/show-client-statistics/dzfxuxSHOW CLIENT_STATISTICSdzfxuxhttps://mariadb.com/kb/en/library/show-client-statistics/dzfxuxdzfxux26dzfxux353qjzxqqvvbqSyntax
  ------ 
  SHOW COLLATION
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  The output from SHOW COLLATION includes all available
  collations. The LIKE clause, if present on its own,
  indicates which collation names to match. The WHERE and LIKE
  clauses can be given to select rows using more general
  conditions, as discussed in Extended SHOW.
   
  The same information can be queried from the
  information_schema.COLLATIONS table.
   
  See Setting Character Sets and Collations for details on
  specifying the collation at the server, database, table and
  column levels.
   
  Examples
  -------- 
  SHOW COLLATION LIKE 'latin1%';
  +-------------------+---------+----+---------+----------+---------+
  | Collation | Charset | Id | Default | Compiled | Sortlen |
  +-------------------+---------+----+---------+----------+---------+
  | latin1_german1_ci | latin1 | 5 | | Yes | 1 |
  | latin1_swedish_ci | latin1 | 8 | Yes | Yes | 1 |
  | latin1_danish_ci | latin1 | 15 | | Yes | 1 |
  | latin1_german2_ci | latin1 | 31 | | Yes | 2 |
  | latin1_bin | latin1 | 47 | | Yes | 1 |
  | latin1_general_ci | latin1 | 48 | | Yes | 1 |
  | latin1_general_cs | latin1 | 49 | | Yes | 1 |
  | latin1_spanish_ci | latin1 | 94 | | Yes | 1 |
  +-------------------+---------+----+---------+----------+---------+
   
  SHOW COLLATION WHERE Sortlen LIKE '8' AND Charset LIKE
  'utf8';
  +--------------------+---------+-----+---------+----------+---------+
  | Collation | Charset | Id | Default | Compiled | Sortlen |
  +--------------------+---------+-----+---------+----------+---------+
  | utf8_unicode_ci | utf8 | 192 | | Yes | 8 |
  | utf8_icelandic_ci | utf8 | 193 | | Yes | 8 |
  | utf8_latvian_ci | utf8 | 194 | | Yes | 8 |
  | utf8_romanian_ci | utf8 | 195 | | Yes | 8 |
  | utf8_slovenian_ci | utf8 | 196 | | Yes | 8 |
  | utf8_polish_ci | utf8 | 197 | | Yes | 8 |
  | utf8_estonian_ci | utf8 | 198 | | Yes | 8 |
  | utf8_spanish_ci | utf8 | 199 | | Yes | 8 |
  | utf8_swedish_ci | utf8 | 200 | | Yes | 8 |
  | utf8_turkish_ci | utf8 | 201 | | Yes | 8 |
  | utf8_czech_ci | utf8 | 202 | | Yes | 8 |
  | utf8_danish_ci | utf8 | 203 | | Yes | 8 |
  | utf8_lithuanian_ci | utf8 | 204 | | Yes | 8 |
  | utf8_slovak_ci | utf8 | 205 | | Yes | 8 |
  | utf8_spanish2_ci | utf8 | 206 | | Yes | 8 |
  | utf8_roman_ci | utf8 | 207 | | Yes | 8 |
  | utf8_persian_ci | utf8 | 208 | | Yes | 8 |
  | utf8_esperanto_ci | utf8 | 209 | | Yes | 8 |
  | utf8_hungarian_ci | utf8 | 210 | | Yes | 8 |
  | utf8_sinhala_ci | utf8 | 211 | | Yes | 8 |
  | utf8_croatian_ci | utf8 | 213 | | Yes | 8 |
  +--------------------+---------+-----+---------+----------+---------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-collation/dzfxuxSHOW COLLATIONdzfxuxhttps://mariadb.com/kb/en/library/show-collation/dzfxuxdzfxux26dzfxux354qjzxqqvvbqJSON functions were added in MariaDB 10.2.3.
   
  Syntax
  ------ 
  JSON_SET(json_doc, path, val[, path, val] ...)
   
  Description
  ----------- 
  Updates or inserts data into a JSON document, returning the
  result, or NULL if any of the arguments are NULL or the
  optional path fails to find an object.
   
  An error will occur if the JSON document is invalid, the
  path is invalid or if the path contains a * or  wildcard.
   
  JSON_SET can update or insert data, while JSON_REPLACE can
  only update, and JSON_INSERT only insert. 
   
  Examples
  -------- 

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/json_set/dzfxuxJSON_SETdzfxuxhttps://mariadb.com/kb/en/json_set/dzfxuxdzfxux41dzfxux707qjzxqqvvbqThe CUME_DIST() function was first introduced with window
  functions in MariaDB 10.2.0.
   
  Syntax
  ------ 
  CUME_DIST() OVER ( 
   [ PARTITION BY partition_expression ] 
   [ ORDER BY order_list ]
  )
   
  Description
  ----------- 
  CUME_DIST() is a window function that returns the cumulative
  distribution of a given row. The following formula is used
  to calculate the value:
   
  (number of rows 

  URL: https://mariadb.com/kb/en/cume_dist/dzfxuxCUME_DISTdzfxuxhttps://mariadb.com/kb/en/cume_dist/dzfxuxdzfxux42dzfxux712qjzxqqvvbqThe NTH_VALUE() function was first introduced with other
  window functions in MariaDB 10.2.
   
  Syntax
  ------ 
  NTH_VALUE (expr[, num_row]) OVER ( 
   [ PARTITION BY partition_expression ] 
   [ ORDER BY order_list ]
  )
   
  Description
  ----------- 
  The NTH_VALUE function returns the value evaluated at row
  number num_row of the window frame, starting from 1, or NULL
  if the row does not exist.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/nth_value/dzfxuxNTH_VALUEdzfxuxhttps://mariadb.com/kb/en/nth_value/dzfxuxdzfxux42dzfxux718qjzxqqvvbqSyntax
  ------ 
  SHOW [FULL] {COLUMNS | FIELDS} FROM tbl_name [FROM db_name]
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  SHOW COLUMNS displays information about the columns in a
  given table. It also works for views. The LIKE clause, if
  present on its own, indicates which column names to match.
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  If the data types differ from what you expect them to be
  based on a
  CREATE TABLE statement, note that MariaDB sometimes changes
  data types when you create or alter a table. The conditions
  under which this
  occurs are described in the Silent Column Changes article.
   
  The FULL keyword causes the output to include the column
  collation and comments, as well as the privileges you have
  for each column.
   
  You can use db_name.tbl_name as an alternative to the
  tbl_name FROM db_name syntax. In other words, these two
  statements are equivalent:
   
  SHOW COLUMNS FROM mytable FROM mydb;
  SHOW COLUMNS FROM mydb.mytable;
   
  SHOW COLUMNS displays the following values for each table
  column:
   
  Field indicates the column name.
   
  Type indicates the column data type.
   
  Collation indicates the collation for non-binary string
  columns, or
  NULL for other columns. This value is displayed only if you
  use the
  FULL keyword.
   
  The Null field contains YES if NULL values can be stored in
  the column,
  NO if not.
   
  The Key field indicates whether the column is indexed:
  If Key is empty, the column either is not indexed or is
  indexed only as a
   secondary column in a multiple-column, non-unique index.
  If Key is PRI, the column is a PRIMARY KEY or
   is one of the columns in a multiple-column PRIMARY KEY.
  If Key is UNI, the column is the first column of a
  unique-valued
   index that cannot contain NULL values.
  If Key is MUL, multiple occurrences of a given value are
  allowed
   within the column. The column is the first column of a
  non-unique index or a
   unique-valued index that can contain NULL values.
   
  If more than one of the Key values applies to a given column
  of a
  table, Key displays the one with the highest priority, in
  the order
  PRI, UNI, MUL.
   
  A UNIQUE index may be displayed as PRI if
  it cannot contain NULL values and there is no
  PRIMARY KEY in the table. A UNIQUE index
  may display as MUL if several columns form a composite
  UNIQUE index; although the combination of the columns is
  unique, each column can still hold multiple occurrences of a
  given value.
   
  The Default field indicates the default value that is
  assigned to the
  column.
   
  The Extra field contains any additional information that is
  available about a given column.
   
  Value | Description | 
   
  AUTO_INCREMENT | The column was created with the
  AUTO_INCREMENT keyword. | 
   
  PERSISTENT | The column was created with the PERSISTENT
  keyword. (New in 5.3) | 
   
  VIRTUAL | The column was created with the VIRTUAL keyword.
  (New in 5.3) | 
   
  on update CURRENT_TIMESTAMP | The column is a TIMESTAMP
  column that is automatically updated on INSERT and UPDATE. |

   
  Privileges indicates the privileges you have for the column.
  This
  value is displayed only if you use the FULL keyword.
   
  Comment indicates any comment the column has. This value is
  displayed
  only if you use the FULL keyword.
   
  SHOW FIELDS is a synonym for
  SHOW COLUMNS. Also DESCRIBE and EXPLAIN can be used as
  shortcuts.
   
  You can also list a table's columns with: 
   
  mysqlshow db_name tbl_name
   
  See the mysqlshow command for more details.
   
  The DESCRIBE statement provides information similar to SHOW
  COLUMNS. The information_schema.COLUMNS table provides
  similar, but more complete, information.
   
  The SHOW CREATE TABLE, SHOW TABLE STATUS, and SHOW INDEX
  statements also provide information about tables.
   
  Examples
  -------- 
  SHOW COLUMNS FROM city;
  +------------+----------+------+-----+---------+----------------+
  | Field | Type | Null | Key | Default | Extra |
  +------------+----------+------+-----+---------+----------------+
  | Id | int(11) | NO | PRI | NULL | auto_increment |
  | Name | char(35) | NO | | | |
  | Country | char(3) | NO | UNI | | |
  | District | char(20) | YES | MUL | | |
  | Population | int(11) | NO | | 0 | |
  +------------+----------+------+-----+---------+----------------+
   
  SHOW COLUMNS FROM employees WHERE Type LIKE 'Varchar%';
  +---------------+-------------+------+-----+---------+-------+
  | Field | Type | Null | Key | Default | Extra |
  +---------------+-------------+------+-----+---------+-------+
  | first_name | varchar(30) | NO | MUL | NULL | |
  | last_name | varchar(40) | NO | | NULL | |
  | position | varchar(25) | NO | | NULL | |
  | home_address | varchar(50) | NO | | NULL | |
  | home_phone | varchar(12) | NO | | NULL | |
  | employee_code | varchar(25) | NO | UNI | NULL | |
  +---------------+-------------+------+-----+---------+-------+
   


  URL: https://mariadb.com/kb/en/library/show-columns/dzfxuxSHOW COLUMNSdzfxuxhttps://mariadb.com/kb/en/library/show-columns/dzfxuxdzfxux26dzfxux355qjzxqqvvbqSyntax
  ------ 
  SPIDER_FLUSH_TABLE_MON_CACHE()
   
  Description
  ----------- 
  A UDF installed with the Spider Storage Engine, this
  function is used for refreshing monitoring server
  information. It returns a value of 1.
   
  Examples
  -------- 
  SELECT SPIDER_FLUSH_TABLE_MON_CACHE();
  +--------------------------------+
  | SPIDER_FLUSH_TABLE_MON_CACHE() |
  +--------------------------------+
  | 1 |
  +--------------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/spider_flush_table_mon_cache/dzfxuxSPIDER_FLUSH_TABLE_MON_CACHEdzfxuxhttps://mariadb.com/kb/en/spider_flush_table_mon_cache/dzfxuxdzfxux43dzfxux728qjzxqqvvbqThe COLUMN_CHECK function was added in MariaDB 10.0.1.
   
  Syntax
  ------ 
  COLUMN_CHECK(dyncol_blob);
   
  Description
  ----------- 
  Check if dyncol_blob is a valid packed dynamic columns blob.
  Return value of 1 means the blob is valid, return value of 0
  means it is not.
   
  Rationale:
  Normally, one works with valid dynamic column blobs.
  Functions like COLUMN_CREATE, COLUMN_ADD, COLUMN_DELETE
  always return valid dynamic column blobs. However, if a
  dynamic column blob is accidentally truncated, or transcoded
  from one character set to another, it will be corrupted.
  This function can be used to check if a value in a blob
  field is a valid dynamic column blob.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/column_check/dzfxuxCOLUMN_CHECKdzfxuxhttps://mariadb.com/kb/en/column_check/dzfxuxdzfxux44dzfxux730qjzxqqvvbqThe Dynamic columns feature was introduced in MariaDB 5.3.
   
  Syntax
  ------ 
  COLUMN_DELETE(dyncol_blob, column_nr, column_nr...);
  COLUMN_DELETE(dyncol_blob, column_name, column_name...);
   
  Description
  ----------- 
  Deletes a dynamic column with the specified name. Multiple
  names can be given. The return value is a dynamic column
  blob after the modification.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/column_delete/dzfxuxCOLUMN_DELETEdzfxuxhttps://mariadb.com/kb/en/column_delete/dzfxuxdzfxux44dzfxux732qjzxqqvvbqThe Dynamic columns feature was introduced in MariaDB 5.3.
   
  Syntax
  ------ 
  COLUMN_EXISTS(dyncol_blob, column_nr);
  COLUMN_EXISTS(dyncol_blob, column_name);
   
  Description
  ----------- 
  Checks if a column with name column_name exists in
  dyncol_blob. If yes, return 1, otherwise return 0. See
  dynamic columns for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/column_exists/dzfxuxCOLUMN_EXISTSdzfxuxhttps://mariadb.com/kb/en/column_exists/dzfxuxdzfxux44dzfxux733qjzxqqvvbqThe Dynamic columns feature was introduced in MariaDB 5.3.
   
  Syntax
  ------ 
  COLUMN_LIST(dyncol_blob);
   
  Description
  ----------- 
  Since MariaDB 10.0.1, this function returns a
  comma-separated list of column names. The names are quoted
  with backticks.
   
  Before MariaDB 10.0.1, it returned a comma-separated list of
  column numbers, not names.
   
  See dynamic columns for more information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/column_list/dzfxuxCOLUMN_LISTdzfxuxhttps://mariadb.com/kb/en/column_list/dzfxuxdzfxux44dzfxux736qjzxqqvvbqSyntax
  ------ 
  SHOW CONTRIBUTORS
   
  Description
  ----------- 
  The SHOW CONTRIBUTORS statement displays information about
  the companies and people who financially contribute to
  MariaDB. For each contributor, it displays Name, Location,
  and Comment values. All columns are encoded as latin1.
   
  In MariaDB 5.5 this is in somewhat random order, and the
  feature was deprecated.
   
  In MariaDB 10.0.5 it was un-deprecated, and since then
  displays all members and sponsors of the MariaDB Foundation
  as well as other financial contributors.
   
  Example
   
  SHOW CONTRIBUTORS;
  +---------------------+-------------------------------+-------------------------------------------------------------+
  | Name | Location | Comment |
  +---------------------+-------------------------------+-------------------------------------------------------------+
  | Booking.com | https://www.booking.com | Founding member,
  Platinum Sponsor of the MariaDB Foundation |
  | Alibaba Cloud | https://www.alibabacloud.com/ | Platinum
  Sponsor of the MariaDB Foundation |
  | Tencent Cloud | https://cloud.tencent.com | Platinum
  Sponsor of the MariaDB Foundation |
  | Microsoft | https://microsoft.com/ | Platinum Sponsor of
  the MariaDB Foundation |
  | MariaDB Corporation | https://mariadb.com | Founding
  member, Platinum Sponsor of the MariaDB Foundation |
  | Visma | https://visma.com | Gold Sponsor of the MariaDB
  Foundation |
  | DBS | https://dbs.com | Gold Sponsor of the MariaDB
  Foundation |
  | IBM | https://www.ibm.com | Gold Sponsor of the MariaDB
  Foundation |
  | Tencent Games | http://game.qq.com/ | Gold Sponsor of the
  MariaDB Foundation |
  | Nexedi | https://www.nexedi.com | Silver Sponsor of the
  MariaDB Foundation |
  | Acronis | https://www.acronis.com | Silver Sponsor of the
  MariaDB Foundation |
  | Verkkokauppa.com | https://www.verkkokauppa.com | Bronze
  Sponsor of the MariaDB Foundation |
  | Virtuozzo | https://virtuozzo.com | Bronze Sponsor of the
  MariaDB Foundation |
  | Tencent Game DBA | http://tencentdba.com/about | Bronze
  Sponsor of the MariaDB Foundation |
  | Tencent TDSQL | http://tdsql.org | Bronze Sponsor of the
  MariaDB Foundation |
  | Percona | https://www.percona.com/ | Bronze Sponsor of the
  MariaDB Foundation |
  | Google | USA | Sponsoring encryption, parallel replication
  and GTID |
  | Facebook | USA | Sponsoring non-blocking API, LIMIT ROWS
  EXAMINED etc |
  | Ronald Bradford | Brisbane, Australia | EFF contribution
  for UC2006 Auction |
  | Sheeri Kritzer | Boston, Mass. USA | EFF contribution for
  UC2006 Auction |
  | Mark Shuttleworth | London, UK. | EFF contribution for
  UC2006 Auction |
  +---------------------+-------------------------------+-------------------------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/show-contributors/dzfxuxSHOW CONTRIBUTORSdzfxuxhttps://mariadb.com/kb/en/library/show-contributors/dzfxuxdzfxux26dzfxux356qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE {DATABASE | SCHEMA} db_name
   
  Description
  ----------- 
  Shows the CREATE DATABASE statement that
  creates the given database. SHOW CREATE SCHEMA is a synonym
  for SHOW CREATE DATABASE. SHOW CREATE DATABASE quotes
  database names according to the value of the
  sql_quote_show_create server system variable.
   
  Examples
  -------- 
  SHOW CREATE DATABASE test;
  +----------+-----------------------------------------------------------------+
  | Database | Create Database |
  +----------+-----------------------------------------------------------------+
  | test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER
  SET latin1 */ |
  +----------+-----------------------------------------------------------------+
   
  SHOW CREATE SCHEMA test;
  +----------+-----------------------------------------------------------------+
  | Database | Create Database |
  +----------+-----------------------------------------------------------------+
  | test | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER
  SET latin1 */ |
  +----------+-----------------------------------------------------------------+
   
  With sql_quote_show_create off:
   
  SHOW CREATE DATABASE test;
  +----------+---------------------------------------------------------------+
  | Database | Create Database |
  +----------+---------------------------------------------------------------+
  | test | CREATE DATABASE test /*!40100 DEFAULT CHARACTER SET
  latin1 */ |
  +----------+---------------------------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/show-create-database/dzfxuxSHOW CREATE DATABASEdzfxuxhttps://mariadb.com/kb/en/library/show-create-database/dzfxuxdzfxux26dzfxux357qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE EVENT event_name
   
  Description
  ----------- 
  This statement displays the CREATE EVENT
  statement needed to re-create a given event, as well as the
  SQL_MODE that was used when the trigger has been created and
  the character set used by the connection.. To find out which
  events are present, use SHOW EVENTS.
   
  The output of this statement is unreliably affected by the
  sql_quote_show_create server system variable - see
  http://bugs.mysql.com/bug.php?id=12719
   
  The information_schema.EVENTS table provides similar, but
  more complete, information.
   
  Examples
  -------- 
  SHOW CREATE EVENT test.e_daily\G
  *************************** 1. row
  ***************************
   Event: e_daily
   sql_mode: 
   time_zone: SYSTEM
   Create Event: CREATE EVENT `e_daily`
   ON SCHEDULE EVERY 1 DAY
   STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
   ON COMPLETION NOT PRESERVE
   ENABLE
   COMMENT 'Saves total number of sessions then
   clears the table each day'
   DO BEGIN
   INSERT INTO site_activity.totals (time, total)
   SELECT CURRENT_TIMESTAMP, COUNT(*) 
   FROM site_activity.sessions;
   DELETE FROM site_activity.sessions;
   END
  character_set_client: latin1
  collation_connection: latin1_swedish_ci
   Database Collation: latin1_swedish_ci
   


  URL: https://mariadb.com/kb/en/library/show-create-event/dzfxuxSHOW CREATE EVENTdzfxuxhttps://mariadb.com/kb/en/library/show-create-event/dzfxuxdzfxux26dzfxux358qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE FUNCTION func_name
   
  Description
  ----------- 
  This statement is similar to 
  SHOW CREATE PROCEDURE but for
  stored functions.
   
  The output of this statement is unreliably affected by the
  sql_quote_show_create server system variable - see
  http://bugs.mysql.com/bug.php?id=12719
   
  Example
   
  MariaDB [test]> SHOW CREATE FUNCTION VatCents\G
  *************************** 1. row
  ***************************
   Function: VatCents
   sql_mode: 
   Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION
  `VatCents`(price DECIMAL(10,2)) RETURNS int(11)
   DETERMINISTIC
  BEGIN
   DECLARE x INT;
   SET x = price * 114;
   RETURN x;
  END
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   


  URL: https://mariadb.com/kb/en/library/show-create-function/dzfxuxSHOW CREATE FUNCTIONdzfxuxhttps://mariadb.com/kb/en/library/show-create-function/dzfxuxdzfxux26dzfxux359qjzxqqvvbqOracle-style packages were introduced in MariaDB 10.3.5.
   
  Syntax
  ------ 
  SHOW CREATE PACKAGE [ db_name . ] package_name
   
  Description
  ----------- 
  The SHOW CREATE PACKAGE statement can be used when Oracle
  SQL_MODE is set.
   
  Shows the CREATE statement that creates the given package
  specification.
   
  Examples
  -------- 
  SHOW CREATE PACKAGE employee_tools\G
  *************************** 1. row
  ***************************
   Package: employee_tools
   sql_mode:
  PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
   Create Package: CREATE DEFINER="root"@"localhost"
  PACKAGE "employee_tools" AS
   FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);
   PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));
   PROCEDURE raiseSalaryStd(eid INT);
   PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));
  END
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   


  URL: https://mariadb.com/kb/en/library/show-create-package/dzfxuxSHOW CREATE PACKAGEdzfxuxhttps://mariadb.com/kb/en/library/show-create-package/dzfxuxdzfxux26dzfxux360qjzxqqvvbqOracle-style packages were introduced in MariaDB 10.3.5.
   
  Syntax
  ------ 
  SHOW CREATE PACKAGE BODY [ db_name . ] package_name
   
  Description
  ----------- 
  The SHOW CREATE PACKAGE BODY statement can be used when
  Oracle SQL_MODE is set.
   
  Shows the CREATE statement that creates the given package
  body (i.e. the implementation).
   
  Examples
  -------- 
  SHOW CREATE PACKAGE BODY employee_tools\G
  *************************** 1. row
  ***************************
   Package body: employee_tools
   sql_mode:
  PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER
   Create Package Body: CREATE DEFINER="root"@"localhost"
  PACKAGE BODY "employee_tools" AS
   
   stdRaiseAmount DECIMAL(10,2):=500;
   
   PROCEDURE log (eid INT, ecmnt TEXT) AS
   BEGIN
   INSERT INTO employee_log (id, cmnt) VALUES (eid, ecmnt);
   END;
   
   PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2)) AS
   eid INT;
   BEGIN
   INSERT INTO employee (name, salary) VALUES (ename,
  esalary);
   eid:= last_insert_id();
   log(eid, 'hire ' || ename);
   END;
   
   FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2) AS
   nSalary DECIMAL(10,2);
   BEGIN
   SELECT salary INTO nSalary FROM employee WHERE id=eid;
   log(eid, 'getSalary id=' || eid || ' salary=' ||
  nSalary);
   RETURN nSalary;
   END;
   
   PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2)) AS
   BEGIN
   UPDATE employee SET salary=salary+amount WHERE id=eid;
   log(eid, 'raiseSalary id=' || eid || ' amount=' ||
  amount);
   END;
   
   PROCEDURE raiseSalaryStd(eid INT) AS
   BEGIN
   raiseSalary(eid, stdRaiseAmount);
   log(eid, 'raiseSalaryStd id=' || eid);
   END;
   
  BEGIN 
   log(0, 'Session ' || connection_id() || ' ' ||
  current_user || ' started');
  END
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   


  URL:
  https://mariadb.com/kb/en/library/show-create-package-body/dzfxuxSHOW CREATE PACKAGE BODYdzfxuxhttps://mariadb.com/kb/en/library/show-create-package-body/dzfxuxdzfxux26dzfxux361qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE PROCEDURE proc_name
   
  Description
  ----------- 
  This statement is a MariaDB extension. It returns the exact
  string that
  can be used to re-create the named stored procedure, as well
  as the SQL_MODE that was used when the trigger has been
  created and the character set used by the connection.. A
  similar
  statement, SHOW CREATE FUNCTION,
  displays information about stored functions.
   
  Both statements require that you are the owner of the
  routine or have the SELECT privilege on the mysql.proc
  table. When neither is true, the statements display NULL for
  the Create Procedure or Create Function field.
   
  Warning Users with SELECT privileges on mysql.proc or USAGE
  privileges on *.* can view the text of routines, even when
  they do not have privileges for the function or procedure
  itself.
   
  The output of these statements is unreliably affected by the
  sql_quote_show_create server system variable - see
  http://bugs.mysql.com/bug.php?id=12719
   
  Examples
  -------- 
  Here's a comparison of the SHOW CREATE PROCEDURE and SHOW
  CREATE FUNCTION statements.
   
  SHOW CREATE PROCEDURE test.simpleproc\G
  *************************** 1. row
  ***************************
   Procedure: simpleproc
   sql_mode: 
   Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1
  INT)
   BEGIN
   SELECT COUNT(*) INTO param1 FROM t;
   END
  character_set_client: latin1
  collation_connection: latin1_swedish_ci
   Database Collation: latin1_swedish_ci
   
  SHOW CREATE FUNCTION test.hello\G
  *************************** 1. row
  ***************************
   Function: hello
   sql_mode:
   Create Function: CREATE FUNCTION `hello`(s CHAR(20))
   RETURNS CHAR(50)
   RETURN CONCAT('Hello, ',s,'!')
  character_set_client: latin1
  collation_connection: latin1_swedish_ci
   Database Collation: latin1_swedish_ci
   
  When the user issuing the statement does not have privileges
  on the routine, attempting to CALL the procedure raises
  Error 1370.
   
  CALL test.prc1();
  Error 1370 (42000): execute command denieed to user
  'test_user'@'localhost' for routine 'test'.'prc1'
   
  If the user neither has privilege to the routine nor the
  SELECT privilege on mysql.proc table, it raises Error 1305,
  informing them that the procedure does not exist.
   
  SHOW CREATE TABLES test.prc1\G
  Error 1305 (42000): PROCEDURE prc1 does not exist
   


  URL:
  https://mariadb.com/kb/en/library/show-create-procedure/dzfxuxSHOW CREATE PROCEDUREdzfxuxhttps://mariadb.com/kb/en/library/show-create-procedure/dzfxuxdzfxux26dzfxux362qjzxqqvvbqSequences were introduced in MariaDB 10.3.
   
  Syntax
  ------ 
  SHOW CREATE SEQUENCE sequence_name;
   
  Description
  ----------- 
  Shows the CREATE SEQUENCE statement that created the given
  sequence. The statement requires the SELECT privilege for
  the table.
   
  Example
   
  CREATE SEQUENCE s1 START WITH 50;
   
  SHOW CREATE SEQUENCE s1\G;
   
  *************************** 1. row
  ***************************
   Table: t1
  Create Table: CREATE SEQUENCE `s1` start with 50 minvalue 1
  maxvalue 9223372036854775806
  increment by 1 cache 1000 nocycle ENGINE=Aria
   
  Notes
   
  If you want to see the underlying table structure used for
  the SEQUENCE
  you can use SHOW CREATE TABLE on the SEQUENCE. You can also
  use SELECT to read the current recorded state of the
  SEQUENCE:
   
  CREATE SEQUENCE t1;
   
  SHOW CREATE TABLE s1\G
  *************************** 1. row
  ***************************
   Table: s1
  Create Table: CREATE TABLE `s1` (
   `next_value` bigint(21) NOT NULL COMMENT 'next not cached
  value',
   `min_value` bigint(21) NOT NULL COMMENT 'min value',
   `max_value` bigint(21) NOT NULL COMMENT 'max value',
   `start` bigint(21) NOT NULL COMMENT 'start value',
   `increment` bigint(21) NOT NULL COMMENT 'increment
  value',
   `cache` bigint(21) NOT NULL COMMENT 'cache size',
   `cycle` tinyint(1) unsigned NOT NULL COMMENT 'cycle
  state',
   `round` bigint(21) NOT NULL COMMENT 'How many cycles has
  been done'
  ) ENGINE=Aria SEQUENCE=1
   
  SELECT * FROM s1;
   
  +------------+-----------+---------------------+-------+-----------+-------+-------+-------+
  | next_value | min_value | max_value | start | increment |
  cache | cycle | round |
  +------------+-----------+---------------------+-------+-----------+-------+-------+-------+
  | 1 | 1 | 9223372036854775806 | 1 | 1 | 1000 | 0 | 0 |
  +------------+-----------+---------------------+-------+-----------+-------+-------+-------+
   


  URL: https://mariadb.com/kb/en/library/show-create-sequence/dzfxuxSHOW CREATE SEQUENCEdzfxuxhttps://mariadb.com/kb/en/library/show-create-sequence/dzfxuxdzfxux26dzfxux363qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE TABLE tbl_name
   
  Description
  ----------- 
  Shows the CREATE TABLE statement that created the given
  table. The statement requires the SELECT privilege for the
  table. This statement also works with views and SEQUENCE.
   
  SHOW CREATE TABLE quotes table and
  column names according to the value of the
  sql_quote_show_create server system variable.
   
  MariaDB and MySQL-specific table options, column options,
  and index options are not included in the output of this
  statement if the NO_TABLE_OPTIONS, NO_FIELD_OPTIONS and
  NO_KEY_OPTIONS SQL_MODE flags are used.
   
  Invalid table options, column options and index options are
  normally commented out (note, that it is possible to create
  a table with invalid options, by altering a table of a
  different engine, where these options were valid). To have
  them uncommented, enable IGNORE_BAD_TABLE_OPTIONS SQL_MODE.
  Remember that replaying a CREATE TABLE statement with
  uncommented invalid options will fail with an error, unless
  IGNORE_BAD_TABLE_OPTIONS SQL_MODE is in effect.
   
  Note that SHOW CREATE TABLE is not meant to provide metadata
  about a table. It provides information about how the table
  was declared, but the real table structure could differ a
  bit. For example, if an index has been declared as HASH, the
  CREATE TABLE statement returned by SHOW CREATE TABLE will
  declare that index as HASH; however, it is possible that the
  index is in fact a BTREE, because the storage engine does
  not support HASH.
   
  MariaDB 10.2.1 permits TEXT and BLOB data types to be
  assigned a DEFAULT value. As a result, from MariaDB 10.2.1,
  SHOW CREATE TABLE will append a DEFAULT NULL to nullable
  TEXT or BLOB fields if no specific default is provided. 
   
  From MariaDB 10.2.2, numbers are no longer quoted in the
  DEFAULT clause in SHOW CREATE statement. Previously, MariaDB
  quoted numbers. 
   
  Examples
  -------- 
  SHOW CREATE TABLE t\G
  *************************** 1. row
  ***************************
   Table: t
  Create Table: CREATE TABLE `t` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `s` char(60) DEFAULT NULL,
   PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
   
  With sql_quote_show_create off:
   
  SHOW CREATE TABLE t\G
  *************************** 1. row
  ***************************
   Table: t
  Create Table: CREATE TABLE t (
   id int(11) NOT NULL AUTO_INCREMENT,
   s char(60) DEFAULT NULL,
   PRIMARY KEY (id)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
   
  Unquoted numeric DEFAULTs, from MariaDB 10.2.2:
   
  CREATE TABLE td (link TINYINT DEFAULT 1);
   
  SHOW CREATE TABLE td\G
  *************************** 1. row
  ***************************
   Table: td
  Create Table: CREATE TABLE `td` (
   `link` tinyint(4) DEFAULT 1
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
   
  Quoted numeric DEFAULTs, until MariaDB 10.2.1:
   
  CREATE TABLE td (link TINYINT DEFAULT 1);
   
  SHOW CREATE TABLE td\G
  *************************** 1. row
  ***************************
   Table: td
  Create Table: CREATE TABLE `td` (
   `link` tinyint(4) DEFAULT '1'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
   


  URL: https://mariadb.com/kb/en/library/show-create-table/dzfxuxSHOW CREATE TABLEdzfxuxhttps://mariadb.com/kb/en/library/show-create-table/dzfxuxdzfxux26dzfxux364qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE TRIGGER trigger_name
   
  Description
  ----------- 
  This statement shows a CREATE TRIGGER
  statement that creates the given trigger, as well as the
  SQL_MODE that was used when the trigger has been created and
  the character set used by the connection.
   
  The output of this statement is unreliably affected by the
  sql_quote_show_create server system variable - see
  http://bugs.mysql.com/bug.php?id=12719
   
  Examples
  -------- 
  SHOW CREATE TRIGGER example\G
  *************************** 1. row
  ***************************
   Trigger: example
   sql_mode:
  ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES
  ,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_
  ENGINE_SUBSTITUTION
  SQL Original Statement: CREATE DEFINER=`root`@`localhost`
  TRIGGER example BEFORE
   INSERT ON t FOR EACH ROW
  BEGIN
   SET NEW.c = NEW.c * 2;
  END
   character_set_client: cp850
   collation_connection: cp850_general_ci
   Database Collation: utf8_general_ci
   Created: 2016-09-29 13:53:34.35
   
  The Created column was added in MySQL 5.7 and MariaDB 10.2.3
  as part of introducing multiple trigger events per action.
   


  URL: https://mariadb.com/kb/en/library/show-create-trigger/dzfxuxSHOW CREATE TRIGGERdzfxuxhttps://mariadb.com/kb/en/library/show-create-trigger/dzfxuxdzfxux26dzfxux365qjzxqqvvbqSHOW CREATE USER was introduced in MariaDB 10.2.0
   
  Syntax
  ------ 
  SHOW CREATE USER user_name
   
  Description
  ----------- 
  Shows the CREATE USER statement that created the given
  user. The statement requires the SELECT privilege for the
  mysql database, except for the current user.
   
  Examples
  -------- 
  CREATE USER foo4@test require cipher 'text' 
   issuer 'foo_issuer' subject 'foo_subject';
   
  SHOW CREATE USER foo4@test\G
  *************************** 1. row
  ***************************
  CREATE USER 'foo4'@'test' 
   REQUIRE ISSUER 'foo_issuer' 
   SUBJECT 'foo_subject' 
   CIPHER 'text'
   
  User Password Expiry:
   
  CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL
  120 DAY;
   
  SHOW CREATE USER 'monty'@'localhost';
   
  +------------------------------------------------------------------+
  | CREATE USER for monty@localhost |
  +------------------------------------------------------------------+
  | CREATE USER 'monty'@'localhost' PASSWORD EXPIRE
  INTERVAL 120 DAY |
  +------------------------------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/show-create-user/dzfxuxSHOW CREATE USERdzfxuxhttps://mariadb.com/kb/en/library/show-create-user/dzfxuxdzfxux26dzfxux366qjzxqqvvbqSyntax
  ------ 
  SHOW CREATE VIEW view_name
   
  Description
  ----------- 
  This statement shows a CREATE VIEW statement that creates
  the given view, as well as the character set used by the
  connection when the view was created. This statement
  also works with views.
   
  SHOW CREATE VIEW quotes table, column and stored function
  names according to the value of the sql_quote_show_create
  server system variable.
   
  Examples
  -------- 
  SHOW CREATE VIEW example\G
  *************************** 1. row
  ***************************
   View: example
   Create View: CREATE ALGORITHM=UNDEFINED
  DEFINER=`root`@`localhost` SQL
  SECURITY DEFINER VIEW `example` AS (select `t`.`id` AS
  `id`,`t`.`s` AS `s` from
  `t`)
  character_set_client: cp850
  collation_connection: cp850_general_ci
   
  With sql_quote_show_create off:
   
  SHOW CREATE VIEW example\G
  *************************** 1. row
  ***************************
   View: example
   Create View: CREATE ALGORITHM=UNDEFINED
  DEFINER=root@localhost SQL SECU
  RITY DEFINER VIEW example AS (select t.id AS id,t.s AS s
  from t)
  character_set_client: cp850
  collation_connection: cp850_general_ci
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-create-view/dzfxuxSHOW CREATE VIEWdzfxuxhttps://mariadb.com/kb/en/library/show-create-view/dzfxuxdzfxux26dzfxux367qjzxqqvvbqSyntax
  ------ 
  SHOW {DATABASES | SCHEMAS}
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  SHOW DATABASES lists the databases on the MariaDB server
  host.
  SHOW SCHEMAS is a synonym for 
  SHOW DATABASES. The LIKE clause, if
  present on its own, indicates which database names to match.
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  You see only those databases for which you have some kind of
  privilege, unless you have the global 
  SHOW DATABASES privilege. You
  can also get this list using the mysqlshow command.
   
  If the server was started with the --skip-show-database
  option, you cannot use this statement at all unless you have
  the
  SHOW DATABASES privilege.
   
  Example
   
  SHOW DATABASES;
  +--------------------+
  | Database |
  +--------------------+
  | information_schema |
  | mysql |
  | performance_schema |
  | test |
  +--------------------+
   
  SHOW DATABASES LIKE 'm%';
  +---------------+
  | Database (m%) |
  +---------------+
  | mysql |
  +---------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-databases/dzfxuxSHOW DATABASESdzfxuxhttps://mariadb.com/kb/en/library/show-databases/dzfxuxdzfxux26dzfxux368qjzxqqvvbqSyntax
  ------ 
  SHOW [STORAGE] ENGINES
   
  Description
  ----------- 
  SHOW ENGINES displays status information about the server's
  storage engines. This is particularly useful for checking
  whether a storage
  engine is supported, or to see what the default engine is. 
  SHOW TABLE TYPES is a deprecated synonym.
   
  The information_schema.ENGINES table provides the same
  information.
   
  Since storage engines are plugins, different information
  about them is also shown in the information_schema.PLUGINS
  table and by the SHOW PLUGINS statement.
   
  Note that both MySQL's InnoDB and Percona's XtraDB
  replacement are labeled as InnoDB. However, if XtraDB is in
  use, it will be specified in the COMMENT field. See XtraDB
  and InnoDB. The same applies to FederatedX.
   
  The output consists of the following columns:
  Engine indicates the engine's name.
  Support indicates whether the engine is installed, and
  whether it is the default engine for the current session.
  Comment is a brief description.
  Transactions, XA and Savepoints indicate whether
  transactions, XA transactions and transaction savepoints are
  supported by the engine.
   
  Examples
  -------- 
  SHOW ENGINES\G
  *************************** 1. row
  ***************************
   Engine: InnoDB
   Support: DEFAULT
   Comment: Supports transactions, row-level locking, and
  foreign keys
  Transactions: YES
   XA: YES
   Savepoints: YES
  *************************** 2. row
  ***************************
   Engine: CSV
   Support: YES
   Comment: CSV storage engine
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 3. row
  ***************************
   Engine: MyISAM
   Support: YES
   Comment: MyISAM storage engine
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 4. row
  ***************************
   Engine: BLACKHOLE
   Support: YES
   Comment: /dev/null storage engine (anything you write to it
  disappears)
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 5. row
  ***************************
   Engine: FEDERATED
   Support: YES
   Comment: FederatedX pluggable storage engine
  Transactions: YES
   XA: NO
   Savepoints: YES
  *************************** 6. row
  ***************************
   Engine: MRG_MyISAM
   Support: YES
   Comment: Collection of identical MyISAM tables
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 7. row
  ***************************
   Engine: ARCHIVE
   Support: YES
   Comment: Archive storage engine
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 8. row
  ***************************
   Engine: MEMORY
   Support: YES
   Comment: Hash based, stored in memory, useful for temporary
  tables
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 9. row
  ***************************
   Engine: PERFORMANCE_SCHEMA
   Support: YES
   Comment: Performance Schema
  Transactions: NO
   XA: NO
   Savepoints: NO
  *************************** 10. row
  ***************************
   Engine: Aria
   Support: YES
   Comment: Crash-safe tables with MyISAM heritage
  Transactions: NO
   XA: NO
   Savepoints: NO
  10 rows in set (0.00 sec)
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-engines/dzfxuxSHOW ENGINESdzfxuxhttps://mariadb.com/kb/en/library/show-engines/dzfxuxdzfxux26dzfxux371qjzxqqvvbqSyntax
  ------ 
  SHOW ENGINE engine_name {STATUS | MUTEX}
   
  Description
  ----------- 
  SHOW ENGINE displays operational information about a storage
  engine. The following statements currently are supported:
   
  SHOW ENGINE INNODB STATUS
  SHOW ENGINE INNODB MUTEX
  SHOW ENGINE PERFORMANCE_SCHEMA STATUS
   
  If the Sphinx Storage Engine is installed, the following is
  also supported:
   
  SHOW ENGINE SPHINX STATUS
   
  See SHOW ENGINE SPHINX STATUS.
   
  Older (and now removed) synonyms were SHOW INNODB STATUS
  for SHOW ENGINE INNODB STATUS and 
  SHOW MUTEX STATUS for 
  SHOW ENGINE INNODB MUTEX.
   
  SHOW ENGINE BDB LOGS formerly displayed status information
  about BDB log files. It was deprecated in MySQL 5.1.12 and
  removed in MariaDB and MySQL 5.5, so now produces an error.
   
  SHOW ENGINE INNODB STATUS
   
  SHOW ENGINE INNODB STATUS displays extensive information
  from the standard InnoDB Monitor about the state of the
  InnoDB storage engine.
  See SHOW ENGINE INNODB STATUS for more.
   
  SHOW ENGINE INNODB MUTEX
   
  SHOW ENGINE INNODB MUTEX displays InnoDB mutex statistics.
   
  The statement displays the following output fields:
  Type: Always InnoDB.
  Name: The source file where the mutex is implemented, and
  the line number
   in the file where the mutex is created. The line number is
  dependent on the MariaDB version.
  Status: This field displays the following values if
  UNIV_DEBUG was defined at compilation time (for example, in
  include/univ.h in the InnoDB part of the source tree). Only
  the os_waits value is displayed if UNIV_DEBUG was not
  defined. Without UNIV_DEBUG, the information on which the
  output is based is insufficient to distinguish regular
  mutexes and mutexes that protect
   rw-locks (which allow multiple readers or a single writer).
  Consequently, the
   output may appear to contain multiple rows for the same
  mutex.
  count indicates how many times the mutex was requested.
  spin_waits indicates how many times the spinlock had to run.
  spin_rounds indicates the number of spinlock rounds.
  (spin_rounds divided by
   spin_waits provides the average round count.)
  os_waits indicates the number of operating system waits.
  This occurs when
   the spinlock did not work (the mutex was not locked during
  the spinlock and
   it was necessary to yield to the operating system and
  wait).
  os_yields indicates the number of times a the thread trying
  to lock a mutex
   gave up its timeslice and yielded to the operating system
  (on the
   presumption that allowing other threads to run will free
  the mutex so that
   it can be locked).
  os_wait_times indicates the amount of time (in ms) spent in
  operating system
   waits, if the timed_mutexes system variable is 1 (ON). If
  timed_mutexes is 0
   (OFF), timing is disabled, so os_wait_times is 0.
  timed_mutexes is off by
   default.
   
  Information from this statement can be used to diagnose
  system problems. For
  example, large values of spin_waits and spin_rounds may
  indicate scalability
  problems.
   
  The information_schema.INNODB_MUTEXES table provides similar
  information.
   
  SHOW ENGINE PERFORMANCE_SCHEMA STATUS
   
  This statement shows how much memory is used for
  performance_schema tables and internal buffers.
   
  The output contains the following fields:
  Type: Always performance_schema.
  Name: The name of a table, the name of an internal buffer,
  or the performance_schema word, followed by a dot and an
  attribute. Internal buffers names are enclosed by
  parenthesis. performance_schema means that the attribute
  refers to the whole database (it is a total). 
  Status: The value for the attribute.
   
  The following attributes are shown, in this order, for all
  tables:
  row_size: The memory used for an individual record. This
  value will never change.
  row_count: The number of rows in the table or buffer. For
  some tables, this value depends on a server system variable.
  memory: For tables and performance_schema, this is the
  result of row_size * row_count.
   
  For internal buffers, the attributes are:
  count
  size
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-engine/dzfxuxSHOW ENGINEdzfxuxhttps://mariadb.com/kb/en/library/show-engine/dzfxuxdzfxux26dzfxux369qjzxqqvvbqSyntax
  ------ 
  SHOW ERRORS [LIMIT [offset,] row_count]
  SHOW ERRORS [LIMIT row_count OFFSET offset]
  SHOW COUNT(*) ERRORS
   
  Description
  ----------- 
  This statement is similar to SHOW WARNINGS, except that
  instead of
  displaying errors, warnings, and notes, it displays only
  errors.
   
  The LIMIT clause has the same syntax as for the
  SELECT statement.
   
  The SHOW COUNT(*) ERRORS statement displays the number of
  errors. You can also retrieve this number from the
  error_count variable.
   
  SHOW COUNT(*) ERRORS;
  SELECT @@error_count;
   
  The value of error_count might be greater than the number of
  messages displayed by SHOW WARNINGS if the max_error_count
  system variable is set so low that not all messages are
  stored.
   
  For a list of MariaDB error codes, see MariaDB Error Codes.
   
  Examples
  -------- 
  SELECT f();
  ERROR 1305 (42000): FUNCTION f does not exist
   
  SHOW COUNT(*) ERRORS;
   
  +-----------------------+
  | @@session.error_count |
  +-----------------------+
  | 1 |
  +-----------------------+
   
  SHOW ERRORS;
   
  +-------+------+---------------------------+
  | Level | Code | Message |
  +-------+------+---------------------------+
  | Error | 1305 | FUNCTION f does not exist |
  +-------+------+---------------------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-errors/dzfxuxSHOW ERRORSdzfxuxhttps://mariadb.com/kb/en/library/show-errors/dzfxuxdzfxux26dzfxux372qjzxqqvvbqSHOW ENGINE INNODB STATUS is a specific form of the SHOW
  ENGINE statement that displays the InnoDB Monitor output,
  which is extensive InnoDB information which can be useful in
  diagnosing problems.
   
  The following sections are displayed
  Status: Shows the timestamp, monitor name and the number of
  seconds, or the elapsed time between the current time and
  the time the InnoDB Monitor output was last displayed. The
  per-second averages are based upon this time.
  BACKGROUND THREAD: srv_master_thread lines show work
  performed by the main background thread.
  SEMAPHORES: Threads waiting for a semaphore and stats on how
  the number of times threads have needed a spin or a wait on
  a mutex or rw-lock semaphore. If this number of threads is
  large, there may be I/O or contention issues. Reducing the
  size of the innodb_thread_concurrency system variable may
  help if contention is related to thread scheduling. Spin
  rounds per wait shows the number of spinlock rounds per OS
  wait for a mutex. 
  LATEST FOREIGN KEY ERROR: Only shown if there has been a
  foreign key constraint error, it displays the failed
  statement and information about the constraint and the
  related tables.
  LATEST DETECTED DEADLOCK: Only shown if there has been a
  deadlock, it displays the transactions involved in the
  deadlock and the statements being executed, held and
  required locked and the transaction rolled back to.
  TRANSACTIONS: The output of this section can help identify
  lock contention, as well as reasons for the deadlocks.
  FILE I/O: InnoDB thread information as well as pending I/O
  operations and I/O performance statistics.
  INSERT BUFFER AND ADAPTIVE HASH INDEX: InnoDB insert buffer
  and adaptive hash index status information, including the
  number of each type of operation performed, and adaptive
  hash index performance.
  LOG: InnoDB log information, including current log sequence
  number, how far the log has been flushed to disk, the
  position at which InnoDB last took a checkpoint, pending
  writes and write performance statistics.
  BUFFER POOL AND MEMORY: Information on buffer pool pages
  read and written, which allows you to see the number of data
  file I/O operations performed by your queries. See InnoDB
  Buffer Pool for more. Similar information is also available
  from the INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS table.
  ROW OPERATIONS:Information about the main thread, including
  the number and performance rate for each type of row
  operation. 
   
  If the innodb_status_output_locks system variable is set to
  1, extended lock information will be displayed.
   
  Example output:
   
  =====================================
  2016-09-12 04:42:15 7f226145fb00 INNODB MONITOR OUTPUT
  =====================================
  Per second averages calculated from the last 29 seconds
  -----------------
  BACKGROUND THREAD
  -----------------
  srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 527
  srv_idle
  srv_master_thread log flush and writes: 527
  ----------
  SEMAPHORES
  ----------
  OS WAIT ARRAY INFO: reservation count 4
  OS WAIT ARRAY INFO: signal count 4
  Mutex spin waits 2, rounds 60, OS waits 2
  RW-shared spins 2, rounds 60, OS waits 2
  RW-excl spins 0, rounds 0, OS waits 0
  Spin rounds per wait: 30.00 mutex, 30.00 RW-shared, 0.00
  RW-excl
  ------------
  TRANSACTIONS
  ------------
  Trx id counter 2308
  Purge done for trx's n:o < 0 undo n:o < 0 state: running
  but idle
  History list length 0
  LIST OF TRANSACTIONS FOR EACH SESSION:
  ---TRANSACTION 0, not started
  MySQL thread id 3, OS thread handle 0x7f226145fb00, query id
  4 localhost root init
  SHOW ENGINE INNODB STATUS
  --------
  FILE I/O
  --------
  I/O thread 0 state: waiting for completed aio requests
  (insert buffer thread)
  I/O thread 1 state: waiting for completed aio requests (log
  thread)
  I/O thread 2 state: waiting for completed aio requests (read
  thread)
  I/O thread 3 state: waiting for completed aio requests (read
  thread)
  I/O thread 4 state: waiting for completed aio requests (read
  thread)
  I/O thread 5 state: waiting for completed aio requests (read
  thread)
  I/O thread 6 state: waiting for completed aio requests
  (write thread)
  I/O thread 7 state: waiting for completed aio requests
  (write thread)
  I/O thread 8 state: waiting for completed aio requests
  (write thread)
  I/O thread 9 state: waiting for completed aio requests
  (write thread)
  Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0,
  0, 0, 0] ,
   ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
  Pending flushes (fsync) log: 0; buffer pool: 0
  172 OS file reads, 5 OS file writes, 5 OS fsyncs
  0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
  -------------------------------------
  INSERT BUFFER AND ADAPTIVE HASH INDEX
  -------------------------------------
  Ibuf: size 1, free list len 0, seg size 2, 0 merges
  merged operations:
   insert 0, delete mark 0, delete 0
  discarded operations:
   insert 0, delete mark 0, delete 0
  0.00 hash searches/s, 0.00 non-hash searches/s
  ---
  LOG
  ---
  Log sequence number 1616829
  Log flushed up to 1616829
  Pages flushed up to 1616829
  Last checkpoint at 1616829
  Max checkpoint age 80826164
  Checkpoint age target 78300347
  Modified age 0
  Checkpoint age 0
  0 pending log writes, 0 pending chkp writes
  8 log i/o's done, 0.00 log i/o's/second
  ----------------------
  BUFFER POOL AND MEMORY
  ----------------------
  Total memory allocated 140771328; in additional pool
  allocated 0
  Total memory allocated by read views 88
  Internal hash tables (constant factor + variable factor)
   Adaptive hash index 2217568 (2213368 + 4200)
   Page hash 139112 (buffer pool 0 only)
   Dictionary cache 630703 (554768 + 75935)
   File system 817648 (812272 + 5376)
   Lock system 333232 (332872 + 360)
   Recovery system 0 (0 + 0)
  Dictionary memory allocated 75935
  Buffer pool size 8191
  Buffer pool size, bytes 134201344
  Free buffers 8037
  Database pages 154
  Old database pages 0
  Modified db pages 0
  Percent of dirty pages(LRU & free pages): 0.000
  Max dirty pages percent: 75.000
  Pending reads 0
  Pending writes: LRU 0, flush list 0, single page 0
  Pages made young 0, not young 0
  0.00 youngs/s, 0.00 non-youngs/s
  Pages read 154, created 0, written 1
  0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  No buffer pool page gets since the last printout
  Pages read ahead 0.00/s, evicted without access 0.00/s,
  Random read ahead 0.00/s
  LRU len: 154, unzip_LRU len: 0
  I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  --------------
  ROW OPERATIONS
  --------------
  0 queries inside InnoDB, 0 queries in queue
  0 read views open inside InnoDB
  0 RW transactions active inside InnoDB
  0 RO transactions active inside InnoDB
  0 out of 1000 descriptors used
  Main thread process no. 3337, id 139784957703936, state:
  sleeping
  Number of rows inserted 0, updated 0, deleted 0, read 0
  0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
  Number of system rows inserted 0, updated 0, deleted 0, read
  0
  0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
  ----------------------------
  END OF INNODB MONITOR OUTPUT
  ============================
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/show-engine-innodb-status/dzfxuxSHOW ENGINE INNODB STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-engine-innodb-status/dzfxuxdzfxux26dzfxux370qjzxqqvvbqSyntax
  ------ 
  SHOW EVENTS [{FROM | IN} schema_name]
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  Shows information about Event Manager events (created with
  CREATE EVENT). Requires the EVENT privilege. Without any
  arguments, SHOW EVENTS lists all of the events in the
  current schema:
   
  SELECT CURRENT_USER(), SCHEMA();
  +----------------+----------+
  | CURRENT_USER() | SCHEMA() |
  +----------------+----------+
  | jon@ghidora | myschema |
  +----------------+----------+
   
  SHOW EVENTS\G
  *************************** 1. row
  ***************************
   Db: myschema
   Name: e_daily
   Definer: jon@ghidora
   Time zone: SYSTEM
   Type: RECURRING
   Execute at: NULL
   Interval value: 10
   Interval field: SECOND
   Starts: 2006-02-09 10:41:23
   Ends: NULL
   Status: ENABLED
   Originator: 0
  character_set_client: latin1
  collation_connection: latin1_swedish_ci
   Database Collation: latin1_swedish_ci
   
  To see the event action, use SHOW CREATE EVENT instead, or
  look at the information_schema.EVENTS table.
   
  To see events for a specific schema, use the FROM clause.
  For example, to see events for the test schema, use the
  following statement:
   
  SHOW EVENTS FROM test;
   
  The LIKE clause, if present, indicates which event names to
  match. The WHERE clause can be given to select rows using
  more general conditions, as discussed in Extended Show.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-events/dzfxuxSHOW EVENTSdzfxuxhttps://mariadb.com/kb/en/library/show-events/dzfxuxdzfxux26dzfxux373qjzxqqvvbqThe SHOW EXPLAIN command is a new feature in MariaDB 10.0.0.
   
  Command description
   
  The SHOW EXPLAIN command allows one to get an EXPLAIN (that
  is, a
  description of a query plan) of a query running in a certain
  thread.
   
  The syntax is:
   
  SHOW EXPLAIN FOR ;
   
  which will produce an EXPLAIN output for the query that
  thread number thread_id is running. The thread id can be
  obtained with SHOW PROCESSLIST.
   
  SHOW EXPLAIN FOR 1;
   
  +------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+
  | id | select_type | table | type | possible_keys | key |
  key_len | ref | rows | Extra |
  +------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+
  | 1 | SIMPLE | tbl | index | NULL | a | 5 | NULL | 1000107 |
  Using index |
  +------+-------------+-------+-------+---------------+------+---------+------+---------+-------------+
  1 row in set, 1 warning (0.00 sec)
   
  The output is always accompanied with a warning which shows
  the query the
  target thread is running (this shows what the EXPLAIN is
  for):
   
  SHOW WARNINGS;
   
  +-------+------+------------------------+
  | Level | Code | Message |
  +-------+------+------------------------+
  | Note | 1003 | select sum(a) from tbl |
  +-------+------+------------------------+
  1 row in set (0.00 sec)
   
  Possible errors
   
  The output can be only produced if the target thread is
  currently running a
  query, which has a ready query plan. If this is not the
  case, the output will
  be:
   
  SHOW EXPLAIN FOR 2;
   
  ERROR 1932 (HY000): Target is not running an EXPLAINable
  command
   
  You will get this error when:
  the target thread is not running a command for which one can
  run EXPLAIN
  the target thread is running a command for which one can run
  EXPLAIN, but
  there is no query plan yet (for example, tables are open and
  locks are
   acquired before the query plan is produced)
   

  Differences between SHOW EXPLAIN and EXPLAIN outputs
   
  Background
   
  In MySQL, EXPLAIN execution takes a slightly different route
  from the way
  the real query (typically the SELECT) is optimized. This is
  unfortunate,
  and has caused a number of bugs in EXPLAIN. (For example,
  see
  MDEV-326, MDEV-410, and
  lp:1013343.
  lp:992942 is not directly
  about EXPLAIN, but it also would not have existed if MySQL
  didn't try to delete
  parts of a query plan in the middle of the query) 
   
  SHOW EXPLAIN examines a running SELECT, and hence its output
  may be
  slightly different from what EXPLAIN SELECT would produce.
  We did our best
  to make sure that either the difference is negligible, or
  SHOW EXPLAIN's
  output is closer to reality than EXPLAIN's output.
   
  List of recorded differences
   
  SHOW EXPLAIN may have Extra='no matching row in const
  table', where EXPLAIN would produce Extra='Impossible
  WHERE ...'
  For queries with subqueries, SHOW EXPLAIN may print
  select_type==PRIMARY where regular EXPLAIN used to print
  select_type==SIMPLE, or vice versa.
   
  Required permissions
   
  Running SHOW EXPLAIN requires the same permissions as
  running SHOW PROCESSLIST would.
   


  URL: https://mariadb.com/kb/en/library/show-explain/dzfxuxSHOW EXPLAINdzfxuxhttps://mariadb.com/kb/en/library/show-explain/dzfxuxdzfxux26dzfxux374qjzxqqvvbqSyntax
  ------ 
  SHOW FUNCTION STATUS
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  This statement is similar to 
  SHOW PROCEDURE STATUS but for
  stored functions.
   
  The LIKE clause, if present on its own, indicates which
  function names to match. 
   
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  The information_schema.ROUTINES table contains more detailed
  information.
   
  Examples
  -------- 
  Showing all stored functions:
   
  SHOW FUNCTION STATUS\G
  *************************** 1. row
  ***************************
   Db: test
   Name: VatCents
   Type: FUNCTION
   Definer: root@localhost
   Modified: 2013-06-01 12:40:31
   Created: 2013-06-01 12:40:31
   Security_type: DEFINER
   Comment: 
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   
  Stored functions whose name starts with 'V': 
   
  SHOW FUNCTION STATUS LIKE 'V%' \G
  *************************** 1. row
  ***************************
   Db: test
   Name: VatCents
   Type: FUNCTION
   Definer: root@localhost
   Modified: 2013-06-01 12:40:31
   Created: 2013-06-01 12:40:31
   Security_type: DEFINER
   Comment: 
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   
  Stored functions with a security type of 'DEFINER':
   
  SHOW FUNCTION STATUS WHERE Security_type LIKE 'DEFINER'
  \G
  *************************** 1. row
  ***************************
   Db: test
   Name: VatCents
   Type: FUNCTION
   Definer: root@localhost
   Modified: 2013-06-01 12:40:31
   Created: 2013-06-01 12:40:31
   Security_type: DEFINER
   Comment: 
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-function-status/dzfxuxSHOW FUNCTION STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-function-status/dzfxuxdzfxux26dzfxux376qjzxqqvvbqUsers
   
  Syntax
  ------ 
  SHOW GRANTS [FOR user]
   
  Description
  ----------- 
  This statement lists the GRANT statement or
  statements that must be issued to duplicate the privileges
  that are granted to
  a MariaDB user account. The account is named using the same
  format as for the
  GRANT statement; for example,
  'jeffrey'@'localhost'. If you specify only the user name
  part
  of the account name, a host name part of '%' is used. For
  additional information about specifying account names, see
  GRANT.
   
  SHOW GRANTS FOR 'root'@'localhost';
  +---------------------------------------------------------------------+
  | Grants for root@localhost |
  +---------------------------------------------------------------------+
  | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH
  GRANT OPTION |
  +---------------------------------------------------------------------+
   
  To list the privileges granted to the account that you are
  using to
  connect to the server, you can use any of the following
  statements:
   
  SHOW GRANTS;
   
  SHOW GRANTS FOR CURRENT_USER;
   
  SHOW GRANTS FOR CURRENT_USER();
   
  If SHOW GRANTS FOR CURRENT_USER (or any
  of the equivalent syntaxes) is used in DEFINER context (such
  as within a stored procedure that is defined with 
   SQL SECURITY DEFINER), the grants displayed are those of
  the
  definer and not the invoker.
   
  Note that the DELETE HISTORY privilege, introduced in
  MariaDB 10.3.4, is displayed as DELETE VERSIONING ROWS when
  running SHOW GRANTS (MDEV-17655).
   
  Roles
   
  Roles were introduced in MariaDB 10.0.5.
   
  Syntax
  ------ 
  SHOW GRANTS [FOR role]
   
  Description
  ----------- 
  From MariaDB 10.0.5, SHOW GRANTS can also be used to view
  the privileges granted to a role.
   
  Example
   
  SHOW GRANTS FOR journalist;
  +------------------------------------------+
  | Grants for journalist |
  +------------------------------------------+
  | GRANT USAGE ON *.* TO 'journalist' |
  | GRANT DELETE ON `test`.* TO 'journalist' |
  +------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/show-grants/dzfxuxSHOW GRANTSdzfxuxhttps://mariadb.com/kb/en/library/show-grants/dzfxuxdzfxux26dzfxux377qjzxqqvvbqSyntax
  ------ 
  SHOW {INDEX | INDEXES | KEYS} 
   FROM tbl_name [FROM db_name]
   [WHERE expr]
   
  Description
  ----------- 
  SHOW INDEX returns table index information. The format
  resembles that of the SQLStatistics call in ODBC.
   
  You can use db_name.tbl_name as an alternative to the
   tbl_name FROM db_name syntax. These two statements are
   equivalent:
   
  SHOW INDEX FROM mytable FROM mydb;
  SHOW INDEX FROM mydb.mytable;
   
  SHOW KEYS and SHOW INDEXES are synonyms for SHOW INDEX.
   
  You can also list a table's indexes with the following
  command: 
   
  mysqlshow -k db_name tbl_name
   
  See mysqlshow for more details.
   
  The information_schema.STATISTICS table stores similar
  information.
   
  The following fields are returned by SHOW INDEX.
   
  Field | Description | 
   
  Table | Table name | 
   
  Non_unique | 1 if the index permits duplicate values, 0 if
  values must be unique. | 
   
  Key_name | Index name. The primary key is always named
  PRIMARY. | 
   
  Seq_in_index | The column's sequence in the index,
  beginning with 1. | 
   
  Column_name | Column name. | 
   
  Collation | Either A, if the column is sorted in ascending
  order in the index, or NULL if it's not sorted. | 
   
  Cardinality | Estimated number of unique values in the
  index. The cardinality statistics are calculated at various
  times, and can help the optimizer make improved decisions. |

   
  Sub_part | NULL if the entire column is included in the
  index, or the number of included characters if not. | 
   
  Packed | NULL if the index is not packed, otherwise how the
  index is packed. | 
   
  Null | NULL if NULL values are permitted in the column, an
  empty string if NULL's are not permitted. | 
   
  Index_type | The index type, which can be BTREE, FULLTEXT,
  HASH or RTREE. See Storage Engine Index Types. | 
   
  Comment | Other information, such as whether the index is
  disabled. | 
   
  Index_comment | Contents of the COMMENT attribute when the
  index was created. | 
   
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  Examples
  -------- 
  CREATE TABLE IF NOT EXISTS `employees_example` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `first_name` varchar(30) NOT NULL,
   `last_name` varchar(40) NOT NULL,
   `position` varchar(25) NOT NULL,
   `home_address` varchar(50) NOT NULL,
   `home_phone` varchar(12) NOT NULL,
   `employee_code` varchar(25) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY `employee_code` (`employee_code`),
   KEY `first_name` (`first_name`,`last_name`)
  ) ENGINE=Aria;
   
  INSERT INTO `employees_example` (`first_name`, `last_name`,
  `position`, `home_address`, `home_phone`, `employee_code`)
   VALUES
   ('Mustapha', 'Mond', 'Chief Executive Officer', '692
  Promiscuous Plaza', '326-555-3492', 'MM1'),
   ('Henry', 'Foster', 'Store Manager', '314 Savage
  Circle', '326-555-3847', 'HF1'),
   ('Bernard', 'Marx', 'Cashier', '1240 Ambient
  Avenue', '326-555-8456', 'BM1'),
   ('Lenina', 'Crowne', 'Cashier', '281 Bumblepuppy
  Boulevard', '328-555-2349', 'LC1'),
   ('Fanny', 'Crowne', 'Restocker', '1023 Bokanovsky
  Lane', '326-555-6329', 'FC1'),
   ('Helmholtz', 'Watson', 'Janitor', '944 Soma
  Court', '329-555-2478', 'HW1');
   
  SHOW INDEXES FROM employees_example;
   
  +-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
  | Table | Non_unique | Key_name | Seq_in_index | Column_name
  | Collation | Cardinality | Sub_part | Packed | Null |
  Index_type | Comment | Index_comment |
  +-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
  | employees_example | 0 | PRIMARY | 1 | id | A | 7 | NULL |
  NULL | | BTREE | | |
  | employees_example | 0 | employee_code | 1 | employee_code
  | A | 7 | NULL | NULL | | BTREE | | |
  | employees_example | 1 | first_name | 1 | first_name | A |
  NULL | NULL | NULL | | BTREE | | |
  | employees_example | 1 | first_name | 2 | last_name | A |
  NULL | NULL | NULL | | BTREE | | |
  +-------------------+------------+---------------+--------------+---------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-index/dzfxuxSHOW INDEXdzfxuxhttps://mariadb.com/kb/en/library/show-index/dzfxuxdzfxux26dzfxux378qjzxqqvvbqSHOW LOCALES was introduced as part of the Information
  Schema plugin extension in MariaDB 10.1.1.
   
  SHOW LOCALES is used to return locales information as part
  of the Locales plugin. While the information_schema.LOCALES
  table has 8 columns, the SHOW LOCALES statement will only
  display 4 of them:
   
  Example
   
  SHOW LOCALES;
  +-----+-------+-------------------------------------+------------------------+
  | Id | Name | Description | Error_Message_Language |
  +-----+-------+-------------------------------------+------------------------+
  | 0 | en_US | English - United States | english |
  | 1 | en_GB | English - United Kingdom | english |
  | 2 | ja_JP | Japanese - Japan | japanese |
  | 3 | sv_SE | Swedish - Sweden | swedish |
  ...
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-locales/dzfxuxSHOW LOCALESdzfxuxhttps://mariadb.com/kb/en/library/show-locales/dzfxuxdzfxux26dzfxux379qjzxqqvvbqSyntax
  ------ 
  SHOW MASTER STATUS
   
  Description
  ----------- 
  Provides status information about the binary log files of
  the master.
   
  This statement requires the SUPER or the REPLICATION_CLIENT
  privilege.
   
  To see information about the current GTIDs in the binary
  log, use the
  gtid_binlog_pos variable.
   
  Example
   
  SHOW MASTER STATUS;
  +--------------------+----------+--------------+------------------+
  | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
  +--------------------+----------+--------------+------------------+
  | mariadb-bin.000016 | 475 | | |
  +--------------------+----------+--------------+------------------+
  SELECT @@global.gtid_binlog_pos;
  +--------------------------+
  | @@global.gtid_binlog_pos |
  +--------------------------+
  | 0-1-2 |
  +--------------------------+
   


  URL: https://mariadb.com/kb/en/library/show-master-status/dzfxuxSHOW MASTER STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-master-status/dzfxuxdzfxux26dzfxux380qjzxqqvvbqSyntax
  ------ 
  SHOW OPEN TABLES [FROM db_name]
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
   SHOW OPEN TABLES lists the non-TEMPORARY
  tables that are currently open in the table cache. See
  http://dev.mysql.com/doc/refman/5.1/en/table-cache.html.
   
  The FROM and LIKE clauses may be used.
   
  The FROM
  clause, if present, restricts the tables shown to those
  present in the
  db_name database. 
   
  The LIKE clause, if
  present on its own, indicates which table names to match.
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  The following information is returned:
   
  Column | Description | 
   
  Database | Database name. | 
   
  Name | Table name. | 
   
  In_use | Number of table instances being used. | 
   
  Name_locked | 1 if the table is name-locked, e.g. if it is
  being dropped or renamed, otherwise 0. | 
   
  Before MariaDB 5.5, each use of, for example, LOCK TABLE ...
  WRITE would increment In_use for that table. With the
  implementation of the metadata locking improvements in
  MariaDB 5.5, LOCK TABLE... WRITE acquires a strong MDL lock,
  and concurrent connections will wait on this MDL lock, so
  any subsequent LOCK TABLE... WRITE will not increment
  In_use.
   
  Example
   
  SHOW OPEN TABLES;
   
  +----------+---------------------------+--------+-------------+
  | Database | Table | In_use | Name_locked |
  +----------+---------------------------+--------+-------------+
  ...
  | test | xjson | 0 | 0 |
  | test | jauthor | 0 | 0 |
  | test | locks | 1 | 0 |
  ...
  +----------+---------------------------+--------+-------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-open-tables/dzfxuxSHOW OPEN TABLESdzfxuxhttps://mariadb.com/kb/en/library/show-open-tables/dzfxuxdzfxux26dzfxux381qjzxqqvvbqOracle-style packages were introduced in MariaDB 10.3.5.
   
  Syntax
  ------ 
  SHOW PACKAGE BODY STATUS
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  The SHOW PACKAGE BODY STATUS statement returns
  characteristics of stored package bodies (implementations),
  such as the database, name, type, creator, creation and
  modification dates, and character set information. A similar
  statement, SHOW PACKAGE STATUS, displays information about
  stored package specifications.
   
  The LIKE clause, if present, indicates which package names
  to match. The WHERE and LIKE clauses can be given to select
  rows using more general conditions, as discussed in Extended
  SHOW.
   
  The ROUTINES table in the INFORMATION_SCHEMA database
  contains more detailed information.
   
  Examples
  -------- 
  SHOW PACKAGE BODY STATUS LIKE 'pkg1'\G
  *************************** 1. row
  ***************************
   Db: test
   Name: pkg1
   Type: PACKAGE BODY
   Definer: root@localhost
   Modified: 2018-02-27 14:44:14
   Created: 2018-02-27 14:44:14
   Security_type: DEFINER
   Comment: This is my first package body
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   


  URL:
  https://mariadb.com/kb/en/library/show-package-body-status/dzfxuxSHOW PACKAGE BODY STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-package-body-status/dzfxuxdzfxux26dzfxux382qjzxqqvvbqOracle-style packages were introduced in MariaDB 10.3.5.
   
  Syntax
  ------ 
  SHOW PACKAGE STATUS
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  The SHOW PACKAGE STATUS statement returns characteristics of
  stored package specifications, such as the database, name,
  type, creator, creation and modification dates, and
  character set information. A similar statement, SHOW PACKAGE
  BODY STATUS, displays information about stored package
  bodies (i.e. implementations).
   
  The LIKE clause, if present, indicates which package names
  to match. The WHERE and LIKE clauses can be given to select
  rows using more general conditions, as discussed in Extended
  SHOW.
   
  The ROUTINES table in the INFORMATION_SCHEMA database
  contains more detailed information.
   
  Examples
  -------- 
  SHOW PACKAGE STATUS LIKE 'pkg1'\G
  *************************** 1. row
  ***************************
   Db: test
   Name: pkg1
   Type: PACKAGE
   Definer: root@localhost
   Modified: 2018-02-27 14:38:15
   Created: 2018-02-27 14:38:15
   Security_type: DEFINER
   Comment: This is my first package
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   


  URL: https://mariadb.com/kb/en/library/show-package-status/dzfxuxSHOW PACKAGE STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-package-status/dzfxuxdzfxux26dzfxux383qjzxqqvvbqSyntax
  ------ 
  SHOW PLUGINS;
   
  Description
  ----------- 
   SHOW PLUGINS displays information about installed plugins.
  The Library column indicates the plugin library - if it is
  NULL, the plugin is built-in and cannot be uninstalled.
   
  The PLUGINS table in the information_schema database
  contains more detailed information.
   
  For specific information about storage engines (a particular
  type of plugin), see the information_schema.ENGINES table
  and the SHOW ENGINES statement.
   
  Examples
  -------- 
  SHOW PLUGINS;
  +----------------------------+----------+--------------------+-------------+---------+
  | Name | Status | Type | Library | License |
  +----------------------------+----------+--------------------+-------------+---------+
  | binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | mysql_native_password | ACTIVE | AUTHENTICATION | NULL |
  GPL |
  | mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL
  |
  | MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | FEDERATED | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL
  |
  | Aria | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
  ...
  | INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL |
  GPL |
  | INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA |
  NULL | GPL |
  | SPHINX | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | ARCHIVE | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | BLACKHOLE | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | FEEDBACK | DISABLED | INFORMATION SCHEMA | NULL | GPL |
  | partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
  | pam | ACTIVE | AUTHENTICATION | auth_pam.so | GPL |
  +----------------------------+----------+--------------------+-------------+---------+
   


  URL: https://mariadb.com/kb/en/library/show-plugins/dzfxuxSHOW PLUGINSdzfxuxhttps://mariadb.com/kb/en/library/show-plugins/dzfxuxdzfxux26dzfxux384qjzxqqvvbqMariaDB 10.0.2
   
  SHOW PLUGINS SONAME was introduced in MariaDB 10.0.2
   
  Syntax
  ------ 
  SHOW PLUGINS SONAME { library | LIKE 'pattern' | WHERE
  expr };
   
  Description
  ----------- 
  SHOW PLUGINS SONAME displays information about compiled-in
  and all server plugins in the plugin_dir directory,
  including plugins that haven't been installed.
   
  Examples
  -------- 
  SHOW PLUGINS SONAME 'ha_example.so';
  +----------+---------------+----------------+---------------+---------+
  | Name | Status | Type | Library | License |
  +----------+---------------+----------------+---------------+---------+
  | EXAMPLE | NOT INSTALLED | STORAGE ENGINE | ha_example.so |
  GPL |
  | UNUSABLE | NOT INSTALLED | DAEMON | ha_example.so | GPL |
  +----------+---------------+----------------+---------------+---------+
   
  There is also a corresponding information_schema table,
  called ALL_PLUGINS, which contains more complete
  information.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-plugins-soname/dzfxuxSHOW PLUGINS SONAMEdzfxuxhttps://mariadb.com/kb/en/library/show-plugins-soname/dzfxuxdzfxux26dzfxux385qjzxqqvvbqSyntax
  ------ 
  SHOW PRIVILEGES
   
  Description
  ----------- 
   SHOW PRIVILEGES shows the list of system privileges that
  the MariaDB server supports. The exact list of privileges
  depends on the version of your server.
   
  Examples
  -------- 
  SHOW PRIVILEGES;
  +-------------------------+---------------------------------------+-------------------------------------------------------+
  | Privilege | Context | Comment |
  +-------------------------+---------------------------------------+-------------------------------------------------------+
  | Alter | Tables | To alter the table |
  | Alter routine | Functions,Procedures | To alter or drop
  stored functions/procedures |
  | Create | Databases,Tables,Indexes | To create new
  databases and tables |
  | Create routine | Databases | To use CREATE
  FUNCTION/PROCEDURE |
  | Create temporary tables | Databases | To use CREATE
  TEMPORARY TABLE |
  | Create view | Tables | To create new views |
  | Create user | Server Admin | To create new users |
  | Delete | Tables | To delete existing rows |
  | Drop | Databases,Tables | To drop databases, tables, and
  views |
  | Event | Server Admin | To create, alter, drop and execute
  events |
  | Execute | Functions,Procedures | To execute stored
  routines |
  | File | File access on server | To read and write files on
  the server |
  | Grant option | Databases,Tables,Functions,Procedures | To
  give to other users those privileges you possess |
  | Index | Tables | To create or drop indexes |
  | Insert | Tables | To insert data into tables |
  | Lock tables | Databases | To use LOCK TABLES (together
  with SELECT privilege) |
  | Process | Server Admin | To view the plain text of
  currently executing queries |
  | Proxy | Server Admin | To make proxy user possible |
  | References | Databases,Tables | To have references on
  tables |
  | Reload | Server Admin | To reload or refresh tables, logs
  and privileges |
  | Replication client | Server Admin | To ask where the slave
  or master servers are |
  | Replication slave | Server Admin | To read binary log
  events from the master |
  | Select | Tables | To retrieve rows from table |
  | Show databases | Server Admin | To see all databases with
  SHOW DATABASES |
  | Show view | Tables | To see views with SHOW CREATE VIEW |
  | Shutdown | Server Admin | To shut down the server |
  | Super | Server Admin | To use KILL thread, SET GLOBAL,
  CHANGE MASTER, etc. |
  | Trigger | Tables | To use triggers |
  | Create tablespace | Server Admin | To create/alter/drop
  tablespaces |
  | Update | Tables | To update existing rows |
  | Usage | Server Admin | No privileges - allow connect only
  |
  +-------------------------+---------------------------------------+-------------------------------------------------------+
  31 rows in set (0.07 sec)
   


  URL: https://mariadb.com/kb/en/library/show-privileges/dzfxuxSHOW PRIVILEGESdzfxuxhttps://mariadb.com/kb/en/library/show-privileges/dzfxuxdzfxux26dzfxux386qjzxqqvvbqSyntax
  ------ 
  SHOW PROCEDURE CODE proc_name
   
  Description
  ----------- 
  This statement is a MariaDB extension that is available only
  for servers that
  have been built with debugging support. It displays a
  representation of the
  internal implementation of the named stored procedure. A
  similar statement,
   SHOW FUNCTION CODE, displays
  information about stored functions.
   
  Both statements require that you be the owner of the routine
  or have
   SELECT access to the mysql.proc table.
   
  If the named routine is available, each statement produces a
  result
  set. Each row in the result set corresponds to one
  "instruction" in
  the routine. The first column is Pos, which is an ordinal
  number
  beginning with 0. The second column is Instruction, which
  contains an
  SQL statement (usually changed from the original source), or
  a
  directive which has meaning only to the stored-routine
  handler.
   
  Examples
  -------- 
  DELIMITER //
   
  CREATE PROCEDURE p1 ()
   BEGIN
   DECLARE fanta INT DEFAULT 55;
   DROP TABLE t2;
   LOOP
   INSERT INTO t3 VALUES (fanta);
   END LOOP;
   END//
  Query OK, 0 rows affected (0.00 sec)
   
  SHOW PROCEDURE CODE p1//
  +-----+----------------------------------------+
  | Pos | Instruction |
  +-----+----------------------------------------+
  | 0 | set fanta@0 55 |
  | 1 | stmt 9 "DROP TABLE t2" |
  | 2 | stmt 5 "INSERT INTO t3 VALUES (fanta)" |
  | 3 | jump 2 |
  +-----+----------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/show-procedure-code/dzfxuxSHOW PROCEDURE CODEdzfxuxhttps://mariadb.com/kb/en/library/show-procedure-code/dzfxuxdzfxux26dzfxux387qjzxqqvvbqSyntax
  ------ 
  SHOW PROCEDURE STATUS
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  This statement is a MariaDB extension. It returns
  characteristics of a stored
  procedure, such as the database, name, type, creator,
  creation and modification
  dates, and character set information. A similar statement, 
   SHOW FUNCTION STATUS, displays
  information about stored functions.
   
  The LIKE clause, if present, indicates which procedure or
  function names to match. The WHERE and LIKE clauses can be
  given to select rows using more general conditions, as
  discussed in Extended SHOW.
   
  The ROUTINES table in the INFORMATION_SCHEMA database
  contains more detailed information.
   
  Examples
  -------- 
  SHOW PROCEDURE STATUS LIKE 'p1'\G
  *************************** 1. row
  ***************************
   Db: test
   Name: p1
   Type: PROCEDURE
   Definer: root@localhost
   Modified: 2010-08-23 13:23:03
   Created: 2010-08-23 13:23:03
   Security_type: DEFINER
   Comment: 
  character_set_client: latin1
  collation_connection: latin1_swedish_ci
   Database Collation: latin1_swedish_ci
   


  URL:
  https://mariadb.com/kb/en/library/show-procedure-status/dzfxuxSHOW PROCEDURE STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-procedure-status/dzfxuxdzfxux26dzfxux388qjzxqqvvbqSyntax
  ------ 
  SHOW RELAYLOG ['connection_name'] EVENTS
   [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
   
  Description
  ----------- 
  On replication slaves this command shows the events in the
  relay log. If 'log_name' is not specified, the first relay
  log is shown.
   
  Syntax for the LIMIT clause is the same as for SELECT ...
  LIMIT.
   
  Using the LIMIT clause is highly recommended because the
  SHOW RELAYLOG EVENTS command returns the complete contents
  of the relay log, which can be quite large.
   
  This command does not return events related to setting user
  and system variables. If you need those, use mysqlbinlog.
   
  On the replication master, this command does nothing.
   
  connection_name
   
  connection_name was added as part of multi-source
  replication added in MariaDB 10.0.1
   
  If there is only one nameless master, or the default master
  (as specified by the default_master_connection system
  variable) is intended, connection_name can be omitted. If
  provided, the SHOW RELAYLOG statement will apply to the
  specified master. connection_name is case-insensitive.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-relaylog-events/dzfxuxSHOW RELAYLOG EVENTSdzfxuxhttps://mariadb.com/kb/en/library/show-relaylog-events/dzfxuxdzfxux26dzfxux393qjzxqqvvbqSyntax
  ------ 
  SHOW SLAVE HOSTS
   
  Description
  ----------- 
  This command is run on the master and displays a list of
  replication slaves that are currently registered with it.
  Only slaves started with the --report-host=host_name option
  are visible in this list.
   
  The list is displayed on any server (not just the master
  server). The output
  looks like this:
   
  SHOW SLAVE HOSTS;
  +------------+-----------+------+-----------+
  | Server_id | Host | Port | Master_id |
  +------------+-----------+------+-----------+
  | 192168010 | iconnect2 | 3306 | 192168011 |
  | 1921680101 | athena | 3306 | 192168011 |
  +------------+-----------+------+-----------+
  Server_id: The unique server ID of the slave server, as
  configured in the server's option file, or on the command
  line with --server-id=value.
  Host: The host name of the slave server, as configured in
  the server's option file, or on the command line with
  --report-host=host_name. Note that this can differ from the
  machine name as configured in the operating system.
  Port: The port the slave server is listening on.
  Master_id: The unique server ID of the master server that
  the slave server is replicating from.
   
  Some MariaDB and MySQL versions report another variable,
  rpl_recovery_rank. This
  variable was never used, and was eventually removed in
  MariaDB 10.1.2 and MySQL 5.6.
   


  URL: https://mariadb.com/kb/en/library/show-slave-hosts/dzfxuxSHOW SLAVE HOSTSdzfxuxhttps://mariadb.com/kb/en/library/show-slave-hosts/dzfxuxdzfxux26dzfxux394qjzxqqvvbqSyntax
  ------ 
  SHOW [FULL] PROCESSLIST
   
  Description
  ----------- 
   SHOW PROCESSLIST shows you which threads are running. You
  can also get this information from the
  information_schema.PROCESSLIST table or the mysqladmin
  processlist command. If you have the 
  PROCESS privilege, you can see all threads.
  Otherwise, you can see only your own threads (that is,
  threads associated with
  the MariaDB account that you are using). If you do not use
  the
  FULL keyword, only the first 100 characters of each
  statement are shown in the Info field.
   
  The columns shown in SHOW PROCESSLIST
   are:
   
  Name | Description | Introduced | 
   
  ID | The client's process ID. |  | 
   
  USER | The username associated with the process. |  | 
   
  HOST | The host the client is connected to. |  | 
   
  DB | The default database of the process (NULL if no
  default). |  | 
   
  COMMAND | The command type. See Thread Command Values. |  | 
   
  TIME | The amount of time, in seconds, the process has been
  in its current state. For a slave SQL thread before MariaDB
  10.1, this is the time in seconds between the last
  replicated event's timestamp and the slave machine's real
  time. |  | 
   
  STATE | See Thread States. |  | 
   
  INFO | The statement being executed. |  | 
   
  PROGRESS | The total progress of the process (0-100%) (see
  Progress Reporting). | MariaDB?5.3 | 
   
  See TIME_MS column in information_schema.PROCESSLIST for
  differences in the TIME column between MariaDB and MySQL.
   
  The information_schema.PROCESSLIST table contains the
  following additional columns:
   
  Name | Description | Introduced | 
   
  TIME_MS | The amount of time, in milliseconds, the process
  has been in its current state. | MariaDB?5.1 | 
   
  STAGE | The stage the process is currently in. |
  MariaDB?5.3 | 
   
  MAX_STAGE | The maximum number of stages. | MariaDB?5.3 | 
   
  PROGRESS | The progress of the process within the current
  stage (0-100%). | MariaDB?5.3 | 
   
  MEMORY_USED | The amount of memory used by the process. |
  MariaDB?10.0.1 | 
   
  EXAMINED_ROWS | The number of rows the process has examined.
  | MariaDB?10.0.1 | 
   
  QUERY_ID | Query ID. | MariaDB?10.0.5 | 
   
  Note that the PROGRESS field from the information schema,
  and the PROGRESS field from SHOW PROCESSLIST display
  different results. SHOW PROCESSLIST shows the total
  progress, while the information schema shows the progress
  for the current stage only.
   
  Threads can be killed using their thread_id, or, since
  MariaDB 10.0.5, their query_id, with the KILL statement.
   
  Since queries on this table are locking, if the
  performance_schema is enabled, you may want to query the
  THREADS table instead.
   
  Examples
  -------- 
  From MariaDB 5.1.x
   
  SHOW FULL PROCESSLIST;
  +---------+-------+-----------+------+---------+------+-------+-----------------------+
  | Id | User | Host | db | Command | Time | State | Info |
  +---------+-------+-----------+------+---------+------+-------+-----------------------+
  | 1988880 | dbart | localhost | NULL | Query | 0 | NULL |
  SHOW FULL PROCESSLIST |
  +---------+-------+-----------+------+---------+------+-------+-----------------------+
   
  SELECT * FROM information_schema.processlist;
  +---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+
  | ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
  TIME_MS |
  +---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+
  | 1988880 | dbart | localhost | NULL | Query | 0 | executing
  | SELECT * FROM information_schema.processlist | 0.444 |
  +---------+-------+-----------+------+---------+------+-----------+----------------------------------------------+---------+
   
  From MariaDB 5.5.x
   
  SHOW FULL PROCESSLIST;
  +-----+------+-----------+------+---------+------+-------+-----------------------+----------+
  | Id | User | Host | db | Command | Time | State | Info |
  Progress |
  +-----+------+-----------+------+---------+------+-------+-----------------------+----------+
  | 126 | root | localhost | NULL | Query | 0 | NULL | SHOW
  FULL PROCESSLIST | 0.000 |
  +-----+------+-----------+------+---------+------+-------+-----------------------+----------+
   
  SELECT * FROM information_schema.processlist;
  +-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+
  | ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
  TIME_MS | STAGE | MAX_STAGE | PROGRESS |
  +-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+
  | 126 | root | localhost | NULL | Query | 0 | executing |
  SELECT * FROM information_schema.processlist | 344.718 | 0 |
  0 | 0.000 |
  +-----+--------+-----------+------+---------+------+-----------+----------------------------------------------+---------+-------+-----------+----------+
   
  From MariaDB 10.0.x
   
  SHOW PROCESSLIST;
  +----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+
  | Id | User | Host | db | Command | Time | State | Info |
  Progress |
  +----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+
  | 2 | event_scheduler | localhost | NULL | Daemon | 2693 |
  Waiting on empty queue | NULL | 0.000 |
  | 4 | root | localhost | NULL | Query | 0 | Table lock |
  SHOW PROCESSLIST | 0.000 |
  +----+-----------------+-----------+------+---------+------+------------------------+------------------+----------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-processlist/dzfxuxSHOW PROCESSLISTdzfxuxhttps://mariadb.com/kb/en/library/show-processlist/dzfxuxdzfxux26dzfxux389qjzxqqvvbqSyntax
  ------ 
  SHOW PROFILE [type [, type] ... ]
   [FOR QUERY n]
   [LIMIT row_count [OFFSET offset]]
   
  type:
   ALL
   | BLOCK IO
   | CONTEXT SWITCHES
   | CPU
   | IPC
   | MEMORY
   | PAGE FAULTS
   | SOURCE
   | SWAPS
   
  Description
  ----------- 
  The SHOW PROFILE and 
  SHOW PROFILES statements display profiling
  information that indicates resource usage for statements
  executed during the
  course of the current session.
   
  Profiling is controlled by the profiling session variable,
  which has a default value of 0 (OFF). Profiling is enabled
  by setting profiling to 1 or ON:
   
  SET profiling = 1;
   
  SHOW PROFILES displays a list of the most recent statements
  sent to the master. The size of the list is controlled by
  the
  profiling_history_size session variable, which has a default
  value of 15. The maximum value is 100. Setting the value to
  0 has the practical effect of disabling profiling.
   
  All statements are profiled except SHOW PROFILES and 
  SHOW PROFILE, so you will find neither of those statements
  in the profile list. Malformed statements are profiled. For
  example, 
   SHOW PROFILING is an illegal statement, and a syntax error
  occurs if you try to execute it, but it will show up in the
  profiling list.
   
   SHOW PROFILE displays detailed information about a single
  statement. Without the FOR QUERY n clause, the output
  pertains to the most recently executed statement. If 
   FOR QUERY n is included,
   SHOW PROFILE displays information for statement n. The
  values of n correspond to
  the Query_ID values displayed by SHOW PROFILES.
   
  The LIMIT row_count clause may be given to limit the
  output to row_count rows. If LIMIT is given, 
   OFFSET offset may be added to begin the output offset
  rows into the full set of rows.
   
  By default, SHOW PROFILE displays Status and Duration
  columns. The Status values are like the State values
  displayed by 
  SHOW PROCESSLIST,
  although there might be some minor differences in
  interpretation for
  the two statements for some status values (see
  http://dev.mysql.com/doc/refman/5.6/en/thread-information.html).
   
  Optional type values may be specified to display specific
  additional
  types of information:
  ALL displays all information
  BLOCK IO displays counts for block input and output
  operations
  CONTEXT SWITCHES displays counts for voluntary and
  involuntary context switches
  CPU displays user and system CPU usage times
  IPC displays counts for messages sent and received
  MEMORY is not currently implemented
  PAGE FAULTS displays counts for major and minor page faults
  SOURCE displays the names of functions from the source code,
  together with the name and line number of the file in which
  the function occurs
  SWAPS displays swap counts
   
  Profiling is enabled per session. When a session ends, its
  profiling information is lost.
   
  The information_schema.PROFILING table contains similar
  information.
   
  Examples
  -------- 
  SELECT @@profiling;
  +-------------+
  | @@profiling |
  +-------------+
  | 0 |
  +-------------+
   
  SET profiling = 1;
   
  USE test;
   
  DROP TABLE IF EXISTS t1;
   
  CREATE TABLE T1 (id INT);
   
  SHOW PROFILES;
  +----------+------------+--------------------------+
  | Query_ID | Duration | Query |
  +----------+------------+--------------------------+
  | 1 | 0.00009200 | SELECT DATABASE() |
  | 2 | 0.00023800 | show databases |
  | 3 | 0.00018900 | show tables |
  | 4 | 0.00014700 | DROP TABLE IF EXISTS t1 |
  | 5 | 0.24476900 | CREATE TABLE T1 (id INT) |
  +----------+------------+--------------------------+
   
  SHOW PROFILE;
  +----------------------+----------+
  | Status | Duration |
  +----------------------+----------+
  | starting | 0.000042 |
  | checking permissions | 0.000044 |
  | creating table | 0.244645 |
  | After create | 0.000013 |
  | query end | 0.000003 |
  | freeing items | 0.000016 |
  | logging slow query | 0.000003 |
  | cleaning up | 0.000003 |
  +----------------------+----------+
   
  SHOW PROFILE FOR QUERY 4;
  +--------------------+----------+
  | Status | Duration |
  +--------------------+----------+
  | starting | 0.000126 |
  | query end | 0.000004 |
  | freeing items | 0.000012 |
  | logging slow query | 0.000003 |
  | cleaning up | 0.000002 |
  +--------------------+----------+
   
  SHOW PROFILE CPU FOR QUERY 5;
  +----------------------+----------+----------+------------+
  | Status | Duration | CPU_user | CPU_system |
  +----------------------+----------+----------+------------+
  | starting | 0.000042 | 0.000000 | 0.000000 |
  | checking permissions | 0.000044 | 0.000000 | 0.000000 |
  | creating table | 0.244645 | 0.000000 | 0.000000 |
  | After create | 0.000013 | 0.000000 | 0.000000 |
  | query end | 0.000003 | 0.000000 | 0.000000 |
  | freeing items | 0.000016 | 0.000000 | 0.000000 |
  | logging slow query | 0.000003 | 0.000000 | 0.000000 |
  | cleaning up | 0.000003 | 0.000000 | 0.000000 |
  +----------------------+----------+----------+------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-profile/dzfxuxSHOW PROFILEdzfxuxhttps://mariadb.com/kb/en/library/show-profile/dzfxuxdzfxux26dzfxux390qjzxqqvvbqSyntax
  ------ 
  SHOW TABLE STATUS [{FROM | IN} db_name]
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
   SHOW TABLE STATUS works like 
   SHOW TABLES, but provides more extensive information about
  each non-TEMPORARY table.
   
  The LIKE clause, if present on its own, indicates which
  table names to
  match. The WHERE and LIKE clauses can be given to select
  rows using more general conditions, as discussed in Extended
  SHOW.
   
  The following information is returned:
   
  Column | Description | 
   
  Name | Table name. | 
   
  Engine | Table storage engine. | 
   
  Version | Version number from the table's .frm file. | 
   
  Row_format | Row format (see InnoDB, Aria and MyISAM row
  formats). | 
   
  Rows | Number of rows in the table. Some engines, such as
  XtraDB and InnoDB may store an estimate. | 
   
  Avg_row_length | Average row length in the table. | 
   
  Data_length | For InnoDB/XtraDB, the index size, in pages,
  multiplied by the page size. For Aria and MyISAM, length of
  the data file, in bytes. For MEMORY, the approximate
  allocated memory. | 
   
  Max_data_length | Maximum length of the data file, ie the
  total number of bytes that could be stored in the table. Not
  used in XtraDB and InnoDB. | 
   
  Index_length | Length of the index file. | 
   
  Data_free | Bytes allocated but unused. For InnoDB tables in
  a shared tablespace, the free space of the shared tablespace
  with small safety margin. An estimate in the case of
  partitioned tables - see the PARTITIONS table. | 
   
  Auto_increment | Next AUTO_INCREMENT value. | 
   
  Create_time | Time the table was created. | 
   
  Update_time | Time the table was last updated. On Windows,
  the timestamp is not updated on update, so MyISAM values
  will be inaccurate. In InnoDB, if shared tablespaces are
  used, will be NULL, while buffering can also delay the
  update, so the value will differ from the actual time of the
  last UPDATE, INSERT or DELETE. | 
   
  Check_time | Time the table was last checked. Not kept by
  all storage engines, in which case will be NULL. | 
   
  Collation | Character set and collation. | 
   
  Checksum | Live checksum value, if any. | 
   
  Create_options | Extra CREATE TABLE options. | 
   
  Comment | Table comment provided when MariaDB created the
  table. | 
   
  Similar information can be found in the
  information_schema.TABLES table as well as by using
  mysqlshow:
   
  mysqlshow --status db_name
   
  Example
   
  show table status\G
  *************************** 1. row
  ***************************
   Name: bus_routes
   Engine: InnoDB
   Version: 10
   Row_format: Dynamic
   Rows: 5
   Avg_row_length: 3276
   Data_length: 16384
  Max_data_length: 0
   Index_length: 0
   Data_free: 0
   Auto_increment: NULL
   Create_time: 2017-05-24 11:17:46
   Update_time: NULL
   Check_time: NULL
   Collation: latin1_swedish_ci
   Checksum: NULL
   Create_options: 
   Comment:
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-table-status/dzfxuxSHOW TABLE STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-table-status/dzfxuxdzfxux26dzfxux397qjzxqqvvbqSyntax
  ------ 
  SHOW [FULL] TABLES [FROM db_name]
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  SHOW TABLES lists the non-TEMPORARY tables, sequences and
  views in a given database. 
   
  The LIKE clause, if present on its own, indicates which
  table names to match. The WHERE and LIKE clauses can be
  given to select rows using more general conditions, as
  discussed in Extended SHOW. For example, when searching for
  tables in the test database, the column name for use in the
  WHERE and LIKE clauses will be Tables_in_test
   
  The FULL modifier is supported such that SHOW FULL TABLES
  displays a second output column. Values for the second
  column. Table_type, are BASE TABLE for a table, VIEW for a
  view and SEQUENCE for a sequence.
   
  You can also get this information using:
   
  mysqlshow db_name
   
  See mysqlshow for more details.
   
  If you have no privileges for a base table or view, it does
  not show up in the output from SHOW TABLES or mysqlshow
  db_name.
   
  The information_schema.TABLES table, as well as the SHOW
  TABLE STATUS statement, provide extended information about
  tables.
   
  Examples
  -------- 
  SHOW TABLES;
  +----------------------+
  | Tables_in_test |
  +----------------------+
  | animal_count |
  | animals |
  | are_the_mooses_loose |
  | aria_test2 |
  | t1 |
  | view1 |
  +----------------------+
   
  Showing the tables beginning with a only.
   
  SHOW TABLES WHERE Tables_in_test LIKE 'a%';
  +----------------------+
  | Tables_in_test |
  +----------------------+
  | animal_count |
  | animals |
  | are_the_mooses_loose |
  | aria_test2 |
  +----------------------+
   
  Showing tables and table types:
   
  SHOW FULL TABLES;
  +----------------+------------+
  | Tables_in_test | Table_type |
  +----------------+------------+
  | s1 | SEQUENCE |
  | student | BASE TABLE |
  | v1 | VIEW |
  +----------------+------------+
   


  URL: https://mariadb.com/kb/en/library/show-tables/dzfxuxSHOW TABLESdzfxuxhttps://mariadb.com/kb/en/library/show-tables/dzfxuxdzfxux26dzfxux398qjzxqqvvbqMariaDB 5.2 introduced the User Statistics feature.
   
  Syntax
  ------ 
  SHOW TABLE_STATISTICS
   
  Description
  ----------- 
  The SHOW TABLE_STATISTICS statement was introduced in
  MariaDB 5.2 as part of the User Statistics feature. It was
  removed as a separate statement in MariaDB 10.1.1, but
  effectively replaced by the generic SHOW
  information_schema_table statement. The
  information_schema.TABLE_STATISTICS table shows statistics
  on table usage
   
  The userstat system variable must be set to 1 to activate
  this feature. See the User Statistics and
  information_schema.TABLE_STATISTICS articles for more
  information.
   
  Example
   
  From MariaDB 10.0
   
  SHOW TABLE_STATISTICS\G
  *************************** 1. row
  ***************************
   Table_schema: mysql
   Table_name: proxies_priv
   Rows_read: 2
   Rows_changed: 0
  Rows_changed_x_#indexes: 0
  *************************** 2. row
  ***************************
   Table_schema: test
   Table_name: employees_example
   Rows_read: 7
   Rows_changed: 0
  Rows_changed_x_#indexes: 0
  *************************** 3. row
  ***************************
   Table_schema: mysql
   Table_name: user
   Rows_read: 16
   Rows_changed: 0
  Rows_changed_x_#indexes: 0
  *************************** 4. row
  ***************************
   Table_schema: mysql
   Table_name: db
   Rows_read: 2
   Rows_changed: 0
  Rows_changed_x_#indexes: 0
   

   
   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/show-table-statistics/dzfxuxSHOW TABLE_STATISTICSdzfxuxhttps://mariadb.com/kb/en/library/show-table-statistics/dzfxuxdzfxux26dzfxux399qjzxqqvvbqSyntax
  ------ 
  SHOW TRIGGERS [FROM db_name]
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
   SHOW TRIGGERS lists the triggers currently defined for
  tables in a database (the default database unless a FROM
  clause is given). This statement requires the
  TRIGGER privilege (prior to MySQL
  5.1.22, it required the SUPER privilege). 
   
  The LIKE clause, if present on its own, indicates which
  table names to
  match and causes the statement to display triggers for those
  tables. The WHERE and LIKE clauses can be given to select
  rows using more general conditions, as discussed in Extended
  SHOW.
   
  Similar information is stored in the
  information_schema.TRIGGERS table.
   
  If there are multiple triggers for the same action, then the
  triggers are shown in action order.
   
  Examples
  -------- 
  For the trigger defined at Trigger Overview:
   
  SHOW triggers Like 'animals' \G
  *************************** 1. row
  ***************************
   Trigger: the_mooses_are_loose
   Event: INSERT
   Table: animals
   Statement: BEGIN
   IF NEW.name = 'Moose' THEN
   UPDATE animal_count SET animal_count.animals =
  animal_count.animals+100;
   ELSE 
   UPDATE animal_count SET animal_count.animals =
  animal_count.animals+1;
   END IF;
  END
   Timing: AFTER
   Created: 2016-09-29 13:53:34.35
   sql_mode: 
   Definer: root@localhost
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   
  Listing all triggers associated with a certain table:
   
  SHOW TRIGGERS FROM test WHERE `Table` = 'user' \G
  *************************** 1. row
  ***************************
   Trigger: user_ai
   Event: INSERT
   Table: user
   Statement: BEGIN END
   Timing: AFTER
   Created: 2016-09-29 13:53:34.35
   sql_mode: 
   Definer: root@%
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
   
  SHOW triggers WHERE Event Like 'Insert' \G
  *************************** 1. row
  ***************************
   Trigger: the_mooses_are_loose
   Event: INSERT
   Table: animals
   Statement: BEGIN
   IF NEW.name = 'Moose' THEN
   UPDATE animal_count SET animal_count.animals =
  animal_count.animals+100;
   ELSE 
   UPDATE animal_count SET animal_count.animals =
  animal_count.animals+1;
   END IF;
  END
   Timing: AFTER
   Created: 2016-09-29 13:53:34.35
   sql_mode: 
   Definer: root@localhost
  character_set_client: utf8
  collation_connection: utf8_general_ci
   Database Collation: latin1_swedish_ci
  character_set_client is the session value of the
  character_set_client system variable when the trigger was
  created. 
  collation_connection is the session value of the
  collation_connection system variable when the trigger was
   created. 
  Database Collation is the collation of the database 
   with which the trigger is associated.
   
  These columns were added in MariaDB/MySQL 5.1.21.
   
  Old triggers created before MySQL 5.7 and MariaDB 10.2.3 has
  NULL in the Created column.
   


  URL: https://mariadb.com/kb/en/library/show-triggers/dzfxuxSHOW TRIGGERSdzfxuxhttps://mariadb.com/kb/en/library/show-triggers/dzfxuxdzfxux26dzfxux400qjzxqqvvbqMariaDB 5.2 introduced the User Statistics feature.
   
  Syntax
  ------ 
  SHOW USER_STATISTICS
   
  Description
  ----------- 
  The SHOW USER_STATISTICS statement was introduced in MariaDB
  5.2 as part of the User Statistics feature. It was removed
  as a separate statement in MariaDB 10.1.1, but effectively
  replaced by the generic SHOW information_schema_table
  statement. The information_schema.USER_STATISTICS table
  holds statistics about user activity. You can use this table
  to find out such things as which user is causing the most
  load and which users are being abusive. You can also use
  this table to measure how close to capacity the server may
  be.
   
  The userstat system variable must be set to 1 to activate
  this feature. See the User Statistics and
  information_schema.USER_STATISTICS table for more
  information.
   
  Example
   
  From MariaDB 10.0:
   
  SHOW USER_STATISTICS\G
  *************************** 1. row
  ***************************
   User: root
   Total_connections: 1
  Concurrent_connections: 0
   Connected_time: 3297
   Busy_time: 0.14113400000000006
   Cpu_time: 0.017637000000000003
   Bytes_received: 969
   Bytes_sent: 22355
   Binlog_bytes_written: 0
   Rows_read: 10
   Rows_sent: 67
   Rows_deleted: 0
   Rows_inserted: 0
   Rows_updated: 0
   Select_commands: 7
   Update_commands: 0
   Other_commands: 0
   Commit_transactions: 1
   Rollback_transactions: 0
   Denied_connections: 0
   Lost_connections: 0
   Access_denied: 0
   Empty_queries: 7
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-user-statistics/dzfxuxSHOW USER_STATISTICSdzfxuxhttps://mariadb.com/kb/en/library/show-user-statistics/dzfxuxdzfxux26dzfxux401qjzxqqvvbqMariaDB 10.1.2
   
  SHOW WSREP_MEMBERSHIP was introduced with the WSREP_INFO
  plugin in MariaDB 10.1.2.
   
  Syntax
  ------ 
  SHOW WSREP_MEMBERSHIP
   
  Description
  ----------- 
  The SHOW WSREP_MEMBERSHIP statement returns Galera node
  cluster membership information. It returns the same
  information as found in the
  information_schema.WSREP_MEMBERSHIP table. Only users with
  the SUPER privilege can access this information.
   
  Examples
  -------- 
  SHOW WSREP_MEMBERSHIP;
  +-------+--------------------------------------+----------+-----------------+
  | Index | Uuid | Name | Address |
  +-------+--------------------------------------+----------+-----------------+
  | 0 | 19058073-8940-11e4-8570-16af7bf8fced | my_node1 |
  10.0.2.15:16001 |
  | 1 | 19f2b0e0-8942-11e4-9cb8-b39e8ee0b5dd | my_node3 |
  10.0.2.15:16003 |
  | 2 | d85e62db-8941-11e4-b1ef-4bc9980e476d | my_node2 |
  10.0.2.15:16002 |
  +-------+--------------------------------------+----------+-----------------+
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/show-wsrep_membership/dzfxuxSHOW WSREP_MEMBERSHIPdzfxuxhttps://mariadb.com/kb/en/library/show-wsrep_membership/dzfxuxdzfxux26dzfxux404qjzxqqvvbqSyntax
  ------ 
  SHOW [GLOBAL | SESSION] VARIABLES
   [LIKE 'pattern' | WHERE expr]
   
  Description
  ----------- 
  SHOW VARIABLES shows the values of MariaDB system variables.
  This
  information also can be obtained using the mysqladmin
  variables
  command. The LIKE clause, if present, indicates which
  variable names
  to match. The WHERE clause can be given to select rows using
  more
  general conditions.
   
  With the GLOBAL modifier, SHOW VARIABLES displays the values
  that are
  used for new connections to MariaDB. With SESSION, it
  displays the
  values that are in effect for the current connection. If no
  modifier
  is present, the default is SESSION. LOCAL is a synonym for
  SESSION.
  With a LIKE clause, the statement displays only rows for
  those
  variables with names that match the pattern. To obtain the
  row for a
  specific variable, use a LIKE clause as shown:
   
  SHOW VARIABLES LIKE 'maria_group_commit';
   
  SHOW SESSION VARIABLES LIKE 'maria_group_commit';
   
  To get a list of variables whose name match a pattern, use
  the "%"
  wildcard character in a LIKE clause:
   
  SHOW VARIABLES LIKE '%maria%';
   
  SHOW GLOBAL VARIABLES LIKE '%maria%';
   
  Wildcard characters can be used in any position within the
  pattern to
  be matched. Strictly speaking, because "_" is a wildcard
  that matches
  any single character, you should escape it as "\_" to
  match it
  literally. In practice, this is rarely necessary.
   
  The WHERE and LIKE clauses can be given to select rows using
  more general conditions, as discussed in Extended SHOW.
   
  See SET for information on setting server system variables.
   
  See Server System Variables for a list of all the variables
  that can be set.
   
  You can also see the server variables by querying the
  Information Schema GLOBAL_VARIABLES and SESSION_VARIABLES
  tables.
   
  Examples
  -------- 
  SHOW VARIABLES LIKE 'aria%';
   
  +------------------------------------------+---------------------+
  | Variable_name | Value |
  +------------------------------------------+---------------------+
  | aria_block_size | 8192 |
  | aria_checkpoint_interval | 30 |
  | aria_checkpoint_log_activity | 1048576 |
  | aria_force_start_after_recovery_failures | 0 |
  | aria_group_commit | none |
  | aria_group_commit_interval | 0 |
  | aria_log_file_size | 1073741824 |
  | aria_log_purge_type | immediate |
  | aria_max_sort_file_size | 9223372036853727232 |
  | aria_page_checksum | ON |
  | aria_pagecache_age_threshold | 300 |
  | aria_pagecache_buffer_size | 134217728 |
  | aria_pagecache_division_limit | 100 |
  | aria_recover | NORMAL |
  | aria_repair_threads | 1 |
  | aria_sort_buffer_size | 134217728 |
  | aria_stats_method | nulls_unequal |
  | aria_sync_log_dir | NEWFILE |
  | aria_used_for_temp_tables | ON |
  +------------------------------------------+---------------------+
   
  SELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM
   INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE
   VARIABLE_NAME LIKE 'max_error_count' OR
   VARIABLE_NAME LIKE 'innodb_sync_spin_loops';
   
  +---------------------------+---------------+--------------+
  | VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |
  +---------------------------+---------------+--------------+
  | MAX_ERROR_COUNT | 64 | 64 |
  | INNODB_SYNC_SPIN_LOOPS | NULL | 30 |
  +---------------------------+---------------+--------------+
   
  SET GLOBAL max_error_count=128;
   
  SELECT VARIABLE_NAME, SESSION_VALUE, GLOBAL_VALUE FROM
   INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE
   VARIABLE_NAME LIKE 'max_error_count' OR
   VARIABLE_NAME LIKE 'innodb_sync_spin_loops';
   
  +---------------------------+---------------+--------------+
  | VARIABLE_NAME | SESSION_VALUE | GLOBAL_VALUE |
  +---------------------------+---------------+--------------+
  | MAX_ERROR_COUNT | 64 | 128 |
  | INNODB_SYNC_SPIN_LOOPS | NULL | 30 |
  +---------------------------+---------------+--------------+
   
  SET GLOBAL max_error_count=128;
   
  SHOW VARIABLES LIKE 'max_error_count';
   
  +-----------------+-------+
  | Variable_name | Value |
  +-----------------+-------+
  | max_error_count | 64 |
  +-----------------+-------+
   
  SHOW GLOBAL VARIABLES LIKE 'max_error_count';
   
  +-----------------+-------+
  | Variable_name | Value |
  +-----------------+-------+
  | max_error_count | 128 |
  +-----------------+-------+
   
  Because the following variable only has a global scope, the
  global value is returned even when specifying SESSION (in
  this case by default):
   
  SHOW VARIABLES LIKE 'innodb_sync_spin_loops';
   
  +------------------------+-------+
  | Variable_name | Value |
  +------------------------+-------+
  | innodb_sync_spin_loops | 30 |
  +------------------------+-------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-variables/dzfxuxSHOW VARIABLESdzfxuxhttps://mariadb.com/kb/en/library/show-variables/dzfxuxdzfxux26dzfxux402qjzxqqvvbqMariaDB 10.1.2
   
  SHOW WSREP_STATUS was introduced with the WSREP_INFO plugin
  in MariaDB 10.1.2.
   
  Syntax
  ------ 
  SHOW WSREP_STATUS
   
  Description
  ----------- 
  The SHOW WSREP_STATUS statement returns Galera node and
  cluster status information. It returns the same information
  as found in the information_schema.WSREP_STATUS table. Only
  users with the SUPER privilege can access this information.
   
  Examples
  -------- 
  SHOW WSREP_STATUS;
  +------------+-------------+----------------+--------------+
  | Node_Index | Node_Status | Cluster_Status | Cluster_Size |
  +------------+-------------+----------------+--------------+
  | 0 | Synced | Primary | 3 |
  +------------+-------------+----------------+--------------+
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/show-wsrep_status/dzfxuxSHOW WSREP_STATUSdzfxuxhttps://mariadb.com/kb/en/library/show-wsrep_status/dzfxuxdzfxux26dzfxux405qjzxqqvvbqSyntax
  ------ 
  SHOW WARNINGS [LIMIT [offset,] row_count]
  SHOW ERRORS [LIMIT row_count OFFSET offset]
  SHOW COUNT(*) WARNINGS
   
  Description
  ----------- 
   SHOW WARNINGS shows the error, warning, and note messages
  that resulted from the last statement that generated
  messages in the
  current session. It shows nothing if the last statement used
  a table
  and generated no messages. (That is, a statement that uses a
  table but
  generates no messages clears the message list.) Statements
  that do not
  use tables and do not generate messages have no effect on
  the message
  list.
   
  A note is different to a warning in that it only appears if
  the sql_notes variable is set to 1 (the default), and is not
  converted to an error if strict mode is enabled.
   
  A related statement, SHOW ERRORS, shows only the errors.
   
  The SHOW COUNT(*) WARNINGS statement displays the total
  number of errors, warnings, and notes. You can also retrieve
  this number from
  the warning_count variable:
   
  SHOW COUNT(*) WARNINGS;
  SELECT @@warning_count;
   
  The value of warning_count might be greater than the number
  of messages displayed by SHOW WARNINGS if the
  max_error_count system variable is set so low that not all
  messages are stored.
   
  The LIMIT clause has the same syntax as for the
   SELECT statement.
   
  SHOW WARNINGS can be used after EXPLAIN EXTENDED to see how
  a query is internally rewritten by MariaDB.
   
  If the sql_notes server variable is set to 1, Notes are
  included in the output of SHOW WARNINGS; if it is set to 0,
  this statement will not show (or count) Notes.
   
  The results of SHOW WARNINGS and SHOW COUNT(*) WARNINGS are
  directly sent to the client. If you need to access those
  information in a stored program, you can use the GET
  DIAGNOSTICS statement instead.
   
  For a list of MariaDB error codes, see MariaDB Error Codes.
   
  The mysql client also has a number of options related to
  warnings. The \W command will show warnings after every
  statement, while \w will disable this. Starting the client
  with the --show-warnings option will show warnings after
  every statement.
   
  MariaDB 10.3.1 implements a stored routine error stack
  trace. SHOW WARNINGS can also be used to show more
  information. See the example below.
   
  Examples
  -------- 
  SELECT 1/0;
  +------+
  | 1/0 |
  +------+
  | NULL |
  +------+
   
  SHOW COUNT(*) WARNINGS;
  +-------------------------+
  | @@session.warning_count |
  +-------------------------+
  | 1 |
  +-------------------------+
   
  SHOW WARNINGS;
  +---------+------+---------------+
  | Level | Code | Message |
  +---------+------+---------------+
  | Warning | 1365 | Division by 0 |
  +---------+------+---------------+
   
  Stack Trace
   
  From MariaDB 10.3.1, displaying a stack trace:
   
  DELIMITER $$
  CREATE OR REPLACE PROCEDURE p1()
   BEGIN
   DECLARE c CURSOR FOR SELECT * FROM not_existing;
   OPEN c;
   CLOSE c;
   END;
  $$
  CREATE OR REPLACE PROCEDURE p2()
   BEGIN
   CALL p1;
   END;
  $$
  DELIMITER ;
  CALL p2;
  ERROR 1146 (42S02): Table 'test.not_existing' doesn't
  exist
   
  SHOW WARNINGS;
  +-------+------+-----------------------------------------+
  | Level | Code | Message |
  +-------+------+-----------------------------------------+
  | Error | 1146 | Table 'test.not_existing' doesn't exist
  |
  | Note | 4091 | At line 6 in test.p1 |
  | Note | 4091 | At line 4 in test.p2 |
  +-------+------+-----------------------------------------+
   
  SHOW WARNINGS displays a stack trace, showing where the
  error actually happened:
  Line 4 in test.p1 is the OPEN command which actually raised
  the error
  Line 3 in test.p2 is the CALL statement, calling p1 from p2.
   


  URL: https://mariadb.com/kb/en/library/show-warnings/dzfxuxSHOW WARNINGSdzfxuxhttps://mariadb.com/kb/en/library/show-warnings/dzfxuxdzfxux26dzfxux403qjzxqqvvbqSyntax
  ------ 
  CALL sp_name([parameter[,...]])
  CALL sp_name[()]
   
  Description
  ----------- 
  The CALL statement invokes a stored procedure that was
  defined previously with CREATE PROCEDURE. 
   
  Stored procedure names can be specified as
  database_name.procedure_name. Procedure names and database
  names can be quoted with backticks (). This is necessary if
  they are reserved words, or contain special characters. See
  identifier qualifiers for details.
   
  Before MySQL 5.1.13, stored procedures that take no
  arguments required parentheses. In current releases of
  MariaDB, CALL p() and CALL p are equivalent.
   
  If parentheses are used, any number of spaces, tab
  characters and new line characters is allowed between the
  procedure's name and the open parenthesis.
   
  CALL can pass back values to its caller using parameters
  that are declared as OUT or INOUT
  parameters. If no value is assigned to an OUT parameter,
  NULL is assigned (and its former value is lost). To pass
  such values from another stored program you can use
  user-defined variables, local variables or routine's
  parameters; in other contexts, you can only use user-defined
  variables. 
   
  CALL can also be executed as a prepared statement.
  Placeholders can be used for IN parameters in all versions
  of MariaDB; for OUT and INOUT parameters, placeholders can
  be used since MariaDB 5.5.
   
  When the procedure returns, a client program can also obtain
  the
  number of rows affected for the final statement executed
  within the routine: At
  the SQL level, call the ROW_COUNT() function; from the C
  API, call the mysql_affected_rows() function.
   
  If the CLIENT_MULTI_RESULTS API flag is set, CALL can return
  any number of resultsets and the called stored procedure can
  execute prepared statements. If it is not set, at most one
  resultset can be returned and prepared statements cannot be
  used within procedures.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/call/dzfxuxCALLdzfxuxhttps://mariadb.com/kb/en/library/call/dzfxuxdzfxux27dzfxux406qjzxqqvvbqThe MyISAM storage engine supports concurrent inserts. This
  feature allows SELECT statements to be executed during
  INSERT operations, reducing contention.
   
  Whether concurrent inserts can be used or not depends on the
  value of the concurrent_insert server system variable:
  NEVER (0) disables concurrent inserts.
  AUTO (1) allows concurrent inserts only when the target
  table has no free blocks (no data in the middle of the table
  has been deleted after the last OPTIMIZE TABLE). This is the
  default.
  ALWAYS (2) always enables concurrent inserts.
   
  If the binary log is used, CREATE TABLE ... SELECT and
  INSERT ... SELECT statements cannot use concurrent inserts.
  These statements acquire a read lock on the table, so
  concurrent inserts will need to wait. This way the log can
  be safely used to restore data.
   
  Concurrent inserts is not used by slaves with the row based
  replication (see binary log formats).
   
  If an INSERT statement contain the HIGH_PRIORITY clause,
  concurrent inserts cannot be used. INSERT ... DELAYED is
  usually unneeded if concurrent inserts are enabled.
   
  LOAD DATA INFILE uses concurrent inserts if the CONCURRENT
  keyword is specified and concurrent_insert is not NEVER.
  This makes the statement slower (even if no other sessions
  access the table) but reduces contention.
   
  LOCK TABLES allows non-conflicting concurrent inserts if a
  READ LOCAL lock is used. Concurrent inserts are not allowed
  if the LOCAL keyword is omitted.
   
  Notes
   
  The decision to enable concurrent insert for a table is done
  when the table is opened. If you change the value of
  concurrent_insert it will only affect new opened tables. If
  you want it to work for also for tables in use or cached,
  you should do FLUSH TABLES after setting the variable.
   


  URL: https://mariadb.com/kb/en/library/concurrent-inserts/dzfxuxConcurrent Insertsdzfxuxhttps://mariadb.com/kb/en/library/concurrent-inserts/dzfxuxdzfxux27dzfxux407qjzxqqvvbqSyntax
  ------ 
  Single-table syntax:
   
  DELETE [LOW_PRIORITY] [QUICK] [IGNORE] 
   FROM tbl_name [PARTITION (partition_list)]
   [WHERE where_condition]
   [ORDER BY ...]
   [LIMIT row_count]
   [RETURNING select_expr 
   [, select_expr ...]]
   
  Multiple-table syntax:
   
  DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
   tbl_name[.*] [, tbl_name[.*]] ...
   FROM table_references
   [WHERE where_condition]
   
  Or:
   
  DELETE [LOW_PRIORITY] [QUICK] [IGNORE]
   FROM tbl_name[.*] [, tbl_name[.*]] ...
   USING table_references
   [WHERE where_condition]
   
  Trimming history:
   
  DELETE HISTORY
   FROM tbl_name [PARTITION (partition_list)]
   [BEFORE SYSTEM_TIME [TIMESTAMP|TRANSACTION] expression]
   
  Description
  ----------- 
  Option | Description | 
   
  LOW_PRIORITY | Wait until all SELECT's are done before
  starting the statement. Used with storage engines that uses
  table locking (MyISAM, Aria etc). See HIGH_PRIORITY and
  LOW_PRIORITY clauses for details. | 
   
  QUICK | Signal the storage engine that it should expect that
  a lot of rows are deleted. The storage engine engine can do
  things to speed up the DELETE like ignoring merging of data
  blocks until all rows are deleted from the block (instead of
  when a block is half full). This speeds up things at the
  expanse of lost space in data blocks. At least MyISAM and
  Aria support this feature. | 
   
  IGNORE | Don't stop the query even if a not-critical error
  occurs (like data overflow). See How IGNORE works for a full
  description. | 
   
  For the single-table syntax, the DELETE statement deletes
  rows
  from tbl_name and returns a count of the number of deleted
  rows. This count can
  be obtained by calling the ROW_COUNT() function. The
  WHERE clause, if given, specifies the conditions that
  identify
  which rows to delete. With no WHERE clause, all rows are
  deleted. If the ORDER BY clause is specified, the rows are
  deleted in the order that is specified. The LIMIT clause
  places a limit on the number of rows that can be deleted.
   
  For the multiple-table syntax, DELETE deletes from each
  tbl_name the rows that satisfy the conditions. In this case,
  ORDER BY and LIMIT> cannot be used. A DELETE can also
  reference tables which are located in different databases;
  see Identifier Qualifiers for the syntax.
   
  where_condition is an expression that evaluates to true for
  each row to be deleted. It is specified as described in
  SELECT.
   
  Currently, you cannot delete from a table and select from
  the same
  table in a subquery.
   
  You need the DELETE privilege on a table to delete rows from
  it. You need only the SELECT privilege for any columns that
  are only read, such as those named in the WHERE clause. See
  GRANT.
   
  The PARTITION clause was introduced in MariaDB 10.0. See
  Partition Pruning and Selection for details.
   
  As stated, a DELETE statement with no WHERE
  clause deletes all rows. A faster way to do this, when you
  do not need to know
  the number of deleted rows, is to use TRUNCATE TABLE.
  However,
  within a transaction or if you have a lock on the table, 
  TRUNCATE TABLE cannot be used whereas DELETE
  can. See TRUNCATE TABLE, and
  LOCK.
   
  From MariaDB 10.0.5, it is possible to return a resultset of
  the deleted rows for a single table to the client by using
  the syntax DELETE ... RETURNING select_expr [, select_expr2
  ...]]
   
  Any of SQL expression that can be calculated from a single
  row fields is allowed. Subqueries are allowed. The AS
  keyword is allowed, so it is possible to use aliases.
   
  The use of aggregate functions is not allowed. RETURNING
  cannot be used in multi-table DELETEs.
   
  Same Source and Target Table
   
  Until MariaDB 10.3.1, deleting from a table with the same
  source and target was not possible. From MariaDB 10.3.1,
  this is now possible. For example:
   
  DELETE FROM t1 WHERE c1 IN (SELECT b.c1 FROM t1 b WHERE
  b.c2=0);
   
  One can use DELETE HISTORY to delete historical information
  from System-versioned tables.
   
  Examples
  -------- 
  How to use the ORDER BY and LIMIT clauses:
   
  DELETE FROM page_hit ORDER BY timestamp LIMIT 1000000;
   
  How to use the RETURNING clause:
   
  DELETE FROM t RETURNING f1;
   
  +------+
  | f1 |
  +------+
  | 5 |
  | 50 |
  | 500 |
  +------+ 
   
  The following statement joins two tables: one is only used
  to satisfy a WHERE condition, but no row is deleted from it;
  rows from the other table are deleted, instead.
   
  DELETE post FROM blog INNER JOIN post WHERE blog.id =
  post.blog_id;
   
  Deleting from the Same Source and Target
   
  CREATE TABLE t1 (c1 INT, c2 INT);
  DELETE FROM t1 WHERE c1 IN (SELECT b.c1 FROM t1 b WHERE
  b.c2=0);
   
  Until MariaDB 10.3.1, this returned:
   
  ERROR 1093 (HY000): Table 't1' is specified twice, both as
  a target for 'DELETE' 
   and as a separate source for
   
  From MariaDB 10.3.1:
   
  Query OK, 0 rows affected (0.00 sec)
   


  URL: https://mariadb.com/kb/en/library/delete/dzfxuxDELETEdzfxuxhttps://mariadb.com/kb/en/library/delete/dzfxuxdzfxux27dzfxux408qjzxqqvvbqEXCEPT was introduced in MariaDB 10.3.0.
   
  The result of EXCEPT is all records of the left SELECT
  result set except records which are in right SELECT result
  set, i.e. it is subtraction of two result sets.
   
  Syntax
  ------ 
  SELECT ...
  (INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...
  [(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...]
  [ORDER BY [column [, column ...]]]
  [LIMIT {[offset,] row_count | row_count OFFSET offset}]
   
  Please note:
  ALL is not supported by EXCEPT (and it is difficult to make
  sense of ALL with EXCEPT).
  Brackets for explicit operation precedence are not
  supported; use a subquery in the FROM clause as a
  workaround).
   
  Description
  ----------- 
  MariaDB has supported EXCEPT and INTERSECT in addition to
  UNION since MariaDB 10.3.
   
  All behavior for naming columns, ORDER BY and LIMIT is the
  same as for UNION.
   
  EXCEPT implicitly supposes a DISTINCT operation.
   
  The result of EXCEPT is all records of the left SELECT
  result except records which are in right SELECT result set,
  i.e. it is subtraction of two result sets.
   
  EXCEPT and UNION have the same operation precedence.
   

  Parentheses
   
  From MariaDB 10.4.0, parentheses can be used to specify
  precedence. Before this, a syntax error would be returned.
   
  Examples
  -------- 
  Show customers which are not employees:
   
  (SELECT e_name AS name, email FROM customers)
  EXCEPT
  (SELECT c_name AS name, email FROM employees);
   
  Difference between UNION, EXCEPT and INTERSECT:
   
  CREATE TABLE seqs (i INT);
  INSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 1 |
  | 2 |
  | 3 |
  | 4 |
  | 5 |
  | 6 |
  +------+
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 1 |
  | 2 |
  +------+
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 3 |
  +------+
   
  Parentheses for specifying precedence, from MariaDB 10.4.0
   
  CREATE OR REPLACE TABLE t1 (a INT);
  CREATE OR REPLACE TABLE t2 (b INT);
  CREATE OR REPLACE TABLE t3 (c INT);
   
  INSERT INTO t1 VALUES (1),(2),(3),(4);
  INSERT INTO t2 VALUES (5),(6);
  INSERT INTO t3 VALUES (1),(6);
   
  ((SELECT a FROM t1) UNION (SELECT b FROM t2)) EXCEPT (SELECT
  c FROM t3);
  +------+
  | a |
  +------+
  | 2 |
  | 3 |
  | 4 |
  | 5 |
  +------+
   
  (SELECT a FROM t1) UNION ((SELECT b FROM t2) EXCEPT (SELECT
  c FROM t3));
  +------+
  | a |
  +------+
  | 1 |
  | 2 |
  | 3 |
  | 4 |
  | 5 |
  +------+
   


  URL: https://mariadb.com/kb/en/library/except/dzfxuxEXCEPTdzfxuxhttps://mariadb.com/kb/en/library/except/dzfxuxdzfxux27dzfxux411qjzxqqvvbqThe XtraDB/InnoDB storage engine uses row-level locking to
  ensure data integrity. However some storage engines (such as
  MEMORY, MyISAM, Aria and MERGE) lock the whole table to
  prevent conflicts. These storage engines use two separate
  queues to remember pending statements; one is for SELECTs
  and the other one is for write statements (INSERT, DELETE,
  UPDATE). By default, the latter has a higher priority.
   
  To give write operations a lower priority, the
  low_priority_updates server system variable can be set to
  ON. The option is available on both the global and session
  levels, and it can be set at startup or via the SET
  statement.
   
  When too many table locks have been set by write statements,
  some pending SELECTs are executed. The maximum number of
  write locks that can be acquired before this happens is
  determined by the max_write_lock_count server system
  variable, which is dynamic.
   
  If write statements have a higher priority (default), the
  priority of individual write statements (INSERT, REPLACE,
  UPDATE, DELETE) can be changed via the LOW_PRIORITY
  attribute, and the priority of a SELECT statement can be
  raised via the HIGH_PRIORITY attribute. Also, LOCK TABLES
  supports a LOW_PRIORITY attribute for WRITE locks.
   
  If read statements have a higher priority, the priority of
  an INSERT can be changed via the HIGH_PRIORITY attribute.
  However, the priority of other write statements cannot be
  raised individually.
   
  The use of LOW_PRIORITY or HIGH_PRIORITY for an INSERT
  prevents Concurrent Inserts from being used.
   


  URL:
  https://mariadb.com/kb/en/library/high_priority-and-low_priority/dzfxuxHIGH_PRIORITY and LOW_PRIORITYdzfxuxhttps://mariadb.com/kb/en/library/high_priority-and-low_priority/dzfxuxdzfxux27dzfxux415qjzxqqvvbqThe IGNORE option tells the server to ignore some common
  errors.
   
  IGNORE can be used with the following statements:
  DELETE
  INSERT (see also INSERT IGNORE)
  LOAD DATA INFILE
  UPDATE
  ALTER TABLE
  CREATE TABLE ... SELECT
  INSERT ... SELECT
   
  The logic used:
  Variables out of ranges are replaced with the
  maximum/minimum value.
   
  SQL_MODEs STRICT_TRANS_TABLES, STRICT_ALL_TABLES,
  NO_ZERO_IN_DATE, NO_ZERO_DATE are ignored.
   
  Inserting NULL in a NOT NULL field will insert 0 ( in a
  numerical
   field), 0000-00-00 ( in a date field) or an empty string (
  in a character
   field).
   
  Rows that cause a duplicate key error or break a foreign key
  constraint are
   not inserted, updated, or deleted.
   
  The following errors are ignored:
   
  Error number | Symbolic error name | Description | 
   
  1022 | ER_DUP_KEY | Can't write; duplicate key in table
  '%s' | 
   
  1048 | ER_BAD_NULL_ERROR | Column '%s' cannot be null | 
   
  1062 | ER_DUP_ENTRY | Duplicate entry '%s' for key %d | 
   
  1242 | ER_SUBQUERY_NO_1_ROW | Subquery returns more than 1
  row | 
   
  1264 | ER_WARN_DATA_OUT_OF_RANGE | Out of range value for
  column '%s' at row %ld | 
   
  1265 | WARN_DATA_TRUNCATED | Data truncated for column
  '%s' at row %ld | 
   
  1292 | ER_TRUNCATED_WRONG_VALUE | Truncated incorrect %s
  value: '%s' | 
   
  1366 | ER_TRUNCATED_WRONG_VALUE_FOR_FIELD | Incorrect
  integer value | 
   
  1369 | ER_VIEW_CHECK_FAILED | CHECK OPTION failed '%s.%s'
  | 
   
  1451 | ER_ROW_IS_REFERENCED_2 | Cannot delete or update a
  parent row | 
   
  1452 | ER_NO_REFERENCED_ROW_2 | Cannot add or update a child
  row: a foreign key constraint fails (%s) | 
   
  1526 | ER_NO_PARTITION_FOR_GIVEN_VALUE | Table has no
  partition for value %s | 
   
  1586 | ER_DUP_ENTRY_WITH_KEY_NAME | Duplicate entry '%s'
  for key '%s' | 
   
  1591 | ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT | Table has no
  partition for some existing values | 
   
  1748 | ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET | Found a
  row not matching the given partition set | 
   
  Ignored errors normally generate a warning.
   
  A property of the IGNORE clause consists in causing
  transactional engines and non-transactional engines (like
  XtraDB and Aria) to behave the same way. For example,
  normally a multi-row insert which tries to violate a UNIQUE
  contraint is completely rolled back on XtraDB/InnoDB, but
  might be partially executed on Aria. With the IGNORE clause,
  the statement will be partially executed in both engines.
   
  Starting from MariaDB 5.5.28 duplicate key errors also
  generate warnings. The OLD_MODE server variable can be used
  to prevent this.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/ignore/dzfxuxIGNOREdzfxuxhttps://mariadb.com/kb/en/library/ignore/dzfxuxdzfxux27dzfxux416qjzxqqvvbqUse the GROUP BY clause in a SELECT statement to group rows
  together that have the same value in one or more column, or
  the same computed value using expressions with any
  functions and operators except
  grouping functions. When you
  use a GROUP BY clause, you will get a single result row for
  each group of rows
  that have the same value for the expression given in GROUP
  BY.
   
  When grouping rows, grouping values are compared as if by
  the = operator.
  For string values, the = operator ignores trailing
  whitespace and may normalize
  characters and ignore case, depending on the collation in
  use.
   
  You can use any of the grouping functions in your select
  expression. Their values will
  be calculated based on all the rows that have been grouped
  together for each result
  row. If you select a non-grouped column or a value computed
  from a non-grouped
  column, it is undefined which row the returned value is
  taken from. This is not permitted if the ONLY_FULL_GROUP_BY
  SQL_MODE is used.
   
  You can use multiple expressions in the GROUP BY clause,
  separated by commas.
  Rows are grouped together if they match on each of the
  expressions.
   
  You can also use a single integer as the grouping
  expression. If you use an integer n,
  the results will be grouped by the nth column in the select
  expression.
   
  The WHERE clause is applied before the GROUP BY clause. It
  filters non-aggregated
  rows before the rows are grouped together. To filter grouped
  rows based on aggregate values,
  use the HAVING clause. The HAVING clause takes any
  expression and evaluates it as
  a boolean, just like the WHERE clause. You can use grouping
  functions in the HAVING
  clause. As with the select expression, if you reference
  non-grouped columns in the HAVING
  clause, the behavior is undefined.
   
  By default, if a GROUP BY clause is present, the rows in the
  output will be sorted by the expressions used in the GROUP
  BY. You can also specify ASC or DESC (ascending, descending)
  after those expressions, like in ORDER BY. The default is
  ASC.
   
  If you want the rows to be sorted by another field, you can
  add an explicit ORDER BY. If you don't want the result to
  be ordered, you can add ORDER BY NULL.
   
  WITH ROLLUP
   
  The WITH ROLLUP modifer adds extra rows to the resultset
  that represent super-aggregate summaries. For a full
  description with examples, see SELECT WITH ROLLUP.
   
  GROUP BY Examples
   
  Consider the following table that records how many times
  each user has played and won a game:
   
  CREATE TABLE plays (name VARCHAR(16), plays INT, wins INT);
  INSERT INTO plays VALUES 
   ("John", 20, 5), 
   ("Robert", 22, 8), 
   ("Wanda", 32, 8), 
   ("Susan", 17, 3);
   
  Get a list of win counts along with a count:
   
  SELECT wins, COUNT(*) FROM plays GROUP BY wins;
   
  +------+----------+
  | wins | COUNT(*) |
  +------+----------+
  | 3 | 1 |
  | 5 | 1 |
  | 8 | 2 |
  +------+----------+
  3 rows in set (0.00 sec)
   
  The GROUP BY expression can be a computed value, and can
  refer back to an identifer
  specified with AS. Get a list of win averages along with a
  count:
   
  SELECT (wins / plays) AS winavg, COUNT(*) FROM plays GROUP
  BY winavg;
   
  +--------+----------+
  | winavg | COUNT(*) |
  +--------+----------+
  | 0.1765 | 1 |
  | 0.2500 | 2 |
  | 0.3636 | 1 |
  +--------+----------+
  3 rows in set (0.00 sec)
   
  You can use any grouping function
  in the select expression. For each win average as above, get
  a list of the average play
  count taken to get that average:
   
  SELECT (wins / plays) AS winavg, AVG(plays) FROM plays 
   GROUP BY winavg;
   
  +--------+------------+
  | winavg | AVG(plays) |
  +--------+------------+
  | 0.1765 | 17.0000 |
  | 0.2500 | 26.0000 |
  | 0.3636 | 22.0000 |
  +--------+------------+
  3 rows in set (0.00 sec)
   
  You can filter on aggregate information using the HAVING
  clause. The HAVING
  clause is applied after GROUP BY and allows you to filter on
  aggregate data that is
  not available to the WHERE clause. Restrict the above
  example to results that involve
  an average number of plays over 20:
   
  SELECT (wins / plays) AS winavg, AVG(plays) FROM plays 
   GROUP BY winavg HAVING AVG(plays) > 20;
   
  +--------+------------+
  | winavg | AVG(plays) |
  +--------+------------+
  | 0.2500 | 26.0000 |
  | 0.3636 | 22.0000 |
  +--------+------------+
  2 rows in set (0.00 sec)
   
  See Also
   
  SELECT
  Joins and Subqueries
  LIMIT
  ORDER BY
  Common Table Expressions
  SELECT WITH ROLLUP
  SELECT INTO OUTFILE
  SELECT INTO DUMPFILE
  FOR UPDATE
  LOCK IN SHARE MODE
  Optimizer Hints
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/group-by/dzfxuxGROUP BYdzfxuxhttps://mariadb.com/kb/en/library/group-by/dzfxuxdzfxux27dzfxux413qjzxqqvvbqDefault Values
   
  If the SQL_MODE contains STRICT_TRANS_TABLES and you are
  inserting into a transactional table (like InnoDB), or if
  the SQL_MODE contains STRICT_ALL_TABLES, all NOT NULL
  columns which does not have a DEFAULT value (and is not
  AUTO_INCREMENT) must be explicitly referenced in INSERT
  statements. If not, an error like this is produced:
   
  ERROR 1364 (HY000): Field 'col' doesn't have a default
  value
   
  In all other cases, if a NOT NULL column without a DEFAULT
  value is not referenced, an empty value will be inserted
  (for example, 0 for INTEGER columns and '' for CHAR
  columns). See NULL Values in MariaDB:Inserting for examples.
   
  If a NOT NULL column having a DEFAULT value is not
  referenced, NULL will be inserted.
   
  If a NULL column having a DEFAULT value is not referenced,
  its default value will be inserted. It is also possible to
  explicitly assign the default value using the DEFAULT
  keyword or the DEFAULT() function.
   
  If the DEFAULT keyword is used but the column does not have
  a DEFAULT value, an error like this is produced:
   
  ERROR 1364 (HY000): Field 'col' doesn't have a default
  value
   
  Duplicate Values
   
  By default, if you try to insert a duplicate row and there
  is a UNIQUE index, INSERT stops and an error like this is
  produced:
   
  ERROR 1062 (23000): Duplicate entry 'dup_value' for key
  'col'
   
  To handle duplicates you can use the IGNORE clause, INSERT
  ON DUPLICATE KEY UPDATE or the REPLACE statement. Note that
  the IGNORE and DELAYED options are ignored when you use ON
  DUPLICATE KEY UPDATE.
   


  URL:
  https://mariadb.com/kb/en/library/insert-default-duplicate-values/dzfxuxINSERT - Default & Duplicate Valuesdzfxuxhttps://mariadb.com/kb/en/library/insert-default-duplicate-values/dzfxuxdzfxux27dzfxux418qjzxqqvvbqSyntax
  ------ 
  INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]
   {VALUES | VALUE} ({expr | DEFAULT},...),(...),...
   [ ON DUPLICATE KEY UPDATE
   col=expr
   [, col=expr] ... ]
   
  Or:
   
  INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [PARTITION (partition_list)]
   SET col={expr | DEFAULT}, ...
   [ ON DUPLICATE KEY UPDATE
   col=expr
   [, col=expr] ... ]
   
  Or:
   
  INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]
   SELECT ...
   [ ON DUPLICATE KEY UPDATE
   col=expr
   [, col=expr] ... ]
   
  The INSERT statement is used to insert new rows into an
  existing table. The INSERT ... VALUES
  and INSERT ... SET forms of the statement insert rows based
  on explicitly specified values. The INSERT ... SELECT form
  inserts rows selected from another table or tables. INSERT
  ... SELECT is discussed further in the INSERT ... SELECT
  article.
   
  The table name can be specified in the form db_name.tbl_name
  or, if a default database is selected, in the form tbl_name
  (see Identifier Qualifiers). This allows to use INSERT ...
  SELECT to copy rows between different databases.
   
  The PARTITION clause was introduced in MariaDB 10.0. It can
  be used in both the INSERT and the SELECT part. See
  Partition Pruning and Selection for details.
   
  The columns list is optional. It specifies which values are
  explicitly inserted, and in which order. If this clause is
  not specified, all values must be explicitly specified, in
  the same order they are listed in the table definition.
   
  The list of value follow the VALUES or VALUE keyword (which
  are interchangeable, regardless how much values you want to
  insert), and is wrapped by parenthesis. The values must be
  listed in the same order as the columns list. It is possible
  to specify more than one list to insert more than one rows
  with a single statement. If many rows are inserted, this is
  a speed optimization.
   
  For one-row statements, the SET clause may be more simple,
  because you don't need to remember the columns order. All
  values are specified in the form col = expr.
   
  Values can also be specified in the form of a SQL expression
  or subquery. However, the subquery cannot access the same
  table that is named in the INTO clause.
   
  If you use the LOW_PRIORITY keyword, execution of the INSERT
  is delayed until no other clients are reading from the
  table. If you use the HIGH_PRIORITY keyword, the statement
  has the same priority as SELECTs. This affects only storage
  engines that use only table-level locking (MyISAM, MEMORY,
  MERGE). However, if one of these keywords is specified,
  concurrent inserts cannot be used. See HIGH_PRIORITY and
  LOW_PRIORITY clauses for details.
   
  INSERT DELAYED
   
  For more details on the DELAYED option, see INSERT DELAYED.
   
  HIGH PRIORITY and LOW PRIORITY
   
  See HIGH_PRIORITY and LOW_PRIORITY.
   
  Defaults and Duplicate Values
   
  See INSERT - Default & Duplicate Values for details..
   
  INSERT IGNORE
   
  See INSERT IGNORE.
   
  INSERT ON DUPLICATE KEY UPDATE
   
  See INSERT ON DUPLICATE KEY UPDATE.
   
  Examples
  -------- 
  Specifying the column names:
   
  INSERT INTO person (first_name, last_name) VALUES ('John',
  'Doe');
   
  Inserting more than 1 row at a time:
   
  INSERT INTO tbl_name VALUES (1, "row 1"), (2, "row 2");
   
  Using the SET clause:
   
  INSERT INTO person SET first_name = 'John', last_name =
  'Doe';
   
  SELECTing from another table:
   
  INSERT INTO contractor SELECT * FROM person WHERE status =
  'c';
   
  See INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE for
  further examples.
   


  URL: https://mariadb.com/kb/en/library/insert/dzfxuxINSERTdzfxuxhttps://mariadb.com/kb/en/library/insert/dzfxuxdzfxux27dzfxux417qjzxqqvvbqIgnoring Errors
   
  Normally INSERT stops and rolls back when it encounters an
  error.
   
  By using the IGNORE keyword all errors are converted to
  warnings, which will not stop inserts of additional rows.
   
  The IGNORE and DELAYED options are ignored when you use ON
  DUPLICATE KEY UPDATE.
   
  Incompatibilities
   
  MariaDB until 5.5.28
  MySQL and MariaDB before 5.5.28 didn't give warnings for
  duplicate key errors when using IGNORE.
  You can get the old behaviour if you set OLD_MODE to
  NO_DUP_KEY_WARNINGS_WITH_IGNORE
   
  Examples
  -------- 
  CREATE TABLE t1 (x INT UNIQUE);
   
  INSERT INTO t1 VALUES(1),(2);
   
  INSERT INTO t1 VALUES(2),(3);
  ERROR 1062 (23000): Duplicate entry '2' for key 'x'
  SELECT * FROM t1;
   
  +------+
  | x |
  +------+
  | 1 |
  | 2 |
  +------+
  2 rows in set (0.00 sec)
   
  INSERT IGNORE INTO t1 VALUES(2),(3);
  Query OK, 1 row affected, 1 warning (0.04 sec)
   
  SHOW WARNINGS;
   
  +---------+------+---------------------------------+
  | Level | Code | Message |
  +---------+------+---------------------------------+
  | Warning | 1062 | Duplicate entry '2' for key 'x' |
  +---------+------+---------------------------------+
   
  SELECT * FROM t1;
   
  +------+
  | x |
  +------+
  | 1 |
  | 2 |
  | 3 |
  +------+
   
  See INSERT ON DUPLICATE KEY UPDATE for further examples
  using that syntax.
   


  URL: https://mariadb.com/kb/en/library/insert-ignore/dzfxuxINSERT IGNOREdzfxuxhttps://mariadb.com/kb/en/library/insert-ignore/dzfxuxdzfxux27dzfxux420qjzxqqvvbqSyntax
  ------ 
  INSERT DELAYED ...
   
  Description
  ----------- 
  The DELAYED option for the INSERT
  statement is a MariaDB/MySQL extension to standard SQL that
  is very useful if you have
  clients that cannot or need not wait for the INSERT to
  complete. This is a common situation when you use MariaDB
  for logging and you
  also periodically run SELECT and UPDATE
  statements that take a long time to complete.
   
  When a client uses INSERT DELAYED, it gets an okay from the
  server at once, and the row is queued to be inserted when
  the table is not in
  use by any other thread.
   
  Another major benefit of using INSERT DELAYED is that
  inserts from many clients are bundled together and written
  in one block. This
  is much faster than performing many separate inserts.
   
  Note that INSERT DELAYED is slower than a normal
   INSERT if the table is not otherwise in use. There is also
  the additional overhead for the server to handle a separate
  thread for each
  table for which there are delayed rows. This means that you
  should use
  INSERT DELAYED only when you are really sure that you need
  it.
   
  The queued rows are held only in memory until they are
  inserted into the table.
  This means that if you terminate mysqld forcibly (for
  example, with kill -9) or
  if mysqld dies unexpectedly, any queued rows that have not
  been written to disk
  are lost.
   
  The number of concurrent INSERT DELAYED threads is limited
  by the max_delayed_threads server system variables. If it is
  set to 0, INSERT DELAYED is disabled. The session value can
  be equal to the global value, or 0 to disable this statement
  for the current session. If this limit has been reached, the
  DELAYED clause will be silently ignore for subsequent
  statements (no error will be produced).
   
  There are some constraints on the use of DELAYED:
  INSERT DELAYED works only with MyISAM, MEMORY, ARCHIVE,
   and BLACKHOLE tables. If you execute INSERT DELAYED with
  another storage engine, you will get an error like this:
  ERROR 1616 (HY000): DELAYED option not supported for table
  'tab_name'
  For MyISAM tables, if there are no free blocks in the middle
  of the data
   file, concurrent SELECT and INSERT statements are
  supported. Under these
   circumstances, you very seldom need to use INSERT DELAYED
   with MyISAM.
  INSERT DELAYED should be used only for
   INSERT statements that specify value lists. The server
   ignores DELAYED for INSERT ... SELECT
   or INSERT ... ON DUPLICATE KEY UPDATE statements.
  Because the INSERT DELAYED statement returns immediately,
   before the rows are inserted, you cannot use
   LAST_INSERT_ID() to get the
   AUTO_INCREMENT value that the statement might generate.
  DELAYED rows are not visible to SELECT
   statements until they actually have been inserted.
  After INSERT DELAYED, ROW_COUNT() returns the number of the
  rows you tried to insert, not the number of the successful
  writes.
  DELAYED is ignored on slave replication servers, so that 
   INSERT DELAYED is treated as a normal
   INSERT on slaves. This is because
   DELAYED could cause the slave to have different data than
   the master. INSERT DELAYED statements are not safe for
  replication.
  Pending INSERT DELAYED statements are lost if a table is
   write locked and ALTER TABLE is used to modify the table
  structure.
  INSERT DELAYED is not supported for views. If you try, you
  will get an error like this: ERROR 1347 (HY000):
  'view_name' is not BASE TABLE
  INSERT DELAYED is not supported for partitioned tables.
  INSERT DELAYED is not supported within stored programs.
   


  URL: https://mariadb.com/kb/en/library/insert-delayed/dzfxuxINSERT DELAYEDdzfxuxhttps://mariadb.com/kb/en/library/insert-delayed/dzfxuxdzfxux27dzfxux419qjzxqqvvbqSyntax
  ------ 
  INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [(col_name,...)]
   SELECT ...
   [ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
   
  Description
  ----------- 
  With INSERT ... SELECT, you can quickly insert many rows
  into a table from one or more other tables. For example:
   
  INSERT INTO tbl_temp2 (fld_id)
   SELECT tbl_temp1.fld_order_id
   FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;
   
  tbl_name can also be specified in the form db_name.tbl_name
  (see Identifier Qualifiers). This allows to copy rows
  between different databases.
   
  If the new table has a primary key or UNIQUE indexes, you
  can use IGNORE to handle duplicate key errors during the
  query. The newer values will not be inserted if an identical
  value already exists.
   
  REPLACE can be used instead of INSERT to prevent duplicates
  on UNIQUE indexes by deleting old values. In that case, ON
  DUPLICATE KEY UPDATE cannot be used.
   
  INSERT ... SELECT works for tables which already exist. To
  create a table for a given resultset, you can use CREATE
  TABLE ... SELECT.
   


  URL: https://mariadb.com/kb/en/library/insert-select/dzfxuxINSERT SELECTdzfxuxhttps://mariadb.com/kb/en/library/insert-select/dzfxuxdzfxux27dzfxux422qjzxqqvvbqINTERSECT was introduced in MariaDB 10.3.0.
   
  The result of an intersect is the intersection of right and
  left SELECT results, i.e. only records that are present in
  both result sets will be included in the result of the
  operation.
   
  Syntax
  ------ 
  SELECT ...
  (INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...
  [(INTERSECT | EXCEPT | UNION [ALL | DISTINCT]) SELECT ...]
  [ORDER BY [column [, column ...]]]
  [LIMIT {[offset,] row_count | row_count OFFSET offset}]
   
  Please note:
  ALL is not supported by INTERSECT (and it is difficult to
  make sense of ALL with INTERSECT).
  Brackets for explicit operation precedence are not
  supported; use a subquery in the FROM clause as a
  workaround).
   
  Description
  ----------- 
  MariaDB has supported INTERSECT (as well as EXCEPT) in
  addition to UNION since MariaDB 10.3.
   
  All behavior for naming columns, ORDER BY and LIMIT is the
  same as for UNION.
   
  INTERSECT implicitly supposes a DISTINCT operation.
   
  The result of an intersect is the intersection of right and
  left SELECT results, i.e. only records that are present in
  both result sets will be included in the result of the
  operation.
   
  INTERSECT has higher precedence than UNION and EXCEPT. If
  possible it will be executed linearly but if not it will be
  translated to a subquery in the FROM clause:
   
  (select a,b from t1)
  union
  (select c,d from t2)
  intersect
  (select e,f from t3)
  union
  (select 4,4);
   
  will be translated to:
   
  (select a,b from t1)
  union
  select c,d from
   ((select c,d from t2)
   intersect
   (select e,f from t3)) dummy_subselect
  union
  (select 4,4)
   

   
  Parentheses
   
  From MariaDB 10.4.0, parentheses can be used to specify
  precedence. Before this, a syntax error would be returned.
   
  Examples
  -------- 
  Show customers which are employees:
   
  (SELECT e_name AS name, email FROM employees)
  INTERSECT
  (SELECT c_name AS name, email FROM customers);
   
  Difference between UNION, EXCEPT and INTERSECT:
   
  CREATE TABLE seqs (i INT);
  INSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 1 |
  | 2 |
  | 3 |
  | 4 |
  | 5 |
  | 6 |
  +------+
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 1 |
  | 2 |
  +------+
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 3 |
  +------+
   
  Parentheses for specifying precedence, from MariaDB 10.4.0
   
  CREATE OR REPLACE TABLE t1 (a INT);
  CREATE OR REPLACE TABLE t2 (b INT);
  CREATE OR REPLACE TABLE t3 (c INT);
   
  INSERT INTO t1 VALUES (1),(2),(3),(4);
  INSERT INTO t2 VALUES (5),(6);
  INSERT INTO t3 VALUES (1),(6);
   
  ((SELECT a FROM t1) UNION (SELECT b FROM t2)) INTERSECT
  (SELECT c FROM t3);
  +------+
  | a |
  +------+
  | 1 |
  | 6 |
  +------+
   
  (SELECT a FROM t1) UNION ((SELECT b FROM t2) INTERSECT
  (SELECT c FROM t3));
  +------+
  | a |
  +------+
  | 1 |
  | 2 |
  | 3 |
  | 4 |
  | 6 |
  +------+
   


  URL: https://mariadb.com/kb/en/library/intersect/dzfxuxINTERSECTdzfxuxhttps://mariadb.com/kb/en/library/intersect/dzfxuxdzfxux27dzfxux423qjzxqqvvbqSyntax
  ------ 
  INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]
   {VALUES | VALUE} ({expr | DEFAULT},...),(...),...
   [ ON DUPLICATE KEY UPDATE
   col=expr
   [, col=expr] ... ]
   
  Or:
   
  INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [PARTITION (partition_list)]
   SET col={expr | DEFAULT}, ...
   [ ON DUPLICATE KEY UPDATE
   col=expr
   [, col=expr] ... ]
   
  Or:
   
  INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
   [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]
   SELECT ...
   [ ON DUPLICATE KEY UPDATE
   col=expr
   [, col=expr] ... ]
   
  Description
  ----------- 
  INSERT ... ON DUPLICATE KEY UPDATE is a MariaDB/MySQL
  extension to the INSERT statement that, if it finds a
  duplicate unique or primary key, will instead perform an
  UPDATE.
   
  The row/s affected value is reported as 1 if a row is
  inserted, and 2 if a row is updated, unless the API's
  CLIENT_FOUND_ROWS flag is set.
   
  If more than one unique index is matched, only the first is
  updated. It is not recommended to use this statement on
  tables with more than one unique index.
   
  If the table has an AUTO_INCREMENT primary key and the
  statement inserts or updates a row, the LAST_INSERT_ID()
  function returns its AUTO_INCREMENT value.
   
  The VALUES() function can only be used in a ON DUPLICATE KEY
  UPDATE clause and has no meaning in any other context. It
  returns the column values from the INSERT portion of the
  statement. This function is particularly useful for
  multi-rows inserts.
   
  The IGNORE and DELAYED options are ignored when you use ON
  DUPLICATE KEY UPDATE.
   
  The PARTITION clause was introduced in MariaDB 10.0. See
  Partition Pruning and Selection for details.
   
  This statement activates INSERT and UPDATE triggers. See
  Trigger Overview for details.
   
  See also a similar statement, REPLACE.
   
  Examples
  -------- 
  CREATE TABLE ins_duplicate (id INT PRIMARY KEY, animal
  VARCHAR(30));
  INSERT INTO ins_duplicate VALUES (1,'Aardvark'),
  (2,'Cheetah'), (3,'Zebra');
   
  If there is no existing key, the statement runs as a regular
  INSERT:
   
  INSERT INTO ins_duplicate VALUES (4,'Gorilla') ON
  DUPLICATE KEY UPDATE animal='Gorilla';
  Query OK, 1 row affected (0.07 sec)
   
  SELECT * FROM ins_duplicate;
  +----+----------+
  | id | animal |
  +----+----------+
  | 1 | Aardvark |
  | 2 | Cheetah |
  | 3 | Zebra |
  | 4 | Gorilla |
  +----+----------+
   
  A regular INSERT with a primary key value of 1 will fail,
  due to the existing key:
   
  INSERT INTO ins_duplicate VALUES (1,'Antelope');
  ERROR 1062 (23000): Duplicate entry '1' for key
  'PRIMARY'
   
  However, we can use an INSERT ON DUPLICATE KEY UPDATE
  instead:
   
  INSERT INTO ins_duplicate VALUES (1,'Antelope') ON
  DUPLICATE KEY UPDATE animal='Antelope';
  Query OK, 2 rows affected (0.09 sec)
   
  Note that there are two rows reported as affected, but this
  refers only to the UPDATE.
   
  SELECT * FROM ins_duplicate;
  +----+----------+
  | id | animal |
  +----+----------+
  | 1 | Antelope |
  | 2 | Cheetah |
  | 3 | Zebra |
  | 4 | Gorilla |
  +----+----------+
   
  Adding a second unique column:
   
  ALTER TABLE ins_duplicate ADD id2 INT;
  UPDATE ins_duplicate SET id2=id+10;
  ALTER TABLE ins_duplicate ADD UNIQUE KEY(id2);
   
  Where two rows match the unique keys match, only the first
  is updated. This can be unsafe and is not recommended unless
  you are certain what you are doing. Note that the warning
  shown below appears in MariaDB 5.5 and before, but has been
  removed in MariaDB 10.0, as MariaDB now assumes that the
  keys are checked in order, as shown in SHOW CREATE TABLE.
   
  INSERT INTO ins_duplicate VALUES (2,'Lion',13) ON
  DUPLICATE KEY UPDATE animal='Lion';
  Query OK, 2 rows affected, 1 warning (0.06 sec)
   
  SHOW WARNINGS;
  +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Level | Code | Message |
  +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Note | 1592 | Unsafe statement written to the binary log
  using statement format since BINLOG_FORMAT = STATEMENT.
  INSERT... ON DUPLICATE KEY UPDATE on a table with more than
  one UNIQUE KEY is unsafe |
  +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   
  SELECT * FROM ins_duplicate;
  +----+----------+------+
  | id | animal | id2 |
  +----+----------+------+
  | 1 | Antelope | 11 |
  | 2 | Lion | 12 |
  | 3 | Zebra | 13 |
  | 4 | Gorilla | 14 |
  +----+----------+------+
   
  Although the third row with an id of 3 has an id2 of 13,
  which also matched, it was not updated.
   
  Changing id to an auto_increment field. If a new row is
  added, the auto_increment is moved forward. If the row is
  updated, it remains the same.
   
  ALTER TABLE `ins_duplicate` CHANGE `id` `id` INT( 11 ) NOT
  NULL AUTO_INCREMENT;
  ALTER TABLE ins_duplicate DROP id2;
  SELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE
  TABLE_NAME='ins_duplicate';
  +----------------+
  | Auto_increment |
  +----------------+
  | 5 |
  +----------------+
   
  INSERT INTO ins_duplicate VALUES (2,'Leopard') ON
  DUPLICATE KEY UPDATE animal='Leopard';
  Query OK, 2 rows affected (0.00 sec)
   
  SELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE
  TABLE_NAME='ins_duplicate';
  +----------------+
  | Auto_increment |
  +----------------+
  | 5 |
  +----------------+
   
  INSERT INTO ins_duplicate VALUES (5,'Wild Dog') ON
  DUPLICATE KEY UPDATE animal='Wild Dog';
  Query OK, 1 row affected (0.09 sec)
   
  SELECT * FROM ins_duplicate;
  +----+----------+
  | id | animal |
  +----+----------+
  | 1 | Antelope |
  | 2 | Leopard |
  | 3 | Zebra |
  | 4 | Gorilla |
  | 5 | Wild Dog |
  +----+----------+
   
  SELECT Auto_increment FROM INFORMATION_SCHEMA.TABLES WHERE
  TABLE_NAME='ins_duplicate';
  +----------------+
  | Auto_increment |
  +----------------+
  | 6 |
  +----------------+
   
  Refering to column values from the INSERT portion of the
  statement: 
   
  INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6)
   ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);
   
  See the VALUES() function for more.
   


  URL:
  https://mariadb.com/kb/en/library/insert-on-duplicate-key-update/dzfxuxINSERT ON DUPLICATE KEY UPDATEdzfxuxhttps://mariadb.com/kb/en/library/insert-on-duplicate-key-update/dzfxuxdzfxux27dzfxux421qjzxqqvvbqDescription
  ----------- 
  MariaDB supports the following JOIN syntaxes for
  the table_references part of SELECT statements and
  multiple-table DELETE and UPDATE statements:
   
  table_references:
   table_reference [, table_reference] ...
   
  table_reference:
   table_factor
   | join_table
   
  table_factor:
   tbl_name [PARTITION (partition_list)]
   [query_system_time_period_specification] [[AS] alias]
  [index_hint_list]
   | table_subquery [query_system_time_period_specification]
  [AS] alias
   | ( table_references )
   | { ON table_reference LEFT OUTER JOIN table_reference
   ON conditional_expr }
   
  join_table:
   table_reference [INNER | CROSS] JOIN table_factor
  [join_condition]
   | table_reference STRAIGHT_JOIN table_factor
   | table_reference STRAIGHT_JOIN table_factor ON
  conditional_expr
   | table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference
  join_condition
   | table_reference NATURAL [{LEFT|RIGHT} [OUTER]] JOIN
  table_factor
   
  join_condition:
   ON conditional_expr
   | USING (column_list)
   
  query_system_time_period_specification:
   FOR SYSTEM_TIME AS OF point_in_time
   | FOR SYSTEM_TIME BETWEEN point_in_time AND point_in_time
   | FOR SYSTEM_TIME FROM point_in_time TO point_in_time
   | FOR SYSTEM_TIME ALL
   
  point_in_time:
   [TIMESTAMP] expression
   | TRANSACTION expression
   
  index_hint_list:
   index_hint [, index_hint] ...
   
  index_hint:
   USE {INDEX|KEY}
   [{FOR {JOIN|ORDER BY|GROUP BY}] ([index_list])
   | IGNORE {INDEX|KEY}
   [{FOR {JOIN|ORDER BY|GROUP BY}] (index_list)
   | FORCE {INDEX|KEY}
   [{FOR {JOIN|ORDER BY|GROUP BY}] (index_list)
   
  index_list:
   index_name [, index_name] ...
   
  A table reference is also known as a join expression.
   
  Each table can also be specified as db_name.tabl_name. This
  allows to write queries which involve multiple databases.
  See Identifier Qualifiers for syntax details.
   
  The syntax of table_factor is extended in comparison with
  the
  SQL Standard. The latter accepts only table_reference, not a
  list of them inside a pair of parentheses.
   
  This is a conservative extension if we consider each comma
  in a list of
  table_reference items as equivalent to an inner join. For
  example:
   
  SELECT * FROM t1 LEFT JOIN (t2, t3, t4)
   ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)
   
  is equivalent to:
   
  SELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)
   ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)
   
  In MariaDB, CROSS JOIN is a syntactic equivalent to
  INNER JOIN (they can replace each other). In standard SQL,
  they are not equivalent. INNER JOIN is used with an
  ON clause, CROSS JOIN is used otherwise.
   
  In general, parentheses can be ignored in join expressions
  containing only
  inner join operations. MariaDB also supports nested joins
  (see
  http://dev.mysql.com/doc/refman/5.1/en/nested-join-optimization.html).
   
  See System-versioned tables for more information
  about FOR SYSTEM_TIME syntax.
   
  Index hints can be specified to affect how the MariaDB
  optimizer makes
  use of indexes. For more information, see How to force query
  plans.
   
  Examples
  -------- 
  SELECT left_tbl.*
   FROM left_tbl LEFT JOIN right_tbl ON left_tbl.id =
  right_tbl.id
   WHERE right_tbl.id IS NULL;
   

   
   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/join-syntax/dzfxuxJOIN Syntaxdzfxuxhttps://mariadb.com/kb/en/library/join-syntax/dzfxuxdzfxux27dzfxux424qjzxqqvvbqSyntax
  ------ 
  LOAD XML [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE
  'file_name'
   [REPLACE | IGNORE]
   INTO TABLE [db_name.]tbl_name
   [CHARACTER SET charset_name]
   [ROWS IDENTIFIED BY '']
   [IGNORE number {LINES | ROWS}]
   [(column_or_user_var,...)]
   [SET col_name = expr,...]
   
  Description
  ----------- 
  The LOAD XML statement reads data from an XML file into a
  table. The
  file_name must be given as a literal string. The tagname in
  the
  optional ROWS IDENTIFIED BY clause must also be given as a
  literal
  string, and must be surrounded by angle brackets (< and >).
   
  LOAD XML acts as the complement of running the mysql client
  in XML
  output mode (that is, starting the client with the --xml
  option). To
  write data from a table to an XML file, use a command such
  as the
  following one from the system shell:
   
  shell> mysql --xml -e 'SELECT * FROM mytable' > file.xml
   
  To read the file back into a table, use LOAD XML INFILE. By
  default,
  the  element is considered to be the equivalent of a
  database
  table row; this can be changed using the ROWS IDENTIFIED BY
  clause.
   
  This statement supports three different XML formats:
  Column names as attributes and column values as attribute
  values:
   
  Column names as tags and column values as the content of
  these tags:
   
   value1
   value2
   
  Column names are the name attributes of  tags, and values
  are
   the contents of these tags:
   
   value1
   value2
   
   This is the format used by other tools, such as mysqldump.
   
  All 3 formats can be used in the same XML file; the import
  routine
  automatically detects the format for each row and interprets
  it
  correctly. Tags are matched based on the tag or attribute
  name and the
  column name.
   
  The following clauses work essentially the same way for LOAD
  XML as
  they do for LOAD DATA:
  LOW_PRIORITY or CONCURRENT
  LOCAL
  REPLACE or IGNORE
  CHARACTER SET
  (column_or_user_var,...)
  SET
   
  See LOAD DATA for more information about these clauses.
   
  The IGNORE number LINES or IGNORE number ROWS clause causes
  the first
  number rows in the XML file to be skipped. It is analogous
  to the LOAD
  DATA statement's IGNORE ... LINES clause.
   
  If the LOW_PRIORITY keyword is used, insertions are delayed
  until no other clients are reading from the table. The
  CONCURRENT keyword allowes the use of concurrent inserts.
  These clauses cannot be specified together.
   
  This statement activates INSERT triggers.
   


  URL: https://mariadb.com/kb/en/library/load-xml/dzfxuxLOAD XMLdzfxuxhttps://mariadb.com/kb/en/library/load-xml/dzfxuxdzfxux27dzfxux427qjzxqqvvbqDescription
  ----------- 
  Use the LIMIT clause to restrict the number of returned
  rows. When you use a single
  integer n with LIMIT, the first n rows will be returned. Use
  the ORDER BY
  clause to control which rows come first. You can also select
  a number of rows after an offset
  using either of the following:
   
  LIMIT offset, row_count
  LIMIT row_count OFFSET offset
   
  When you provide an offset m with a limit n, the first m
  rows will be ignored, and the
  following n rows will be returned.
   
  Executing an UPDATE with the LIMIT clause is not safe for
  replication.
   
  Since MariaDB 10.0.11, LIMIT 0 has been an exception to this
  rule (see MDEV-6170).
   
  Beginning in MariaDB 5.5.21, there is a LIMIT ROWS EXAMINED
  optimization which provides the
  means to terminate the execution of SELECT statements which
  examine too
  many rows, and thus use too many resources. See LIMIT ROWS
  EXAMINED.
   
  Multi-Table Updates
   
  Until MariaDB 10.3.1, it was not possible to use LIMIT (or
  ORDER BY) in a multi-table UPDATE statement. This
  restriction was lifted in MariaDB 10.3.2.
   
  GROUP_CONCAT
   
  Starting from MariaDB 10.3.3, it is possible to use LIMIT
  with GROUP_CONCAT().
   
  Examples
  -------- 
  CREATE TABLE members (name VARCHAR(20));
  INSERT INTO members
  VALUES('Jagdish'),('Kenny'),('Rokurou'),('Immaculada');
   
  SELECT * FROM members;
   
  +------------+
  | name |
  +------------+
  | Jagdish |
  | Kenny |
  | Rokurou |
  | Immaculada |
  +------------+
   
  Select the first two names (no ordering specified):
   
  SELECT * FROM members LIMIT 2;
   
  +---------+
  | name |
  +---------+
  | Jagdish |
  | Kenny |
  +---------+
   
  All the names in alphabetical order:
   
  SELECT * FROM members ORDER BY name;
   
  +------------+
  | name |
  +------------+
  | Immaculada |
  | Jagdish |
  | Kenny |
  | Rokurou |
  +------------+
   
  The first two names, ordered alphabetically:
   
  SELECT * FROM members ORDER BY name LIMIT 2;
   
  +------------+
  | name |
  +------------+
  | Immaculada |
  | Jagdish |
  +------------+
   
  The third name, ordered alphabetically (the first name would
  be offset zero, so the third is offset two):
   
  SELECT * FROM members ORDER BY name LIMIT 2,1;
   
  +-------+
  | name |
  +-------+
  | Kenny |
  +-------+
   
  From MariaDB 10.3.2, LIMIT can be used in a multi-table
  update:
   
  CREATE TABLE warehouse (product_id INT, qty INT);
  INSERT INTO warehouse VALUES
  (1,100),(2,100),(3,100),(4,100);
   
  CREATE TABLE store (product_id INT, qty INT);
  INSERT INTO store VALUES (1,5),(2,5),(3,5),(4,5);
   
  UPDATE warehouse,store SET warehouse.qty = warehouse.qty-2,
  store.qty = store.qty+2 
   WHERE (warehouse.product_id = store.product_id AND
  store.product_id >= 1) 
   ORDER BY store.product_id DESC LIMIT 2;
   
  SELECT * FROM warehouse;
   
  +------------+------+
  | product_id | qty |
  +------------+------+
  | 1 | 100 |
  | 2 | 100 |
  | 3 | 98 |
  | 4 | 98 |
  +------------+------+
   
  SELECT * FROM store;
   
  +------------+------+
  | product_id | qty |
  +------------+------+
  | 1 | 5 |
  | 2 | 5 |
  | 3 | 7 |
  | 4 | 7 |
  +------------+------+
   
  From MariaDB 10.3.3, LIMIT can be used with GROUP_CONCAT,
  so, for example, given the following table:
   
  CREATE TABLE d (dd DATE, cc INT);
   
  INSERT INTO d VALUES ('2017-01-01',1);
  INSERT INTO d VALUES ('2017-01-02',2);
  INSERT INTO d VALUES ('2017-01-04',3);
   
  the following query:
   
  SELECT SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(":",dd,cc)
  ORDER BY cc DESC),",",1) FROM d;
   
  +----------------------------------------------------------------------------+
  | SUBSTRING_INDEX(GROUP_CONCAT(CONCAT_WS(":",dd,cc) ORDER
  BY cc DESC),",",1) |
  +----------------------------------------------------------------------------+
  | 2017-01-04:3 |
  +----------------------------------------------------------------------------+
   
  can be more simply rewritten as:
   
  SELECT GROUP_CONCAT(CONCAT_WS(":",dd,cc) ORDER BY cc DESC
  LIMIT 1) FROM d;
   
  +-------------------------------------------------------------+
  | GROUP_CONCAT(CONCAT_WS(":",dd,cc) ORDER BY cc DESC LIMIT
  1) |
  +-------------------------------------------------------------+
  | 2017-01-04:3 |
  +-------------------------------------------------------------+
   


  URL: https://mariadb.com/kb/en/library/limit/dzfxuxLIMITdzfxuxhttps://mariadb.com/kb/en/library/limit/dzfxuxdzfxux27dzfxux425qjzxqqvvbqCommon Table Expressions (CTEs) are a standard SQL feature,
  and are essentially temporary named result sets. There are
  two kinds of CTEs: Non-Recursive, which this article covers;
  and Recursive.
   
  Common table expressions were introduced in MariaDB 10.2.1.
   
  Non-Recursive CTEs
   
  The WITH keyword signifies a CTE. It is given a name,
  followed by a body (the main query) as follows:
   
  CTEs are similar to derived tables. For example
   
  WITH engineers AS 
   ( SELECT * FROM employees
   WHERE dept = 'Engineering' )
   
  SELECT * FROM engineers
  WHERE ...
   
  SELECT * FROM
   ( SELECT * FROM employees
   WHERE dept = 'Engineering' ) AS engineers
  WHERE
  ...
   
  A non-recursive CTE is basically a query-local VIEW. There
  are several advantages and caveats to them. The syntax is
  more readable than nested FROM (SELECT ...).
  A CTE can refer to another and it can be referenced from
  multiple places.
   
  A CTE referencing Another CTE
   
  Using this format makes for a more readable SQL than a
  nested FROM(SELECT ...) clause. Below is an example of this:
   
  WITH engineers AS (
  SELECT * FROM employees
  WHERE dept IN('Development','Support') ),
  eu_engineers AS ( SELECT * FROM engineers WHERE country
  IN('NL',...) )
  SELECT
  ...
  FROM eu_engineers;
   
  Multiple Uses of a CTE
   
  This can be an 'anti-self join', for example:
   
  WITH engineers AS (
  SELECT * FROM employees
  WHERE dept IN('Development','Support') )
   
  SELECT * FROM engineers E1
  WHERE NOT EXISTS
   (SELECT 1 FROM engineers E2
   WHERE E2.country=E1.country
   AND E2.name  E1.name );
   
  Or, for year-over-year comparisons, for example:
   
  WITH sales_product_year AS (
  SELECT product, YEAR(ship_date) AS year,
  SUM(price) AS total_amt
  FROM item_sales
  GROUP BY product, year )
   
  SELECT *
  FROM sales_product_year CUR,
  sales_product_year PREV,
  WHERE CUR.product=PREV.product 
  AND CUR.year=PREV.year + 1 
  AND CUR.total_amt > PREV.total_amt
   
  Another use is to compare individuals against their group.
  Below is an example of how this might be executed:
   
  WITH sales_product_year AS (
  SELECT product,
  YEAR(ship_date) AS year,
  SUM(price) AS total_amt
  FROM item_sales
  GROUP BY product, year
  )
   
  SELECT * 
  FROM sales_product_year S1
  WHERE
  total_amt > 
   (SELECT 0.1 * SUM(total_amt)
   FROM sales_product_year S2
   WHERE S2.year = S1.year)
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/non-recursive-common-table-expressions-overview/dzfxuxNon-Recursive Common Table Expressions Overviewdzfxuxhttps://mariadb.com/kb/en/library/non-recursive-common-table-expressions-overview/dzfxuxdzfxux27dzfxux429qjzxqqvvbqSyntax
  ------ 
  LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE
  'file_name'
   [REPLACE | IGNORE]
   INTO TABLE tbl_name
   [CHARACTER SET charset_name]
   [{FIELDS | COLUMNS}
   [TERMINATED BY 'string']
   [[OPTIONALLY] ENCLOSED BY 'char']
   [ESCAPED BY 'char']
   ]
   [LINES
   [STARTING BY 'string']
   [TERMINATED BY 'string']
   ]
   [IGNORE number LINES]
   [(col_name_or_user_var,...)]
   [SET col_name = expr,...]
   
  Description
  ----------- 
  Reads rows from a text file into the designated table on the
  database at a very high speed. The file name must be given
  as a literal string. 
   
  Files are written to disk using the SELECT INTO OUTFILE
  statement. You can then read the files back into a table
  using the LOAD DATA INFILE statement. The FIELDS and LINES
  clauses are the same in both statements. These clauses are
  optional, but if both are specified then the FIELDS clause
  must precede LINES.
   
  In releases after MariaDB 5.5, LOAD DATA INFILE is unsafe
  for statement-based replication.
   
  Executing this statement activates INSERT triggers.
   
  REPLACE and IGNORE
   
  In cases where you load data from a file into a table that
  already contains data and has a Primary Key, you may
  encounter issues where the statement attempts to insert a
  row with a Primary Key that already exists. When this
  happens, the statement fails with Error 1064, protecting the
  data already on the table. In cases where you want MariaDB
  to overwrite duplicates, use the REPLACE keyword.
   
  The REPLACE keyword works like the REPLACE statement. Here,
  the statement attempts to load the data from the file. If
  the row does not exist, it adds it to the table. If the row
  contains an existing Primary Key, it replaces the table
  data. That is, in the event of a conflict, it assumes the
  file contains the desired row. 
   
  This operation can cause a degradation in load speed by a
  factor of 20 or more if the part that has already been
  loaded is larger than the capacity of the InnoDB Buffer
  Pool. This happens because it causes a lot of turnaround in
  the Buffer Pool.
   
  Use the IGNORE keyword when you want to skip any rows that
  contain a conflicting Primary Key. Here, the statement
  attempts to load the data from the file. If the row does not
  exist, it adds it to the table. If the row contains an
  existing Primary Key, it ignores the addition request and
  moves on to the next. That is, in the event of a conflict,
  it assumes the table contains the desired row.
   
  LOCAL
   
  When you issue this statement, the Server attempts to read
  files from the host file system. Using the LOCAL keyword,
  the statement instead attempts to read files from the
  client. This allows you to insert files from the client's
  local file system into the database.
   
  In the event that you don't want the server to permit this
  operation, (such as for security reasons), you can disable
  support using local_infile. When this system variable is set
  to 0, MariaDB rejects LOAD DATA LOCAL INFILE statements,
  failing with an error message.
   
  Character-sets
   
  When the statement opens the file, it attempts to read the
  contents using the default character-set, as defined by the
  character_set_database system variable. 
   
  In the cases where the file was written using a
  character-set other than the default, you can specify the
  character-set to use with the CHARACTER SET clause in the
  statement. It ignores character-sets specified by the SET
  NAMES statement and by the character_set_client system
  variable. Setting the CHARACTER SET clause to a value of
  binary indicates "no conversion."
   
  The statement interprets all fields in the file as having
  the same character-set, regardless of the column data type.
  To properly interpret file contents, you must ensure that it
  was written with the correct character-set. If you write a
  data file with mysqldump -T or with the SELECT INTO OUTFILE
  statement with the mysql client, be sure to use the
  --default-character-set option, so that the output is
  written with the desired character-set.
   
  When using mixed character sets, use the CHARACTER SET
  clause in both SELECT INTO OUTFILE and LOAD DATA INFILE to
  ensure that MariaDB correctly interprets the escape
  sequences.
   
  The character_set_filesystem system variable controls the
  interpretation of the filename.
   
  It is currently not possible to load data files that use the
  ucs2 character set.
   
  Priority and Concurrency
   
  In loading data from a file, there's a risk that the
  statement will attempt insertions concurrent with reads from
  another client, which can result in the read serving a
  result-set that contains only part of the update from the
  LOAD DATA INFILE statement.
   
  Using the LOW_PRIORITY keyword, MariaDB delays insertions
  until no other clients are reading from the table.
  Alternatively, you can use the CONCURRENT keyword to perform
  concurrent insertion.
   
  The LOW_PRIORITY and CONCURRENT keywords are mutually
  exclusive. They cannot be used in the same statement.
   
  Progress Reporting
   
  Since MariaDB 5.3, the LOAD DATA INFILE statement supports
  progress reporting. You may find this useful when dealing
  with long-running operations. Using another client you can
  issue a SHOW PROCESSLIST query to check the progress of the
  data load.
   
  Using mysqlimport
   
  MariaDB ships with a separate utility for loading data from
  files: mysqlimport. It operates by sending LOAD DATA INFILE
  statements to the server.
   
  Using mysqlimport you can compress the file using the
  --compress option, to get better performance over slow
  networks, providing both the client and server support the
  compressed protocol. Use the --local option to load from the
  local file system.
   
  Indexing
   
  In cases where the storage engine supports ALTER TABLE...
  DISABLE KEYS statements, the LOAD DATA INFILE statement
  automatically disables indexes during the execution.
   


  URL: https://mariadb.com/kb/en/library/load-data-infile/dzfxuxLOAD DATA INFILEdzfxuxhttps://mariadb.com/kb/en/library/load-data-infile/dzfxuxdzfxux27dzfxux426qjzxqqvvbqDescription
  ----------- 
  Use the ORDER BY clause to order a resultset, such as that
  are returned from a SELECT
  statement. You can specify just a column or use any
  expression with functions. If you are
  using the GROUP BY clause, you can use grouping functions in
  ORDER BY.
  Ordering is done after grouping.
   
  You can use multiple ordering expressions, separated by
  commas. Rows will be sorted by
  the first expression, then by the second expression if they
  have the same value for the
  first, and so on.
   
  You can use the keywords ASC and DESC after each ordering
  expression to
  force that ordering to be ascending or descending,
  respectively. Ordering is ascending
  by default.
   
  You can also use a single integer as the ordering
  expression. If you use an integer n,
  the results will be ordered by the nth column in the select
  expression.
   
  When string values are compared, they are compared as if by
  the STRCMP
  function. STRCMP ignores trailing whitespace and may
  normalize
  characters and ignore case, depending on the collation in
  use.
   
  Starting from MariaDB 5.5.35 duplicated entries in the ORDER
  BY clause are removed. MySQL 5.6 also removes duplicated
  fields.
   
  ORDER BY can also be used to order the activities of a
  DELETE or UPDATE statement (usually with the LIMIT clause). 
   
  Until MariaDB 10.3.1, it was not possible to use ORDER BY
  (or LIMIT) in a multi-table UPDATE statement. This
  restriction was lifted in MariaDB 10.3.2.
   
  Examples
  -------- 
  CREATE TABLE seq (i INT, x VARCHAR(1));
  INSERT INTO seq VALUES (1,'a'), (2,'b'), (3,'b'),
  (4,'f'), (5,'e');
   
  SELECT * FROM seq ORDER BY i;
   
  +------+------+
  | i | x |
  +------+------+
  | 1 | a |
  | 2 | b |
  | 3 | b |
  | 4 | f |
  | 5 | e |
  +------+------+
   
  SELECT * FROM seq ORDER BY i DESC;
   
  +------+------+
  | i | x |
  +------+------+
  | 5 | e |
  | 4 | f |
  | 3 | b |
  | 2 | b |
  | 1 | a |
  +------+------+
   
  SELECT * FROM seq ORDER BY x,i;
   
  +------+------+
  | i | x |
  +------+------+
  | 1 | a |
  | 2 | b |
  | 3 | b |
  | 5 | e |
  | 4 | f |
  +------+------+
   
  ORDER BY in an UPDATE statement, in conjunction with LIMIT:
   
  UPDATE seq SET x='z' WHERE x='b' ORDER BY i DESC LIMIT
  1;
   
  SELECT * FROM seq;
   
  +------+------+
  | i | x |
  +------+------+
  | 1 | a |
  | 2 | b |
  | 3 | z |
  | 4 | f |
  | 5 | e |
  +------+------+
   
  From MariaDB 10.3.2, ORDER BY can be used in a multi-table
  update:
   
  CREATE TABLE warehouse (product_id INT, qty INT);
  INSERT INTO warehouse VALUES
  (1,100),(2,100),(3,100),(4,100);
   
  CREATE TABLE store (product_id INT, qty INT);
  INSERT INTO store VALUES (1,5),(2,5),(3,5),(4,5);
   
  UPDATE warehouse,store SET warehouse.qty = warehouse.qty-2,
  store.qty = store.qty+2 
   WHERE (warehouse.product_id = store.product_id AND
  store.product_id >= 1) 
   ORDER BY store.product_id DESC LIMIT 2;
   
  SELECT * FROM warehouse;
   
  +------------+------+
  | product_id | qty |
  +------------+------+
  | 1 | 100 |
  | 2 | 100 |
  | 3 | 98 |
  | 4 | 98 |
  +------------+------+
   
  SELECT * FROM store;
   
  +------------+------+
  | product_id | qty |
  +------------+------+
  | 1 | 5 |
  | 2 | 5 |
  | 3 | 7 |
  | 4 | 7 |
  +------------+------+
   


  URL: https://mariadb.com/kb/en/library/order-by/dzfxuxORDER BYdzfxuxhttps://mariadb.com/kb/en/library/order-by/dzfxuxdzfxux27dzfxux430qjzxqqvvbqSyntax
  ------ 
  REPLACE [LOW_PRIORITY | DELAYED]
   [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]
   {VALUES | VALUE} ({expr | DEFAULT},...),(...),...
   
  Or:
   
  REPLACE [LOW_PRIORITY | DELAYED]
   [INTO] tbl_name [PARTITION (partition_list)]
   SET col={expr | DEFAULT}, ...
   
  Or:
   
  REPLACE [LOW_PRIORITY | DELAYED]
   [INTO] tbl_name [PARTITION (partition_list)] [(col,...)]
   SELECT ...
   
  Description
  ----------- 
   REPLACE works exactly like
   INSERT, except that if an old row in the table
   has the same value as a new row for a PRIMARY KEY or a
   UNIQUE index, the old row is deleted before the new row is
   inserted. If the table has more than one UNIQUE keys, it is
  possible that the new row conflicts with more than one row.
  In this case, all conflicting rows will be deleted.
   
  The table name can be specified in the form db_name.tbl_name
  or, if a default database is selected, in the form tbl_name
  (see Identifier Qualifiers). This allows to use REPLACE ...
  SELECT to copy rows between different databases.
   
  Basically it works like this:
   
  BEGIN;
  SELECT 1 FROM t1 WHERE key=# FOR UPDATE;
  IF found-row
   DELETE FROM t1 WHERE key=# ;
   INSERT INTO t1 VALUES (...);
  ENDIF
  END;
   
  The above can be replaced with:
   
  REPLACE INTO t1 VALUES (...)
   
   REPLACE is a MariaDB/MySQL extension to the SQL standard.
  It
   either inserts, or deletes and inserts. For other
  MariaDB/MySQL extensions to
   standard SQL --- that also handle duplicate values --- see
  IGNORE and INSERT ON DUPLICATE KEY UPDATE.
   
  Note that unless the table has a PRIMARY KEY or
   UNIQUE index, using a REPLACE statement
  makes no sense. It becomes equivalent to INSERT, because
  there is no index to be used to determine whether a new row
  duplicates another.
   
  Values for all columns are taken from the values specified
  in the
   REPLACE statement. Any missing columns are set to their
  default values, just as happens for INSERT. You cannot refer
  to values from the current row and use them in the new row.
  If you use an
  assignment such as 'SET col = col + 1', the
  reference to the column name on the right hand side is
  treated as
   DEFAULT(col), so the assignment is equivalent to
   'SET col = DEFAULT(col) + 1'.
   
  To use REPLACE, you must have both the
   INSERT and DELETE privileges
  for the table.
   
  There are some gotchas you should be aware of, before using
  REPLACE:
  If there is an AUTO_INCREMENT field, a new value will be
  generated.
  If there are foreign keys, ON DELETE action will be
  activated by REPLACE.
  Triggers on DELETE and INSERT will be activated by REPLACE.
   
  To avoid some of these behaviors, you can use INSERT ... ON
  DUPLICATE KEY UPDATE.
   
  The PARTITION clause was introduced in MariaDB 10.0. See
  Partition Pruning and Selection for details.
   
  This statement activates INSERT and DELETE triggers. See
  Trigger Overview for details.
   


  URL: https://mariadb.com/kb/en/library/replace/dzfxuxREPLACEdzfxuxhttps://mariadb.com/kb/en/library/replace/dzfxuxdzfxux27dzfxux433qjzxqqvvbqRecursive Common Table Expressions have been supported since
  MariaDB 10.2.2.
   
  Common Table Expressions (CTEs) are a standard SQL feature,
  and are essentially temporary named result sets. CTEs first
  appeared in the SQL standard in 1999, and the first
  implementations began appearing in 2007.
   
  There are two kinds of CTEs:
  Non-recursive
  Recursive, which this article covers.
   
  SQL is generally poor at recursive structures.
   
  CTEs permit a query to reference itself. A recursive CTE
  will repeatedly execute subsets of the data until it obtains
  the complete result set. This makes it particularly useful
  for handing hierarchical or tree-structured data.
   
  Syntax example
   
  WITH RECURSIVE signifies a recursive CTE. It is given a
  name, followed by a body (the main query) as follows:
   

  Computation
   
  Given the following structure:
   
  First execute the anchor part of the query:
   
  Next, execute the recursive part of the query:
   

   

  Summary so far
   
  with recursive R as (
   select anchor_data
   union [all]
   select recursive_part
   from R, ...
  )
  select ...
  Compute anchor_data
  Compute recursive_part to get the new data
  if (new data is non-empty) goto 2;
   
  CAST to avoid truncating data
   
  As currently implemented by MariaDB and by the SQL Standard,
  data may be truncated if not correctly cast. It is necessary
  to CAST the column to the correct width if the CTE's
  recursive part produces wider values for a column than the
  CTE's nonrecursive part. Some other DBMS give an error in
  this situation, and MariaDB's behavior may change in future
  - see MDEV-12325. See the examples below.
   
  Examples
  -------- 
  Transitive closure - determining bus destinations
   
  Sample data:
   
  CREATE TABLE bus_routes (origin varchar(50), dst
  varchar(50));
  INSERT INTO bus_routes VALUES 
   ('New York', 'Boston'), 
   ('Boston', 'New York'), 
   ('New York', 'Washington'), 
   ('Washington', 'Boston'), 
   ('Washington', 'Raleigh');
   
  Now, we want to return the bus destinations with New York as
  the origin:
   
  WITH RECURSIVE bus_dst as ( 
   SELECT origin as dst FROM bus_routes WHERE origin='New
  York' 
   UNION
   SELECT bus_routes.dst FROM bus_routes, bus_dst WHERE
  bus_dst.dst= bus_routes.origin 
  ) 
  SELECT * FROM bus_dst;
   
  +------------+
  | dst |
  +------------+
  | New York |
  | Boston |
  | Washington |
  | Raleigh |
  +------------+
   
  The above example is computed as follows:
   
  First, the anchor data is calculated:
  Starting from New York
  Boston and Washington are added
   
  Next, the recursive part:
  Starting from Boston and then Washington
  Raleigh is added
  UNION excludes nodes that are already present.
   
  Computing paths - determining bus routes
   
  This time, we are trying to get bus routes such as “New
  York -> Washington -> Raleigh”.
   
  Using the same sample data as the previous example:
   
  WITH RECURSIVE paths (cur_path, cur_dest) AS (
   SELECT origin, origin FROM bus_routes WHERE origin='New
  York' 
   UNION
   SELECT CONCAT(paths.cur_path, ',', bus_routes.dst),
  bus_routes.dst 
   FROM paths, bus_routes 
   WHERE paths.cur_dest = bus_routes.origin AND 
   LOCATE(bus_routes.dst, paths.cur_path)=0 
  ) 
  SELECT * FROM paths;
   
  +-----------------------------+------------+
  | cur_path | cur_dest |
  +-----------------------------+------------+
  | New York | New York |
  | New York,Boston | Boston |
  | New York,Washington | Washington |
  | New York,Washington,Boston | Boston |
  | New York,Washington,Raleigh | Raleigh |
  +-----------------------------+------------+
   
  CAST to avoid data truncation
   
  In the following example, data is truncated because the
  results are not specifically cast to a wide enough type:
   
  WITH RECURSIVE tbl AS (
   SELECT NULL AS col
   UNION
   SELECT "THIS NEVER SHOWS UP" AS col FROM tbl
  )
  +------+
  | col |
  +------+
  | NULL |
  | |
  +------+
   
  Explicitly use CAST to overcome this:
   
  WITH RECURSIVE tbl AS (
   SELECT CAST(NULL AS CHAR(50)) AS col
   UNION SELECT "THIS NEVER SHOWS UP" AS col FROM tbl
  ) 
  SELECT * FROM tbl;
   
  +---------------------+
  | col |
  +---------------------+
  | NULL |
  | THIS NEVER SHOWS UP |
  +---------------------+
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/recursive-common-table-expressions-overview/dzfxuxRecursive Common Table Expressions Overviewdzfxuxhttps://mariadb.com/kb/en/library/recursive-common-table-expressions-overview/dzfxuxdzfxux27dzfxux432qjzxqqvvbqSyntax
  ------ 
  SELECT ... INTO DUMPFILE 'file_path'
   
  Description
  ----------- 
  SELECT ... INTO DUMPFILE is a SELECT clause which writes the
  resultset into a single unformatted row, without any
  separators, in a file. The results will not be returned to
  the client.
   
  file_path can be an absolute path, or a relative path
  starting from the data directory. It can only be specified
  as a string literal, not as a variable. However, the
  statement can be dynamically composed and executed as a
  prepared statement to work around this limitation.
   
  This statement is binary-safe and so is particularly useful
  for writing BLOB values to file. It can be used, for
  example, to copy an image or an audio document from the
  database to a file. SELECT ... INTO FILE can be used to save
  a text file.
   
  The file must not exist. It cannot be overwritten. A user
  needs the FILE privilege to run this statement. Also,
  MariaDB needs permission to write files in the specified
  location. If the secure_file_priv system variable is set to
  a non-empty directory name, the file can only be written to
  that directory.
   
  Since MariaDB 5.1, the character_set_filesystem system
  variable has controlled interpretation of file names that
  are given as literal strings.
   
  Example
   
  SELECT _utf8'Hello world!' INTO DUMPFILE '/tmp/world';
   
  SELECT LOAD_FILE('/tmp/world') AS world;
   
  +--------------+
  | world |
  +--------------+
  | Hello world! |
  +--------------+
   


  URL: https://mariadb.com/kb/en/library/select-into-dumpfile/dzfxuxSELECT INTO DUMPFILEdzfxuxhttps://mariadb.com/kb/en/library/select-into-dumpfile/dzfxuxdzfxux27dzfxux435qjzxqqvvbqSyntax
  ------ 
  SELECT
   [ALL | DISTINCT | DISTINCTROW]
   [HIGH_PRIORITY]
   [STRAIGHT_JOIN]
   [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
   [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
   select_expr [, select_expr ...]
   [ FROM table_references
   [WHERE where_condition]
   [GROUP BY {col_name | expr | position} [ASC | DESC], ...
  [WITH ROLLUP]]
   [HAVING where_condition]
   [ORDER BY {col_name | expr | position} [ASC | DESC], ...]
   [LIMIT {[offset,] row_count | row_count OFFSET offset}]
   [PROCEDURE procedure_name(argument_list)]
   [INTO OUTFILE 'file_name' [CHARACTER SET charset_name]
  [export_options]
   
  INTO DUMPFILE 'file_name' | INTO var_name [, var_name] ] |

   
   [[FOR UPDATE | LOCK IN SHARE MODE] [WAIT n | NOWAIT] ] ]
   
  export_options:
   [{FIELDS | COLUMNS}
   [TERMINATED BY 'string']
   [[OPTIONALLY] ENCLOSED BY 'char']
   [ESCAPED BY 'char']
   ]
   [LINES
   [STARTING BY 'string']
   [TERMINATED BY 'string']
   ]
   
  Description
  ----------- 
  SELECT is used to retrieve rows selected from one or more
  tables, and can include UNION statements and subqueries.
  Each select_expr expression indicates a column or data that
  you want to retrieve. You
  must have at least one select expression. See Select
  Expressions below.
   
  The FROM clause indicates the table or tables from which to
  retrieve rows.
  Use either a single table name or a JOIN expression. See
  JOIN
  for details. If no table is involved, FROM DUAL can be
  specified.
   
  The PARTITION clause was introduced in MariaDB 10.0. See
  Partition Pruning and Selection for details.
  Each table can also be specified as db_name.tabl_name. Each
  column can also be specified as tbl_name.col_name or even
  db_name.tbl_name.col_name. This allows to write queries
  which involve multiple databases. See Identifier Qualifiers
  for syntax details.
   
  The WHERE clause, if given, indicates the condition or
   conditions that rows must satisfy to be selected.
   where_condition is an expression that evaluates to true for
   each row to be selected. The statement selects all rows if
  there is no WHERE
   clause.
  In the WHERE clause, you can use any of the functions and
   operators that MariaDB supports, except for aggregate
  (summary) functions. See Functions and Operators and
  Functions and Modifiers for use with GROUP BY (aggregate).
   
  Use the ORDER BY clause to order the results.
   
  Use the LIMIT clause allows you to restrict the results to
  only
  a certain number of rows, optionally with an offset.
   
  Use the GROUP BY and HAVING clauses to group
  rows together when they have columns or computed values in
  common.
   
  SELECT can also be used to retrieve rows computed without
  reference to
  any table.
   
  Select Expressions
   
  A SELECT statement must contain one or more select
  expressions, separated
  by commas. Each select expression can be one of the
  following:
  The name of a column.
  Any expression using functions and operators.
  * to select all columns from all tables in the FROM clause.
  tbl_name.* to select all columns from just the table
  tbl_name.
   
  When specifying a column, you can either use just the column
  name or qualify the column
  name with the name of the table using tbl_name.col_name. The
  qualified form is
  useful if you are joining multiple tables in the FROM
  clause. If you do not qualify the
  column names when selecting from multiple tables, MariaDB
  will try to find the column in
  each table. It is an error if that column name exists in
  multiple tables.
   
  You can quote column names using backticks. If you are
  qualifying column names
  with table names, quote each part separately as
  `tbl_name`.`col_name`.
   
  If you use any grouping functions
  in any of the select expressions, all rows in your results
  will be implicitly grouped, as if
  you had used GROUP BY NULL.
   
  DISTINCT
   
  A query may produce some identical rows. By default, all
  rows are retrieved, even when their values are the same. To
  explicitly specify that you want to retrieve identical rows,
  use the ALL option. If you want duplicates to be removed
  from the resultset, use the DISTINCT option. DISTINCTROW is
  a synonym for DISTINCT. See also COUNT DISTINCT and SELECT
  UNIQUE in Oracle mode.
   
  INTO
   
  The INTO clause is used to specify that the query results
  should be written to a file or variable.
  SELECT INTO OUTFILE - formatting and writing the result to
  an external file.
  SELECT INTO DUMPFILE - binary-safe writing of the
  unformatted results to an external file.
  SELECT INTO Variable - selecting and setting variables.
   
  The reverse of SELECT INTO OUTFILE is LOAD DATA.
   
  WAIT/NOWAIT
   
  Set the lock wait timeout. See WAIT and NOWAIT.
   

  max_statement_time clause
   
  By using max_statement_time in conjunction with SET
  STATEMENT, it is possible to limit the execution time of
  individual queries. For example:
   
  SET STATEMENT max_statement_time=100 FOR 
   SELECT field1 FROM table_name ORDER BY field1;
   


  URL: https://mariadb.com/kb/en/library/select/dzfxuxSELECTdzfxuxhttps://mariadb.com/kb/en/library/select/dzfxuxdzfxux27dzfxux434qjzxqqvvbqSyntax
  ------ 
  SELECT ... INTO OUTFILE 'file_name'
   [CHARACTER SET charset_name]
   [export_options]
   
  export_options:
   [{FIELDS | COLUMNS}
   [TERMINATED BY 'string']
   [[OPTIONALLY] ENCLOSED BY 'char']
   [ESCAPED BY 'char']
   ]
   [LINES
   [STARTING BY 'string']
   [TERMINATED BY 'string']
   ]
   
  Description
  ----------- 
  SELECT INTO OUTFILE writes the resulting rows to a file, and
  allows the use of column and row terminators to specify a
  particular output format. The default is to terminate fields
  with tabs (\t) and lines with newlines (\n).
   
  The file must not exist. It cannot be overwritten. A user
  needs the FILE privilege to run this statement. Also,
  MariaDB needs permission to write files in the specified
  location. If the secure_file_priv system variable is set to
  a non-empty directory name, the file can only be written to
  that directory.
   
  The LOAD DATA INFILE statement complements SELECT INTO
  OUTFILE.
   
  Character-sets
   
  The CHARACTER SET clause specifies the character set in
  which the results are to be written. Without the clause, no
  conversion takes place (the binary character set). In this
  case, if there are multiple character sets, the output will
  contain these too, and may not easily be able to be
  reloaded.
   
  In cases where you have two servers using different
  character-sets, using SELECT INTO OUTFILE to transfer data
  from one to the other can have unexpected results. To ensure
  that MariaDB correctly interprets the escape sequences, use
  the CHARACTER SET clause on both the SELECT INTO OUTFILE
  statement and the subsequent LOAD DATA INFILE statement.
   
  Example
   
  The following example produces a file in the CSV format:
   
  SELECT customer_id, firstname, surname INTO OUTFILE
  '/exportdata/customers.txt'
   FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
   LINES TERMINATED BY '\n'
   FROM customers;
   


  URL: https://mariadb.com/kb/en/library/select-into-outfile/dzfxuxSELECT INTO OUTFILEdzfxuxhttps://mariadb.com/kb/en/library/select-into-outfile/dzfxuxdzfxux27dzfxux436qjzxqqvvbqSyntax
  ------ 
  See SELECT for the full syntax.
   
  Description
  ----------- 
  The WITH ROLLUP modifier adds extra rows to the resultset
  that represent super-aggregate summaries. The
  super-aggregated column is represented by a NULL value.
  Multiple aggregates over different columns will be added if
  there are multiple GROUP BY columns.
   
  The LIMIT clause can be used at the same time, and is
  applied after the WITH ROLLUP rows have been added.
   
  WITH ROLLUP cannot be used with ORDER BY. Some sorting is
  still possible by using ASC or DESC clauses with the GROUP
  BY column, although the super-aggregate rows will always be
  added last.
   
  Examples
  -------- 
  These examples use the following sample table
   
  CREATE TABLE booksales ( 
   country VARCHAR(35), genre
  ENUM('fiction','non-fiction'), year YEAR, sales INT);
   
  INSERT INTO booksales VALUES
   ('Senegal','fiction',2014,12234),
  ('Senegal','fiction',2015,15647),
   ('Senegal','non-fiction',2014,64980),
  ('Senegal','non-fiction',2015,78901),
   ('Paraguay','fiction',2014,87970),
  ('Paraguay','fiction',2015,76940),
   ('Paraguay','non-fiction',2014,8760),
  ('Paraguay','non-fiction',2015,9030);
   
  The addition of the WITH ROLLUP modifier in this example
  adds an extra row that aggregates both years:
   
  SELECT year, SUM(sales) FROM booksales GROUP BY year;
   
  +------+------------+
  | year | SUM(sales) |
  +------+------------+
  | 2014 | 173944 |
  | 2015 | 180518 |
  +------+------------+
  2 rows in set (0.08 sec)
   
  SELECT year, SUM(sales) FROM booksales GROUP BY year WITH
  ROLLUP;
   
  +------+------------+
  | year | SUM(sales) |
  +------+------------+
  | 2014 | 173944 |
  | 2015 | 180518 |
  | NULL | 354462 |
  +------+------------+
   
  In the following example, each time the genre, the year or
  the country change, another super-aggregate row is added:
   
  SELECT country, year, genre, SUM(sales) 
   FROM booksales GROUP BY country, year, genre;
   
  +----------+------+-------------+------------+
  | country | year | genre | SUM(sales) |
  +----------+------+-------------+------------+
  | Paraguay | 2014 | fiction | 87970 |
  | Paraguay | 2014 | non-fiction | 8760 |
  | Paraguay | 2015 | fiction | 76940 |
  | Paraguay | 2015 | non-fiction | 9030 |
  | Senegal | 2014 | fiction | 12234 |
  | Senegal | 2014 | non-fiction | 64980 |
  | Senegal | 2015 | fiction | 15647 |
  | Senegal | 2015 | non-fiction | 78901 |
  +----------+------+-------------+------------+
   
  SELECT country, year, genre, SUM(sales) 
   FROM booksales GROUP BY country, year, genre WITH ROLLUP;
   
  +----------+------+-------------+------------+
  | country | year | genre | SUM(sales) |
  +----------+------+-------------+------------+
  | Paraguay | 2014 | fiction | 87970 |
  | Paraguay | 2014 | non-fiction | 8760 |
  | Paraguay | 2014 | NULL | 96730 |
  | Paraguay | 2015 | fiction | 76940 |
  | Paraguay | 2015 | non-fiction | 9030 |
  | Paraguay | 2015 | NULL | 85970 |
  | Paraguay | NULL | NULL | 182700 |
  | Senegal | 2014 | fiction | 12234 |
  | Senegal | 2014 | non-fiction | 64980 |
  | Senegal | 2014 | NULL | 77214 |
  | Senegal | 2015 | fiction | 15647 |
  | Senegal | 2015 | non-fiction | 78901 |
  | Senegal | 2015 | NULL | 94548 |
  | Senegal | NULL | NULL | 171762 |
  | NULL | NULL | NULL | 354462 |
  +----------+------+-------------+------------+
   
  The LIMIT clause, applied after WITH ROLLUP:
   
  SELECT country, year, genre, SUM(sales) 
   FROM booksales GROUP BY country, year, genre WITH ROLLUP
  LIMIT 4;
   
  +----------+------+-------------+------------+
  | country | year | genre | SUM(sales) |
  +----------+------+-------------+------------+
  | Paraguay | 2014 | fiction | 87970 |
  | Paraguay | 2014 | non-fiction | 8760 |
  | Paraguay | 2014 | NULL | 96730 |
  | Paraguay | 2015 | fiction | 76940 |
  +----------+------+-------------+------------+
   
  Sorting by year descending:
   
  SELECT country, year, genre, SUM(sales) 
   FROM booksales GROUP BY country, year DESC, genre WITH
  ROLLUP;
   
  +----------+------+-------------+------------+
  | country | year | genre | SUM(sales) |
  +----------+------+-------------+------------+
  | Paraguay | 2015 | fiction | 76940 |
  | Paraguay | 2015 | non-fiction | 9030 |
  | Paraguay | 2015 | NULL | 85970 |
  | Paraguay | 2014 | fiction | 87970 |
  | Paraguay | 2014 | non-fiction | 8760 |
  | Paraguay | 2014 | NULL | 96730 |
  | Paraguay | NULL | NULL | 182700 |
  | Senegal | 2015 | fiction | 15647 |
  | Senegal | 2015 | non-fiction | 78901 |
  | Senegal | 2015 | NULL | 94548 |
  | Senegal | 2014 | fiction | 12234 |
  | Senegal | 2014 | non-fiction | 64980 |
  | Senegal | 2014 | NULL | 77214 |
  | Senegal | NULL | NULL | 171762 |
  | NULL | NULL | NULL | 354462 |
  +----------+------+-------------+------------+
   


  URL: https://mariadb.com/kb/en/library/select-with-rollup/dzfxuxSELECT WITH ROLLUPdzfxuxhttps://mariadb.com/kb/en/library/select-with-rollup/dzfxuxdzfxux27dzfxux437qjzxqqvvbqUNION is used to combine the results from multiple SELECT
  statements into a single result set.
   
  Syntax
  ------ 
  SELECT ...
  UNION [ALL | DISTINCT] SELECT ...
  [UNION [ALL | DISTINCT] SELECT ...]
  [ORDER BY [column [, column ...]]]
  [LIMIT {[offset,] row_count | row_count OFFSET offset}]
   
  Description
  ----------- 
  UNION is used to combine the results from multiple SELECT
  statements into a single result set.
   
  The column names from the first SELECT statement are used as
  the column names for the results returned. Selected columns
  listed in corresponding positions of each SELECT statement
  should have the same data type. (For example, the first
  column selected by the first statement should have the same
  type as the first column selected by the other statements.)
   
  If they don't, the type and length of the columns in the
  result take into account the values returned by all of the
  SELECTs, so there is no need for explicit casting. Note that
  currently this is not the case for recursive CTEs - see
  MDEV-12325.
   
  Table names can be specified as db_name.tbl_name. This
  permits writing UNIONs which involve multiple databases. See
  Identifier Qualifiers for syntax details.
   
  UNION queries cannot be used with aggregate functions.
   
  ALL/DISTINCT
   
  The ALL keyword causes duplicate rows to be preserved. The
  DISTINCT keyword (the default if the keyword is omitted)
  causes duplicate rows to be removed by the results.
   
  UNION ALL and UNION DISTINCT can both be present in a query.
  In this case, UNION DISTINCT will override any UNION ALLs to
  its left.
   
  Until MariaDB 10.1.1, all UNION ALL statements required the
  server to create a temporary table. Since MariaDB 10.1.1,
  the server can in most cases execute UNION ALL without
  creating a temporary table, improving performance (see
  MDEV-334).
   
  ORDER BY and LIMIT
   
  Individual SELECTs can contain their own ORDER BY and LIMIT
  clauses. In this case, the individual queries need to be
  wrapped between parentheses. However, this does not affect
  the order of the UNION, so they only are useful to limit the
  record read by one SELECT.
   
  The UNION can have global ORDER BY and LIMIT clauses, which
  affect the whole resultset. If the columns retrieved by
  individual SELECT statements have an alias (AS), the ORDER
  BY must use that alias, not the real column names.
   
  HIGH_PRIORITY
   
  Specifying a query as HIGH_PRIORITY will not work inside a
  UNION. If applied to the first SELECT, it will be ignored.
  Applying to a later SELECT results in a syntax error:
   
  ERROR 1234 (42000): Incorrect usage/placement of
  'HIGH_PRIORITY'
   
  SELECT ... INTO ...
   
  Individual SELECTs cannot be written INTO DUMPFILE or INTO
  OUTFILE. If the last SELECT statement specifies INTO
  DUMPFILE or INTO OUTFILE, the entire result of the UNION
  will be written. Placing the clause after any other SELECT
  will result in a syntax error.
   
  If the result is a single row, SELECT ... INTO @var_name can
  also be used.
   

  Parentheses
   
  From MariaDB 10.4.0, parentheses can be used to specify
  precedence. Before this, a syntax error would be returned.
   
  Examples
  -------- 
  UNION between tables having different column names:
   
  (SELECT e_name AS name, email FROM employees)
  UNION
  (SELECT c_name AS name, email FROM customers);
   
  Specifying the UNION's global order and limiting total
  rows:
   
  (SELECT name, email FROM employees)
  UNION
  (SELECT name, email FROM customers)
  ORDER BY name LIMIT 10;
   
  Adding a constant row:
   
  (SELECT 'John Doe' AS name, 'john.doe@example.net' AS
  email)
  UNION
  (SELECT name, email FROM customers);
   
  Differing types:
   
  SELECT CAST('x' AS CHAR(1)) UNION SELECT REPEAT('y',4);
  +----------------------+
  | CAST('x' AS CHAR(1)) |
  +----------------------+
  | x |
  | yyyy |
  +----------------------+
   
  Returning the results in order of each individual SELECT by
  use of a sort column:
   
  (SELECT 1 AS sort_column, e_name AS name, email FROM
  employees)
  UNION
  (SELECT 2, c_name AS name, email FROM customers) ORDER BY
  sort_column;
   
  Difference between UNION, EXCEPT and INTERSECT:
   
  CREATE TABLE seqs (i INT);
  INSERT INTO seqs VALUES (1),(2),(3),(4),(5),(6);
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 1 |
  | 2 |
  | 3 |
  | 4 |
  | 5 |
  | 6 |
  +------+
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 1 |
  | 2 |
  +------+
   
  SELECT i FROM seqs WHERE i =3;
   
  +------+
  | i |
  +------+
  | 3 |
  +------+
   
  Parentheses for specifying precedence, from MariaDB 10.4.0
   
  CREATE OR REPLACE TABLE t1 (a INT);
  CREATE OR REPLACE TABLE t2 (b INT);
  CREATE OR REPLACE TABLE t3 (c INT);
   
  INSERT INTO t1 VALUES (1),(2),(3),(4);
  INSERT INTO t2 VALUES (5),(6);
  INSERT INTO t3 VALUES (1),(6);
   
  ((SELECT a FROM t1) UNION (SELECT b FROM t2)) INTERSECT
  (SELECT c FROM t3);
  +------+
  | a |
  +------+
  | 1 |
  | 6 |
  +------+
   
  (SELECT a FROM t1) UNION ((SELECT b FROM t2) INTERSECT
  (SELECT c FROM t3));
  +------+
  | a |
  +------+
  | 1 |
  | 2 |
  | 3 |
  | 4 |
  | 6 |
  +------+
   


  URL: https://mariadb.com/kb/en/library/union/dzfxuxUNIONdzfxuxhttps://mariadb.com/kb/en/library/union/dzfxuxdzfxux27dzfxux438qjzxqqvvbqSyntax
  ------ 
  Single-table syntax:
   
  UPDATE [LOW_PRIORITY] [IGNORE] table_reference 
   [PARTITION (partition_list)]
   SET col1={expr1|DEFAULT} [,col2={expr2|DEFAULT}] ...
   [WHERE where_condition]
   [ORDER BY ...]
   [LIMIT row_count]
   
  Multiple-table syntax:
   
  UPDATE [LOW_PRIORITY] [IGNORE] table_references
   SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...
   [WHERE where_condition]
   
  Description
  ----------- 
  For the single-table syntax, the UPDATE statement updates
  columns of existing rows in the named table with new values.
  The
  SET clause indicates which columns to modify and the values
  they should be given. Each value can be given as an
  expression, or the keyword
  DEFAULT to set a column explicitly to its default value. The
  WHERE clause, if given, specifies the conditions that
  identify
  which rows to update. With no WHERE clause, all rows are
  updated. If the ORDER BY clause is specified, the rows are
  updated in the order that is specified. The LIMIT clause
  places a limit on the number of rows that can be updated.
   
  The PARTITION clause was introduced in MariaDB 10.0. See
  Partition Pruning and Selection for details.
   
  Until MariaDB 10.3.2, for the multiple-table syntax, UPDATE
  updates rows in each
  table named in table_references that satisfy the conditions.
  In this case,
  ORDER BY and LIMIT cannot be used. This restriction was
  lifted in MariaDB 10.3.2 and both clauses can be used with
  multiple-table updates. An UPDATE can also reference tables
  which are located in different databases; see Identifier
  Qualifiers for the syntax.
   
  where_condition is an expression that evaluates to true for
  each row to be updated.
   
  table_references and where_condition are as
  specified as described in SELECT.
   
  Assignments are evaluated in left-to-right order, unless the
  SIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB
  10.3.5) is set, in which case the UPDATE statement evaluates
  all assignments simultaneously. 
   
  You need the UPDATE privilege only for columns referenced in
  an UPDATE that are actually updated. You need only the
  SELECT privilege for any columns that are read but
  not modified. See GRANT.
   
  The UPDATE statement supports the following modifiers:
  If you use the LOW_PRIORITY keyword, execution of
   the UPDATE is delayed until no other clients are reading
  from
   the table. This affects only storage engines that use only
  table-level
   locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and
  LOW_PRIORITY clauses for details.
  If you use the IGNORE keyword, the update statement does 
   not abort even if errors occur during the update. Rows for
  which
   duplicate-key conflicts occur are not updated. Rows for
  which columns are
   updated to values that would cause data conversion errors
  are updated to the
   closest valid values instead.
   
  UPDATE Statements With the Same Source and Target
   
  From MariaDB 10.3.2, UPDATE statements may have the same
  source and target.
   
  For example, given the following table:
   
  DROP TABLE t1;
   
  CREATE TABLE t1 (c1 INT, c2 INT);
  INSERT INTO t1 VALUES (10,10), (20,20);
   
  Until MariaDB 10.3.1, the following UPDATE statement would
  not work:
   
  UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
  ERROR 1093 (HY000): Table 't1' is specified twice, 
   both as a target for 'UPDATE' and as a separate source
  for data
   
  From MariaDB 10.3.2, the statement executes successfully:
   
  UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
   
  SELECT * FROM t1;
   
  +------+------+
  | c1 | c2 |
  +------+------+
  | 10 | 10 |
  | 21 | 20 |
  +------+------+
   
  Example
   
  Single-table syntax:
   
  UPDATE table_name SET column1 = value1, column2 = value2
  WHERE id=100;
   
  Multiple-table syntax:
   
  UPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 =
  value2 WHERE tab1.id = tab2.id;
   


  URL: https://mariadb.com/kb/en/library/update/dzfxuxUPDATEdzfxuxhttps://mariadb.com/kb/en/library/update/dzfxuxdzfxux27dzfxux439qjzxqqvvbqThe WITH keyword signifies a Common Table Expression (CTE).
  It allows you to refer to a subquery expression many times
  in a query, as if having a temporary table that only exists
  for the duration of a query.
   
  There are two kinds of CTEs:
  Non-Recursive
  Recursive
   
  Common Table Expression WITH was introduced in MariaDB
  10.2.1.
   
  Recursive WITH has been supported since MariaDB 10.2.2.
   
  Syntax
  ------ 
  WITH [RECURSIVE] table_reference as (SELECT ...)
   SELECT ...
   
  You can use table_reference as any normal table in the
  external SELECT part. You can also use WITH in sub queries.
  WITH can also be used with EXPLAIN and SELECT.
   
  Below is an example with the WITH at the top level:
   
  WITH t AS (SELECT a FROM t1 WHERE b >= 'c') 
   SELECT * FROM t2, t WHERE t2.c = t.a;
   
  The example below uses WITH in a subquery:
   
  SELECT t1.a, t1.b FROM t1, t2
   WHERE t1.a > t2.c 
   AND t2.c IN(WITH t AS (SELECT * FROM t1 WHERE t1.a 

  URL: https://mariadb.com/kb/en/library/with/dzfxuxWITHdzfxuxhttps://mariadb.com/kb/en/library/with/dzfxuxdzfxux27dzfxux440qjzxqqvvbqSyntax
  ------ 
  {DESCRIBE | DESC} tbl_name [col_name | wild]
   
  Description
  ----------- 
  DESCRIBE provides information about the columns in a table.
  It is a shortcut for SHOW COLUMNS FROM.
  These statements also display information for views.
   
  col_name can be a column name, or a string containing the
  SQL "%" and "_" wildcard characters to
  obtain output only for the columns with names matching the
  string. There is no
  need to enclose the string within quotes unless it contains
  spaces or other
  special characters.
   
  DESCRIBE city;
   
  +------------+----------+------+-----+---------+----------------+
  | Field | Type | Null | Key | Default | Extra |
  +------------+----------+------+-----+---------+----------------+
  | Id | int(11) | NO | PRI | NULL | auto_increment |
  | Name | char(35) | YES | | NULL | |
  | Country | char(3) | NO | UNI | | |
  | District | char(20) | YES | MUL | | |
  | Population | int(11) | YES | | NULL | |
  +------------+----------+------+-----+---------+----------------+
   
  The description for SHOW COLUMNS provides
  more information about the output columns.
   


  URL: https://mariadb.com/kb/en/library/describe/dzfxuxDESCRIBEdzfxuxhttps://mariadb.com/kb/en/library/describe/dzfxuxdzfxux28dzfxux441qjzxqqvvbqANALYZE FORMAT=JSON is a mix of the EXPLAIN FORMAT=JSON and
  ANALYZE statement features. ANALYZE FORMAT=JSON $statement
  will execute $statement, and then print the output of
  EXPLAIN FORMAT=JSON, amended with the data from query
  execution.
   
  Basic Execution Data
   
  You can get the following also from tabular ANALYZE
  statement form:
  r_rows is provided for any node that reads rows. It shows
  how many rows were read, on average 
  r_filtered is provided whenever there is a condition that is
  checked. It shows the percentage of rows left after checking
  the condition.
   
  Advanced Execution Data
   
  The most important data that is not available in tabula
  ANALYZE statement are:
  r_loops field. This shows how many times the node was
  executed. Most query plan elements have this field.
  r_total_time_ms field. It shows how much time in total was
  spent executing this node. If the node has subnodes, their
  execution time is included.
  r_buffer_size field. Query plan nodes that make use of
  buffers report the size of buffer that was was used.
   
  Data About Individual Query Plan Nodes
   
  filesort node reports whether sorting was done with LIMIT n
  parameter, and how many rows were in the sort result. 
  block-nl-join node has r_loops field, which allows to tell
  whether Using join buffer was efficient 
  range-checked-for-each-record reports counters that show the
  result of the check. 
  expression-cache is used for subqueries, and it reports how
  many times the cache was used, and what cache hit ratio was.
  union_result node has r_rows so one can see how many rows
  were produced after UNION operation
  and so forth
   
  Use Cases
   
  See Examples of ANALYZE FORMAT=JSON.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/analyze-format-json/dzfxuxANALYZE FORMAT=JSONdzfxuxhttps://mariadb.com/kb/en/library/analyze-format-json/dzfxuxdzfxux28dzfxux444qjzxqqvvbqExample #1
   
  Customers who have ordered more than 1M goods.
   
  ANALYZE FORMAT=JSON
  SELECT CONT(*)
  FROM customer
  WHERE
   (SELECT SUM(o_totalprice) FROM orders WHERE
  o_custkey=c_custkey) > 1000*1000;
   
  The query takes 40 seconds over cold cache
   
  EXPLAIN: {
   "query_block": {
   "select_id": 1,
   "r_loops": 1,
   "r_total_time_ms": 39872,
   "table": {
   "table_name": "customer",
   "access_type": "index",
   "key": "i_c_nationkey",
   "key_length": "5",
   "used_key_parts": ["c_nationkey"],
   "r_loops": 1,
   "rows": 150303,
   "r_rows": 150000,
   "r_total_time_ms": 270.3,
   "filtered": 100,
   "r_filtered": 60.691,
   "attached_condition": "((subquery#2) > ((1000 *
  1000)))",
   "using_index": true
   },
   "subqueries": [
   {
   "query_block": {
   "select_id": 2,
   "r_loops": 150000,
   "r_total_time_ms": 39531,
   "table": {
   "table_name": "orders",
   "access_type": "ref",
   "possible_keys": ["i_o_custkey"],
   "key": "i_o_custkey",
   "key_length": "5",
   "used_key_parts": ["o_custkey"],
   "ref": ["dbt3sf1.customer.c_custkey"],
   "r_loops": 150000,
   "rows": 7,
   "r_rows": 10,
   "r_total_time_ms": 39208,
   "filtered": 100,
   "r_filtered": 100
   }
   }
   }
   ]
   }
  }
  ANALYZE shows that 39.2 seconds were spent in the subquery,
  which was executed 150K times (for every row of outer
  table).
   

   
   
   
   
   
   
   

  URL:
  https://mariadb.com/kb/en/library/analyze-formatjson-examples/dzfxuxANALYZE FORMAT=JSON Examplesdzfxuxhttps://mariadb.com/kb/en/library/analyze-formatjson-examples/dzfxuxdzfxux28dzfxux445qjzxqqvvbqSyntax
  ------ 
  Crosses(g1,g2)
   
  Description
  ----------- 
  Returns 1 if g1 spatially crosses g2. Returns NULL if g1 is
  a Polygon or a MultiPolygon, or if g2 is a
  Point or a MultiPoint. Otherwise, returns 0.
   
  The term spatially crosses denotes a spatial relation
  between two
  given geometries that has the following properties:
  The two geometries intersect
  Their intersection results in a geometry that has a
  dimension that is one
   less than the maximum dimension of the two given geometries
  Their intersection is not equal to either of the two given
  geometries
   
  CROSSES() is based on the original MySQL implementation, and
  uses object bounding rectangles, while ST_CROSSES() uses
  object shapes.
   

   
   
   
   
   
   
   

  URL: https://mariadb.com/kb/en/library/crosses/dzfxuxCROSSESdzfxuxhttps://mariadb.com/kb/en/library/crosses/dzfxuxdzfxux30dzfxqjzxq


