1. 11 5月, 2016 9 次提交
    • H
      Remove a lot of unnecessary setup steps from qp_misc regression test. · 8eedfe9f
      Heikki Linnakangas 提交于
      There were a lot of unused tables and functions, and chaff like comments
      that are not needed for the actual tests in the file. At first glance,
      some of the things seemed marginally useful to test on their own right,
      like loading data with non-ASCII characters in it, but all the setup
      stuff was in a large ignore-block, so any failures there would go unnoticed
      anyway.
      
      Removing unnecessary stuff is a virtue of its own, but this also speeds up
      the test nicely.
      8eedfe9f
    • H
      Convert test case to Unix line endings. · eb1db513
      Heikki Linnakangas 提交于
      eb1db513
    • H
      Split GPDB additions to create_table test to a separate test. · 35c3c579
      Heikki Linnakangas 提交于
      The stuff that's inherited from upstream stays in create_table, while the
      stuff that we've added in GPDB is split off to gp_create_table. Separating
      them makes merging and diffing with upstream easier.
      35c3c579
    • H
      Remove redundant test case from qp_functions test file. · ac989241
      Heikki Linnakangas 提交于
      The test with stress_test() function (and accompanying tables) was created
      and executed once. Then it was dropped, and recreated, and then executed
      two times. Executing the same function twice might reveal bugs in plan
      caching, so I kept that (although TBH we have better coverage for that
      elsewhere). But I don't see the point of dropping and recreating it in
      between: surely it's good enough to just create the function once, and
      execute it twice.
      
      This reduces the runtime of qp_functions test by about 1/3 (from 3 minutes
      to 2 minutes on my laptop).
      ac989241
    • D
      Avoid checking the integer exponent for infinity · 7fca740a
      Daniel Gustafsson 提交于
      The exponent in the pow calculation is integer and can thus not be
      infinity, remove for logical OR in check.
      
      Andreas Scherbaum and Atri Sharma
      7fca740a
    • H
      Avoid deadlock on catchup interrupt. · 698603da
      Heikki Linnakangas 提交于
      An earlier attempt at this checked AmIInSIGUSR1Handler() to see if we
      are currently processing a catchup event. But that's not good enough:
      we also process catchup interrupts outside the signal handler, in
      EnableCatchupInterrupt(). I saw lockups during "make installcheck-good"
      with a stack trace that shows a backend waiting for lock on a temporary
      relation, while trying to truncate it when committing the transaction
      opened for processing a catchup event.
      
      For reference, the commit message for the commit that introduced the
      AmIInSIGUSR1Handler check said:
      
          Recent parallel installcheck-good revealed we have a chance to process
          catchup interrupt while waiting for commit-prepare, and if the prepared
          transaction has created a temporary table with on commit option, the
          newly opened transaction for the sake of AcceptInvalidationMessages()
          cannot see and fails before the commit-prepare.  It's even not clear if
          we are safe to open and commit another transaction between prepare and
          commit-prepare, but for now just skip the oncommit operation as it
          doesn't have any effect anyway.
      698603da
    • S
      This commit generates code for code path: ExecVariableList > slot_getattr >... · 7b75d9ea
      Shreedhar Hardikar 提交于
      This commit  generates code for code path: ExecVariableList > slot_getattr > _slot_getsomeattrs > slot_deform_tuple. This code path is executed during scan in simple select queries that do not have a where clause (e.g., select bar from foo;).
      
      For each attribute A in the target list, regular implementation of ExecvariableList retrieves the slot that A comes from and calls slot_getattr. slot_get_attr() will eventually call slot_deform_tuple (through _slot_getsomeattrs), which fetches all yet unread attributes of the slot until the given attribute.
      
      This commit generates the code for the case that all the attributes in target list use the same slot (created during a scan i.e, ecxt_scantuple). Moreover, instead of looping over the target list one at a time, it uses slot_getattr only once, with the largest attribute index from the target list.
      
      If during code generation time, the completion is not possible (e.g., attributes use different slots), then function returns false and codegen manager will be responsible to manage the clean up.
      
      This implementation does not support:
      * Null attributes
      * Variable length attributes
      * Fixed length attributes passed by reference (e.g., uuid)
      If at execution time, we see any of the above types of attributes, we fall back to the regular function.
      
      Moreover, this commit:
      * renames existing "codegen" guc, which is used for initiating llvm libraries, to "init_codegen" (Note: we set this guc in gpconfig),
      * adds guc "codegen", which enables code generation and compilation at query execution time,
      * enhances the existing code generation utilities by adding a function that creates all IR instructions for falling back to regular functions, and
      * removes the existing code that generates the code of a naive slot_deform_tuple, which simply falls back to regular slot_deform_tuple.
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      7b75d9ea
    • V
    • L
      add Makefile target "make unitdevel" that runs pure unit tests (#710) · e7e83220
      Larry H 提交于
      * new "unitdevel" target uses whatever libraries and python is provided by developer's PATH
      * that new "unitdevel" target allows whatever logging that the unit tests output, to stdout
      * change names of 4 "unit" test files that actually require a cluster to be running to have "_cluster_" in their names
      * keep the behavior of the existing "make check" to run both pure unit tests AND the "_cluster_" tests
      e7e83220
  2. 10 5月, 2016 12 次提交
  3. 09 5月, 2016 8 次提交
    • H
      Produce textual error messages for LDAP issues instead of numeric codes · 4d31c209
      Heikki Linnakangas 提交于
      This is a backport of the following upstream commit:
      
      ---
      commit edc9109c
      Author: Peter Eisentraut <peter_e@gmx.net>
      Date:   Thu Sep 27 20:22:50 2012 -0400
      
          Produce textual error messages for LDAP issues instead of numeric codes
      ---
      
      Signed-off-by: Dan Lynch (dlynch@gopivotal.com)
      4d31c209
    • H
      Avoid using "---" in test case, because it confuses gpdiff.pl · 9e1dc1ea
      Heikki Linnakangas 提交于
      To gpdiff.pl, "---" looks like the beginning of a result set, so it sorts
      the rows following that. As long as the test case passes, that doesn't
      matter, but if there's a failure, the output diff is mixed up.
      9e1dc1ea
    • A
      add -n for sort command when initsystem compare the primary and mirror order · 38efb490
      Andreas Scherbaum 提交于
      since I get error when initsystem if the segment number >8
      [FATAL]:-mismatch between content id and primary content id
      
      I check that this is because, when matching mirror with primary has different order for some index.
      e.g. I print the sort result:
      primary is 0,10,11,12,13,1,14,15...
      mirror is 0,10,11,12,13,14,1,15....
      
      I believe it make more sense that we use sort -n , so I changed the code, and init system successfully.
      
      Patch submitted by @byxiangfei
      38efb490
    • H
      Allow system to start up, even if pg_auth_time_constraint is corrupt. · 4d9cd367
      Heikki Linnakangas 提交于
      If pg_auth_time_constraint contains a role OID that doesn't exist in
      pg_authid, we used to crash at system startup. A corrupt catalog table
      is not good, but refusing to start up is even worse. Make
      write_auth_time_file() function more resilient, and throw a warning
      in that situation, and avoid the crash. The crash happened in the
      pq_qsort() after this loop, because time_name_compar expects every
      authtime_entry being sorted to have a valid non-NULL role name.
      4d9cd367
    • H
      Enhance partition_locking test case to also check locks in segments. · 7b87d7b6
      Heikki Linnakangas 提交于
      While hacking in this area, at one point I broke the code so that a
      partition was not correctly in a segment as it should've been, even though
      it was locked in the master. Fortunately, I noticed that in manual testing
      before committing, but to prevent such bugs from slipping in in the future,
      enhance the 'partition_locking' test to catch that kind of bugs.
      7b87d7b6
    • H
      Change test cases to not rely on implicit int -> text cast. · 6f4986ec
      Heikki Linnakangas 提交于
      The int -> text cast (and many other casts to text) were downgraded
      to assignment casts in the upstream, and we're about to merge that patch
      soon. To prepare for that and to reduce the size of that huge merge
      commit somewhat, adjust GPDB test cases to not rely on those casts that
      are about to be removed.
      
      When the casts were downgraded in the upstream, it revealed a lot of buggy
      queries in applications (or put another way, it broke a lot of applications
      :-) ). Many of the queries in our regression tests look bogus like that
      as well, for example the "sale.dt < 10" comparison in the qp_olap_mdqa test
      (sale.dt is a date). But I didn't try to change the meaning of the queries,
      I just added the casts needed to make them do the same thing they used to.
      I'm afraid that changing the substance of the queries would reduce our
      code coverage, if the tests are reproducing some very specific scenario.
      6f4986ec
    • H
      Clean up EXPLAIN-related code. · 3ea0db50
      Heikki Linnakangas 提交于
      There's no real need for a separate MemoryContext for EXPLAIN stuff. Might
      as well leave all that in the per-statement context.
      3ea0db50
    • H
      Remove EXPLAIN remnants of workfile caching. · 0eb57971
      Heikki Linnakangas 提交于
      Workfile caching was an experimental feature that was never taken into
      production use. It has since been removed, but these instrumentation
      remnants of it were still lying around unused.
      0eb57971
  4. 07 5月, 2016 1 次提交
  5. 06 5月, 2016 7 次提交
  6. 05 5月, 2016 3 次提交