Statement returned more than one row, where no more than one was expected <resultMap id="Student" type="org.mybatis.example.Student"> <id property="id" column="id"/> <result property="name"…
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Statement returned more than one row, where no more than one was expected. at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptio…
该系列文档是本人在学习 Mybatis 的源码过程中总结下来的,可能对读者不太友好,请结合我的源码注释(Mybatis源码分析 GitHub 地址.Mybatis-Spring 源码分析 GitHub 地址.Spring-Boot-Starter 源码分析 GitHub 地址)进行阅读 MyBatis 版本:3.5.2 MyBatis-Spring 版本:2.0.3 MyBatis-Spring-Boot-Starter 版本:2.1.4 MyBatis的SQL执行过程 在前面一系列的文档中,我…
MyBatis关联查询和懒加载错误 今天在写项目时遇到了个BUG.先说一下背景,前端请求更新生产订单状态,后端从前端接收到生产订单ID进行查询,然后就有问题了. 先看控制台报错: org.apache.ibatis.executor.ExecutorException: Statement returned more than one row, where no more than one was expected. 很明显,预期查出一条记录的结果查出了多条记录.因为在实现 service 层代…
Format: column column_name new_value var_name Meaning: use the column_name of a select statment to construct a variable, later we can use &var_name to refer its value. If the Select statement returned more that one row, the last row value will be ass…
centos7.5 binlog恢复数据失败 问题: mysql> \. /tmp/inc.sql ERROR 1050 (42S01): Table 'new_1' already exists ERROR 1666 (HY000): Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT. 原因: 新库用…
MySQL 5.5 中对于二进制日志 (binlog) 有 3 种不同的格式可选:Mixed,Statement,Row,默认格式是 Statement.总结一下这三种格式日志的优缺点. MySQL Replication 复制可以是基于一条语句 (Statement Level) ,也可以是基于一条记录 (Row Level),可以在 MySQL 的配置参数中设定这个复制级别,不同复制级别的设置会影响到 Master 端的 bin-log 日志格式. 1. Row日志中会记录成每一行数据被修改…
SQL statements   This topic contains tables that list the SQL statements classified by type. SQL schema statements (Table 1) SQL data change statements (Table 2) SQL data statements (Table 3) SQL transaction statements (Table 4) SQL connection statem…
from http://www.akadia.com/services/ora_chained_rows.html Overview If you notice poor performance in your Oracle database Row Chaining and Migration may be one of several reasons, but we can prevent some of them by properly designing and/or diagnosin…
1.for standard table, it must be sorted by search key. 2.for sorted table , binary search is used automatically when searching with/include table key.  Note:with a binary search (addition BINARY SEARCH is used for standard tables, automatically for s…