ERROR 1307 (HY000) at line 31: Failed to CREATE PROCEDURE

2012-01-02 Thread Adarsh Sharma

Dear all,

I am running Mysql on a Linux System ( Caos ).
Today when I am trying to create a procedure in it, I m facing the below 
issue :


ERROR 1307 (HY000) at line 31: Failed to CREATE PROCEDURE

My OS version is :
Systemr-5:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP1 (x86_64) - Kernel \r (\l).

Kernel Version is :  Server-5:~ # uname -a
Linux 5 2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09 UTC 2007 x86_64 
x86_64 x86_64 GNU/Linux


Mysql Version is very old :
System-5:~ # mysql --version
mysql  Ver 14.12 Distrib 5.0.45, for unknown-linux-gnu (x86_64) using 
readline 5.0


After some research ,I know this error occurs due to loading mysql data 
in previous version of mysql from new one.
I had this issue in the past  I solved the issue by mysql_upgrade 
command but this time the issue still persists.


Any suggestions for solving the issue.


Thanks in Advance.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Beginner question

2012-01-02 Thread Reindl Harald


Am 02.01.2012 16:33, schrieb Biz-comm:
 Thanks for any assistance.
 
 Web page  that needs a sort of all records with a specific state, set to 
 show, and if it exists in one of 4 categories.
 
 
 Using this:
 
 SELECT * 
 FROM listings
 WHERE listing_state = 'DC' 
 AND listings.listing_show ='y'  
 AND  listings.cat1 = 23  OR listings.cat2 = 23 OR listings.cat3 = 23 
 
 
 Gives up 2 records in the state of DC, set to show, and are listed in cat1.
 However, it also gives up 2 records in the state of VA, set to show, but are 
 listed in cat2 (not in 1).
 Any assistance most appreciated.

basic math
how should mysql know that the OR-clauses are meant not standalone?

SELECT *
FROM listings
WHERE listing_state = 'DC'
AND listings.listing_show ='y'
AND (listings.cat1 = 23  OR listings.cat2 = 23 OR listings.cat3 = 23)



signature.asc
Description: OpenPGP digital signature


Re: Beginner question

2012-01-02 Thread Mike OK

Hi Patrice

I would try some brackets.

Something like this should work

SELECT * FROM listings WHERE listing_state = 'DC' AND listings.listing_show 
='y'  AND  ( listings.cat1 = 23  OR listings.cat2 = 23 OR listings.cat3 = 
23 )


Mike


- Original Message - 
From: Biz-comm b...@biz-comm.com

To: mysql@lists.mysql.com
Sent: Monday, January 02, 2012 10:33 AM
Subject: Beginner question


Thanks for any assistance.

Web page  that needs a sort of all records with a specific state, set to 
show, and if it exists in one of 4 categories.



Using this:

SELECT *
FROM listings
WHERE listing_state = 'DC'
AND listings.listing_show ='y'
AND  listings.cat1 = 23  OR listings.cat2 = 23 OR listings.cat3 = 23


Gives up 2 records in the state of DC, set to show, and are listed in cat1.

However, it also gives up 2 records in the state of VA, set to show, but are 
listed in cat2 (not in 1).


Any assistance most appreciated.



Regards,

Patrice Olivier-Wilson
828-628-0500
http://Biz-comm.com
b...@biz-comm.com





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: Beginner question

2012-01-02 Thread Biz-comm
Perfect. Thanks so much.
On Jan 2, 2012, at 10:40 AM, Mike OK wrote:

 Hi Patrice
 
 I would try some brackets.
 
 Something like this should work
 
 SELECT * FROM listings WHERE listing_state = 'DC' AND listings.listing_show 
 ='y'  AND  ( listings.cat1 = 23  OR listings.cat2 = 23 OR listings.cat3 = 23 )
 
 Mike
 

Regards,

Patrice Olivier-Wilson
828-628-0500
http://Biz-comm.com
b...@biz-comm.com





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: why does basic MySQLdump on db table fail with Permission denied, or else it creates a zero KB file

2012-01-02 Thread Jan Steinman

On 31 Dec 11, at 20:36, Govinda wrote:
 If you're using MacOS X Server, it should be in /usr/bin, which should be in 
 your default $PATH, or else you couldn't do ANYTHING, including ls.
 
 I have notes somewhere in my stuff about how to get $PATH to include where 
 mysql actually lives, but once I realized what the issue was (in my OP this 
 thread) then I was fine with just using a full path for now.  The convenience 
 of a 'fixed' $PATH will be nice, sooner or later (when I get to it), but for 
 now it is just as well that I let it beat into my head how the CL is actually 
 working (working out the full paths)

You should fix the $PATH, as you'll need it for utilities (such as mysqldump) 
and such.

You need to edit your shell startup file. For bash, it's .bash_profile in 
your home directory. Other shells will have their own startup script. My 
.bash_profile includes:

export 
PATH=$HOME/bin:/Developer/Tools:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/opt/local/sbin

Do echo $SHELL to see which shell you're using.

Do printenv to see all your global shell variables, including $SHELL and 
$PATH.

 What does locate mysqldump tell you?
 
 Govind% locate mysqldump
 
 WARNING: The locate database (/var/db/locate.database) does not exist.
 To create the database, run the following command:
 
  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

[message repeated after running the suggested command]

What that does is tells the system launcher to index your disks in the 
background, so it's no surprise that it would not immediately create a working 
database.

It should have finished by now, and you should now be able to run the locate 
command.

 How about echo $PATH?
 
 Govind% echo $PATH
 /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin

I don't have the official binary distribution in front of me, but once you get 
locate working, you can add the path of your MySQL binaries to the $PATH 
variable by appending it (preceded by a colon) to the $PATH declaration in your 
shell's startup script.


Do you often think about difficulties, failure and disasters? Do you keep 
thinking about the negative news you have seen on the TV or read in the 
newspapers? Do you see yourself stuck and unable to improve your life or your 
health? Do you frequently think that you do not deserve happiness or money, or 
that it is too difficult to get them? If you do, then you will close your mind, 
see no opportunities, and behave and react in such ways as to repel people and 
opportunities. You let the power of negative thinking rule your life. -- Ramon 
Sasson
 Jan Steinman, EcoReality Co-op 





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql