Hi Paul,
 
I've spent the past two days trying to reproduce my problem and I think
I may have brought this on myself. I've had been trying to create a
procedure with the Query Browser GUI and was unable to do so. So I tried
to create them with MySQL-Front and MySQL Control Center and somehow I
was able to get the procedure added to the proc table. Once the
procedure was created I went into the mysql.proc table with MySQL-Front
and modified the values of param_list and body fields to the values I
had. So I probably put the strVal VarChar in the param_list without ever
going through a Create or Alter Procedure statement. My bad. 
 
I'm still not able to create a procedure with Query Browser, which
confuses me. I can create one using the command line client but the same
commands do not work in Query Browser. That's a problem for another
post.

>>> Paul DuBois <[EMAIL PROTECTED]> 12/2/06 10:38 AM >>>
At 11:34 AM -0800 12/1/06, Chris White wrote:
>On Friday 01 December 2006 11:22, Ed Reed wrote:
>>  I have a problem/question I'd like to find someone else to
verify/answer
>>  for me.
>>
>>  I'm using MySQL 5.1.09 running on Netware. I've created a stored
>>  procedure that has one parameter,
>>
>>  Create Procedure MyTest(strVal VarChar)
>>  Begin
>>   Select Field1, Field2, Field3 From MyTable
>>   Where Field3=strVal;
>>  End
>
>varchar is meant to be variable, so it MUST have a length supplied. 
If you
>want the same flexibility without specifying a specific length, use
TEXT
>instead.

Hmm ... I don't know.  CHAR is equivalent to CHAR(1), but for VARCHAR
the length is not optional.   For example, if you try to create a
table
using a length-less VARCHAR, this happens:

mysql> create table t (c varchar);
ERROR 1064 (42000): You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right 
syntax to use near ')' at line 1

If you are able to create the procedure when no VARCHAR length is
given,
I think that might be considered a bug.  And it's certainly a problem
that you get "proc table is missing, corrupt, or contains bad data."
when attempting to invoke the procedure.

Ed, could you file a bug report about this issue at bugs.mysql.com?
That way, one of the developers can figure out what's going on and
resolve the issue.
Thanks.

-- 
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com 

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


Reply via email to