Re: mysqldump with single-transaction option.

2014-10-08 Thread Andrew Moore
gt; On Tue, Oct 7, 2014 at 11:55 AM, yoku ts. wrote: > > > > > Hello, > > > > > > If you use any *NOT InnoDB* storage engine, you're right. > > > mysqldump with --single-transaction doesn't have any consistent as you > > say. > &g

Re: mysqldump with single-transaction option.

2014-10-07 Thread yoku ts.
ello, > > > > If you use any *NOT InnoDB* storage engine, you're right. > > mysqldump with --single-transaction doesn't have any consistent as you > say. > > > > If you use InnoDB all databases and tables, your dumping process is > > protec

Re: mysqldump with single-transaction option.

2014-10-06 Thread geetanjali mehra
OT InnoDB* storage engine, you're right. > mysqldump with --single-transaction doesn't have any consistent as you say. > > If you use InnoDB all databases and tables, your dumping process is > protected by transaction isolation level REPEATABLE-READ. > > > http://dev.my

Re: mysqldump with single-transaction option.

2014-10-06 Thread yoku ts.
Hello, If you use any *NOT InnoDB* storage engine, you're right. mysqldump with --single-transaction doesn't have any consistent as you say. If you use InnoDB all databases and tables, your dumping process is protected by transaction isolation level REPEATABLE-READ. http://dev.mys

Re: mysqldump with single-transaction option.

