Re: How to Detect MySql table update/difference

2009-08-06 Thread Martijn Tonies
Hi, Hi, I'm a novel developer of MySql and now I am trying to create a mysql query to detect table updates. I query a database table every X seconds, and i want to get only the different rows in the table. The result that I want to have is simply TABLE (t = now) - TABLE (t = X second ago) E

RE: How to Detect MySql table update/difference

2009-08-05 Thread Daevid Vincent
o:bs...@ymail.com] > Sent: Wednesday, August 05, 2009 2:57 PM > To: Rolando Edwards; mysql@lists.mysql.com > Subject: Re: How to Detect MySql table update/difference > > > Ok, but in this way I can only detect if it's done ONE type > of operation, for example if I add a row and

Re: How to Detect MySql table update/difference

2009-08-05 Thread BS TLC
. I think it's not a easy query (or set of queries), but I want to create one for this goal. However thanks for the hint about the difference between COUNT(1) and COUNT(*)! Thanks. -Original Message- From: Rolando Edwards Sent: Wednesday, August 05, 2009 23:12:09 Subject: RE: Ho

RE: How to Detect MySql table update/difference

2009-08-05 Thread Rolando Edwards
dnesday, August 05, 2009 10:30 AM To: mysql@lists.mysql.com Subject: How to Detect MySql table update/difference Hi, I'm a novel developer of MySql and now I am trying to create a mysql query to detect table updates. I query a database table every X seconds, and i want to get only the diff

How to Detect MySql table update/difference

2009-08-05 Thread BS TLC
Hi, I'm a novel developer of MySql and now I am trying to create a mysql query to detect table updates. I query a database table every X seconds, and i want to get only the different rows in the table. The result that I want to have is simply TABLE (t = now) - TABLE (t = X second ago) Every ti

Logout after table update

2007-12-05 Thread Éric Fournier/CSPQ
Hi everyone , I'm new to the mysql administration world (couple months). Couple days ago a client came up with the following situation he got logged out after editing a table (tt_content table part of typo3) He thinks he was kicked out because he tried to update a

Re: Multiple-table UPDATE unexpected result

2007-02-09 Thread ViSolve DB Team
| 10 | +--+--+ 4 rows in set (0.00 sec) Thanks ViSolve DB Team. - Original Message - From: "Thomas Spahni" <[EMAIL PROTECTED]> To: Cc: <[EMAIL PROTECTED]> Sent: Thursday, February 08, 2007 3:57 PM Subject: Multiple-table UPDATE unexpected result Dear listmember

Multiple-table UPDATE unexpected result

2007-02-08 Thread Thomas Spahni
Dear listmembers On mysql version 4.1.13 I execute a query of this type: UPDATE a LEFT JOIN b ON a.col = b.col SET a.x = a.x + b.y WHERE b.col IS NOT NULL; I expect that column a.x is updated for every match in the join but this is not the case. Table a is updated for the first match only as

Re: Table update

2007-01-20 Thread Jørn Dahl-Stamnes
On Saturday 20 January 2007 05:52, ViSolve DB Team wrote: > Hi > > Update will never support group by clause, only supports group functions; > Try as: > > Update teams t > inner join rider_team as rt on (rt.team_id=t.id) > inner join participants as p on (p.rider_id=rt.rider

Re: Table update

2007-01-19 Thread ViSolve DB Team
t.created = ( select min(starttime) from races), t.id=(select id from race where starttime=(select min(starttime) from race)) ; Thanks ViSolve DB Team. Original Message - From: "Jørn Dahl-Stamnes" <[EMAIL PROTECTED]> To: Sent: Thursday, January 18, 2007 3:13 AM Subject:

Table update

2007-01-17 Thread Jørn Dahl-Stamnes
I want to update new column in a table with data from other tables. The following query give me the data: select t.id,min(r.starttime) from teams as t inner join rider_team as rt on (rt.team_id=t.id) inner join participants as p on (p.rider_id=rt.rider_id) inner join races as r on (r

Re: find date an time of a table update

2006-12-21 Thread ViSolve DB Team
S where TABLE_NAME=''; Note 2: Check the user privilege to access the database. If not grant it. Thanks ViSolve DB Team. - Original Message - From: "Marcelo Fabiani" <[EMAIL PROTECTED]> To: Sent: Friday, December 22, 2006 6:21 AM Subject: find date an time of

find date an time of a table update

2006-12-21 Thread Marcelo Fabiani
Hi, I didn't find a way to know the time and date of the last update of table, not the data but the table info itself. Is this possible? I want to use this info in order to show it in a web page. Mysql 4.1 Apache Myisam Regards Marcelo Fabiani -- MySQL General Mailing List For list archive

RE: Multi table update

2005-01-03 Thread Jay Blanchard
[snip] I read 6) as saying that until you complete all of the calculations on a row, you don't change the data for the row. I could even interpret this as saying that you don't update ANY row on the table until you have completed the calculations for ALL of the rows. I read 7) as saying that you

