1. 05 4月, 2017 1 次提交
    • A
      Fix ON COMMIT DELETE ROWS action for append optimized tables · 5ccdd6a2
      Asim R P 提交于
      The fix is to perform the same steps as a TRUNCATE command - set new relfiles
      and drop existing ones for parent AO table as well as all its auxiliary tables.
      
      This fixes issue #913.  Thank you, Tao-Ma for reporting the issue and proposing
      a fix as PR #960.  This commit implements Tao-Ma's idea but implementation
      differs from the original proposal.
      5ccdd6a2
  2. 03 4月, 2017 2 次提交
    • D
      Move BugBuster memory_quota test to ICW · 6cc722e0
      Daniel Gustafsson 提交于
      This moves the memory_quota tests more or less unchanged to ICW.
      Changes include removing ignore sections and minor formatting as
      well as a rename to bb_memory_quota.
      6cc722e0
    • D
      Migrate BugBuster mpph tests to ICW · 42b33d42
      Daniel Gustafsson 提交于
      This combines the various mpph tests in BugBuster into a single
      new ICW suite, bb_mpph. Most of the existing queries were moved
      over with a few pruned that were too uninteresting, or covered
      elsewhere.
      
      The BugBuster tests combined are: load_mpph, mpph_query,
      mpph_aopart, hashagg and opperf.
      42b33d42
  3. 30 3月, 2017 1 次提交
    • J
      Remove bugbuster leftover schema_topology · 9c854010
      Jesse Zhang 提交于
      Not to be confused with a TINC test with the same name.
      This test was brought into the main suite in
      b82c1e60 as an effort to increase
      visibility into all the tests that we cared about. We never had the
      bandwidth to look at the intent of this test though.
      
      There are a plethora of problem of the bugbuster version of
      `schema_topology`:
      
      0. It has very unclear and mixed intent. For example, it depends on
      gphdfs (which nobody outside Pivotal can build) but it just tests that
      we are able to revoke privilege of that protocol.
      0. It creates and switches databases
      0. The vast number of cases in this test is duplicating coverage for
      tests elsewhere in `installcheck-good` and TINC.
      
      Burning this with fire.
      9c854010
  4. 20 3月, 2017 1 次提交
    • D
      Remove deprecated analytical functions · fae97ae7
      Daniel Gustafsson 提交于
      Most of the builtin analytical functions added in Greenplum have
      been deprecated in favour of the corresponding functionality in
      MADLib. The deprecation notice was committed in a61bf8b7, code as
      well as tests are removed here. The sum(array[]) function require
      the matrix_add() backend code and thus it remains.
      
      This removes matrix_add(), matrix_multiply(), matrix_transpose(),
      pinv(), mregr_coef(), mregr_r2(), mregr_pvalues(), mregr_tstats(),
      nb_classify() and nb_probabilities().
      fae97ae7
  5. 13 3月, 2017 1 次提交
    • H
      Rewrite TINC tests for AO checksum failure, and move to main test suite. · c54ffe6e
      Heikki Linnakangas 提交于
      Some notable differences:
      
      * For the last "appendonly_verify_block_checksums_co" test, don't use a
        compressed table. That seems fragile.
      
      * In the "appendonly_verify_block_checksums_co" test, be more explicit in
        what is replaced. It used to scan backwards from end of file for the byte
        'a', but we didn't explicitly include that byte in the test data. What
        actually gets replaced depends heavily on how integers are encoded. (And
        the table was compressed too, which made it even more indeterministic.)
        In the rewritten test, we replace the string 'xyz', and we use a text
        field that contains that string as the table data.
      
      * Don't restore the original table file after corrupting. That seemed
        uninteresting to test. Presumably the table was OK before we corrupted
        it, so surely it's still OK after restoring it back. In theory, there
        could be a problem if the file's corrupt contents were cached somewhere,
        but we don't cache AO tables, and I'm not sure what we'd try to prove by
        testing that, anway, because swapping the file while the system is active
        is surely not supported.
      
      * The old script checked that the output when a corrupt table was SELECTed
        from contained the string "ERROR:  Header checksum does not match".
        However, half of the tests actually printed a different error, "Block
        checksum does not match". It turns out that the way the old select_table
        function asserted the result of the grep command was wrong. It should've
        done "assert(int(result) > 0), ..." rather than just "assert(result > 0),
        ...". As written, it always passed, even if there was no ERROR in the
        output. The rewritten test does not have that bug.
      c54ffe6e
  6. 09 3月, 2017 1 次提交
    • H
      Add more tests for CREATEEXTTABLE privileges. · b8bf866c
      Heikki Linnakangas 提交于
      These tests are from the legacy cdbfast test suite, from
      writable_ext_tbl/test_* files. They're not very exciting, and we already
      had tests for some variants of these commands, but looking at the way all
      these privileges are handled in the code, perhaps it's indeed best to have
      tests for many different combinations. The tests run in under a second, so
      it's not too much of a burden.
      
      Compared to the original tests, I removed the SELECTs and INSERTs that
      tested that you can also read/write the external tables, after successfully
      creating one. Those don't seem very useful, they all basically test that
      the owner of an external table can read/write it. By getting rid of those
      statements, these tests don't need a live gpfdist server to be running,
      which makes them a lot simpler and faster to run.
      
      Also move the existing tests on these privileges from the 'external_table'
      test to the new file.
      b8bf866c
  7. 08 3月, 2017 1 次提交
    • K
      Implement CREATE ROLE RESOURCE GROUP syntax. · 8c0c0c4d
      Kenan Yao 提交于
      There are two default resource groups, default_group and admin_group,
      roles will be assigned to one of them depending on they are superuser or
      not unless a group is explicitly specified. Only superuser can be
      assigned to the admin_group.
      
          -- create a role r1 and assign it to resgroup g1
          CREATE ROLE r1 RESOURCE GROUP g1;
      Signed-off-by: NNing Yu <nyu@pivotal.io>
      8c0c0c4d
  8. 06 3月, 2017 1 次提交
    • H
      Move "CTE functional" tests from TINC to main test suite. · 629f7e76
      Heikki Linnakangas 提交于
      I had to jump through some hoops to run the same test queries with
      optimizer_cte_inlining both on and off, like the original tests did. The
      actual tests queries are in qp_with_functional.sql, which is included by
      two launcher scripts that set the options. The launcher tests are put in
      the test schedule, instead of qp_with_functional.sql.
      
      When ORCA is not enabled, the tests are run with gp_cte_sharing on and off.
      That's not quite the same as inlining, but it's similar in nature in that
      it makes sense to run test queries with it enabled and disabled. There were
      some tests for that in with_clause and qp_with_clause tests already, but I
      don't think some extra coverage will hurt us.
      
      This is just a straightforward conversion, there might be overlapping tests
      between these new tests and existing 'with_clause', 'qp_with_clause', and
      upstream 'with' tests. We can clean them up later; these new tests run in
      a few seconds on my laptop, so that's not urgent.
      
      A few tests were tagged with "@skip" in the original tests. Test queries
      58, 59, and 60 produced different results on different invocations,
      apparently depending on the order that a subquery returned rows (OPT-2497).
      I left them in TINC, as skipped tests, pending a decision on what to do
      about them. Queries 28 and 29 worked fine, so I'm not sure why they were
      tagged as "@skip OPT-3035" in the first place. I converted them over and
      enabled like the other tests.
      629f7e76
  9. 03 3月, 2017 2 次提交
  10. 02 3月, 2017 6 次提交
  11. 01 3月, 2017 1 次提交
    • H
      Move functionProperty tests from TINC. · 64f83aa8
      Heikki Linnakangas 提交于
      I'm not how many of these tests are worth keeping at all, but as a first
      step, let's get them into the main test suite. The runtime of the parallel
      group with these tests is about 1 minute on my laptop.
      
      This is mostly a straightforward move, with mechanical changes removing the
      useless TINC tags. However, some tests were marked with the special
      "@executemode ORCA_PLANNER_DIFF" tag. The code in __init__.py ran those
      tests differently. Normally, you run a test, and comparet the output with
      the expected output file. But those ORCA_PLANNER_DIFF tests were run twice,
      with and without ORCA, and the results were compared against each other,
      instead of the expected output stored in the repository. The expected
      outputs of those tests were out of date, you got a different error message
      now than what was remembered in the expected output.
      
      Now those tests are run as normal pg_regress tests. I updated the expected
      output of those tests to match what you get nowadays.
      64f83aa8
  12. 27 2月, 2017 1 次提交
    • H
      Move RLE delta compression tests from TINC. · 9cad0a0a
      Heikki Linnakangas 提交于
      I kept the tests using QuickLZ in TINC, as we don't have QuickLZ support in
      the open source version anymore. They ought to be moved to where we keep
      the code for reading legacy quicklz-compressed tables.
      9cad0a0a
  13. 25 2月, 2017 2 次提交
  14. 23 2月, 2017 3 次提交
    • H
    • H
      Remove redundant direct dispatch tests. · a92d0e33
      Heikki Linnakangas 提交于
      These exact same tests were in both 'direct_dispatch', and in
      'bfv_dd_types'. Oddly, one SELECT was missing from 'bfv_dd_types', though.
      Add the missing SELECT there, and remove all these type tests from
      'direct_dispatch'.
      
      Now that there are no duplicate table names in these tests, also run
      'direct_dispatch' in the same parallel group as the rest of the direct
      dispatch tests. That's a more logical grouping.
      a92d0e33
    • H
      Make bfv_temp test more robust. · b81a2ca0
      Heikki Linnakangas 提交于
      The test disconnects, and immediately reconnects and checks that temp
      table from the previous session has been removed. However, the old backend
      removes the tables only after the disconnection, so there's a race
      condition here: the new session might query pg_tables and still see the
      table, if the old session was not fast enough to remove it first.
      
      Add a two-second sleep, to make the race condition less likely to happen.
      This is not guaranteed to avoid the race altogether, but I don't see an
      easy way to wait for the specific event that the old backend has exited.
      
      A sleep in a test that doesn't run in parallel with other tests is a bit
      annoying, as it directly makes the whole regression suite slower. To
      compensate for that, move the test to run in parallel with the other
      nearby bfv_* tests. Those other tests don't use temp tables, so it still
      works.
      
      Also, modify the validation query in the test that checks that there are
      no temp tables, to return whole rows, not just COUNT(*). That'll make
      analyzing easier, if this test fails.
      b81a2ca0
  15. 22 2月, 2017 2 次提交
    • H
      Move uao_dml and uaocs_dml tests from TINC to the main regression suite. · 33de2106
      Heikki Linnakangas 提交于
      The uao_dml and uaocs_dml tests were identical, except that there were
      a few additional queries in the uao_dml suite that were missing from the
      uaocs_dml suite, and various cosmetic differences in table names and such.
      Use the new "uao templating" mechanism in pg_regress to generate both
      cases from a single set of files.
      
      I didn't look for redundant or useless tests in these suites. At a quick
      glance, at least many of the select tests seem quite pointless, so it would
      be good to cull these in the future.
      33de2106
    • H
      Move tests for ALTER TABLE on AO-tables from TINC to main test suite. · b04c9aba
      Heikki Linnakangas 提交于
      This is a straightforward copy-paste, except for thing: I changed all the
      quicklz-compressed tables to use zlib instead, so that these tests work
      without support for legacy quicklz compression. AFAICT, the compression
      isn't a very interesting aspect for these tests (I even considered making
      them uncompressed.)
      b04c9aba
  16. 21 2月, 2017 3 次提交
  17. 19 2月, 2017 1 次提交
    • H
      Fix test cases to work with a three-segment cluster. · aada2649
      Heikki Linnakangas 提交于
      Change the queries that check tuple counts on a particular segment,
      in utility mode, to not print out the exact tuple counts, but a crude
      classification of 0, 1, <5 or more tuples. That's less sensitive to how
      the tuples are distributed across segments.
      
      The locks_reindex test is moved to the regular regression suite. I rewrote
      it to use a more advanced "locktest" view, copied from the
      partition_locking test, which doesn't rely on utility mode.
      
      These changes should make the tests work with even larger clusters,
      but I've only tested with 1, 2, and 3 nodes.
      aada2649
  18. 18 2月, 2017 2 次提交
  19. 17 2月, 2017 2 次提交
  20. 15 2月, 2017 3 次提交
  21. 14 2月, 2017 1 次提交
  22. 08 2月, 2017 1 次提交
  23. 03 2月, 2017 1 次提交
    • H
      Fix memory leak and error handling of workfiles. · f0a0a593
      Heikki Linnakangas 提交于
      There's no need to allocate ExecWorkFile struct in TopMemoryContext. We
      don't rely on a callback to clean them up anymore, they will be closed
      by the normal ResourceOwner and MemoryContext mechanisms. Otherwise,
      the memory allocated for the struct is leaked on abort.
      
      In the passing, make the error handling more robust.
      
      Also modify tuplestorenew.c, to allocate everything in a MemoryContext,
      rather than using gp_malloc() directly. ResourceOwner and MemoryContext
      mechanisms will now take care of cleanup on abort, instead of the custom
      end-of-xact callback.
      
      Remove execWorkFile mock test. The only thing it tested was that
      ExecWorkFile was allocated in TopMemoryContext. That didn't seem very
      interesting to begin with, and the assumption is now false, anyway. We
      could've changed the test to test that it's allocated in
      CurrentMemoryContext instead, but I don't see the point.
      
      Per report in private from Karthikeyan Rajaraman. Test cases also by him,
      with some cleanup by me.
      f0a0a593