insert_select-binlog.result
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:1k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. create table t1(a int, unique(a));
  2. insert into t1 values(2);
  3. create table t2(a int);
  4. insert into t2 values(1),(2);
  5. reset master;
  6. insert into t1 select * from t2;
  7. ERROR 23000: Duplicate entry '2' for key 1
  8. show binlog events;
  9. Log_name Pos Event_type Server_id Orig_log_pos Info
  10. master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
  11. master-bin.000001 79 Query 1 79 use `test`; insert into t1 select * from t2
  12. select * from t1;
  13. a
  14. 1
  15. 2
  16. drop table t1, t2;
  17. create table t1(a int);
  18. insert into t1 values(1),(1);
  19. reset master;
  20. create table t2(unique(a)) select a from t1;
  21. ERROR 23000: Duplicate entry '1' for key 1
  22. show binlog events;
  23. Log_name Pos Event_type Server_id Orig_log_pos Info
  24. master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
  25. drop table t1;