Skip to content

Commit

Permalink
don't print FETCH pseudo SQL statements before (in proc mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsauthof committed Jul 2, 2013
1 parent 0f95183 commit ed4dffe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 162 deletions.
162 changes: 0 additions & 162 deletions modtest/ref/sql
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:314
Expand All @@ -408,15 +399,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:314
Expand All @@ -426,15 +408,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:314
Expand All @@ -444,15 +417,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:314
Expand All @@ -462,15 +426,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:314
Expand All @@ -480,15 +435,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:314
Expand All @@ -498,15 +444,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:314
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution (errorcode: 1403, ORA-01403: no data found, select str ,n from example_tbl where n<:b0 order by n ):
-- example/main.pc:314
Expand Down Expand Up @@ -544,15 +481,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:337
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:337
Expand All @@ -562,15 +490,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:340
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:340
Expand All @@ -580,15 +499,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:343
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:343
Expand All @@ -598,15 +508,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:346
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:346
Expand All @@ -616,15 +517,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:349
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:349
Expand All @@ -634,15 +526,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:352
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:352
Expand All @@ -652,15 +535,6 @@ select str ,n from example_tbl where n<5 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:355
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:355
Expand Down Expand Up @@ -717,15 +591,6 @@ select str ,n from example_tbl where n<6 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:406
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:406
Expand All @@ -738,15 +603,6 @@ select str ,n from example_tbl where n<6 order by n ;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:406
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution (errorcode: 1403, ORA-01403: no data found, select str ,n from example_tbl where n<:b0 order by n ):
-- example/main.pc:406
Expand Down Expand Up @@ -853,15 +709,6 @@ DELETE FROM example_tbl WHERE n = 4;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:468
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution:
-- example/main.pc:468
Expand All @@ -874,15 +721,6 @@ DELETE FROM example_tbl WHERE n = 4;
-- ---------------------------------------------------------------------------


-- ###########################################################################
-- Before execution:
-- example/main.pc:468
-- Pseudo-SQL: FETCH
-- PREFETCH=1 (# of prefetched rows)
( :XXX, :XXX );
-- ---------------------------------------------------------------------------


-- ===========================================================================
-- After execution (errorcode: 1403, ORA-01403: no data found, SELECT str, n FROM example_tbl WHERE n < :x ORDER BY n):
-- example/main.pc:468
Expand Down
6 changes: 6 additions & 0 deletions wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,12 @@ static int pp_sql_before(const sqlexd *d, Statement *stmt, unsigned callback_nr)

traceproc_trap(stmt->type_str, stmt->text, true, true);

// printing a FETCH statement before execution
// is not really useful
if (stmt->type == FETCH && options.binary[OPT_SQL])
return 0;


if (state.callbacks[callback_nr].before_fn) {
int ret = state.callbacks[callback_nr]
.before_fn(stmt, state.callbacks[callback_nr].user_ptr);
Expand Down

0 comments on commit ed4dffe

Please sign in to comment.