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
with the same action time and event for one table' Or any other alternate to do the same ? Thanks Regards Jeetendra Ranjan -- Jesper Wisborg Krogh Team Lead Noggin IT • Level 8, 28 Foveaux St, Surry Hills NSW Australia 2010 T: +61 2 9219 8800 • F: +61 2 9280 4669 • E: jes...@noggin.com.au

Re: Force index command in sql query

2009-12-09 Thread Jesper Wisborg Krogh
On 09/12/2009, at 5:10 PM, Jeetendra Ranjan wrote: Hi, After analysing slow query log i found that some queries are not using index and so i used the force index command in query and test it and now it starts using index properly.Accordingly i implemented the same query with force index

Re: MySQL variables

2009-12-09 Thread Jesper Wisborg Krogh
On 09/12/2009, at 6:56 PM, machiel.richards wrote: Good day guys (and girls if any) I am constantly in a position where variables on a production mysql database needs to be changed. The database runs a 24/7 system and thus to reboot is not preffered and

Re: Return row even if nothing found

2009-12-15 Thread Jesper Wisborg Krogh
On Wed, 16 Dec 2009 07:39:09 Cantwell, Bryan wrote: I have a situation where I need to always get a row returned even if no match is in the table (only 1 or many rows are acceptable). I can use: select a, b, c from mytable where a = 'yarp'; and might get 20 rows if there are matches, but I

Re: how to get the name of primary key ?

2010-02-01 Thread Jesper Wisborg Krogh
On 01/02/2010, at 7:33 PM, 曹凯 wrote: Hi all, if we just know the table name but don't know the name of primary key, is there any variables or constants could instead of the PK? for example: there is a table game_log, and now I have the last inserted_id but don't know what its

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

2010-02-01 Thread Jesper Wisborg Krogh
Try to run SHOW ENGINE INNODB STATUS; Near the top there will be some information on the latest deadlock. That might help you to understand what is deadlocking. Sometimes changing the query or changing the indexes can remove the condition that causes the deadlock. I don't know whether you

Re: I NEED HELP ON 'SOURCE(\.) MYSQL

2010-02-01 Thread Jesper Wisborg Krogh
How did you type the source command? Did you remember not to quote the file name? E.g. mysql SOURCE schema.sql is the correct way. Jesper On Tue, 2 Feb 2010 10:38:08 kebede teferi wrote: Hi, I'm very new to this and I need help. What I want to do is to execute a source command statement

Re: where is the best material handler and cursor

2010-02-05 Thread Jesper Wisborg Krogh
On 06/02/2010, at 5:31 PM, MuraliKrishna wrote: Hi I am in need to know about handlers and cursors.. if any site giving detailed explanation and examples on these. thanks in advance Cursors: http://dev.mysql.com/doc/refman/5.1/en/cursors.html Handlers:

Re: ERROR 1442 (HY000) when delete inside trigger statement

2010-02-18 Thread Jesper Wisborg Krogh
--- Original Message --- From: viraj kali...@gmail.com To: mysql@lists.mysql.com Sent: 19/2/10, 05:48:41 Subject: ERROR 1442 (HY000) when delete inside trigger statement issue: ERROR 1442 (HY000): Can't update table 'T1' in stored function/trigger because it is already used by

Re: set max_allowed_packet

2010-02-20 Thread Jesper Wisborg Krogh
Jesper Wisborg Krogh Team Leader • Certified MySQL 5.0 Developer DBA Noggin IT • Level 8, 28 Foveaux St, Surry Hills NSW Australia 2010 T: +61 2 9219 8800 • F: +61 2 9280 4669 • E: jes...@noggin.com.au http://www.noggin.com.au On 21/02/2010, at 4:46 AM, Paul DuBois wrote: On Feb 20, 2010

Re: Dumping table contents to stdout in tab-separated value format

2010-02-20 Thread Jesper Wisborg Krogh
On 21/02/2010, at 2:03 PM, Yang Zhang wrote: Hi, I'm interested in piping out the contents of a mysql table to stdout in tab-separated value format, but: - using 'select * into outfile' can't write to stdout. - mysqldump --fields-... requires --tab, which requires an output file path. - I

Re: can't dump a database with views: stack smashing detected ***: mysqldump terminated

2010-02-22 Thread Jesper Wisborg Krogh
On 22/02/2010, at 9:20 PM, Tomasz Chmielewski wrote: When I try to dump a database which contains views, mysqldump crashes: # mysqldump -u root --opt --password=secret database dump.sql *** stack smashing detected ***: mysqldump terminated Aborted # I use MySQL 5.0.89-0.glibc23 binaries from

Re: Remove - Foreign key constraint in innodb

