| Bug #8017 | test [sql statment] - will predict if i'll do this will i get an any error | ||
|---|---|---|---|
| Submitted: | 19 Jan 2005 18:27 | Modified: | 4 Feb 2009 15:25 |
| Reporter: | shimon doodkin | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Parser | Severity: | S4 (Feature request) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any | |
[19 Jan 2005 18:28]
shimon doodkin
example 1
test select * from table_x
will return
|test |
+----+
|true |
example 2
test select * fromtable_x
will return
|test |
+----+
|false|
example 2
test insert into only_tinyinttable values('abc')
will return
|test |
+----+
|false|
example 2
test update only_tinyinttable set value=2 where not_exsisting_col=1
will return
|test |
+----+
|false|
[3 Oct 2008 18:05]
Konstantin Osipov
Starting from 5.0, you can use SQL PREPARE.
[4 Feb 2009 15:25]
Susanne Ebrecht
According to the comment from Konstantin I will close this feature request now. There are solution in MySQL 5.0 and higher for this.

Description: test [sql statment] - will predict if i'll execute [sql statment] will i get an any error example 1 select * from table_x will return |test | +----+ |true | example 2 select * fromtable_x will return |test | +----+ |false| example 2 insert into only_tinyinttable values('abc') will return |test | +----+ |false| example 2 update only_tinyinttable set value=2 where not_exsisting_col=1 will return |test | +----+ |false| ... and so on for all sql statments How to repeat: not a bug Suggested fix: add suport for test command for simple statments first and for all sql statments after. may be an other syntax thet remind transaction like : batch [many sql statments] go it will check for suitability for all statments and then on [go] it will execute all the statments.