RE: Multi table update

2004-12-31 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 12/30/2004 05:20:49 PM: > [snip] > > Anyhow, it has been a good discussion. No bugs were uprooted and > > everyone's understanding may have risen a notch. After a couple of > > decades using SQL I still find interesting topics to discuss. > > Yes, I t

RE: Multi table update OT

2004-12-30 Thread Jay Blanchard
[snip] ...tons o' stuff... [/snip] BTW...Happy New Year! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Multi table update

2004-12-30 Thread Jay Blanchard
[snip] > Anyhow, it has been a good discussion. No bugs were uprooted and > everyone's understanding may have risen a notch. After a couple of > decades using SQL I still find interesting topics to discuss. Yes, I too have enjoyed this conversation. Thank you for thinking out loud with me on such

RE: Multi table update

2004-12-30 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 12/30/2004 03:50:24 PM: > [snip] > ... a bunch of stuff > [/snip] > > It alomost sounds as if you're coming from a M$ campwhat you > describe are VIEWS. In a way it is, an internally generated view of the source/destination tables. > > Any

RE: Multi table update

2004-12-30 Thread Jay Blanchard
[snip] ... a bunch of stuff [/snip] It alomost sounds as if you're coming from a M$ campwhat you describe are VIEWS. Anyhow, the ANSI SQL standards specify some of the behaviors we have been talking about. Many DB manufacturers use the standards and implement other "features" like you des

RE: Multi table update

2004-12-30 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 12/30/2004 01:32:20 PM: > [snip] > I understand that is the behavior of the assignment operator. That's why > I used it. ;-) I expected the results to be 19 and 6 not 19 and 20. > This is just another example of the serialization of evaluation that >

RE: Multi table update

2004-12-30 Thread Jay Blanchard
[snip] I understand that is the behavior of the assignment operator. That's why I used it. ;-) I expected the results to be 19 and 6 not 19 and 20. This is just another example of the serialization of evaluation that occurs while processing a single row of data. I have the opinion that while proce

RE: Multi table update

2004-12-30 Thread Jay Blanchard
[snip] So the question is not, if a multi table update should be implemented serialized. The answer is clear: yes it should. The question is, on which data the subsequent updates should work. [/snip] It should work on the data specified in the update query. Each set statement is isolated and the

RE: Multi table update

2004-12-30 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 12/30/2004 11:43:43 AM: > [snip] > I hope I am not so naive that Kai and I are the only two who sees a > problem with this behavior. Some of you may think this is a "feature" > but I do not like it because that means that calculational errors will > o

Re: Multi table update

2004-12-30 Thread Kai Ruhnau
best. On several other implementations (other DBs) of multi-table updates the behavior is exactly the same as this. I don't think it is clear, what Shawn's and my point is. It is clear, that a multi table update will be executed in a serialized manner. I don't want to think of the di

RE: Multi table update

2004-12-30 Thread Jay Blanchard
[snip] I hope I am not so naive that Kai and I are the only two who sees a problem with this behavior. Some of you may think this is a "feature" but I do not like it because that means that calculational errors will occur simply by inverting column positions (putting one before the other) within a

