The @ variables are so-called user variables, see:
http://dev.mysql.com/doc/refman/5.0/en/Variables.html
http://dev.mysql.com/doc/refman/5.0/en/example-user-variables.html
these are defined in the session scope. They cant be declared either (or better, a reference implicitly declares it if it didnt exist already)
So, your snippet nearly works (declaration is bogging you now):
Create Procedure testproc()
as
select * from testtable where field1 = @test1
should work fine, but you must be really careful.
If there's another process that unexpectedly sets the value of @test1, you could get into trouble.
Therefore, I recommend you rewrite it with normal parameters:
Create Procedure testproc(
p_test1 varchar(32)
)
as
select * from testtable where field1 = p_test1
these are defined in the scope of the procedure so you cannot get weird sidefx