~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/test/regress/sql/subselect.sql

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
SELECT 1 AS zero WHERE 1 IN (SELECT 2);
10
10
 
 
11
-- Check grammar's handling of extra parens in assorted contexts
 
12
 
 
13
SELECT * FROM (SELECT 1 AS x) ss;
 
14
SELECT * FROM ((SELECT 1 AS x)) ss;
 
15
 
 
16
(SELECT 2) UNION SELECT 2;
 
17
((SELECT 2)) UNION SELECT 2;
 
18
 
 
19
SELECT ((SELECT 2) UNION SELECT 2);
 
20
SELECT (((SELECT 2)) UNION SELECT 2);
 
21
 
 
22
SELECT (SELECT ARRAY[1,2,3])[1];
 
23
SELECT ((SELECT ARRAY[1,2,3]))[2];
 
24
SELECT (((SELECT ARRAY[1,2,3])))[3];
 
25
 
11
26
-- Set up some simple test tables
12
27
 
13
28
CREATE TABLE SUBSELECT_TBL (
346
361
  int4_tbl i4 on dummy = i4.f1;
347
362
 
348
363
--
 
364
-- Test case for cross-type partial matching in hashed subplan (bug #7597)
 
365
--
 
366
 
 
367
create temp table outer_7597 (f1 int4, f2 int4);
 
368
insert into outer_7597 values (0, 0);
 
369
insert into outer_7597 values (1, 0);
 
370
insert into outer_7597 values (0, null);
 
371
insert into outer_7597 values (1, null);
 
372
 
 
373
create temp table inner_7597(c1 int8, c2 int8);
 
374
insert into inner_7597 values(0, null);
 
375
 
 
376
select * from outer_7597 where (f1, f2) not in (select * from inner_7597);
 
377
 
 
378
--
349
379
-- Test case for premature memory release during hashing of subplan output
350
380
--
351
381