分析一个开源项目,往数据库里添加日志,为了避免写入日志信息影响正常业务,日志的插入方式采用了insert delayed的方式。

打印其数据库语句,复制到mysql执行报如下错误:

ERROR 1616 (HY000): DELAYED option not supported for table

经过查找资料发现是有的mysql的存储引擎不支持此方式:

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  (HY000): DELAYED option not supported for table 'tab_name'

mysql存储引擎的查看方式:

MariaDB [(none)]> show engines;
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| FEDERATED | YES | FederatedX pluggable storage engine | YES | NO | YES |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
+--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
rows in set (0.00 sec)

修改方式:

在配置文件my.cnf中的 [mysqld] 下面加入default-storage-engine=INNODB 一句

参考地址:

https://mariadb.com/kb/en/library/insert-delayed/

http://www.cnblogs.com/lina1006/archive/2011/04/29/2032894.html

https://www.cnblogs.com/Baronboy/p/6037913.html

mysql和mariadb支持insert delayed的问题的更多相关文章

  1. 让你的mysql或mariadb 支持ipv6

    如果你在windows 或Linux系统已经安装了mysql/mariadb,并且操作系统本身已经支持了ipv6. 在/etc/my.conf 这样配置可以让mysql也支持ipv6 [mysqld] ...

  2. MySQL INSERT DELAYED

    INSERT DELAYED 语法 INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_nam ...

  3. Asp.Net Core 轻松学-使用MariaDB/MySql/PostgreSQL和支持多个上下文对象

    前言 在上一篇文章中(Asp.Net Core 轻松学-10分钟使用EFCore连接MSSQL数据库)[https://www.cnblogs.com/viter/p/10243577.html],介 ...

  4. MySQL(MariaDB)的 SSL 加密复制

    背景: 在默认的主从复制过程或远程连接到MySQL/MariaDB所有的链接通信中的数据都是明文的,在局域网内连接倒问题不大:要是在外网里访问数据或则复制,则安全隐患会被放大很多.由于项目要求需要直接 ...

  5. Navicat(服务器对象) -2之MySQL 或 MariaDB 对象

    MySQL 或 MariaDB 对象 http://www.navicat.com.cn/manual/online_manual/cn/navicat/win_manual/index.html 要 ...

  6. MySQL并发复制系列三:MySQL和MariaDB实现对比

    http://blog.itpub.net/28218939/viewspace-1975856/ 并发复制(Parallel Replication) 系列三:MySQL 5.7 和MariaDB ...

  7. INSERT DELAYED 句法

    INSERT 语句的 DELAYED 选项是一个 MySQL 特有的选项,如果你的客户端不能等待 INSERT 的完成,这将会是很有用的.This is a common problem when y ...

  8. Python使用MySQLConnector/Python操作MySQL、MariaDB数据库

    使用MySQL Connector/Python操作MySQL.MariaDB数据库   by:授客 QQ:1033553122 因目前MySQLdb并不支持python3.x,而MySQL官方已经提 ...

  9. MySQL与MariaDB核心特性比较详细版v1.0(覆盖mysql 8.0/mariadb 10.3,包括优化、功能及维护)

    注:本文严禁任何形式的转载,原文使用word编写,为了大家阅读方便,提供pdf版下载. MySQL与MariaDB主要特性比较详细版v1.0(不含HA).pdf 链接:https://pan.baid ...

随机推荐

  1. python基础(3)-pycharm安装&for循环&format字符串&list列表&set集合使用

    安装IDE(PyCharm)&破解 点击下载安装包,安装. 点击下载破解补丁. 进入pycharm安装bin目录,将破解补丁copy到当前目录. 在bin目录下找到pycharm.exe.vm ...

  2. python框架之Flask(6)-flask-sqlalchemy&flask-script&flask-migrate使用

    整合SQLAlchemy 安装 pip3 install flask-sqlalchemy 简单使用 from flask import Flask from flask_sqlalchemy imp ...

  3. windows----------如何修改windows服务器远程端口

    远程连接并登录到 Windows 实例. 选择开始 > 运行,输入 regedit 打开注册表编辑器. 查找 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe ...

  4. js对象添加动态属性

    在业务中,经常会遇到使用同个方法调用多个同类型接口,以下简单模拟两个API接口 // api-1 { code: 0, status: 200, title: 'web前端框架', list: [ { ...

  5. windows程序设计 新建一个提示框程序

    1.鼠标右键项目名称,添加->新建项目. 2.选择.cpp,将文件名改成.c文件.点击添加. 3.在.c文件里面输入代码. #include <windows.h> //hInsta ...

  6. 【Checkio Exercise】Three Point Circle

    计算三角形外接圆的函数: Three Point Circle If we want to build new silos, then we need to make more formal and ...

  7. timer控件、三级联动、帐号激活权限设置

    一.Timer控件 Timer实际就是一个线程控件. 属性:Enabled    是否被启用 Interval     多长时间执行一次控件中的代码 事件: Tick     事件中放要执行的代码. ...

  8. vue用npm安装删除模块element-ui mint-ui

    vue用npm安装删除模块element-ui mint-ui 在vue项目中先引入了element-ui,后来发现移动版的需要用mint-ui,所以需要先卸载了再安装.卸载element-ui:np ...

  9. 记录:工作中用到的Js日期时间方法

    /** * 获取当前时间 */ function getDate() { return new Date(); } /** * 格式化当前时间 * @param {*} value */ functi ...

  10. jQuery 新建函数

    jQuery 新建函数 格式一: // 格式一:新建添加函数方法并使用 $.extend({ 'xsk':function () { return 'xsk'; } }); // 调用 $.xsk() ...