Temporary Tables with Triggers Problem

2013-05-29 Thread Neil Tompkins
Hi, I've a trigger that writes some data to a temporary table; and at the end of the trigger writes all the temporary table data in one insert to our normal Innodb table. However, for some reason the trigger isn't copying the table from the temporary table to the Innodb table. If I write in the

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread Ananda Kumar
can you please share the code of the trigger. Any kind of error your getting On Wed, May 29, 2013 at 6:49 PM, Neil Tompkins neil.tompk...@googlemail.com wrote: Hi, I've a trigger that writes some data to a temporary table; and at the end of the trigger writes all the temporary table data

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread Neil Tompkins
This is my Trigger which doesn't seem to work; but doesn't cause a error DROP TEMPORARY TABLE IF EXISTS tempHotelRateAvailability; CREATE TEMPORARY TABLE tempHotelRateAvailability(AuditTrailId varchar(36),UserId bigint(20),ActionType enum('INSERT','UPDATE','DELETE'),TableName

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread Ananda Kumar
did u check if data is getting inserted into tempHotelRateAvailability On Wed, May 29, 2013 at 7:21 PM, Neil Tompkins neil.tompk...@googlemail.com wrote: This is my Trigger which doesn't seem to work; but doesn't cause a error DROP TEMPORARY TABLE IF EXISTS tempHotelRateAvailability;

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread Neil Tompkins
I took the following lines of code slightly modified and it returned some data using a normal Query Editor CREATE TEMPORARY TABLE tempHotelRateAvailability(AuditTrailId varchar(36),UserId bigint(20),ActionType varchar(36),TableName varchar(36),RowKey varchar(255),FieldName varchar(36),OldValue

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread Ananda Kumar
But, does it work inside the trigger. If not, then based on the logic, there will not be any data, and data goes not get inserted from temp table to innodb table On Wed, May 29, 2013 at 7:29 PM, Neil Tompkins neil.tompk...@googlemail.com wrote: I took the following lines of code slightly

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread Neil Tompkins
OK, the data is going into the temp table. But when I run the command INSERT INTO AuditTrail SELECT tempHotelRateAvailability.* FROM tempHotelRateAvailability; from the TRIGGER it does not copy the data. However if I run this query INSERT INTO AuditTrail SELECT tempHotelRateAvailability.* FROM

Re: Temporary Tables with Triggers Problem

2013-05-29 Thread hsv
2013/05/29 14:51 +0100, Neil Tompkins This is my Trigger which doesn't seem to work; but doesn't cause a error DROP TEMPORARY TABLE IF EXISTS tempHotelRateAvailability; CREATE TEMPORARY TABLE tempHotelRateAvailability(AuditTrailId varchar(36),UserId bigint(20),ActionType

Triggers

2013-05-10 Thread Aastha
If triggers use complex business rules and large transaction. What would we be recommendations? I need three possible ways. Thanks,

Re: Triggers

2013-05-10 Thread Michael Dykman
Your question is far too vague to answer. What are your requirements? What considerations are you worried about? On Fri, May 10, 2013 at 2:55 PM, Aastha aast...@gmail.com wrote: If triggers use complex business rules and large transaction. What would we be recommendations? I need three

RE: Triggers

2013-05-10 Thread Rick James
Triggers use whatever code you put in them. Recommendations for what? -Original Message- From: Aastha [mailto:aast...@gmail.com] Sent: Friday, May 10, 2013 11:55 AM To: mysql@lists.mysql.com Subject: Triggers If triggers use complex business rules and large transaction. What

RE: Triggers and column names

2012-06-22 Thread Rick James
] Sent: Thursday, June 21, 2012 5:05 PM To: mysql Subject: Re: Triggers and column names 2012/06/21 17:06 -0500, Gael Martinez I'm getting that done today thru a large static trigger script and I would like something more dynamic... For that it is needful to look up the table

Re: Triggers and column names

2012-06-22 Thread Gael Martinez
to change from one invocation of the trigger to the next, so don't have the dynamic code inside the trigger. -Original Message- From: Hal?sz S?ndor [mailto:h...@tbbs.net] Sent: Thursday, June 21, 2012 5:05 PM To: mysql Subject: Re: Triggers and column names 2012/06/21 17:06

Triggers and column names

2012-06-21 Thread Gael Martinez
Hello there I'm trying to figure out an elegant way with Mysql 5.5.25 to log changes via a before change trigger to a table including the column name of the field that changed... How can I dynamically enumerate the field names and populate the field log into the t1_log test table ... Would a

Re: Triggers and column names

2012-06-21 Thread Hal�sz S�ndor
2012/06/21 17:06 -0500, Gael Martinez I'm getting that done today thru a large static trigger script and I would like something more dynamic... For that it is needful to look up the table in INFORMATION_SCHEMA.COLUMNS, and, yes, you can look up the field names--but then what will you do with

Re: UPDATE triggers with REPLACE statements

2012-01-23 Thread Hal�sz S�ndor
; 20111219 03:42 PM -0800, Jim McNeely Not if you are using innoDB tables. For these, you use INSERT and UPDATE triggers. Jim McNeely On Dec 19, 2011, at 11:58 AM, Halász Sándor wrote: 2011/12/19 11:30 -0800, Jim McNeely In the MySQL documentation, we find this tantalizing statement

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
Perfect!! This is the answer I was looking for. Thanks! I didn't know about this. Jim McNeely On Dec 18, 2011, at 11:26 AM, Claudio Nanni wrote: Only if you can change the application you could use INSERTON DUPLICATE KEY UPDATE instead of REPLACE. Check Peter's post here:

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
In the MySQL documentation, we find this tantalizing statement: It is possible that in the case of a duplicate-key error, a storage engine may perform the REPLACE as an update rather than a delete plus insert, but the semantics are the same. There are no user-visible effects other than a

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Claudio Nanni
Good to know and good that you took time to read the manual, good approach. But why bother with REPLACE if you will go with INSERT.ON DUPLICATE KEY UPDATE? The storage engine is a property of your table and you can set it and/or change it, it is the low-level layer (physical) of the database

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
to be MySQL with either engine, but the processes creating these queries have some limitations. Anyway, I just thought I would share. BTW I experimented, and innoDB does updates and fires off update triggers for REPLACE statements, but MyISAM does delete/inserts. Jim McNeely On Dec 19, 2011

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Hal�sz S�ndor
increments Handler_xxx status variables. If accurate, the triggers are those of DELETE INSERT, not UPDATE. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
Not if you are using innoDB tables. For these, you use INSERT and UPDATE triggers. Jim McNeely On Dec 19, 2011, at 11:58 AM, Halász Sándor wrote: 2011/12/19 11:30 -0800, Jim McNeely In the MySQL documentation, we find this tantalizing statement: It is possible that in the case

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Hal�sz S�ndor
2011/12/19 13:55 -0800, Jim McNeely Anyway, I just thought I would share. BTW I experimented, and innoDB does updates and fires off update triggers for REPLACE statements, but MyISAM does delete/inserts. Thank you. Which version? Well, then the documentation is wrong: it is indeed visible

Re: UPDATE triggers with REPLACE statements

2011-12-18 Thread Claudio Nanni
Only if you can change the application you could use INSERTON DUPLICATE KEY UPDATE instead of REPLACE. Check Peter's post here: http://kae.li/iiigi Cheers Claudio 2011/12/17 Jim McNeely j...@newcenturydata.com Here is a fun one! I have a set of tables that get populated and changed a

Re: UPDATE triggers with REPLACE statements

2011-12-17 Thread Hal�sz S�ndor
2011/12/16 16:00 -0800, Jim McNeely I have a set of tables that get populated and changed a lot from lots of REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger never gets triggered because REPLACES are all deletes and inserts. The trigger is going to populate

UPDATE triggers with REPLACE statements

2011-12-16 Thread Jim McNeely
Here is a fun one! I have a set of tables that get populated and changed a lot from lots of REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger never gets triggered because REPLACES are all deletes and inserts. The trigger is going to populate another table as a

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Luis Motta Campos
On 8 Sep 2011, at 16:23, Chris Tate-Davies wrote: Hello. I want to know if there is a special way I can access all the data in the NEW/OLD data? I realise I can access it by referencing NEW.fieldname but I want to serialise the NEW object so I can save as a string. Is this possible or do

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Chris Tate-Davies
Thanks, I kinda guessed that, but I'm not sure how to pass the OLD object to it as MySQL cannot handle a rowset datatype. Has anyone had any experience with this? Not sure where to start or how to proceed. Chris On 13/09/11 07:40, Luis Motta Campos wrote: On 8 Sep 2011, at 16:23, Chris

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Claudio Nanni
Hi, Just quick reading your email, forgive me if I'm mistaken what about serializing using *concat(old.f1,'|||',old.f2,'|||',old.f3) ('|||' = any separator that works for you)* and deserialize inside the function? does this make any sense to you? Cheers Claudio 2011/9/13 Chris Tate-Davies

Re: Triggers - Accessing all NEW data

2011-09-13 Thread Chris Tate-Davies
I could do that, but I was hoping I wouldn't have to specify the individual fields, and just pass the collection for parsing. If I were to add any fields I would have to re-write the trigger which is something I was trying to avoid. On 13/09/11 09:53, Claudio Nanni wrote: Hi, Just quick

Triggers - Accessing all NEW data

2011-09-08 Thread Chris Tate-Davies
Hello. I want to know if there is a special way I can access all the data in the NEW/OLD data? I realise I can access it by referencing NEW.fieldname but I want to serialise the NEW object so I can save as a string. Is this possible or do I need to write a function? Thanks, Chris *Chris

Triggers for Table Duplication

2011-05-19 Thread Steve Staples
to have the user_test table to be an exact copy of the user table, would it be safe to say I have to create 3 triggers? AFTER INSERT AFTER UPDATE AFTER DELETE I figure it would be better to do the AFTER incase there was an issue with doing the operation on the first table... /*After INSERT

Triggers and FOR EACH ROW

2010-07-13 Thread Mihamina Rakotomandimby
Manao ahoana, Hello, Bonjour, I just read several documentation on MySQL triggers. The way to create triggers is: CREATE TRIGGER t21_au BEFORE UPDATE ON t22 FOR EACH ROW BEGIN // ... END; The trigger I want is only on UPDATE. Is FOR EACH ROW referring to each existing row in the table

Re: Triggers and FOR EACH ROW

2010-07-13 Thread Martijn Tonies
Manao ahoana, Hello, Bonjour, I just read several documentation on MySQL triggers. The way to create triggers is: CREATE TRIGGER t21_au BEFORE UPDATE ON t22 FOR EACH ROW BEGIN // ... END; The trigger I want is only on UPDATE. Is FOR EACH ROW referring to each existing row in the table

limiting acess by Triggers

2010-05-06 Thread paulo matadr
Hi all , Im new on mysql,how can block update column of specif table for a user x by trigger in mysql? Is possible deny acess for columns on mysql? version: 5.0.77 Regards

Re: limiting acess by Triggers

2010-05-06 Thread Prabhat Kumar
*Column Privileges* Column privileges apply to single columns in a given table. Each privilege to be granted at the column level must be followed by the column or columns, enclosed within parentheses. GRANT SELECT (col1), INSERT (col1,col2) ON mydb.mytbl TO 'someuser'@'somehost'; The allowable

Allowing triggers stored procedures on MySQL

2010-03-06 Thread Brent Clark
Hi everyone, Currently we have a policy that prohibit our customers from creating stored procedures and triggers on their DB's which I imagine must be driving them up the walls. It's like having a car with a boot but you are not able to use it. :) Are there any reasons why we would'nt want

Re: Allowing triggers stored procedures on MySQL

2010-03-06 Thread Jesper Wisborg Krogh
On 07/03/2010, at 3:30 AM, Brent Clark wrote: Hi everyone, Currently we have a policy that prohibit our customers from creating stored procedures and triggers on their DB's which I imagine must be driving them up the walls. It's like having a car with a boot but you are not able to use

triggers- how to bring updates in one table to another table

2010-01-28 Thread muralikrishna g
i have two tables namely.. table1 and table2, table1 and table2 have the two columns samely like id and name, by using triggers i have to bring the updates in table1 to table2, if i updated name in table1 trigger has to made the same up date for table2. please help me regarding this. thnaks

Re: triggers- how to bring updates in one table to another table

2010-01-28 Thread Alexander Kolesen
CREATE TRIGGER sync_t AFTER UPDATE ON table1 FOR EACH ROW UPDATE table2 SET name = NEW.name WHERE id = NEW.id; i have two tables namely.. table1 and table2, table1 and table2 have the two columns samely like id and name, by using triggers i have to bring the updates in table1 to table2, if i

ERROR 1235 (42000): This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'

2009-12-08 Thread Jeetendra Ranjan
Hi, I just would like to know which version of MySQL support the creation of database triggers with the same action and event for one table. Because if i create the the triggers as below i am getting error. First trigger (Succesfull) ++ CREATE TRIGGER CONSUMER_PROFILE_before_delete

Re: ERROR 1235 (42000): This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'

2009-12-08 Thread Jesper Wisborg Krogh
On Wed, 9 Dec 2009 16:39:33 Jeetendra Ranjan wrote: Hi, I just would like to know which version of MySQL support the creation of database triggers with the same action and event for one table. I'm not sure there is any plan to implement support for multiple triggers with the same action

Re: ERROR 1235 (42000): This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'

2009-12-08 Thread Martijn Tonies
I just would like to know which version of MySQL support the creation of database triggers with the same action and event for one table. I'm not sure there is any plan to implement support for multiple triggers with the same action and timing. I certainly hope so... If not, it seems yet

RE: Triggers For Radius DB

2009-07-08 Thread Marcel Grandemange
In the last episode (Jul 07), Marcel Grandemange said: I hope someone can assist me. I have a freeradius server running off mysql. Now I would like to use triggers to negate some of the traffic logged within it. I tried to use following as trigger.. Create Trigger ftp BEFORE UPDATE

Triggers For Radius DB

2009-07-07 Thread Marcel Grandemange
Good Day. I hope someone can assist me. I have a freeradius server running off mysql. Now I would like to use triggers to negate some of the traffic logged within it. I tried to use following as trigger.. Create Trigger ftp BEFORE UPDATE ON radacct FOR EACH ROW BEGIN

Re: Triggers For Radius DB

2009-07-07 Thread Dan Nelson
In the last episode (Jul 07), Marcel Grandemange said: I hope someone can assist me. I have a freeradius server running off mysql. Now I would like to use triggers to negate some of the traffic logged within it. I tried to use following as trigger.. Create Trigger ftp BEFORE UPDATE

Question about triggers

2009-02-02 Thread Tobias Stocker
Hy there, I'm planing to to build a small partial replication on MySQL 5.0 using the Spread Toolkit and the Message API for MySQL. Therefore I'll create a trigger (on insert) which fetches the row and sends it to the message group XY. I was wondering if there is a way to tell MySQL in an SQL

Re: Question about triggers

2009-02-02 Thread Baron Schwartz
Send the value of @@server_id in the message, and make sure each server has a unique value for that. Compare the value in the received message to the value in the server and see whether you should stop the loop. On Mon, Feb 2, 2009 at 4:38 AM, Tobias Stocker tobias.stoc...@ch.netstream.com

triggers sintax error with IF

2008-02-16 Thread Nacho Garcia
Hi, im struggling with triggers but i can make this works because of bad sintax, i hope someone can give me a hand CREATE TRIGGER trigger_actualize AFTER INSERT ON usuarios_imgvid FOR EACH ROW IF NEW.type=IMG THEN UPDATE users_status E SET images=images+1 WHERE E.id_usr

Re: triggers sintax error with IF

2008-02-16 Thread Paul DuBois
Hi, im struggling with triggers but i can make this works because of bad sintax, i hope someone can give me a hand CREATE TRIGGER trigger_actualize AFTER INSERT ON usuarios_imgvid FOR EACH ROW IF NEW.type=IMG THEN UPDATE users_status E SET images=images+1 WHERE E.id_usr

Re: issues with replicating stored routines or triggers?

2008-01-16 Thread Moon's Father
This means you should take care of the routine replication of this section. On Jan 13, 2008 6:04 PM, gengxy-douban [EMAIL PROTECTED] wrote: With MySQL's classic statement-based replication, there may be issues with replicating stored routines or triggers from : http://dev.mysql.com/doc/refman

issues with replicating stored routines or triggers?

2008-01-13 Thread gengxy-douban
With MySQL's classic statement-based replication, there may be issues with replicating stored routines or triggers from : http://dev.mysql.com/doc/refman/5.1/en/replication-formats.html what's mean?

bulk updates/inserts and triggers

2007-12-30 Thread C K
Hello, I am facing a problem related with triggers and bulk updates/inserts. I have two tables one is having 'transactions' and another is 'documents'. Each record in transactions table relates with a document by DocId. Foreign keys are created. I have activated triggers for transactions table

Replication error with stored proc and triggers

2007-12-03 Thread [EMAIL PROTECTED]
Description: I am using MySQL server as backend database supporting a telecomm platform providing voice over ip services. tables involved: acc, cdr, account, location2 Partial processing flow: 1. When a phone call is started. A record will be inserted into table acc (method=INVITE). This will

Triggers/Innodb/Locking

2007-11-14 Thread bruce
... Is this more or less how mysql innodb/triggers/locking works? thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

triggers

2007-04-11 Thread ch h
In a trigger I need to iterate thru a query result that will consist of more than 1 row. Could someone please give me a general example of how this would be accomplished. For example in php i would just use while($row = $result-fetch_assoc) { ..process the row } I have no

Re: triggers

2007-04-11 Thread Andrew Dashin
Hi, ch Probably you should look here http://dev.mysql.com/doc/refman/5.0/en/cursors.html -- Andrew Dashin ch h пишет: In a trigger I need to iterate thru a query result that will consist of more than 1 row. Could someone please give me a general example of how this would be accomplished.

how to dump triggers separately

2007-03-23 Thread asv
I need to create dump of all triggers in my database (This means that ONLY triggers must be dumped and nothing more: no data and no table structure). Is there any direct (or simple) way to do that? Mysqldump seems to be unable to do that. The only two ways i see -- to create a script that gets

Re: how to dump triggers separately

2007-03-23 Thread Rolando Edwards
It would be advisable that your triggers be dumeds in association with your table structures like this mysqldump -h... -u... -p... --no-data --triggers dbname However, the next line is what you are looking for mysqldump -h... -u... -p... --no-data --no-create-info --triggers dbname

Re: Using Triggers to Maintain a Table to prevent complex join statements...

2007-02-21 Thread Jay Pipes
Cory Robin wrote: We have a statement that joins 8 different tables to pull multiple rows from each table. I have heard of people using triggers to create, update and delete records in a table based on statements in other tables. The obvious result of this would be to SPEED up results

Using Triggers to Maintain a Table to prevent complex join statements...

2007-02-20 Thread Cory Robin
We have a statement that joins 8 different tables to pull multiple rows from each table. I have heard of people using triggers to create, update and delete records in a table based on statements in other tables. The obvious result of this would be to SPEED up results right? :) I'd love

Help with mysql triggers

2007-02-12 Thread Winn Johnston
Question. I have two tables donation_test, and max_donation. The max donation table is a summary table, used to keep the max donation for each contact_id, by listing its donation_id. We have decided to use database level triggers to keep the summary table (max_donation) table up to date. I have

Triggers and Stored procedure problems

2007-02-05 Thread Lars trollsen
Well I´m having some problems with a trigger and i don´t know how to handle this situation. Let´s start... well I have 2 tables (Table1 and Table2). Only fictional tables. CREATE TABLE `table1` ( `id` int(10) unsigned NOT NULL auto_increment, `status` tinyint(1) unsigned NOT NULL, PRIMARY

manual on stored procedures and triggers

2006-08-09 Thread Vittorio Zuccalà
Hello, i'm searching for a manual about stored procedures and triggers. I'm new about this arguments but i want to study them. Unfortunally, mysql online manual is not rich about examples so, can you suggest me some online manuals on stored procedures and triggers? Thank you, Vittorio

Re: manual on stored procedures and triggers

2006-08-09 Thread Chris White
On Wednesday 09 August 2006 07:27 am, Vittorio Zuccalà wrote: Hello, i'm searching for a manual about stored procedures and triggers. I'm new about this arguments but i want to study them. Unfortunally, mysql online manual is not rich about examples so, can you suggest me some online manuals

pbm with Triggers

2006-07-26 Thread Jean-Yves Beaujean
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I've a problem with triggers and federated table: I would like insert a record in a unknown table. The table where insert the record is unknown when the trigger starts. But, with a field value, I select the table name. CREATE TRIGGER

Creating Triggers

2006-06-21 Thread Palani kodeswaran
.. is it possible to call UDFs from within Triggers... Hope to hear at the earliest... Thanks in advance. Palani.

Where is the triggers run when replicating?

2006-06-01 Thread Patrik Wallstrom
Easy setup: two mysql 5 servers, one running master, the other one is slave. The database have triggers to create history of rows in history tables. What is expected from the slave? Is it expected to run the triggers, as well as receiving the new row in the history table? Or should it really run

Re: Where is the triggers run when replicating?

2006-06-01 Thread Daniel da Veiga
On 6/1/06, Patrik Wallstrom [EMAIL PROTECTED] wrote: Easy setup: two mysql 5 servers, one running master, the other one is slave. The database have triggers to create history of rows in history tables. What is expected from the slave? Is it expected to run the triggers, as well as receiving

Problems with triggers

2006-05-24 Thread Ivan Milanez Castellanos
Hi, I'm having problems with a trigger that I'm working on, I want to create a trigger that after inserting a row in table A will copy the row to table B and once there will delete the row from table A. I'm using two triggers for this one goes on table A and does the copy of the information

Need help with triggers

2006-05-15 Thread Daevid Vincent
This is my first trigger I'm trying to write. I have two tables. 'stores' and 'zipcodes'. I want to automatically set the latitude and longitude of the store using it's zipcode lookup in the zipcode table. DELIMITER $$; DROP TRIGGER `store_coord`$$ create trigger `store_coord` BEFORE INSERT

Re: Need help with triggers

2006-05-15 Thread Martijn Tonies
Daevid, This is my first trigger I'm trying to write. I have two tables. 'stores' and 'zipcodes'. I want to automatically set the latitude and longitude of the store using it's zipcode lookup in the zipcode table. DELIMITER $$; DROP TRIGGER `store_coord`$$ create trigger `store_coord`

RE: Need help with triggers

2006-05-15 Thread Daevid Vincent
This is my first trigger I'm trying to write. I have two tables. 'stores' and 'zipcodes'. I want to automatically set the latitude and longitude of the store using it's zipcode lookup in the zipcode table. DELIMITER $$; DROP TRIGGER `store_coord`$$ create trigger

RE: Need help with triggers

2006-05-15 Thread Quentin Bennett
May 2006 2:41 p.m. To: 'Martijn Tonies'; mysql@lists.mysql.com Subject: RE: Need help with triggers This is my first trigger I'm trying to write. I have two tables. 'stores' and 'zipcodes'. I want to automatically set the latitude and longitude of the store using it's zipcode lookup

Re: Need help with triggers

2006-05-15 Thread Peter Brawley
Daevid, This is my first trigger I'm trying to write. I have two tables. 'stores' and 'zipcodes'. I want to automatically set the latitude and longitude of the store using it's zipcode lookup in the zipcode table. DELIMITER $$; DROP TRIGGER `store_coord`$$ create trigger

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-09 Thread Gleb Paharenko
Hello. This should be interesting for you: http://bugs.mysql.com/bug.php?id=16266 Ian Sales (DBA) wrote: - unfortunately, the set up demands that the master stays at 4.0. I can't change that. The triggers were working in 5.0.16. It's the new DEFINER that was added with 5.0.17

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-09 Thread Ian Sales (DBA)
Gleb Paharenko wrote: Hello. This should be interesting for you: http://bugs.mysql.com/bug.php?id=16266 Hi, The bug report implies that if you recreate the triggers on the slave (deleting them manually from the database directory), then it resolves the issue. Unfortunately

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-06 Thread Ian Sales (DBA)
Gleb Paharenko wrote: Hello. I've subsequently upgraded the instance to 5.0.18, Have you updated master to 5.0.18 as well? - unfortunately, the set up demands that the master stays at 4.0. I can't change that. The triggers were working in 5.0.16. It's the new DEFINER

Re: triggers on 5.0.17 -- definer not fully qualified

2006-01-06 Thread Gleb Paharenko
Hello. I've subsequently upgraded the instance to 5.0.18, Have you updated master to 5.0.18 as well? Ian Sales (DBA) wrote: After upgrading to 5.0.17, the triggers on one of my instances now break replication with a definer is not fully qualified error. I set the DEFINER

triggers on 5.0.17 -- definer not fully qualified

2006-01-05 Thread Ian Sales (DBA)
After upgrading to 5.0.17, the triggers on one of my instances now break replication with a definer is not fully qualified error. I set the DEFINER in the CREATE TRIGGER statement to CURRENT_USER (i.e., [EMAIL PROTECTED]), but the error still occurs. If I try setting the DEFINER to any other

creating triggers?

2005-12-30 Thread Brittingham, John
the number of CUIDS for that date and time if it does. I have never done anything with triggers and wonder if this is possible? John Brittingham Marketing and Customer Systems Desk: 425-288-8071 Cell: 425-770-0458

Re: 5.0.16. Bug in triggers?

2005-12-27 Thread Gleb Paharenko
Privet! This seems as a bug, especially because with InnoDB tables bulk insert works fine. You may add your comments at: http://bugs.mysql.com/bug.php?id=16021 Juri Shimon wrote: Hello mysql, When trigger on table uses select from same table, then bulk insert into this

5.0.16. Bug in triggers?

2005-12-26 Thread Juri Shimon
Hello mysql, When trigger on table uses select from same table, then bulk insert into this table cause error. How to repeat: create table t(i int not null, j int not null, n numeric(15,2), primary key(i,j)); create table s(i int not null, n numeric(15,2), primary key(i)); delimiter //

Re: triggers? when they execute and locking

2005-12-05 Thread Gleb Paharenko
Hello. Please could you provide a repeatable test case, so it will be easier for list members to diagnose this weird behavior? Ben De Luca wrote: Im am trying to implement a task running system with mysql and Im coming across a few problems with what I am trying to do.

Re: triggers? when they execute and locking

2005-12-05 Thread Ben De Luca
Ill try? and make some thing more simple thats what I have actually running, Can some one clarify that what I am doing should work though? On 05/12/2005, at 9:54 PM, Gleb Paharenko wrote: Hello. Please could you provide a repeatable test case, so it will be easier for list members to

triggers? when they execute and locking

2005-12-04 Thread Ben De Luca
Im am trying to implement a task running system with mysql and Im coming across a few problems with what I am trying to do. Simply I am trying to insert a list of tasks into the DB for various computers to run, I want to track when they ran and where they ran. I also have to limit some of

Re: A few questions about triggers in MySQL 5

2005-11-17 Thread Gleb Paharenko
Hello. 4. triggers reference another table They're allowed as of MySQL 5.0.10. See: http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html Jenny Chen wrote: Does the current latest MySQL 5.0 support: 1. column based triggers 2. trigger restriction 3. multiple triggers

A few questions about triggers in MySQL 5

2005-11-16 Thread Jenny Chen
Hi, Does the current latest MySQL 5.0 support: 1. column based triggers 2. trigger restriction 3. multiple triggers of same type of the table 4. triggers reference another table And any information on in which release they will be supported? Thanks, Jenny

RE: Triggers that handle multiple events (insert and update)

2005-11-10 Thread Burke, Dan
A valid question. However that's only the simplest example of the kind of validation I'm trying to put into the triggers (for the sake of a shorter email). Dan. -Original Message- From: Björn Persson [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 09, 2005 5:25 PM To: mysql

Triggers that handle multiple events (insert and update)

2005-11-09 Thread Burke, Dan
Hello, Can triggers in 5.0 handle multiple events? I have some range checking I'd like to enforce at the database level when inserting or updating a record, and I'm finding myself duplicating trigger code to make an INSERT and an UPDATE trigger, which makes it harder to maintain in the long run

Re: Triggers that handle multiple events (insert and update)

2005-11-09 Thread SGreen
Burke, Dan [EMAIL PROTECTED] wrote on 11/09/2005 09:05:50 AM: Hello, Can triggers in 5.0 handle multiple events? I have some range checking I'd like to enforce at the database level when inserting or updating a record, and I'm finding myself duplicating trigger code to make an INSERT

RE: Triggers that handle multiple events (insert and update)

2005-11-09 Thread Burke, Dan
I see what you're saying. That won't really help, because I'll still be duplicating changes in the update and insert triggers every time I add a new field. The hope was that I would only need to do it once. Your method sounds like it could become costly from an execution time perspective

RE: Triggers that handle multiple events (insert and update)

2005-11-09 Thread Björn Persson
onsdagen den 9 november 2005 18:07 skrev Burke, Dan: For example, one field has to be = 0, so I put this validation Why don't you just declare that field as unsigned? Björn Persson -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Triggers

2005-10-10 Thread Ian Sales (DBA)
Steffan A. Cline wrote: Upon insert or update I get the following error: ERROR 1442 (HY000): Can't update table 'locations' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. What exactly is the meaning of this? Is there no way

Re: Triggers

2005-10-10 Thread Steffan A. Cline
This does not work as I am drawing the information from 2 tables. I did use the NEW operator and every combination I could think of. Below I'll include the triggers and so on. What the deal is that I have a query to find locations within a certain radius. BUT from what I read in the table

Re: Triggers

2005-10-10 Thread Steffan A. Cline
This does not work as I am drawing the information from 2 tables. I did use the NEW operator and every combination I could think of. Below I'll include the triggers and so on. What the deal is that I have a query to find locations within a certain radius. BUT from what I read in the table

Re: Triggers

2005-10-10 Thread SGreen
You could re-write your query so that you get the lat and lon for each location as you run the query. Since each location has a zip code, this just means only one extra join per query. That also means you won't need the triggers as you are looking up each locations lat and lon on the fly

Re: Triggers

2005-10-10 Thread Gleb Paharenko
Hello. I just skimmed the article on CREATE TRIGGER in the manual and don't see any prohibition against making the triggered action take place in the same table I hope this is a temporary limitation. From: http://dev.mysql.com/doc/mysql/en/news-5-0-12.html Recursive triggers

Triggers

2005-10-09 Thread Steffan A. Cline
I am trying to use triggers for the first time with MySQL 5.0. I have read the manual but I am not understanding why I would run into the following problem. I created the following triggers: CREATE TRIGGER UpdPopCoord AFTER UPDATE ON locations FOR EACH ROW UPDATE locations, zipcodes SET

Re: Triggers

2005-10-09 Thread Rhino
will go away if the table that triggers the action is always different from the table that is changed as a result of the trigger. In other words, if an action in Table X is your trigger, the action taken when the trigger is pulled should take place in some table OTHER THAN Table X. I just skimmed

  1   2   >