NYCPHP Meetup

NYPHP.org

[nycphp-talk] SPROCs in the MySQL/PostgreSQL + PHP crowd

Jerry B. Altzman jbaltz at altzman.com
Mon Dec 13 11:26:06 EST 2010


I know this isn't a MySQL list, but ...

on 12/12/2010 7:52 AM Justin Dearing said the following:
> On Sun, Dec 12, 2010 at 2:12 AM, Jerry B. Altzman <jbaltz at altzman.com
> <mailto:jbaltz at altzman.com>> wrote:
>     I just encountered my first real one.
>     It's on a MySQL on a Windows platform--someone from the MSSQL world,
>     no doubt.
>     Just got bitten hard by it, migrating from 5.0 to 5.1 has slightly
>     different schemata in the mysql.mysql database, which made me need
>     to be very careful about importing dumpfiles.
> Just out of curiosity, what if you copied over the binary database files
> (via LVM snapshot if your runnin LVM to prevent downtime) to a 5.1
> machine? Will 5.1 import 5.0 binary files?

I actually tried that...but a) this was a Windows platform (so LVM 
doesn't exist) and b) the structure of the tables in the main MySQL 
changed from 5.0 -> 5.1 (extra columns in mysql.proc, mysql.db, etc) so 
a physical restoral (I tried just copying the innodb and myisam table 
files over) failed.

If there were NO sprocs, this would have been easy...but someone started 
using them so I got stuck with a logical dump/restore (and hand-editing 
the dump file to NOT try to recreate any tables in the MySQL mysql 
database).

There's a bit of confusion. MySQL runs a special database called 'mysql' 
that contains all manner of administrative information, and it's where 
things like stored procedure definitions live.

> BTW, someone who uses a stored procedure in MySQL could be coming from
> the Oracle, Sybase, Microsft, or Postgres world. Either that, or they
> are new to RDBMSes and do not have prejudices against using certain
> features in MySQL since they weren't using it since 4.0 when you could
> not do these things.

I mentioned that this was a windows machine, running ASP code. My best 
guess is MSSQL. :-) Every large RDBMS (Oracle, DB2, Sybase, MSSQL) uses 
them a lot more.

> Justin

//jbaltz
-- 
jerry b. altzman | jbaltz at altzman.com | www.jbaltz.com | twitter:@lorvax
thank you for contributing to the heat death of the universe.



More information about the talk mailing list