Re: Multi table update

2004-12-30 Thread Kai Ruhnau
[EMAIL PROTECTED] schrieb: I snipped the discussion down to the SQL-statements with some explanational text. I hope it does not break reading. [snip] UPDATE table1 INNER JOIN table2 ON table2.ID_table1=table1.ID SET table2.value=table2.value-IF(table1.condition=7,1,0), table1.condition=8 WHERE

RE: Multi table update

2004-12-30 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 12/30/2004 07:59:35 AM: > [snip] > "atomically" from my applications point of view means: > I have a snapshot of my data (due to InnoDB this does not change > hiddenly during > my session). I send a query to the database. I get the result / changed > d

RE: Multi table update

2004-12-30 Thread Jay Blanchard
[snip] "atomically" from my applications point of view means: I have a snapshot of my data (due to InnoDB this does not change hiddenly during my session). I send a query to the database. I get the result / changed data. And everything between sending and the receiving the result I expect to be han

RE: Multi table update

2004-12-29 Thread Kai Ruhnau
Zitat von Jay Blanchard <[EMAIL PROTECTED]>: > [snip] > Although my question goes in that direction, it is more about why this > statement > does not act atomically from my applications point of view. > > > update table2, table1 > > SET table2.value=table2.value-IF(table1.condition=7,1,0), > > tab

RE: Multi table update

2004-12-29 Thread Jay Blanchard
[snip] Although my question goes in that direction, it is more about why this statement does not act atomically from my applications point of view. > update table2, table1 > SET table2.value=table2.value-IF(table1.condition=7,1,0), > table1.condition=8 > WHERE table1.ID = table2.ID_table1 [/snip]

RE: Multi table update

2004-12-29 Thread Jay Blanchard
credible information to the contrary, I will stick with the hypothesis that this is a BUG in the execution engine. [/snip] Shawn, what makes an InnoDB table different from any other type of table with regards to the way UPDATE is processed? When you issue a multi-table update you must adhere to the

Re: Multi table update

2004-12-28 Thread Kai Ruhnau
e case when foreign key constraints may temporably be broken during a multi table update, so that the InnoDB engine does not perform the query. Although my question goes in that direction, it is more about why this statement does not act atomically from my applications point of view. > update

RE: Multi table update

2004-12-28 Thread SGreen
"Jay Blanchard" <[EMAIL PROTECTED]> wrote on 12/28/2004 11:38:58 AM: > [snip] > And the query: > > UPDATE table1 > INNER JOIN table2 ON table2.ID_table1=table1.ID > SET table2.value=table2.value-IF(table1.condition=7,1,0), > table1.condition=8 > WHERE table1.ID IN (1,2) > > After that the v

Re: Multi table update

2004-12-28 Thread SGreen
My Testing and results at the bottom. Suspect a buggy implementation of the IF() calculation (see tests and results). Kai Ruhnau <[EMAIL PROTECTED]> wrote on 12/28/2004 11:06:43 AM: > Zitat von [EMAIL PROTECTED]: > > > Can you provide us a test case (sample table definitions and sample data)

RE: Multi table update

2004-12-28 Thread Jay Blanchard
[snip] And the query: UPDATE table1 INNER JOIN table2 ON table2.ID_table1=table1.ID SET table2.value=table2.value-IF(table1.condition=7,1,0), table1.condition=8 WHERE table1.ID IN (1,2) After that the value's in table2 are still 5 and 2. But I would expect the 5 to be a 4. [/snip] It was con

Re: Multi table update

2004-12-28 Thread Kai Ruhnau
Zitat von [EMAIL PROTECTED]: > Can you provide us a test case (sample table definitions and sample data) > ? Sure. -- CREATE TABLE table1 ( ID int(10) unsigned NOT NULL default '0', condition int(10) unsigned NOT NULL default '0' ) TYPE=InnoDB; INSERT INTO table1 VALUES (1,7); INSERT INTO

