Re: what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-18 Thread shawn l.green
On 2018-08-18 23:59, shawn l.green wrote: Hello Jeff, On 8/13/2018 12:05 PM, j...@lxvi.net wrote: Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so

Re: what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-18 Thread Mogens Melander
l.green wrote: Hello Jeff, On 8/13/2018 12:05 PM, j...@lxvi.net wrote: Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so far, I haven't found

Re: what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-18 Thread shawn l.green
Hello Jeff, On 8/13/2018 12:05 PM, j...@lxvi.net wrote: Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so far, I haven't found an explanation

what is the rationale for not allowing LOCK TABLES in a stored procedure

2018-08-13 Thread jeff
Hello, I have read through several pages of the reference manual, and I've seen several instances where it is stated that LOCK TABLES (and UNLOCK TABLES) is not allowed in a stored procedure, but so far, I haven't found an explanation as to *why* that is. Could someone please enlighten me? Thanks

Mysqldump routines dump, problem with lock tables.

2013-02-04 Thread Rafał Radecki
denied for user 'yyy'@'zzz' (using password: YES) when using LOCK TABLES So I thinke that mysqldump locks the table (--add-locks) by default. But for this user: mysql show grants for yyy@'zzz

RE: Mysqldump routines dump, problem with lock tables.

2013-02-04 Thread Rick James
with lock tables. Hi All. I use: # rpm -qa | grep -i percona-server-server Percona-Server-server-55-5.5.28-rel29.3.388.rhel6.x86_64 My system: # uname -a;cat /etc/redhat-release Linux prbc01.mg.local 2.6.32-279.19.1.el6.centos.plus.x86_64 #1 SMP Wed Dec 19 06:20:23 UTC 2012 x86_64

Re: Slower performance with LOCK TABLES

2011-09-26 Thread Johan De Meersman
- Original Message - From: Hank hes...@gmail.com Just an update. Using the load index into cache statement for the 200 million row indexed source table, my correlated update statement ran in 1 hour, 45 minutes to update 144 million rows. A 50% increase in performance! Good to

RE: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-25 Thread Shafi AHMED
@lists.mysql.com Subject: Re: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES Hello Shafi, Adding to Prabhat alternatives, you can use --force to the mysqldump command to ignore the errors and continue taking backup. Regarding the error

Re: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-24 Thread Suresh Kuna
AM, Prabhat Kumar aim.prab...@gmail.comwrote: correct. mysqldump by default has --lock-tables enabled, which means it tries to lock all tables to be dumped before starting the dump. And doing LOCK TABLES t1, t2, ... for really big number of tables will inevitably exhaust all available file

Re: Slower performance with LOCK TABLES

