MySQL Forums
Forum List  »  Stored Procedures

same SP running in different servers, return datatype problem
Posted by: Eduardo Ceballos
Date: September 16, 2011 01:42PM

Hi
I upgraded from 5.0.26 to 5.1.49 and i have a stored procedure returning different datatypes in each.

this is an example (the stored proc is long...)

--------------------------------------------------------------------
CREATE DEFINER=`bancaria`@`%` PROCEDURE `pruebados`(par1 varchar(2))
BEGIN

set @a = lpad(par1,2,'0');
select @a ;

END;
==========================================================================


Running it on 5.0.26 it returns:
(mysql -uroot -p -T test)


mysql> call pruebados('');
Field 1: `a`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: VAR_STRING <<<<<<<<<<<<<<<this is what i need =)!
Collation: latin1_swedish_ci (8)
Length: 8192
Max_length: 2
Decimals: 31
Flags:

+------+
| a |
+------+
| 01 |
+------+
1 row in set (0.00 sec)



--------------------------------------------------------------------
Running it on 5.1.49 it returns:
(mysql -uroot -p --column-type-info test)


mysql> call pruebados('');
Field 1: `a`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: MEDIUM_BLOB <<<<<<<<<<<<<<<< THIS SHOULD BE A VARCHAR
Collation: latin1_swedish_ci (8)
Length: 16777215
Max_length: 2
Decimals: 31
Flags:

+------+
| a |
+------+
| 01 |
+------+
1 row in set (0.00 sec)


I'm a bit lost, i dont really know how to proceed.

Thank u for ur time

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.