Wednesday, July 18, 2007

Imagine that you work mostly with C#. Imagine that on occasion you sprinkle SQL, Java and JavaScript into your daily routine, and that you also use the command line a lot.

Can you see the problem?

Didn't think so. I'll clue you in: the last one in that list has one distinct difference with the first four. Look around you. Have you found what we're looking for?

That is correct. The answer is: the semicolon. A lightweight, generally meaningless way to end a statement in most common languages. Arguably useless to users, arguably beneficial to parsers, and the cause of almost half an hour of continuous head-scratching by both programmer and DBA. How so?

C:\Temp>mysql -C -usomeuser -phispassword thedatabase;
ERROR 1044 (42000): Access denied for user 'someuser'@'%' to database 'thedatabase;'

I'll let you draw your own conclusions.

Saturday, July 28, 2007 2:14:39 PM (Jerusalem Standard Time, UTC+02:00)
Umm, use a real shell instead of cmd ? ';' works fine most everywhere...

PS - Hi Tomer :-)
Eyal
Sunday, July 29, 2007 12:20:56 AM (Jerusalem Standard Time, UTC+02:00)
Yeah, unfortunately that would mean installing otherwise unnecessary software on client machines, wouldn't it?

And uuh, hi yourself, even though I've no idea who you are :-)
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview