In the last episode (Oct 15), Kailash R said:
> I was wondering if there is a way to increase the size of user defined
> variables ? I am not able to attribute a type to them and when I assign
> @sql = 'a_text _field' , 'a_text_field' gets truncated if it exceeds the
> size of @sql. This is not wholesome as I am using @sql in a subsequent
> prepare statement and my procedure errors out with a sql syntax error.
> Any advice for this would help.
Do you have example code that fails? Mysql variables are probably limited
to your server's max_packet value. I am able to create variables containing
long strings with no problems, at least:
mysql> set @a=repeat('a',1024*1024*10);
Query OK, 0 rows affected (0.95 sec)
mysql> select length(@a);
| length(@a) |
| 10485760 |
1 row in set (0.05 sec)