Jay Pipes wrote:
Roland Bouman wrote:
Hi!
On Fri, Dec 19, 2008 at 9:53 PM, Jay Pipes <[email protected]> wrote:
My idea is to completely scrap all of this type of stuff and simply
throw
errors when bad data is encountered.
Sure - but note that you cannot simply change all warnings into
errors....MySQL sometimes throws a warning even when there is nothing
the matter:
Database changed
mysql> create table if not exists `I do *NOT* exist`(
-> `really, i d` int
-> );
Query OK, 0 rows affected (0.19 sec)
mysql> create table if not exists `I do *NOT* exist`(
-> `really, i d` int
-> );
Query OK, 0 rows affected, 1 warning (0.00 sec)
Note (Code 1050): Table 'i do *not* exist' already exists
Sure, but in the case above, is the warning useful at all? By putting
IF NOT EXISTS aren't you essentially saying "don't error if it exists"
and therefore we would one care about the warning that is emitted?
A "completion code" would have done the trick. This should not be a
warning, because you are asking that a table should be created if it
does not exist, and no action if it does exist.
Completion codes are also defined by the standard, and have the same
meaning as an "OK" result.
That is, about the only completion code defined is the "No data" that
you should get when you query some data and zero rows are delivered.
In HADB we used "completion codes" for the following query results:
"N rows retrieved" (for a SELECT statement)
"N rows updated"
"N rows deleted"
"N rows inserted"
Thanks,
Roy
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp