[MySQL] 트랜잭션

트랜잭션

  • SHOW VARIABLES LIKE '%COMMIT%'
  • 현재 커밋과 관련된 설정정보 확인
  • START TRANSACTION
  • COMMIT
  • ROLLBACK
SHOW VARIABLES LIKE '%COMMIT%'

autocommit                          ON  <- 여기
binlog_group_commit_sync_delay       0
binlog_group_commit_sync_no_delay_count  0
binlog_order_commits                    ON
innodb_api_bk_commit_interval            5
innodb_commit_concurrency            0
innodb_flush_log_at_trx_commit           1
original_commit_timestamp           36028797018963968
START TRANSACTION;

UPDATE issue 
SET issue_name = 'BaseService 작성'
WHERE issue_id = 8
;

SELECT *
FROM issue i 
; -- 위의 업데이트 쿼리가 반영된 결과가 나오지만 실제로 테이블은 변경되지 않은 상태

COMMIT;

links

social