RE: Multi table update

2004-12-28 Thread Jay Blanchard
[snip] I believe your answer was neither on topic nor very useful. That is an excellent warning you quoted from the manual but I do not believe that it applies to this particular problem. I also humbly disagree with your analysis of the warning as neither triggers nor stored procedures are in pro

Re: Multi table update

2004-12-28 Thread SGreen
Can you provide us a test case (sample table definitions and sample data) ? Shawn Green Database Administrator Unimin Corporation - Spruce Pine Kai Ruhnau <[EMAIL PROTECTED]> wrote on 12/28/2004 10:23:23 AM: > Zitat von [EMAIL PROTECTED]: > > > One reason may be due to your ON condition. > >

RE: Multi table update

2004-12-28 Thread SGreen
> Is this behavior correct? > [/snip] > > In the sense that it did what was given to it in the query, yes. From > http://www.mysql.com/update > > "If you use a multiple-table UPDATE statement involving InnoDB tables > for which there are foreign key constraints, the MySQL o

Re: Multi table update

2004-12-28 Thread Kai Ruhnau
Zitat von [EMAIL PROTECTED]: > One reason may be due to your ON condition. > > ON table2.ID=table2.ID_table1 > > You reference table 2 twice and I doubt that on the table2 table id equals > id_table1 very often. Because table2 is LEFT JOINed to table1, you will > only be able to update the rows th

RE: Multi table update

2004-12-28 Thread Jay Blanchard
/update "If you use a multiple-table UPDATE statement involving InnoDB tables for which there are foreign key constraints, the MySQL optimizer might process tables in an order that differs from that of their parent/child relationship. In this case, the statement will fail and roll back. In

Multi table update

2004-12-28 Thread Kai Ruhnau
application-level, but up to now I consindered a multi table update an atomic operation. Is this behavior correct? Greetings Kai -- This signature is left as an exercise for the reader. Unsatz des Jahres: $POLITIKER ruft $PARTEI zur Geschlossenheit. -- MySQL General Mailing List For list archives: http

Temporary Table update

2004-07-06 Thread Paul McNeil
I added a LIMIT clause to my create table command and now all data is present. Is the 1000 row limit a standard that must always be overridden? God Bless Paul C. McNeil Developer in Java, MS-SQL, MySQL, and web technologies. GOD BLESS AMERICA! To God Be The Glory! -- MySQL Ge

Re: Multiple-table Update

2004-03-28 Thread Nitin Mehta
which ver of mysql are you using? multiple table update is possible only with ver starting from 4.0.4. HTH.. Nitin - Original Message - From: "Laercio Xisto Braga Cavalcanti" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Fri

Multiple-table Update

2004-03-26 Thread Laercio Xisto Braga Cavalcanti
'm using Multiple-table Update with the above sintax: mysql> desc italica; ++---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++---+--+-+-+---+ | ita_empresa | decimal(10,0)

multiple table update

2004-03-07 Thread Jav Travis
update gci_copy,dis set gci_copy.products_description=concat_ws('',gci_copy.products_description,dis.products_model,dis.products_description) where gci_copy.products_image=dis.products_image only able to caoncat one match possiable work arounds. __

RE: LOCK TABLES and multi table UPDATE

2004-01-24 Thread dread
On 22-Jan-2004 Michael McTernan wrote: > Hi there, > > Thanks for your quick response! > >> Why all the locks, temp tables and updates? You can just do: >> >> SELECT >> CASE WHEN B.y IS NULL THEN A.x ELSE B.y END AS newX >> FROM >> A LEFT JOIN B ON A.x = B.x > > Spot on - many thanks! I wa

RE: LOCK TABLES and multi table UPDATE

2004-01-22 Thread Michael McTernan
ion, but I've certainly learnt something now :) Thanks, Mike > -Original Message- > From: Jochem van Dieten [mailto:[EMAIL PROTECTED] > Sent: 22 January 2004 16:38 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: LOCK TABLES and multi table UPDATE > &