2014-10-06 Thread geetanjali mehra
se mysqldump >> as follows: >> >> >> *mysqldump --single-transaction --all-databases > backup_sunday_1_PM.sql* >> >> MySQL manual says: >> >> This backup operation acquires a global read lock on all tables at the >> beginning of the dump (us

Re: mysqldump with single-transaction option.

2014-10-06 Thread shawn l.green
Hello Geetanjali, On 9/23/2014 7:14 AM, geetanjali mehra wrote: Can anybody please mention the internals that works when we use mysqldump as follows: *mysqldump --single-transaction --all-databases > backup_sunday_1_PM.sql* MySQL manual says: This backup operation acquires a global r

mysqldump with single-transaction option.

2014-09-23 Thread geetanjali mehra
Can anybody please mention the internals that works when we use mysqldump as follows: *mysqldump --single-transaction --all-databases > backup_sunday_1_PM.sql* MySQL manual says: This backup operation acquires a global read lock on all tables at the beginning of the dump (using *FLUSH TAB

How to get a S-lock in a Transaction

2014-05-28 Thread N!
Hi: I tried to get a S-lock using following SQL: 1. start transaction; SELECT * FROM test.t1 where id=1; But I found this way does not work. I changed it as following: 2. start transaction; SELECT * FROM test.t1 where id=1 lock in share mode; I am wondering why the

Re: store transaction rollback information

2013-01-21 Thread Luis Motta Campos
On 26 Jul 2012, at 21:43, James Devine wrote: > I have a large series of mysql changes(inserts/deletes/updates) taking > place in a transaction. After committing there may be some times where I > need to roll those changes back later on. Is there an easy way of > determining what wa

store transaction rollback information

2012-07-26 Thread James Devine
I have a large series of mysql changes(inserts/deletes/updates) taking place in a transaction. After committing there may be some times where I need to roll those changes back later on. Is there an easy way of determining what was changed in a transaction in a way I can store it and rollback

About mysql++3.1.0 SET TRANSACTION ISOLATION LEVEL

2012-02-09 Thread 陈秋丰
Hello: I foud a question about function of transaction. In this function switch not have break Transaction::Transaction(Connection& conn, IsolationLevel level, IsolationScope scope, bool consistent) : conn_(conn), finished_(

Re: Isolation level per transaction?

2011-03-04 Thread Perrin Harkins
On Fri, Mar 4, 2011 at 1:32 AM, Angela liu wrote: > Can Isolation levels be set per transaction?  I know isolation levels can be > set per session or globally, but not sure at transaction level. Given that you can only have one transaction at a time in a session, there is no real diff

Isolation level per transaction?

2011-03-03 Thread Angela liu
HI, Folks: Can Isolation levels be set per transaction?  I know isolation levels can be set per session or globally, but not sure at transaction level. if so , can anybody give me an example? Thanks a lot

Re: how to find no.of transaction in mysql

2010-05-08 Thread Prabhat Kumar
or you can use some tools, there is tons of third tools you can use. On Sat, May 8, 2010 at 7:15 PM, Prabhat Kumar wrote: > Hi, > I think you can get only no. of transactions happned on the database since > it was started. > > By using command "show status" ; variable "Questions" will give val

Re: how to find no.of transaction in mysql

2010-05-08 Thread Prabhat Kumar
Hi, I think you can get only no. of transactions happned on the database since it was started. By using command "show status" ; variable "Questions" will give value of no. of transactions happened on the database since database was started. But there is way u can use, as I used to calculate que

how to find no.of transaction in mysql

2010-05-08 Thread Anand
Hi , Is it possible to find the no.of transactions happened on the database for the specified duration of time ? it could be for past 2/3 days. Thanks Anand

Re: 回复: mysql transaction log

2010-05-04 Thread Claudio Nanni
MySQL does not have a thing such the Oracle transaction log. But it has the Binary Log used by replication, for this reason the binary log is server level and it is "decoupled" from the storage engine concept. Basically (if we consider the old good "statement" format) it

回复: mysql transaction log

2010-05-03 Thread Timo
InnoDB support transaction. MyISAM does not support trantsaction. http://www.databasejournal.com/features/mysql/article.php/3382171/Transactions-in-MySQL.htm 2010-05-04 Best regards Timo Seven blog: http://zauc.wordpress.com #请翻墙浏览,或者指定hosts到74.200.243.252### twitter: https

Re: mysql transaction log

2010-05-03 Thread Nitin Mehta
I think you've got it a little wrong. In MySQL, transaction log is different from bin-log. Transaction logs are used only for Innodb while bin-logs are optional and capture data related to all the storage engines. I believe, you cannot read thru the transaction logs and these logs files

mysql transaction log

2010-05-03 Thread Angelina Paul
Please help me to understand more about the mysql transaction log ( mysqlbinlog) file and its contents. Will it support only the innodb or all the storage engine types like MyISAM, InnoDB? Thanks, Arsh Paul

Re: High-level transaction isolation architecture of InnoDB

2010-03-26 Thread Harrison Fisk
Hi Yang, On Mar 26, 2010, at 4:28 PM, Yang Zhang wrote: I've noticed that Innodb seems to exhibit true serializability for the serializable transaction isolation level. Does this mean it implements predicate locking? Kinda, but not exactly. In serializable, all reads will use shared

High-level transaction isolation architecture of InnoDB

2010-03-26 Thread Yang Zhang
I've noticed that Innodb seems to exhibit true serializability for the serializable transaction isolation level. Does this mean it implements predicate locking? Also out of curiosity, is it possible to set a snapshot isolation transaction isolation level (is Innodb implemented using MVCC)? T

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Madonna DeVaudreuil
bject: Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction Try to run SHOW ENGINE INNODB STATUS; Near the top there will be some information on the latest deadlock. That might help you to understand what is deadlocking. Sometimes changing the

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Jesper Wisborg Krogh
equently get these messages: DB ERROR: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction Am I writing my query wrong or expecting behavior that MySQL doesn't support? -- - michael dykman - mdyk...@gmail.com May the

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Michael Dykman
LECT $LOCK_ID, q.queue_id, 'parse', DATE_ADD(NOW(), INTERVAL 1 HOUR) >>> FROM queue q >>>  LEFT JOIN cli_lock l ON l.object_id = q.queue_id AND l.lock_type = >>> 'parse' >>> WHERE l.object_id IS NULL >>>  AND q.status = 'parse&#x

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread D. Dante Lorenso
d IS NULL AND q.status = 'parse' ORDER BY q.file_size ASC, q.created ASC, q.queue_id ASC LIMIT 1 However, as I execute this query several times each minute from different applications, I frequently get these messages: DB ERROR: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread D. Dante Lorenso
fferent > applications, I frequently get these messages: > > DB ERROR: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when > trying to get lock; try restarting transaction > > Am I writing my query wrong or expecting behavior th

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Johan De Meersman
ile_size ASC, q.created ASC, q.queue_id ASC > > LIMIT 1 > > > > However, as I execute this query several times each minute from different > > applications, I frequently get these messages: > > > > DB ERROR: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found

Re: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Michael Dykman
.file_size ASC, q.created ASC, q.queue_id ASC > LIMIT 1 > > However, as I execute this query several times each minute from different > applications, I frequently get these messages: > > DB ERROR: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when > trying t

Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

2010-02-01 Thread Dante Lorenso
on failure: 1213 Deadlock found when trying to get lock; try restarting transaction Am I writing my query wrong or expecting behavior that MySQL doesn't support? -- Dante

Re: Can't execute the given command because you have active locked tables or an active transaction

2009-12-30 Thread Miguel Angel Nieto
Hi, > I am getting "Can't execute the given command because you have active locked > tables or an active transaction" error when I am trying to truncate table. I > am unable to understand the error as when I am using the mysql query browser > then the same command is

Can't execute the given command because you have active locked tables or an active transaction

2009-12-30 Thread Manasi Save
Hi All,I am getting "Can't execute the given command because you have active locked tables or an active transaction" error when I am trying to truncate table. I am unable to understand the error as when I am using the mysql query browser then the same command is working fine but whe

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-28 Thread Martijn Tonies
There seems to be some confusion about 'multi-db'.Within a single MySQL instance, assuming that all your tables are a transactional type (InnoDB isn't the only one), you don't have to do anything special to cross database boundaries. XA is required if you plan to spread your transactions out

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-28 Thread Michael Dykman
r, Sybase SQL >> Anywhere, MySQL, InterBase, NexusDB and Firebird! >> >> Database questions? Check the forum: >> http://www.databasedevelopmentforum.com >> >> >>  Looks to me we should use XA transaction syntax instead. Check this: >> >> >>  http://dev.

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-28 Thread Paul DuBois
d Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com Looks to me we should use XA transaction syntax instead. Check this: http://dev.mysql.com/doc/refman/5.0/

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-28 Thread Martijn Tonies
://www.databasedevelopmentforum.com Looks to me we should use XA transaction syntax instead. Check this: http://dev.mysql.com/doc/refman/5.0/en/xa.html Thanks, YY 2009/10/28 Martijn Tonies Michael, Does MySQL support multi-db transactions? With regards, Martijn Tonies Upscene

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-28 Thread Ye Yuan
Looks to me we should use XA transaction syntax instead. Check this: http://dev.mysql.com/doc/refman/5.0/en/xa.html Thanks, YY 2009/10/28 Martijn Tonies > Michael, > > Does MySQL support multi-db transactions? > > With regards, > > Martijn Tonies > Up

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-28 Thread Martijn Tonies
://www.databasedevelopmentforum.com That is correct. Many db interfaces off programmatic abstractions of these facilities, but you may certainly just issue the statments. START TRANSACTION INSERT that UPDATE that on success: COMMIT on error: ROLLBACK - michael dykman On Wed, Oct 28, 2009 at 12:07 AM

Re: START TRANSACTION COMMIT ROLLBACK

2009-10-27 Thread Michael Dykman
That is correct. Many db interfaces off programmatic abstractions of these facilities, but you may certainly just issue the statments. START TRANSACTION INSERT that UPDATE that on success: COMMIT on error: ROLLBACK - michael dykman On Wed, Oct 28, 2009 at 12:07 AM, Mosaed AlZamil wrote

START TRANSACTION COMMIT ROLLBACK

2009-10-27 Thread Mosaed AlZamil
Hello Everyone, I am a newbie using innodb. How can I implement START TRANSACTION COMMIT ROLLBACK when I need to update two tables that are located in two different databases. Would a single START TRANSACTION be sufficient ? Any help would be appreciated. TIA Mos

Re: lock wait timeout try restrating transaction

2009-08-30 Thread Shawn Green
Hello Manasi, Manasi Save wrote: Hi All, Can anyone provide me any input on in what all senerios one can get this error. I have innodb tables, I am updating one table but I am getting error lock wait timeout try restarting transaction. Also the parameter innodb_lock_wait_timeout is set to 50

lock wait timeout try restrating transaction

2009-08-28 Thread Manasi Save
Hi All, Can anyone provide me any input on in what all senerios one can get this error. I have innodb tables, I am updating one table but I am getting error lock wait timeout try restarting transaction. Also the parameter innodb_lock_wait_timeout is set to 50 default. what will be the effect of

developing a transaction safe interface with MySQL as database

2009-05-28 Thread Gábor Lénárt
Hei All, I am new here (my name is Gábor Lénárt and I am from Hungary), and I am also quite new to develop more complex applications using RDBMS, MySQL in our case. I hope it's the right place to ask general questions too. I have experience to create simple applications without transa

RE: Understanding Transaction Deadlocks with Innodb

2009-05-26 Thread Michael Caplan
Hi Martin, Sorry my example wasn't clearer. I am doing a commit or rollback depending on the success of the overall transaction. What I don't do is retry parts of the transaction upon deadlock. Thanks for pointing that out, though! Best, Mike On Mon, 2009-05-25 at 16:46 -04

Understanding Transaction Deadlocks with Innodb

2009-05-25 Thread Michael Caplan
and related tables I have code that does something like this: 1. Create transaction 2. REPLACE data in a single case as identified by a primary key * The choice of using a REPLACE statement is that I want it to INSERT or DELETE and INSERT the case data. With

Re: MySQL 5.1 Rolling back a transaction containing Create Alter Drop table statements

2009-03-16 Thread Baron Schwartz
On Mon, Mar 16, 2009 at 10:25 AM, Hatem Nassrat wrote: > Hi, > > Is there any way to rollback a transaction in MySQL 5.1 that contains > "Create", "Alter", "Drop", table statements. No. Sorry. -- MySQL General Mailing List For list archives: h

MySQL 5.1 Rolling back a transaction containing Create Alter Drop table statements

2009-03-16 Thread Hatem Nassrat
Hi, Is there any way to rollback a transaction in MySQL 5.1 that contains "Create", "Alter", "Drop", table statements. i.e. is there any way to turn off the feature:     "Statements That Cause an Implicit Commit" or even remove some of the default statem

Re: Impact of making a stored program transactional while running under transaction manager?

2009-03-09 Thread Al
David Karr wrote: it's supposedly good advice in a multi-step stored procedure to have an explicit "start transaction" and "commit" wrapping the work. What is the impact of doing this if the stored procedure is called from code managed by a transaction manager. For ins

Impact of making a stored program transactional while running under transaction manager?

2009-03-09 Thread David Karr
it's supposedly good advice in a multi-step stored procedure to have an explicit "start transaction" and "commit" wrapping the work. What is the impact of doing this if the stored procedure is called from code managed by a transaction manager. For instance, in a JEE ap

Re: view doesn't refresh inside transaction

2009-03-05 Thread Baron Schwartz
into > the base tables inside a transaction, the view doesn't seem to update. > Only after the transaction is committed does the row appear in the > view. Now I would like to avoid having to commit the transaction at > that point. Is there any way to force a view to refresh inside a &

view doesn't refresh inside transaction

2009-03-04 Thread Ingo Weiss
Hi all, I have a view that is joining two base tables. I can update through the view, but insert only through the base tables. Now I am having the problem that seems to boil down to the following: When I insert into the base tables inside a transaction, the view doesn't seem to update.

Re: Locking certain rows in a transaction

2008-08-11 Thread John Smith
Perrin Harkins wrote: > Assuming you're using InnoDB tables, "SELECT...FOR UPDATE" will lock > the rows as you describe. It can prevent other inserts and updates to > neighboring rows as well, depending on what isolation level you're > running (default is REPEATABLE READ). Thanks, in fact it eve

Re: Locking certain rows in a transaction

2008-08-09 Thread Perrin Harkins
On Sat, Aug 9, 2008 at 8:10 AM, John Smith <[EMAIL PROTECTED]> wrote: > Now here's the question: I need to lock certain rows, so that no other > client can read or write that rows (I want those clients to wait until the > transaction is commited or rolled back). I don'

Locking certain rows in a transaction

2008-08-09 Thread John Smith
Hi, i'm currently experimenting with nested sets. To insert a new node,, I need 1 SELECT, 2 UPDATE and 1 INSERT statement. Of course all of this wii be packed into a transaction, because the table could get corrupted if not all of the mentioned queries are executed. Now here's the q

RE: innodb transaction not works

2008-03-21 Thread Rajesh Mehrotra
Hi Saravanan, Please check http://forums.mysql.com/read.php?97,18003,18003 -Raj. -Original Message- From: Saravanan [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2008 1:59 PM To: mysql@lists.mysql.com Subject: innodb transaction not works Hi lists, We are running database with

innodb transaction not works

2008-03-21 Thread Saravanan
Hi lists, We are running database with mixed tables myisam and innodb. I know that innodb supports transactions. My server is running with default transaction-isolation=REPEATABLE READ Whenever our cron runs stats updation scripts. It locks whole table and make other sql statements which

MySQL - Transaction/Commit Question/Issue

2007-11-15 Thread bruce
Hi... I'm considering the following issue: need to copy in db1 tbl_1 -> tbl_2 and in db2 cat -> dog so i need to perform copies of both tbls in the two databases. and i need them to both succeed, or to both be rolled back. the copies are in two separate databases. any thoughts on this... t

Re: Rollback on a Transaction with No Updates

2007-09-19 Thread Baron Schwartz
Robert DiFalco wrote: Is there any difference between calling rollback or commit on a transaction that did not alter data? For example, not a read-only transaction but a transaction that only performed read-only selects. Any difference in performance between calling rollback or commit? I know

RE: Rollback on a Transaction with No Updates

2007-09-18 Thread Robert DiFalco
[mailto:[EMAIL PROTECTED] Sent: Tuesday, September 18, 2007 10:00 AM To: Robert DiFalco Cc: Baron Schwartz; mysql@lists.mysql.com Subject: Re: Rollback on a Transaction with No Updates I realize that wasn't the question, but it does seem like a lot of trouble to get the equivalent of setAutoCommit

Re: Rollback on a Transaction with No Updates

2007-09-18 Thread Michael Dykman
ichael Dykman [mailto:[EMAIL PROTECTED] > Sent: Monday, September 17, 2007 2:56 PM > To: Robert DiFalco > Cc: Baron Schwartz; mysql@lists.mysql.com > Subject: Re: Rollback on a Transaction with No Updates > > If your transaction are only 1 query deep, why use them at all? An > indivi

RE: Rollback on a Transaction with No Updates

2007-09-17 Thread Robert DiFalco
Sure, but that wasn't really the question. -Original Message- From: Michael Dykman [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 2:56 PM To: Robert DiFalco Cc: Baron Schwartz; mysql@lists.mysql.com Subject: Re: Rollback on a Transaction with No Updates If your transa

Rollback on a Transaction with No Updates

2007-09-17 Thread Robert DiFalco
Is there any difference between calling rollback or commit on a transaction that did not alter data? For example, not a read-only transaction but a transaction that only performed read-only selects. Any difference in performance between calling rollback or commit? I know they are functionally the

Re: Rollback on a Transaction with No Updates

2007-09-17 Thread Michael Dykman
If your transaction are only 1 query deep, why use them at all? An individual query is already atomic, regardless of table type/server mode. - michael dkyman On 9/17/07, Robert DiFalco <[EMAIL PROTECTED]> wrote: > While it is functionally equivalent I wonder if it the code paths ta

RE: Rollback on a Transaction with No Updates

2007-09-17 Thread Robert DiFalco
ing a commit (unless there was an exception but I'm not analyzing that case). -Original Message- From: Baron Schwartz [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 2:36 PM To: Robert DiFalco Cc: mysql@lists.mysql.com Subject: Re: Rollback on a Transaction with No Updat

Re: Rollback on a Transaction with No Updates

2007-09-17 Thread Baron Schwartz
Robert DiFalco wrote: Is there any difference between calling rollback or commit on a transaction that did not alter data? For example, not a read-only transaction but a transaction that only performed read-only selects. Any difference in performance between calling rollback or commit? I know

Re: transaction problem

2007-09-05 Thread Baron Schwartz
Hi, [EMAIL PROTECTED] wrote: Hi list! I've a problem with transaction I initiate a transaction with "start transaction". Soon i execute following query: * update t1 set t=12; and by I complete I execute rollback but when I do it I obtain the following thing: "non-transa

transaction problem

2007-09-05 Thread [EMAIL PROTECTED]
Hi list, I am going to change the type of table to InnoDB Thank!! Pablo -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: transaction problem

2007-09-05 Thread Martijn Tonies
Hi, > I've a problem with transaction > I initiate a transaction with "start transaction". Soon i execute > following query: > * update t1 set t=12; and by I complete I execute rollback but when I do > it I obtain the following thing: > "non-transactional

transaction problem

2007-09-05 Thread [EMAIL PROTECTED]
Hi list! I've a problem with transaction I initiate a transaction with "start transaction". Soon i execute following query: * update t1 set t=12; and by I complete I execute rollback but when I do it I obtain the following thing: "non-transactional Some changed tables cou

Re: Transaction/locking confusion

2007-03-14 Thread Michael Dykman
clusive next-key lock on every record the search encounters." So it sounds like the select for update will effectively be the same as what I'm already doing, and thus suffer the same problem. Is it just that locks don't apply outside the transaction? If transactions can't solve sy

Re: Transaction/locking confusion

2007-03-14 Thread Marcus Bointon
hat I'm already doing, and thus suffer the same problem. Is it just that locks don't apply outside the transaction? If transactions can't solve synchronisation problems between processes, what are they for??! Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://

Re: Transaction/locking confusion

2007-03-14 Thread Marcus Bointon
On 13 Mar 2007, at 13:44, JamesDR wrote: With what you've provided us: You can not prevent this. You are running in a transaction which is isolated from any others. But doesn't that isolation provide atomicity, i.e. the first transaction to commit will act as if all of its

Re: Transaction/locking confusion

2007-03-13 Thread JamesDR
Marcus Bointon wrote: > Hi, > > (repeat posting) > > I have a simple PHP function that initialises a process definition. To > prevent it happening more than once, I'm wrapping it in a transaction, > however, it doesn't seem to be working and I get multiple &

Transaction/locking confusion

2007-03-13 Thread Marcus Bointon
Hi, (repeat posting) I have a simple PHP function that initialises a process definition. To prevent it happening more than once, I'm wrapping it in a transaction, however, it doesn't seem to be working and I get multiple initialisations. In pseudocode: BEGIN; UPDATE process

Re: mysqldump --single-transaction causes database to become unusable

2007-03-08 Thread Filip Krejci
shing them in db on some timeout. You can also use making backup on slave as somebody mentioned before. Filip -- ---TRANSACTION 0 190439971, ACTIVE 7 sec, process no 23228, OS thread id 2296302480 starting index read mysql tables in use 1, locked 1 LOCK WAIT 2 lock struct(s),

Re: mysqldump --single-transaction causes database to become unusable

2007-03-08 Thread Ian P. Christian
Filip Krejci wrote: > Hi, > > I suppose this is really I/O problem. > You're right, it looks like it was just an I/O problem - your suggestion was spot on. I've now managed to dump my master data, and can get my slave back online! Thanks a lot for your suggestion, -- Ian P. Christian ~ http://p

Re: mysqldump --single-transaction causes database to become unusable

2007-03-08 Thread Ian P. Christian
Filip Krejci wrote: > Hi, > > you are right, option --single-transaction does not accquire any lock on > your innodb tables. Backup is fully on-line due to mvcc. > > You should look for another reason of this behavior. > > 1/ What says 'show full processlist' whe

Re: mysqldump --single-transaction causes database to become unusable

2007-03-08 Thread Maciej Dobrzanski
In news:[EMAIL PROTECTED], "Ian P. Christian" <[EMAIL PROTECTED]> wrote: > This database I'm dumping has something like 17 million rows, all but > 1 table (which uses FULLTEXT, and only has 3-4k rows) run innodb. > There is only one table of any real size, and this table has all but > about 100k o

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Filip Krejci
I have few information, but i suppose that you are on performance border of your db server. So you haven't reserve for doing backup. Send some few rows of command vmstat 1, before backup process and through backup process. How are these numbers: - queries per second ? - updates / selects rate

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Marcus Bointon
On 7 Mar 2007, at 09:30, Ian P. Christian wrote: --single-transaction Creates a consistent snapshot by dumping all tables in a single transaction. Works ONLY for tables stored in storage engines which support multiversioning (currently only InnoDB does); the dump is NOT guaranteed to be

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Ian P. Christian
Filip Krejci wrote: Hi, you are right, option --single-transaction does not accquire any lock on your innodb tables. Backup is fully on-line due to mvcc. You should look for another reason of this behavior. 1/ What says 'show full processlist' when backup is running It sh

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Filip Krejci
Hi, you are right, option --single-transaction does not accquire any lock on your innodb tables. Backup is fully on-line due to mvcc. You should look for another reason of this behavior. 1/ What says 'show full processlist' when backup is running 2/ What says 'show engine

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Ian P. Christian
Marcus Bointon wrote: Hi Marcus :) > On 7 Mar 2007, at 08:44, Ian P. Christian wrote: > > --single-transaction doesn't _do_ the dump as a transaction, it simply > wraps the dump in begin/commit statements so it's atomic when restoring. > > If the dump is to preserve

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Praj
Hi , --single-transaction will execute the same nature of mysqldump command with begin and end transaction. How ever the table is locked for the backup your site may be slow. -- Praj Ian P. Christian wrote: Recently my one and only slave went down, and stupidly I don't have a dump sui

Re: mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Marcus Bointon
On 7 Mar 2007, at 08:44, Ian P. Christian wrote: mysqldump --master-data --single-transaction database > dump.sql This database I'm dumping has something like 17 million rows, all but 1 table (which uses FULLTEXT, and only has 3-4k rows) run innodb. There is only one table of any r

mysqldump --single-transaction causes database to become unusable

2007-03-07 Thread Ian P. Christian
- you live and learn. So... I'm doing a database dump: mysqldump --master-data --single-transaction database > dump.sql This database I'm dumping has something like 17 million rows, all but 1 table (which uses FULLTEXT, and only has 3-4k rows) run innodb. There is only one tabl

Transaction/locking confusion

2007-03-05 Thread Marcus Bointon
Hi, I have a simple PHP function that initialises a process definition. To prevent it happening more than once, I'm wrapping it in a transaction, however, it doesn't seem to be working and I get multiple initialisations. In pseudocode: BEGIN; UPDATE process SET status = '

Transaction/locking confusion

2007-03-05 Thread Marcus Bointon
Hi, I have a simple PHP function that initialises a process definition. To prevent it happening more than once, I'm wrapping it in a transaction, however, it doesn't seem to be working and I get multiple initialisations. In pseudocode: BEGIN; UPDATE process SET status = '

Re: Sequence ID generation transaction-safe?

2006-12-16 Thread Eric Bergen
Hi Frederic, Update then select on a single row table is transaction safe. If two users start a transaction and issue update queries the first query to execute will set a lock on that row. The second query will then block on the update waiting to obtain the same lock. In innodb row locks are not

Sequence ID generation transaction-safe?

2006-12-16 Thread Frederic Wenzel
auto-increment table. I am using "UPDATE translations_seq SET id=LAST_INSERT_ID(id+1)" and then I fetch my newest ID with "select id from translations_seq". While this method is described in the manual as "multi-user safe" I was wondering if this was also transactio

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-29 Thread Nico Sabbi
Mike Kruckenberg wrote: mysql> SET @staff_id = LAST_INSERT_ID(); Query OK, 0 rows affected (0.01 sec) I don't know if this behaviour has changed in later versions of mysql, but using session variables, although lovely, was the quickest way to break replication (at least up to and including 4.

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Andre Matos
Thanks for all your help Mike. Problem solved. I divided to process in two parts: one write the insert/update/delete and then write the changes in the audit trail. All this inside one transaction. If the first part fails, ROLLBACK. If the second part fails, ROLLBACK, otherwise, if both were done

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Mike Kruckenberg
Andre Matos wrote: Thanks Mike. I understand the possible "gaps" that I might have if I use the ROLLBACK. This is acceptable in my case. What I really want to avoid is what I am doing now: open one transaction to insert, or update, or delete certain information and close with the co

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Andre Matos
Thanks Mike. I understand the possible "gaps" that I might have if I use the ROLLBACK. This is acceptable in my case. What I really want to avoid is what I am doing now: open one transaction to insert, or update, or delete certain information and close with the commit. Then,

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Mike Kruckenberg
Andre Matos wrote: SET AUTOCOMMIT=0; START TRANSACTION; INSERT INTO staff (`Name`) VALUES ('ABC'); INSERT INTO changes (`Key`, `Table`, `Value`) VALUES (LAST_INSERT_ID(), 'staff', 'ABC'); COMMIT; SET AUTOCOMMIT=1; This works fine in my test environment, however

Re: InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Mike Kruckenberg
Andre Matos wrote: The idea is to have a audit trail to record the changes made. So, I want to insert a new record in the "staff" table and right after this, insert a record in the "changes" table. SET AUTOCOMMIT=0; START TRANSACTION; INSERT INTO staff (`Name`) VALUES

InnoDB Transaction and LAST_INSERT_ID()

2006-11-28 Thread Andre Matos
'', PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs AUTO_INCREMENT=1; The idea is to have a audit trail to record the changes made. So, I want to insert a new record in the "staff" table and right after this, insert a record in the "

Re: transaction in mysql 5

2006-10-31 Thread George-Cristian Bîrzan
t; the first script commit to the database or rollback ? http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-isolation.html -- George-Cristian Bîrzan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

transaction in mysql 5

2006-10-31 Thread Ahmad Al-Twaijiry
Hi everyone I have a PHP script that will run every minute and do a lot of SELECT and UPDATE statments All my tables are InnoDB and I'm using PHP 5 and POD class ( http://php.net/pod ) to connect to mysql, in my script I start the transaction (using method beginTransaction() ) in the begi

Re: dose mysqldump --single-transaction lock table?

2006-09-13 Thread Chris
Leo wrote: > Hi,all.I want to use mysqldump to backup a innodb table,and add the option > --single-transaction,dose it lock all the table?thanks. It has to so it can give you one transaction and make sure nothing else gets entered after it starts and before it finishes. -- MySQL G

  1   2   3   4   5   >