insert 、 update 和 delete et 命令默认与 Mysql 中的事务一起使用?
The insert , update and delete et command are default work with Transactions in Mysql?
在mysql database
中,我们用来insert
、update
和delete
数据的命令默认是Transaction ?
I mean to say, If we insert 1 corore rows from one table to another and the connection break from some reason, then the half rows are being insert or nothing would be insert?
我在这里很困惑,它是否在事务内工作。
/usr/bin/mysqldump -h ${SYSTEMIP} -u${SOURCEUSER} -p${SOURCEPASS} \
--skip-add-drop-table -t --skip-lock-tables --single-transaction --skip-add-locks --complete-insert -e -q --skip-disable-keys \
--where="id=${ID}" \ ${SOURCEDB} ${SOURCETABLE} | sed -e "s/${SOURCETABLE}/${TARGETTABLE}/g" >> /tmp/sample.sql;
从上面的脚本代码来看 --single-transaction 是什么意思?
请检查自动提交是真/假。
如果 autocommit=1 那么它会自动插入记录。
在您的设置中将自动提交设置为 false
SET 自动提交=0;
请参考以下link
在mysql database
中,我们用来insert
、update
和delete
数据的命令默认是Transaction ?
I mean to say, If we insert 1 corore rows from one table to another and the connection break from some reason, then the half rows are being insert or nothing would be insert?
我在这里很困惑,它是否在事务内工作。
/usr/bin/mysqldump -h ${SYSTEMIP} -u${SOURCEUSER} -p${SOURCEPASS} \
--skip-add-drop-table -t --skip-lock-tables --single-transaction --skip-add-locks --complete-insert -e -q --skip-disable-keys \
--where="id=${ID}" \ ${SOURCEDB} ${SOURCETABLE} | sed -e "s/${SOURCETABLE}/${TARGETTABLE}/g" >> /tmp/sample.sql;
从上面的脚本代码来看 --single-transaction 是什么意思?
请检查自动提交是真/假。 如果 autocommit=1 那么它会自动插入记录。
在您的设置中将自动提交设置为 false SET 自动提交=0;
请参考以下link