Re: LOCK TABLES and multi table UPDATE

2004-01-22 Thread Jochem van Dieten
Michael McTernan said: > > I'm using MySQL 4.0.15-standard-log, on RedHat 9.0 with InnoDb tables. > > Essentially I have two tables, one table is a list of integers, > while the second is a table of integer pairs. e.g. > > +---+ +-+-+ > | A | | B.x | B.y | > +---+ +-+-+ > | 1

LOCK TABLES and multi table UPDATE

2004-01-22 Thread Michael McTernan
Hi there, I've got a small issue which looks a little like a bug. I'm using MySQL 4.0.15-standard-log, on RedHat 9.0 with InnoDb tables. Essentially I have two tables, one table is a list of integers, while the second is a table of integer pairs. e.g. +---+ +-+-+ | A | | B.x | B.y |

Re: Multi-Table UPDATE Emulation

2003-12-09 Thread Egor Egorov
"Mike Brum" <[EMAIL PROTECTED]> wrote: > Hopefully someone can help me out with this - > > I have two tables in mySQL: comments and diary > > I want to populate a new field in comments with the current values of diary > - but only if they meet certain criteria. > > Now, the problem is this - my

Multi-Table UPDATE Emulation

2003-12-08 Thread Mike Brum
Hopefully someone can help me out with this - I have two tables in mySQL: comments and diary I want to populate a new field in comments with the current values of diary - but only if they meet certain criteria. Now, the problem is this - my webserver is using an older version of mySQL that does

replication, multi-table update work around

2003-11-19 Thread Ware Adams
the replicated tables in a multi-table update statement like this: update non_replicated_db.table, replicated_db.table set non_replicated_db.table.val=replicated_db.table.val where non_replicated_db.table.val_id=replicated_db.table.val_id; So this query includes the replicated_db in the update stat

Re: Mysql hangs on multi table update on innodb table.

