feature request: statement SELECT...(INSERT|UPDATE) :)

2008-01-30 Thread Dmitry E. Oboukhov
with these very strings. Is it possible to add to the syntax of the INSERT operator appoximately in such way: INSERT [IGNORE] INTO ... - a general syntax SELECT list INSERT [IGNORE] INTO ... - an added one. UPDATE ... - a general syntax SELECT list UPDATE - an added one. Where can it be needed

Re: feature request: statement SELECT...(INSERT|UPDATE) :)

2008-01-30 Thread Jochem van Dieten
On Jan 30, 2008 12:50 PM, Dmitry E. Oboukhov wrote: Is it possible to add to the syntax of the INSERT operator appoximately in such way: SELECT list INSERT [IGNORE] INTO ... - an added one. SELECT list UPDATE - an added one. PS: I understand that adding the changes into a language

Re: feature request: statement SELECT...(INSERT|UPDATE) :)

2008-01-30 Thread Martijn Tonies
On Jan 30, 2008 12:50 PM, Dmitry E. Oboukhov wrote: Is it possible to add to the syntax of the INSERT operator appoximately in such way: SELECT list INSERT [IGNORE] INTO ... - an added one. SELECT list UPDATE - an added one. PS: I understand that adding the changes

Re: Deadlocks with High Concurrency SELECT FOR UPDATE