2011-09-23 Thread Johan De Meersman
explanation WHY this would be the case, despite the fact that the documentation states otherwise (see: Right here: http://dev.mysql.com/doc/refman/5.5/en/lock-tables-restrictions.html) I believe you're misinterpreting that, as is the author from the blog you originally referenced. What it says

mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-23 Thread Shafi AHMED
Folks I have a mysql database of 200G size and the backup fails due to the foll. Issue. mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES Can someone assist pls.? Best Rgs, Shafi AHMED

Re: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-23 Thread Johan De Meersman
TABLES Folks I have a mysql database of 200G size and the backup fails due to the foll. Issue. mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES Can someone assist pls.? Best Rgs, Shafi AHMED -- Bier met grenadyn Is als

Re: Slower performance with LOCK TABLES

2011-09-23 Thread Hank
. This query takes about 3.5 hours when I don't use LOCK TABLES, and over 4 hours when I do use LOCK TABLES. Most peculiar. Is the difference in performance consistent in repeated executions? yes, I've done these tests about a dozen times now, and while not exactly scientific

Re: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-23 Thread Dan Nelson
In the last episode (Sep 23), Shafi AHMED said: I have a mysql database of 200G size and the backup fails due to the foll. Issue. mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES Can someone assist pls.? $ perror 24 OS

Re: Slower performance with LOCK TABLES

2011-09-23 Thread Hank
trying to find a logical or reasonable explanation WHY this would be the case, despite the fact that the documentation states otherwise (see: Right here: http://dev.mysql.com/doc/refman/5.5/en/lock-tables-restrictions.html) I believe you're misinterpreting that, as is the author from the blog

Re: Slower performance with LOCK TABLES

2011-09-23 Thread Hal�sz S�ndor
LOCK TABLES and UNLOCK TABLES there is no key-cache flushing. InnoDB is not mentioned. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: mysqldump: Got error: 1017: Can't find file: './ssconsole/ss_requestmaster.frm' (errno: 24) when using LOCK TABLES

2011-09-23 Thread Prabhat Kumar
correct. mysqldump by default has --lock-tables enabled, which means it tries to lock all tables to be dumped before starting the dump. And doing LOCK TABLES t1, t2, ... for really big number of tables will inevitably exhaust all available file descriptors, as LOCK needs all tables to be opened

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Hank
million records each, so anything I can do to increase the performance of these long running queries will shorten the migration running time. What I was referring to was that in the documentation, that when using LOCK TABLES, mysql does not update the key cache until the lock is released, versus

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Antony T Curtis
Even for MyISAM tables, LOCK TABLES is not usually the best solution for increasing performance. When there is little to no contention, LOCK TABLES doesn't offer much value. MyISAM works best when you can get more work done in a statement: Instead of executing a bunch of insert statements

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Hank
That is what I'm doing. I'm doing a correlated update on 200 million records. One UPDATE statement. Also, I'm not asking for a tutorial when not to use LOCK TABLES. I'm trying to figure out why, despite what the documentation says, using LOCK TABLES hinders performance for large update

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Ananda Kumar
records. One UPDATE statement. Also, I'm not asking for a tutorial when not to use LOCK TABLES. I'm trying to figure out why, despite what the documentation says, using LOCK TABLES hinders performance for large update statements on MYISAM tables when it is supposed to increase performance

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Hank
than ur individual update stmt. regards anandkl On Thu, Sep 22, 2011 at 8:24 PM, Hank hes...@gmail.com wrote: That is what I'm doing. I'm doing a correlated update on 200 million records. One UPDATE statement. Also, I'm not asking for a tutorial when not to use LOCK TABLES. I'm trying

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Ananda Kumar
...@gmail.com wrote: That is what I'm doing. I'm doing a correlated update on 200 million records. One UPDATE statement. Also, I'm not asking for a tutorial when not to use LOCK TABLES. I'm trying to figure out why, despite what the documentation says, using LOCK TABLES hinders performance

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Hank
for a tutorial when not to use LOCK TABLES. I'm trying to figure out why, despite what the documentation says, using LOCK TABLES hinders performance for large update statements on MYISAM tables when it is supposed to increase performance on exactly the type of queries I am performing. If you

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Ananda Kumar
...@gmail.com wrote: That is what I'm doing. I'm doing a correlated update on 200 million records. One UPDATE statement. Also, I'm not asking for a tutorial when not to use LOCK TABLES. I'm trying to figure out why, despite what the documentation says, using LOCK TABLES hinders performance

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Hank
Like I said, the problem is not just one particular SQL statement. It is several dozen statements operating on tables with several hundred million records. The problem is that I am finding that when I use LOCK TABLES, these queries run slower (please read my ORIGINAL post with all

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Ananda Kumar
use LOCK TABLES, these queries run slower (please read my ORIGINAL post with all this information). I am trying to find a logical or reasonable explanation WHY this would be the case, despite the fact that the documentation states otherwise (see: Right here: http://dev.mysql.com/doc/refman

Re: Slower performance with LOCK TABLES

2011-09-22 Thread Hank
million records. The problem is that I am finding that when I use LOCK TABLES, these queries run slower (please read my ORIGINAL post with all this information). Wandering out my area of expertise here :-) but have you done any key cache tuning or are you running with the defaults? mysql show

Slower performance with LOCK TABLES

2011-09-21 Thread Hank
According to everything I've read, using LOCK TABLES...WRITE for updates, inserts and deletes should improve performance of mysql server, but I think I've been seeing the opposite effect. I've been doing quite a bit of testing on a 64bit install of CentOS 5.5 installed as a guest OS on a VMWare

Re: Slower performance with LOCK TABLES

2011-09-21 Thread Antony T Curtis
LOCK TABLES...WRITE is very likely to reduce performance if you are using a transactional storage engine, such as InnoDB/XtraDB or PBXT. The reason is that only one connection is holding the write lock and no other concurrent operation may occur on the table. LOCK TABLES is only really

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-06 Thread Johan De Meersman
I haven't bothered to look for the bug, but it seems to me to be quite reasonable default behaviour to lock the whole lot when you're dumping transactional tables - it ensures you dump all tables from the same consistent view. I would rather take this up with the ZRM people - it should just

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-06 Thread agd85
On Mon, 06 Jun 2011 12:44 +0200, Johan De Meersman vegiv...@tuxera.be wrote: I haven't bothered to look for the bug, but it seems to me to be quite reasonable default behaviour to lock the whole lot when you're dumping transactional tables - it ensures you dump all tables from the same

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-06 Thread Johan De Meersman
- Original Message - From: ag...@airpost.net Excluding 'performance_schema' appears to eliminate the error. And it seems does NOT cause a reliability-of-the-backup problem. Hah, no, backing that up is utterly pointless. Never noticed it doing that. It's basically a virtual schema

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-06 Thread agd85
On Mon, 06 Jun 2011 18:54 +0200, Johan De Meersman vegiv...@tuxera.be wrote: Excluding 'performance_schema' appears to eliminate the error. And it seems does NOT cause a reliability-of-the-backup problem. Hah, no, backing that up is utterly pointless. that's a useful/final confirmation.

upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread agd85
TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES -- manual:backup:ERROR: mysqldump did not succeed. Command used is /usr/bin/mysqldump --opt --extended-insert --create-options --default-character-set=utf8 --routines

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread Reindl Harald
/cache/mysql/mysql.sock --databases drupal6 performance_schema /var/mysql-bkup/manual/20110605131003/backup.sql mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread agd85
'@'localhost' IDENTIFIED BY PASSWORD '*D...D' | | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON `drupal6`.* TO 'drupal_admin

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread Reindl Harald
the grant statements does nobody interest maybe use phpmyadmin for a clearer display mysql select * from mysql.user where user='root' limit 1;

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread agd85
fwiw, others are seeing this. e.g., in addition to the two bugs i'd already referenced, http://www.directadmin.com/forum/showthread.php?p=202053 and one http://qa.lampcms.com/q122897/Can-t-backup-mysql-table-with-mysqldump-SELECT-LOCK-TABL-command claims a solution Add --skip-add-locks to

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread Reindl Harald
hm - bad i would use a replication slave and stop him for consistent backups because dumb locks are not really a good solution independent if this works normally Am 05.06.2011 23:26, schrieb ag...@airpost.net: fwiw, others are seeing this. e.g., in addition to the two bugs i'd already

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread Reindl Harald
BTW WHY is everybody ansering to the list AND the author of the last post? this reults in get every message twice :-( Am 05.06.2011 23:26, schrieb ag...@airpost.net: fwiw, others are seeing this. e.g., in addition to the two bugs i'd already referenced,

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread agd85
On Sun, 05 Jun 2011 23:30 +0200, Reindl Harald h.rei...@thelounge.net wrote: BTW WHY is everybody ansering to the list AND the author of the last post? this reults in get every message twice :-( Reply - sends to ONLY the From == h.rei...@thelounge.net Reply to all sends to BOTH the From ==

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread agd85
On Sun, 05 Jun 2011 23:29 +0200, Reindl Harald h.rei...@thelounge.net wrote: i would use a replication slave and stop him for consistent backups because dumb locks are not really a good solution independent if this works normally unfortunately, i have no idea what that means. something's

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread Reindl Harald
Am 05.06.2011 23:49, schrieb ag...@airpost.net: On Sun, 05 Jun 2011 23:29 +0200, Reindl Harald h.rei...@thelounge.net wrote: i would use a replication slave and stop him for consistent backups because dumb locks are not really a good solution independent if this works normally

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread agd85
i still have no idea why this is necessary. there seems to be a but, problem, misconfiguration, etc. wouldn't it make some sense to try to FIX it, rather than setting up a completely different server? perhaps someone with an idea of the problem and its solution will be able to chime in. --

Re: upgraded from 5.1-5.5. now getting a mysqldump ERROR 1142: SELECT,LOCK TABL command denied to user 'root'@'localhost' for table 'cond_instances' when using LOCK TABLES. a bug or my config?

2011-06-05 Thread Reindl Harald
Am 05.06.2011 23:55, schrieb ag...@airpost.net: i still have no idea why this is necessary. take it or not it is a professional solution which works for databses with 20 GB every day here with rsync without interrupt/lock mysqld a second and it is much faster there seems to be a but,

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-20 Thread Tanmay Pradhan
           |          |            | |              |             0 |           0 |               0 |             0 | However, I still gave the following cmd. mysql GRANT select, lock tables ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password'; mysql flush privileges; u...@localhost entry after

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Krishna Chandra Prajapati
; After this, mysqldump failed with the following error: $ /usr/local/mysql/bin/mysqldump -h localhost -u root ABC_DATABASE abc.dump mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES Even following cmd failed: $ /usr/local/mysql/bin

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Michael Dykman
mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES Even following cmd failed: $ /usr/local/mysql/bin/mysqldump -h host_name -u user1 -p ABC_DATABASE abc.dump mysqldump: Got error: 1045: Access denied for user 'user1'@'IP

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Shawn Green (MySQL)
/mysql/bin/mysqldump -h localhost -u root ABC_DATABASE abc.dump mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES To fix this, you need to reset the DEFINER for a TRIGGER defined within the database so that it is defined as a valid user

Re: mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-19 Thread Tanmay Pradhan
| Y| || | | 0 | 0 | 0 | 0 | However, I still gave the following cmd. mysql GRANT select, lock tables ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password'; mysql flush privileges; u...@localhost

mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES

2010-10-18 Thread Tanmay Pradhan
= '%'; mysql FLUSH PRIVILEGES; After this, mysqldump failed with the following error: $ /usr/local/mysql/bin/mysqldump -h localhost -u root ABC_DATABASE abc.dump mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TABLES Even following cmd

Re: Lock Tables Question

2007-06-05 Thread Brent Baisley
I think you're missing the concept of a transaction in the database sense. The idea behind a transaction is that you can perform multiple steps and if you don't complete all steps, any changes are reversed. The reversal process is handled by the database. A good example is moving money from bank

Re: Lock Tables Question

2007-06-05 Thread David T. Ashley
On 6/5/07, Brent Baisley [EMAIL PROTECTED] wrote: I think you're missing the concept of a transaction in the database sense. The idea behind a transaction is that you can perform multiple steps and if you don't complete all steps, any changes are reversed. The reversal process is handled by the

Re: Lock Tables Question

2007-06-05 Thread Baron Schwartz
to make locks 'database-local.' In my experience, using LOCK TABLES becomes a spaghetti problem that begins to involve more and more things until you are going through *serious* contortions. I would avoid it at all costs. Baron -- MySQL General Mailing List For list archives: http

Re: Lock Tables Question

2007-06-05 Thread David T. Ashley
('database_name'). That should handle your requirement to make locks 'database-local.' In my experience, using LOCK TABLES becomes a spaghetti problem that begins to involve more and more things until you are going through *serious* contortions. I would avoid it at all costs. My only concern

Re: Lock Tables Question

2007-06-05 Thread Paul McCullagh
Hi David, On Jun 5, 2007, at 3:55 PM, David T. Ashley wrote: My only concern with GET_LOCK() is that lock is server-global rather than database-global. This makes attacks possible in a shared setting (some bad person could disable your database code by going after your lock). My solution

Lock Tables Question

2007-06-04 Thread David T. Ashley
I decided to go with a simple paradigm for my web-based database. Rather than transactions, each process locks the entire database while it is changing something, then unlocks it. This just serializes access (all other processes will block until the one modifying the database has finished).

Re: Lock Tables Question

2007-06-04 Thread Gerald L. Clark
David T. Ashley wrote: I decided to go with a simple paradigm for my web-based database. Rather than transactions, each process locks the entire database while it is changing something, then unlocks it. This just serializes access (all other processes will block until the one modifying the

Re: Lock Tables Question

2007-06-04 Thread David T. Ashley
On 6/4/07, Gerald L. Clark [EMAIL PROTECTED] wrote: David T. Ashley wrote: LOCK TABLE thistable, thattable, theothertable, goshthislistcangetlongtable; Do whatever is needed; UNLOCK TABLES; You could use a string lock for this. Thanks for the suggestion. It looks logically correct.

RE: Lock Tables Question

2007-06-04 Thread Jerry Schwartz
www.the-infoshop.com www.giiexpress.com www.etudes-marche.com -Original Message- From: David T. Ashley [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 3:54 PM To: mysql@lists.mysql.com Subject: Re: Lock Tables Question On 6/4/07, Gerald L. Clark [EMAIL PROTECTED] wrote

Re: Lock Tables Question

2007-06-04 Thread David T. Ashley
On 6/4/07, Jerry Schwartz [EMAIL PROTECTED] wrote: Whatever you do, make sure that every bit of code that locks multiple resources locks them in the same order. That's the only way to avoid deadlocks. Hi Jerry, I really appreciate the good advice. However, my original question is still

Re: Lock Tables Question

2007-06-04 Thread Gerald L. Clark
question is really whether MySQL might do some strange optimizations ... or somehow buffer the middle query so that it completes after the UNLOCK. Thanks, Dave. Once you issue a LOCK TABLES command, you may not access any tables not in the LOCK statement. You must lock *ALL* tables you will use

Re: Lock Tables Question

2007-06-04 Thread David T. Ashley
Once you issue a LOCK TABLES command, you may not access any tables not in the LOCK statement. You must lock *ALL* tables you will use, perform your updates, and then UNLOCK TABLES. I didn't know that. I reviewed the documentation. Thanks. OK, then my only remaining question is how many

Re: LOCK TABLES

2006-10-17 Thread Visolve DB Team
LocalSettings.php, then go to the wiki). 2. --opt is enabled by default with mysqldump, and part of what it does it lock tables. So try the backup without lock tables, by adding --skip-lock-tables. Thanks ViSolve DB Team. - Original Message - From: mdpeters [EMAIL PROTECTED] To: mysql

Re: LOCK TABLES

2006-10-17 Thread mdpeters
mysqldump --user root --password=password horsewiki horsewiki.sql Dan Buettner wrote: Hmmm, sounds like something's pretty abnormal here. Any idea what may have been done here? I wonder if you could step around this with a call to mysqldump that doesn't explicitly lock tables ... what

Re: LOCK TABLES

2006-10-17 Thread mdpeters
I tried this first to no avail. mysqldump --user root --password=password --skip-lock-tables horsewiki horsewiki.sql mysqldump: mysqldump: Couldn't execute 'show create table `archive`': Table 'horsewiki.archive' doesn't exist (1146) I'll try the update next. Visolve DB Team wrote: Hi

RE: LOCK TABLES

2006-10-17 Thread Jerry Schwartz
Buettner Cc: mysql@lists.mysql.com Subject: Re: LOCK TABLES I tried mv archive.frm .archive.frm first. Then I ran mysqldump again. It moves past archive and onto another table. I did this 6 times, each time moving the next one it complained about until I stopped and put them all back. Dan

Re: LOCK TABLES

2006-10-17 Thread mdpeters
Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: mdpeters [mailto:[EMAIL PROTECTED] Sent: Monday, October 16, 2006 9:19 PM To: Dan Buettner Cc: mysql@lists.mysql.com Subject: Re: LOCK TABLES I tried mv archive.frm .archive.frm

LOCK TABLES

2006-10-16 Thread mdpeters
this: # mysqldump --user root --password=password horsewiki horsewiki.sql and get this: mysqldump: Got error: 1146: Table 'horsewiki.archive' doesn't exist when using LOCK TABLES I have tried using phpMyAdmin-2.9.0.2. It seems to let me export the database to an SQL file. When I attempt to import

Re: LOCK TABLES

2006-10-16 Thread Dan Buettner
10 system using the mysql-max-5.0.20a-solaris10-sparc version. My database name is horsewiki. I execute this: # mysqldump --user root --password=password horsewiki horsewiki.sql and get this: mysqldump: Got error: 1146: Table 'horsewiki.archive' doesn't exist when using LOCK TABLES I have tried

Re: LOCK TABLES

2006-10-16 Thread mdpeters
Sparc 10 system using the mysql-max-5.0.20a-solaris10-sparc version. My database name is horsewiki. I execute this: # mysqldump --user root --password=password horsewiki horsewiki.sql and get this: mysqldump: Got error: 1146: Table 'horsewiki.archive' doesn't exist when using LOCK TABLES I have

Re: LOCK TABLES

2006-10-16 Thread Dan Buettner
'horsewiki.archive' doesn't exist when using LOCK TABLES I have tried using phpMyAdmin-2.9.0.2. It seems to let me export the database to an SQL file. When I attempt to import it on the other system, I get this: Error There seems to be an error in your SQL query. The MySQL server error

Re: LOCK TABLES

2006-10-16 Thread mdpeters
. This is a Solaris Sparc 10 system using the mysql-max-5.0.20a-solaris10-sparc version. My database name is horsewiki. I execute this: # mysqldump --user root --password=password horsewiki horsewiki.sql and get this: mysqldump: Got error: 1146: Table 'horsewiki.archive' doesn't exist when using LOCK

Re: Re: LOCK TABLES

2006-10-16 Thread Dan Buettner
Hmmm, sounds like something's pretty abnormal here. Any idea what may have been done here? I wonder if you could step around this with a call to mysqldump that doesn't explicitly lock tables ... what is the commad you're running again? Dan On 10/16/06, mdpeters [EMAIL PROTECTED] wrote: I

re[2]: (Windows) drop / create index and lock tables

2006-10-04 Thread Rob Desbois
), and want to ensure data integrity while I recreate it. The following is what I thought I had to do: LOCK TABLES foo WRITE; DROP INDEX `keyX` ON `foo`; CREATE UNIQUE INDEX `keyX` ON `foo` (`column1`,`column2`); UNLOCK TABLES; After much head-scratching due to Error Code : 1100 Table 'foo

(Windows) drop / create index and lock tables

2006-10-03 Thread Rob Desbois
), and want to ensure data integrity while I recreate it. The following is what I thought I had to do: LOCK TABLES foo WRITE; DROP INDEX `keyX` ON `foo`; CREATE UNIQUE INDEX `keyX` ON `foo` (`column1`,`column2`); UNLOCK TABLES; After much head-scratching due to Error Code : 1100 Table 'foo

Re: (Windows) drop / create index and lock tables

2006-10-03 Thread Dan Buettner
), UNIQUE KEY `keyX`(`column1`)); I have to perform an update of the key to extend it to both columns (it's an example, ignore the content of the key), and want to ensure data integrity while I recreate it. The following is what I thought I had to do: LOCK TABLES foo WRITE; DROP INDEX `keyX

Re: MySQL lock tables - bug or not?

2006-07-30 Thread James Harvard
Thanks for your reply. I repeated your test with the same results on 4.1.21 (database in question is on 4.1). I'll give the ISP another kick and see what they have to say. So there's no other reason why an ISP might not want to grant LOCK TABLES in a shared hosting environment? Thanks, James

MySQL lock tables - bug or not?

2006-07-28 Thread James Harvard
I'm using MySQL as the db for Drupal (PHP based CMS), on shared hosting. There are repeated errors because the db user does not have permission for LOCK TABLES, which Drupal uses. The ISP says that they don't grant this permission because ... MySQL has a bug which allows users with GrantTables

Re: MySQL lock tables - bug or not?

2006-07-28 Thread Eric Braswell
I am not aware of any such bug related to the LOCK TABLES privilege. Like you I could not find a mention in our bugs database, for any version. It is easy to demonstrate that this is not the case. If permissions are properly set up, LOCK TABLES can be restricted to a database just like every

Re: Options --lock-tables, --lock-all-tables do not work in mysql-4.1.8

2005-10-22 Thread Gleb Paharenko
. mysqldump --opt database_name database_name.sql mysqldump --lock-tables database_name database_name.sql mysqldump --skip-opt --lock-tables database_name database_name.sql mysqldump --lock-all-tables database_name database_name.sql Unfortunately options --lock-tables, --lock-all

Options --lock-tables, --lock-all-tables do not work in mysql-4.1.8

2005-10-21 Thread Slawomir Orlowski \(CYMPAK\)
hello, I have mysql-4.1.8 compiled form source working on RH7.2. I have tried to backup my database with mysqldump. mysqldump --opt database_name database_name.sql mysqldump --lock-tables database_name database_name.sql mysqldump --skip-opt --lock-tables database_name database_name.sql

Re: Options --lock-tables, --lock-all-tables do not work in mysql-4.1.8

2005-10-21 Thread Devananda
Slawomir Orlowski (CYMPAK) wrote: hello, I have mysql-4.1.8 compiled form source working on RH7.2. I have tried to backup my database with mysqldump. mysqldump --opt database_name database_name.sql mysqldump --lock-tables database_name database_name.sql mysqldump --skip-opt --lock-tables

Re: lock tables and sql cache

2005-03-31 Thread Gleb Paharenko
Hello. I think it is a weird behavior. I've reported a bug: http://bugs.mysql.com/bug.php?id=9511 Bob O'Neill [EMAIL PROTECTED] wrote: If I try to read table 'b' after locking table 'a', I expect to get the error message Table 'b' was not locked with LOCK TABLES. However

lock tables and sql cache

2005-03-30 Thread Bob O'Neill
If I try to read table 'b' after locking table 'a', I expect to get the error message Table 'b' was not locked with LOCK TABLES. However, if my query that accesses table b is stored in the query cache, I don't get the error. This causes a problem in the following scenario: User 1: LOCK TABLES

(Errcode: 24) when using LOCK TABLES doing backup

2004-11-08 Thread Diego Martini
' not found (Errcode: 24) when using LOCK TABLES But the message not is always with the table Abook_vx.MYD. Sometimes appear in Abook_vx.MYD, other in data files .MYD and other in .frm files. Our database has 7000 tables. Could be this the problem ? The backup support say that the problem resides

lock tables

2004-10-11 Thread Melanie Courtot
Hi, I'm a bit confused by the lock mechanism under mysql. When user A does an update on table 1, the table is automatically locked by mysql?that means at the same time user B won't be able to modify the same row? Or do I have to specify the lock for each query? And what about temporary tables?

Re: lock tables

2004-10-11 Thread Benjamin Arai
You only need to lock whene you are going to run a query that contains a series of actions and they all have to happen at the same time. As for single queries, they are already atomic, so you don't need to put and locks around them. On Mon, 11 Oct 2004 11:14:36 +0100, Melanie Courtot [EMAIL

LOCK TABLES permission and 4.0.15a

2004-06-08 Thread Fernando Monteiro
Hello, My ISP is using the old version 4.0.15a and have no early plans to upgrade it. I'm trying to issue LOCK/UNLOCK TABLES commands at my ISP's MySQL, and I'm getting an access denied error. I asked them to give me the lock tables permission, but they answered this permission option isn't

Re: LOCK TABLES permission and 4.0.15a

2004-06-08 Thread Michael Stassen
Version 4.0.15 comes after version 4.0.2 (15 2), so the version is not a problem here. From the manual: As of MySQL 4.0.2, to use LOCK TABLES you must have the global LOCK TABLES privilege and a SELECT privilege for the involved tables. http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html

Re: LOCK TABLES permission and 4.0.15a

2004-06-08 Thread Michael Stassen
Fernando Monteiro wrote: Hello, Michael, Version 4.0.15 comes after version 4.0.2 (15 2), so the version is not a problem here. (...) I asked them to give me the lock tables permission, but they answered this permission option isn't available on versions prior to 4.0.2. They also told me

VB .NET MYSQL - LOCK TABLES

2004-06-03 Thread Mirco Santori
Hello MySql List, I have create connection with VB .NET MySql, and now i must use the LOCK TABLES statment. I want to know how i can use this sintax .. i must open connection - begin the LOCK TABLES - begin the select statment, and then UNLOCK TABLES .. I think so that is not correctly

RE: VB .NET MYSQL - LOCK TABLES

2004-06-03 Thread Victor Pendleton
MYSQL - LOCK TABLES Hello MySql List, I have create connection with VB .NET MySql, and now i must use the LOCK TABLES statment. I want to know how i can use this sintax .. i must open connection - begin the LOCK TABLES - begin the select statment, and then UNLOCK TABLES .. I think so

Re: VB .NET MYSQL - LOCK TABLES

2004-06-03 Thread Larry Lowry
: Thursday, June 03, 2004 1:25 PM Subject: RE: VB .NET MYSQL - LOCK TABLES You will need to reuse your database connection, do not open a new connection with each call or the lock will not be there. LOCK TABLE table1 READ; SELECT * FROM table1; UNLOCK TABLES; -Original Message- From

Blocking Selects with LOCK TABLES

2004-05-10 Thread Lou Olsten
to the table. Other threads are blocked. So, I've got two threads going (T1, T2). T1 issues LOCK TABLES transtest WRITE; But when I go to T2, I can still issue: SELECT * FROM transtest; and retrieve all the data. I CANNOT update, so I know the command is at least partially working. As I understand

Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Victoria Reznichenko
holding the lock can read from or write to the table. Other threads are blocked. So, I've got two threads going (T1, T2). T1 issues LOCK TABLES transtest WRITE; But when I go to T2, I can still issue: SELECT * FROM transtest; and retrieve all the data. I CANNOT update, so I know the command

Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Robert A. Rosenberg
At 12:40 -0400 on 05/10/2004, Lou Olsten wrote about Blocking Selects with LOCK TABLES: x-charset iso-8859-1According to the docs (http://dev.mysql.com/doc/mysql/en/LOCK_TABLES.html) : If a thread obtains a READ lock on a table, that thread (and all other threads) can only read from the table

Re: Blocking Selects with LOCK TABLES

2004-05-10 Thread Lou Olsten
Looks like it's a query cache issue. In this case you get result from the cache. That was it. THANKS - Original Message - From: Victoria Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 10, 2004 1:20 PM Subject: Re: Blocking Selects with LOCK TABLES Lou

LOCK TABLES and SHOW TABLE STATUS FROM - deadlock? (3.23.58)

2004-03-23 Thread Ondra Zizka
,$spoj)){ decho(' A '.$sError = sql_error(mysql_error(),$sql)); } $sql = LOCK TABLES $gt_firmy WRITE; if(!$res = mysql_query($sql,$spoj)){ decho(' A '.$sError = sql_error(mysql_error(),$sql)); } $sql = SELECT * FROM $gt_firmy AS f;if(!$res = mysql_query($sql,$spoj)){ decho(' B '.$sError

  1   2   >