2003-03-11 Thread Sinisa Milivojevic
Scott Wong writes: > > Version: Mysql 4.0.10-gamma > > Description: Mysql hangs and possibly can not recover from a query on an innodb > table. > > How to Repeat : > > drop table if exists parent; > drop table if exists child; > > CREATE TABLE parent(id INT NOT NULL, > PRIMARY KEY (

RE: Mysql hangs on multi table update on innodb table.

2003-03-05 Thread Sinisa Milivojevic
Scott Wong writes: > > Hi, I havent received any response on this so i'll send this again. > I did check again with 4.0.11-gamma and the problem is still there. > > > Regards, > Scott > Hi! This will require a major re-write in multi table update's and will not come up very soon. But should co

RE: Mysql hangs on multi table update on innodb table.

2003-03-05 Thread Scott Wong
Hi, I havent received any response on this so i'll send this again. I did check again with 4.0.11-gamma and the problem is still there. Regards, Scott > Version: Mysql 4.0.10-gamma > > Description: Mysql hangs and possibly can not recover from a query on an innodb > table. > > How to Re

RE: Table Update

2003-02-26 Thread Don Read
On 26-Feb-2003 Andrew Maynes wrote: > problably a silly question but if I am updating a table in a MySQL DB with a > table structure like this: > > TABLE xxx > ItemSKU > ItemName > ItemDescription > PostCode > Category > CityID > CTelephone > ItemID > Cfax > Cemail > Caddre

Table Update

2003-02-26 Thread Andrew Maynes
problably a silly question but if I am updating a table in a MySQL DB with a table structure like this: TABLE xxx ItemSKU ItemName ItemDescription PostCode Category CityID CTelephone ItemID Cfax Cemail Caddress CTown Cwww PRIMARY KEY (ItemID) and the update query is t

Mysql hangs on multi table update on innodb table.

2003-02-21 Thread Scott Wong
Version: Mysql 4.0.10-gamma Description: Mysql hangs and possibly can not recover from a query on an innodb table. How to Repeat : drop table if exists parent; drop table if exists child; CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE TABLE child(id INT

Re: Table Update Help / Problem

2003-01-20 Thread Diana Soares
Check the REPLACE command... http://www.mysql.com/doc/en/REPLACE.html I think it suits your problem... On Mon, 2003-01-20 at 08:14, Michael Watson wrote: > This may be very simple, but the solution eludes me.. > > I have two tables Products and NewProducts, The Products table contains a > list

Table Update Help / Problem

2003-01-20 Thread Michael Watson
This may be very simple, but the solution eludes me.. I have two tables Products and NewProducts, The Products table contains a list of all the current product line and prices Products.ProdCode, Products.Price (amongst other details not relevent here). NewProducts contains a list of changes to

Table update notification - Observer Pattern

2002-08-27 Thread Willemann, Philip
Hi: If my MySQL server updates a table, does the ability exist to inform a client or clients (observers) that a table has changed. I do not want to replicate the data, I just want to know the name or names of the tables that have been updated. Thank you Phil Willemann ---

Need help on Multi-table update queries

2002-07-29 Thread deep kapasi
Hi, I m using MySQL 4.0.2 which now supports multi-table update query I am getting error while throwing multi-table UPDATE query, I don't know what the problem is To generate an error run below query, it will create a 2 InnoDB table and inserts a dummy record in it CREATE TABLE `systemde

Need help on Multi-table update queries

2002-07-28 Thread deep kapasi
Hi, I m using MySQL 4.0.2 which now supports multi-table update query I am getting error while throwing multi-table UPDATE query, I don't know what the problem is To generate an error run below query, it will create a 2 InnoDB table and inserts a dummy record in it CREATE TABLE `systemde

Re: does mysql support multi table update?

2002-04-16 Thread Egor Egorov
bin, Tuesday, April 16, 2002, 12:40:56 AM, you wrote: bc> does mysql latest version support multi tables update? bc> Thanks a lot Nope. It will come later ... Look at: http://www.mysql.com/doc/T/O/TODO_future.html -- For technical support contracts, goto https://order.mysql.com/ This

does mysql support multi table update?

2002-04-15 Thread bin cai
Hi, everyone, does mysql latest version support multi tables update? Thanks a lot __ Find, Connect Date! http://personals.yahoo.ca - Before posting, please ch

RE: help: table update program?

2002-04-01 Thread Roger Baklund
* James Gosnell > Does anyone know of a program or algorithm that will take a table > structure and update another table to the new one? Like, to just change > or add a column? What I'm trying to do is continually update the table > with different fields, or change the field types whenever I feel

help: table update program?

2002-04-01 Thread James Gosnell
Does anyone know of a program or algorithm that will take a table structure and update another table to the new one? Like, to just change or add a column? What I'm trying to do is continually update the table with different fields, or change the field types whenever I feel the need to add a new fe

Re: multi-table update

2001-12-03 Thread Sinisa Milivojevic
Corey Kaye writes: > I'm wondering what is the best way to update one table based on another. Can joins >be performed for an update? > > update table1 set table1.field2 = table2.field2 where table1.field1 = table2.field1; > > The alternative seams to be: > select table2.field2 from table2; > u

multi-table update

2001-12-02 Thread Corey Kaye
I'm wondering what is the best way to update one table based on another. Can joins be performed for an update? update table1 set table1.field2 = table2.field2 where table1.field1 = table2.field1; The alternative seams to be: select table2.field2 from table2; update table2 set table2.field2 = $

multi table update

2001-10-24 Thread Tomas Carmen
Hi list: How can I update a table field from a another table field, the multitable update is not implemented or yes?. I am thinking in use a foreign key (references) or tmp table or can I use table aliases? something like this: replace into table master( fielda, fieldb , fieldc) select t1.field

need help with cross table update

2001-06-06 Thread Jaime Teng
Hi, I have two tables on mysql: Table1: class char(10) usernamechar(50) etc. etc.. Table2: class char(10) usernamechar(50) timeint unsigned etc.. Table2's "class" column is a new column addition and therefore does not have any values on it. I wa