2010-02-25 Thread Jesper Wisborg Krogh
An example how to delete a foreign key from an InnoDB table: test CREATE TABLE table_1 (id int unsigned NOT NULL auto_increment PRIMARY KEY) ENGINE=InnoDB; Query OK, 0 rows affected (0.56 sec) test CREATE TABLE table_2 (table1_id int unsigned NOT NULL, FOREIGN KEY (table1_id) REFERENCES

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

Re: Disable innodb status info in err log

2010-03-17 Thread Jesper Wisborg Krogh
On 17/03/2010, at 9:10 PM, Anand kumar wrote: you are right sir , the variables innodb_status_file will write the show innodb status information on to the file innodb_status.PID ... however for me the innodb status is logging into the default error log file... i dont have any clue on how

Re: upgrade from version 5.0.45

2010-04-04 Thread Jesper Wisborg Krogh
Be aware that if it is an unpatched version of 5.0.77, then there is a bug related to name_const (http://bugs.mysql.com/bug.php?id=42014) that can cause serious problems (infinite server crashes if it happens in a replication thread). Redhat/CentOS have applied the patch, but other sources

Re: CLI can't read data from table

2010-04-14 Thread Jesper Wisborg Krogh
On Thu, 15 Apr 2010 09:31:04 Mike Diehl wrote: I just created a new table called lines. I can use Open Office to read the records in it just fine. However, when I type this command at the cli, I get an error: select * from lines; ERROR 1064 (42000): You have an error in your SQL syntax;

Re: How to compute the min and max of two numbers?

2010-04-26 Thread Jesper Wisborg Krogh
On Tue, 27 Apr 2010 09:08:29 Peng Yu wrote: I don't see there is a function to compute min or max of two numbers in a row. Essentially I want to select all the rows where the minimum of column1 and column2 are bigger than the maximum of col3 and col4 (The following code won't work as I

Re: order by numeric value

2010-04-27 Thread Jesper Wisborg Krogh
On Wed, 28 Apr 2010 08:53:57 Keith Clark wrote: But I'd prefer not to see the extra sorting field. You don't need to select a field in order to be able to order by it. So select chart_of_accounts.accountname as Account, concat('$',format(coalesce(sum(sales_journal_entries.debit),0),2)) as

slave-net-timeout

2010-05-26 Thread Jesper Wisborg Krogh
Hi, According to the manual, the slave-net-timeout specifies how long time to wait for data from the master before considering the connection dead. From my experience this actually means that the slave will reconnect if it hasn't received a full event in that period of time. E.g. setting

Re: How do I GRANT SELECT to mysql.time_zone_name for ANYONE?!

2010-10-15 Thread Jesper Wisborg Krogh
Hi On 16/10/2010, at 1:47 AM, Suresh Kuna wrote: Hey Daevid, As this time zone table won't change once it is set up. Do a copy of the table data into another database and give grants to it. Copy the data is not a good solution. First of all, time zone data does change. Secondly if you

Re: How do I GRANT SELECT to mysql.time_zone_name for ANYONE?!

2010-10-15 Thread Jesper Wisborg Krogh
Hi, On 16/10/2010, at 8:50 AM, Daevid Vincent wrote: Thanks for the reply Jesper, but either there isn't a solution in your response, or I'm missing it? What I mean is that you have to explicitly give the grant to each user that should be allowed to query the table. You can't run one

Re: Access to MySQL

2010-12-17 Thread Jesper Wisborg Krogh
On 17/12/2010, at 9:02 AM, Jerry Schwartz wrote: I have to move the back-end of an Access application to MySQL, and I’ve run into one issue that I haven’t been able to solve yet. The Access database stores dates as text in a “/mm/dd” format. The problem is that the default value is a

Re: CURRENT insert ID

2011-01-21 Thread Jesper Wisborg Krogh
Hi, On 22/01/2011, at 11:27 AM, Donovan Brooke wrote: Just an idear.. Don't auto_increment the main table.. create a unique Id table, auto_increment that, and grab that value first for use with both fields in your main table. This can be wrapped into a trigger, so the main table

Re: How can I drop a table that is named “logs/#sql-ib203” and appeared after MySQL crash?

2013-06-21 Thread Jesper Wisborg Krogh
Hi Frank, On 20/06/2013 05:00, Franck Dernoncourt wrote: Hi all, A table `logs/#sql-ib203` appeared after a MySQL crash due to disk space shortage while deleting some attributes in a table in the `logs` database and adding an index. `USE logs; SHOW TABLES;` does not list the table

Re: User-defined variables not working ONLY on first query in chained replication

2013-07-16 Thread Jesper Wisborg Krogh
Hi Matthew, On 16/07/2013 21:21, Matthew Ward wrote: I've noticed a weird issue in our chained replication environment where when setting user-defined variables, the first time the variable is used in a session the value is NULL, but all uses thereafter work correctly. snip The first time I

Re: MySQL version 3.23 to 5.x features

2013-08-21 Thread Jesper Wisborg Krogh
Hi Naga, On 21/08/2013 23:43, shawn green wrote: Hello Naga, On 8/21/2013 6:45 AM, Nagaraj S wrote: Hello, Can anyone share the features/comparison from MySQL version 3.23 to 5.x in single document? I can get from Google, however I have to navigate different pages/sites, if it is in single

Re: Mysql 5.1 union with group by for results

2013-11-08 Thread Jesper Wisborg Krogh
Hi Machiel, On 8/11/2013 20:04, Machiel Richards wrote: Good day all I am hoping someone can assist me in the following. One of our servers were running mysql 5.0 still and as part of a phased upgrade route we have upgraded to version 5.1. However since the upgrade,

Re: Crash after shutdown/restart

2014-01-14 Thread Jesper Wisborg Krogh
Hi Jørn, On 15/01/2014 04:36, Jørn Dahl-Stamnes wrote: 140114 18:20:08 InnoDB: Error: data file /data/mysql/data/ibdata3 uses page size 1024, 140114 18:20:08 InnoDB: but the only supported page size in this release is=16384 140114 18:20:08 InnoDB: Could not open or create data files. That

Re: LIKE sql optimization

2014-02-12 Thread Jesper Wisborg Krogh
On 12/02/2014 13:16, Morgan Tocker wrote: Hi Zhigang, On Feb 11, 2014, at 8:48 PM, Zhigang Zhang zzgang2...@gmail.com wrote: I want to know the reason, in my opinion, to scan the smaller index data has better performance than to scan the whole table data. I think I understand the question

RE: alter table modify syntax error

2014-06-28 Thread Jesper Wisborg Krogh
Hi Tim, -Original Message- From: Tim Dunphy [mailto:bluethu...@gmail.com] Sent: Sunday, 29 June 2014 03:45 Cc: mysql@lists.mysql.com Subject: Re: alter table modify syntax error Hey guys, Sorry to hit you with one more. But I'm trying to use a positional statement in a column

RE: alter table modify syntax error

2014-06-28 Thread Jesper Wisborg Krogh
Hi Tim, -Original Message- From: Tim Dunphy [mailto:bluethu...@gmail.com] Sent: Sunday, 29 June 2014 10:09 To: Jesper Wisborg Krogh Cc: mysql@lists.mysql.com Subject: Re: alter table modify syntax error The syntax sixth is not a supported syntax. You should use the syntax

RE: Avoiding table scans...

2014-07-24 Thread Jesper Wisborg Krogh
Hi Chris, -Original Message- From: Chris Knipe [mailto:sav...@savage.za.org] Sent: Thursday, 24 July 2014 19:18 To: mysql@lists.mysql.com Subject: Avoiding table scans... mysql SELECT MIN(ArtNumber) AS ArtNumber, MessageID FROM 78168ea0a9b3b513a1f2d39b559b406e WHERE ArtNumber

RE: MySQL 5.5.33 History list not purging?

2014-09-07 Thread Jesper Wisborg Krogh
Hi Brad, -Original Message- From: Brad Heller [mailto:b...@cloudability.com] Sent: Sunday, 7 September 2014 03:07 To: MySQL General List Subject: MySQL 5.5.33 History list not purging? For some reason, the history list isn't purging on one of my masters. This is causing all kinds

Re: can I just encrypt tables? what about the app?

2016-02-29 Thread Jesper Wisborg Krogh
Hi Lejeczek, On 1/03/2016 00:31, lejeczek wrote: hi everybody a novice type of question - having a php + mysql, can one just encrypt (internally in mysql) tables and php will be fine? If not, would it be easy to re-code php to work with this new, internal encryption? Starting with MysQL

Re: MySql Swapping issues

2016-09-08 Thread Jesper Wisborg Krogh
Hi Machiel, On 8/09/2016 05:24, Machiel Richards wrote: ... Biggest issue at the moment is mysql taking all physical memory until nothing left, the starts swapping as well until that is completely used up. Since you are using MySQL 5.7, you can consider enabling memory instrumentation in

Re: audit trails

2016-12-07 Thread Jesper Wisborg Krogh
Hi, On 8/12/2016 18:39, mach...@seworx.co.za wrote: ... So to recap what has been done for now : - Triggers to insert a record in audit table to show the table, type of query(insert/update) and who made the relevant change. - Trigger to prevent

Re: rescue Inno tables from an abandoned data directory?

2016-12-03 Thread Jesper Wisborg Krogh
Hi Martin, On 4/12/2016 07:23, Martin Mueller wrote: I abandoned a MySQL 5.22 database that quite suddenly andthat I wasn’t able to start up again. The data directory consists of a mix of ISAM and Inno tables. I was able to copy the ISAM tables into a new 5.6 version, and they work.