2007-10-16 Thread Baron Schwartz
Hi William, William Newton wrote: Hello List, I have this table that has a single row in it: CREATE TABLE `quicktable` ( `x` int(11) NOT NULL auto_increment, `quick_id` int(11) NOT NULL default '0', PRIMARY KEY (`x`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 select *

Deadlocks with High Concurrency SELECT FOR UPDATE

2007-10-15 Thread William Newton
Hello List, I have this table that has a single row in it: CREATE TABLE `quicktable` ( `x` int(11) NOT NULL auto_increment, `quick_id` int(11) NOT NULL default '0', PRIMARY KEY (`x`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 select * from quicktable; +---+--+ | x |

Re: SELECT and UPDATE together, with LIMIT? (incremental external indexing)

2005-02-07 Thread SGreen
Your solution is as good as any I can think of. If your source tables are InnoDB you could wrap your SELECT/UPDATE processing in a transaction to help make it even more robust. It might speed things up if you omit the offset to your LIMIT clause and just do: SELECT pkfield FROM source_table

Re: SELECT and UPDATE together, with LIMIT? (incremental external indexing)

2005-02-07 Thread Nick Arnett
[EMAIL PROTECTED] wrote: Your solution is as good as any I can think of. If your source tables are InnoDB you could wrap your SELECT/UPDATE processing in a transaction to help make it even more robust. It might speed things up if you omit the offset to your LIMIT clause and just do: Yes

select and update field in one query

2004-06-28 Thread darren
Hi all, I need to select the top 1000 records based on the usage field and update the checked field to '1'. I am currently doing it in 2 statements; i.e. select first then update from a MYSQL_ROW array. How do I do it in just a single statement? Please advice on a better way. Also...will doing

Re: select and update field in one query

2004-06-28 Thread Rhino
- Original Message - From: darren [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 28, 2004 11:42 AM Subject: select and update field in one query Hi all, I need to select the top 1000 records based on the usage field and update the checked field to '1'. I am currently

Re: select and update field in one query

2004-06-28 Thread SGreen
: Fax to: 06/28/2004 11:42 Subject: select and update field in one query

Re: select and update field in one query

2004-06-28 Thread Michael Stassen
Rhino wrote: - Original Message - From: darren [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 28, 2004 11:42 AM Subject: select and update field in one query Hi all, I need to select the top 1000 records based on the usage field and update the checked field to '1'. I am currently

Re: The corrumpion detected on SELECT AFTER UPDATE ON BLOB COLUMN

2003-02-04 Thread Sinisa Milivojevic
Dyego Souza do Carmo writes: How-To-Repeat: create table teste ( id integer auto_increment unique,imagem LONGBLOB not null); insert into teste (id) values (1); update teste set image = (IMG OF 300K) where id = 1; select if(imagem is null, ERRO, OK) from escriba2.teste where id = 1; * My

The corrumpion detected on SELECT AFTER UPDATE ON BLOB COLUMN

2003-02-03 Thread Dyego Souza do Carmo
How-To-Repeat: create table teste ( id integer auto_increment unique,imagem LONGBLOB not null); insert into teste (id) values (1); update teste set image = (IMG OF 300K) where id = 1; select if(imagem is null, ERRO, OK) from escriba2.teste where id = 1; * My System is Linux 2.4.18 * Table table

RE: SELECT and UPDATE at the same time?

2002-12-19 Thread ir000387
it will impact you. HTH, Dan Cumpian -Original Message- From: Jeff Snoxell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: SELECT and UPDATE at the same time? Hello again, I'm selecting a group of records from my database. I

RE: SELECT and UPDATE at the same time?

2002-12-19 Thread Paul DuBois
that? through the record set. But that doesn't sound like it will impact you. HTH, Dan Cumpian -Original Message- From: Jeff Snoxell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: SELECT and UPDATE at the same time? Hello again

RE: SELECT and UPDATE at the same time?

2002-12-19 Thread Dan Cumpian
Cumpian; 'Jeff Snoxell'; [EMAIL PROTECTED] Subject: RE: SELECT and UPDATE at the same time? At 13:23 -0500 12/19/02, [EMAIL PROTECTED] wrote: Well, the only basis I have is personal experience from connecting to a local MySQL database. The components I use for connecting to MySQL with Delphi does cache

Re: SELECT and UPDATE at the same time?

2002-12-18 Thread Paul DuBois
At 17:56 + 12/18/02, Jeff Snoxell wrote: Hello again, I'm selecting a group of records from my database. I then loop through the selected records and do some work based on what I find. But what I also want to do as I interrogate each record is update some of its fields with new values...

SELECT and UPDATE at the same time?

2002-12-18 Thread Jeff Snoxell
Hello again, I'm selecting a group of records from my database. I then loop through the selected records and do some work based on what I find. But what I also want to do as I interrogate each record is update some of its fields with new values... but won't that screw up the outer loop? I mean

Re: Re: SELECT and UPDATE at the same time?

2002-12-18 Thread Jeff Snoxell
SELECT * FROM my_table WHERE Age 50 AND UPDATE Status = OLD No. That's goofy anyway. Why wouldn't you just use a regular UPDATE query? UPDATE mytable Status = OLD WHERE Age 50; Cos I want to do a fairly long-winded process on the records of those who are Age50 and subsequently update

Re: SELECT and UPDATE at the same time?

2002-12-18 Thread Paul DuBois
address : [EMAIL PROTECTED] [EMAIL PROTECTED] - Original Message - From: Jeff Snoxell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 18, 2002 7:56 PM Subject: SELECT and UPDATE at the same time? Hello again, I'm selecting

Re: SELECT and UPDATE at the same time?

2002-12-18 Thread Gelu Gogancea
] To: [EMAIL PROTECTED] Sent: Wednesday, December 18, 2002 7:56 PM Subject: SELECT and UPDATE at the same time? Hello again, I'm selecting a group of records from my database. I then loop through the selected records and do some work based on what I find. But what I also want to do as I

RE: Re: SELECT and UPDATE at the same time?

2002-12-18 Thread Mike Hillyer
:54 PM To: [EMAIL PROTECTED] Subject: Re: Re: SELECT and UPDATE at the same time? SELECT * FROM my_table WHERE Age 50 AND UPDATE Status = OLD No. That's goofy anyway. Why wouldn't you just use a regular UPDATE query? UPDATE mytable Status = OLD WHERE Age 50; Cos I want to do a fairly long

RE: SELECT and UPDATE at the same time?

2002-12-18 Thread Dan Cumpian
-Original Message- From: Jeff Snoxell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: SELECT and UPDATE at the same time? Hello again, I'm selecting a group of records from my database. I then loop through the selected records and do some

RE: SELECT and UPDATE at the same time?

2002-12-18 Thread Paul DuBois
that? through the record set. But that doesn't sound like it will impact you. HTH, Dan Cumpian -Original Message- From: Jeff Snoxell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: SELECT and UPDATE at the same time? Hello again

Simultaneous SELECT and UPDATE on the same table

2002-03-08 Thread Corin Hartland-Swann
Hi there, I have a medium-size table (3 million rows) with several pieces of data including an ID and a number (called id and num below). I have a program which builds a hash in perl from a data file of the 'new' numbers for each id, only some of which have changed (5-10%). To update the table

Re: Simultaneous SELECT and UPDATE on the same table

2002-03-08 Thread Paul DuBois
At 17:00 + 3/8/02, Corin Hartland-Swann wrote: Hi there, I have a medium-size table (3 million rows) with several pieces of data including an ID and a number (called id and num below). I have a program which builds a hash in perl from a data file of the 'new' numbers for each id, only some

RE: Simultaneous SELECT and UPDATE on the same table

2002-03-08 Thread Roger Baklund
* Paul DuBois At 17:00 + 3/8/02, Corin Hartland-Swann wrote: [...] This works for a varying number of rows (usually 5,000 to 10,000) before it silently exits the loop. I'm using MySQL 3.23.49a [...] That's also your problem. With mysql_use_result, it's *required* that you completely

RE: Simultaneous SELECT and UPDATE on the same table

2002-03-08 Thread Paul DuBois
At 21:14 +0100 3/8/02, Roger Baklund wrote: * Paul DuBois At 17:00 + 3/8/02, Corin Hartland-Swann wrote: [...] This works for a varying number of rows (usually 5,000 to 10,000) before it silently exits the loop. I'm using MySQL 3.23.49a [...] That's also your problem. With

RE: Simultaneous SELECT and UPDATE on the same table

2002-03-08 Thread Corin Hartland-Swann
Hi there, On Fri, 8 Mar 2002, Paul DuBois wrote: At 21:14 +0100 3/8/02, Roger Baklund wrote: * Paul DuBois At 17:00 + 3/8/02, Corin Hartland-Swann wrote: [...] This works for a varying number of rows (usually 5,000 to 10,000) before it silently exits the loop. I'm using MySQL

SELECT and UPDATE in one query?

2002-02-20 Thread Felix Richter
Hi! I need to SELECT some rows using a lengthy WHERE-clause and then to UPDATE these rows just to set a flag. What is the best way to do this (performance-wise)? Being able to do that in one single query would be great because otherwise I had to use transactions to be sure to match _exactly_

Re: SELECT and UPDATE in one query?

2002-02-20 Thread Fournier Jocelyn [Presence-PC]
Subject: SELECT and UPDATE in one query? Hi! I need to SELECT some rows using a lengthy WHERE-clause and then to UPDATE these rows just to set a flag. What is the best way to do this (performance-wise)? Being able to do that in one single query would be great because otherwise I had to use

Select and Update logjam

2001-12-11 Thread Brian J. Kifiak
Hi, I seem to be experiencing similair problems to what Sam Lam reported earlier this month (Subject: tables locked during long compound INSERT/DELETE?). What I've observed is that when I'm issuing an UPDATE on a table that also has SELECT queries being executed on it, everything seems to clog

Re: SELECT ... FOR UPDATE

2001-04-02 Thread Richard Ellerbrock
, at this moment, installing MySQL version 3.23.36. I noted that the "SELECT...FOR UPDATE" feature has been added. What does this do and how is it used? The online manual simply mentions that it exists; but doesn't explain what it is or how to use it. Thanks, An