Commit graph

24 commits

Author SHA1 Message Date
Dmitry Lenev
e960abc7cf Fix for bug#36544 "DROP USER does not remove stored function
privileges".

The first problem was that DROP USER didn't properly remove privileges 
on stored functions from in-memory structures. So the dropped user
could have called stored functions on which he had privileges before
being dropped while his connection was still around.
Even worse if a new user with the same name was created he would
inherit privileges on stored functions from the dropped user.
Similar thing happened with old user name and function privileges
during RENAME USER.

This problem stemmed from the fact that the handle_grant_data() function
which handled DROP/RENAME USER didn't take any measures to update
in-memory hash with information about function privileges after
updating them on disk.

This patch solves this problem by adding code doing just that.

The second problem was that RENAME USER didn't properly update in-memory
structures describing table-level privileges and privileges on stored 
procedures. As result such privileges could have been lost after a rename
(i.e. not associated with the new name of user) and inherited by a new
user with the same name as the old name of the original user.

This problem was caused by code handling RENAME USER in
handle_grant_struct() which [sic!]:
a) tried to update wrong (tables) hash when updating stored procedure
   privileges for new user name.
b) passed wrong arguments to function performing the hash update and
   didn't take into account the way in which such update could have
   changed the order of the hash elements.

This patch solves this problem by ensuring that a) the correct hash
is updated, b) correct arguments are used for the hash_update()
function and c) we take into account possible changes in the order
of hash elements.
2011-02-07 14:01:19 +03:00
Sergey Glukhov
c1a298d0a4 Bug#41049 does syntax "grant" case insensitive?
test result fix
2009-10-28 13:15:33 +04:00
Matthias Leich
eb91084540 Fix for Bug#40545, Bug#40209, Bug#40618, Bug#38346
Details:
  - Limit the queries to character sets and collations
    which are most probably available in all build types.
    But try to preserve the intention of the tests.
  - Remove the variants adjusted to some build types.

  Note:
  1. The results of the review by Bar are included.
  2. I am not able to check the correctness of this patch
     on any existing build type and any MySQL version.
     So it could happen that the new test fails somewhere.
2009-06-19 17:04:25 +02:00
Matthias Leich
7a7885f406 Fix for Bug#43383 main.variables-big : Weak testing code and result
including modifications according to code review
+ backport of the fix for
  Bug 41932 funcs_1: is_collation_character_set_applicability path
                     too long for tar
  which was missing in 5.0 (just a renaming of two files)
2009-03-26 19:12:19 +01:00
Patrick Crews
1c39d5ff8f Fix of failing funcs_1 tests.
Changes are due to changes in precision.
Re-record of .result files to account for new server precision.
2009-03-09 11:32:07 -04:00
Staale Smedseng
c0fb3df0d0 Recommit for merging and pushing 2009-02-27 16:11:15 +02:00
Alexey Kopytov
811ace8364 Fixed several test failures in the funcs_1 suite introduced by the patch for bug #21205. 2009-02-14 18:58:07 +03:00
Matthias Leich
e1ea011cee Fix for Bug#38427 "Data too long" in some configurations,
tests "<ENGINE>_func_view" fail
2008-10-02 13:47:16 +02:00
Gleb Shchepa
d1f5280a5c merge 5.0-main --> 5.0-bugteam 2008-07-10 00:54:20 +05:00
Patrick Crews
8d5dc3a5f5 Bug#37380 - Test funcs_1.is_columns_myisam_embedded fails on OS X
Test was failing due to the addition of a '\x05' character in result sets
Latest builds of the server have shown this problem to have disappeared.
Removing code within the test that disables the test on Mac OS X.

Recommit due to tree error on earlier, approved patch.
2008-07-01 14:44:47 -04:00
Matthias Leich
dd7bc1a662 Fix for
Bug#36787 Test funcs_1.charset_collation_1 failing
Details:
1. Skip charset_collation_1 if charset "ucs2_bin" is
   missing (property which distincts "vanilla" builds
   from the others)
2. Let builds with version_comment LIKE "%Advanced%"
   (found them for 5.1) execute charset_collation_3.
3. Update comments charset_collation.inc so that they
   reflect the current experiences.
2008-06-30 22:16:06 +02:00
Matthias Leich mleich@mysql.com
00c19cd837 Fix for
Bug#37167 funcs_1: Many tests fail if the embedded server is used.
   Bug#37164 funcs_1: Some tests fail if an optional character set is missing.
+ some cleanup within the testsuite related to the fixes above
+ some adjustments to open bugs on Mac OS X

Details:
- Remove the initial loading of data from tests if these data
  are not somewhere retrieved
- Remove any use of columns with attribute unicode
  (-> UCS2 is no more needed) from tests where unicode
  properties are not checked or somehow required
- Create a separate branch of the Character maximum length test
  (CML). If UCS2 is available than this test gets applied to
  every available type of string column with attribute unicode
  This prevents any loss of coverage by the points above.
- Disable the execution of is_tables_ndb which gives wrong
  results because of a bug. Correct the exepected results of
  this test.
- In case of tests failing when applied to the embedded server
    1) Create a variant of this test for the embedded server
  or
    2) Skip the test in case of embedded server
  depending on purpose and complexity of test.
- Skip the tests which could suffer from
  Bug 28309 First insert violates unique constraint - was "memory" table empty ?
  Bug 37380 Test funcs_1.is_columns_myisam_embedded fails on OS X
  (both bugs Mac OS X, embedded server, MySQL 5.0 only)
- Minor improvements like remove typos
2008-06-16 20:39:58 +02:00
Matthias Leich mleich@mysql.com
be574a3a57 Bug#36788 Multiple funcs_1 'trig' tests are failing on vanilla builds
Fix for this bug and additional improvements/fixes
In detail:
- Remove unicode attribute from several columns
  (unicode properties were nowhere needed/tested)
  of the table tb3
  -> The runnability of these tests depends no more on
     the availibility of some optional collations.
- Use a table tb3 with the same layout for all
  engines to be tested and unify the engine name
  within the protocols.
  -> <engine>_trig_<abc>.result have the same content
- Do not load data into tb3 if these rows have no
  impact on result sets
- Add tests for NDB (they exist already in 5.1)
- "--replace_result" at various places because
  NDB variants of tests failed with "random" row
  order in results
  This fixes a till now unknown weakness within the
  funcs_1 NDB tests existing in 5.1 and 6.0
- Fix the expected result of ndb_trig_1011ext
  which suffered from Bug 32656
  + disable this test
- funcs_1 could be executed with the mysql-test-run.pl
  option "--reorder", which saves some runtime by
  optimizing server restarts.
  Runtimes on tmpfs (one attempt only):
  with    reorder 132 seconds
  without reorder 183 seconds
- Adjust two "check" statements within func_misc.test
  which were incorrect (We had one run with result set
  difference though the server worked good.)
- minor fixes in comments
2008-06-02 21:57:11 +02:00
mleich@five.local.lan
89ddc0aa52 Fix for
Bug#35335 funcs_1: Some tests fail within load_file during
                      pushbuild runs
   Solution: 1. Move files with input data used in load_file, 
                load data etc. 
                from suite/funcs_1/<whatever>
                to std_data
             2. Use for testsuite funcs_1 the server option
                --secure-file-priv=<MYSQLTEST_VARDIR>
             3. Outfiles have to be stored under MYSQLTEST_VARDIR 
+ changes according to WL#4304 Cleanup in funcs_1 tests
  - backport of fixes/improvements made in 5.1 to 5.0
    The differences between scripts in 5.0 and 5.1 cause
    much additional and annoying work during any upmerge.
  - replace error numbers with names
  - improved comments
  - improved formatting
  - Unify storage engine names so that result files for
    storage engine variants do not differ (some tests)
  - remove a script no more used (tests are done in other scripts)
2008-03-31 19:48:02 +02:00
mleich@five.local.lan
d7e6ba4794 Post fix for
WL#4203 Reorganize and fix the data dictionary tests of
        testsuite funcs_1
because the goal to fix
Bug#34532 Some funcs_1 tests do not clean up at end of testing
was partially missed.
Some minor additional modifications are for
   WL#4304 Cleanup in funcs_1 tests
2008-03-11 19:54:35 +01:00
mleich@five.local.lan
30091e23f9 WL#4203 Reorganize and fix the data dictionary tests of
testsuite funcs_1
1. Fix the following bugs
   Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
      Solution: Test variants charset_collation_* adjusted to different builds
   Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table
      Solution: Excluding "PROFILING" table from queries
   Bug#33654 "slow log" is missing a line
      Solution: Unify the content of the fields TABLES.TABLE_ROWS and
                STATISTICS.CARDINALITY within result sets
   Bug#34532 Some funcs_1 tests do not clean up at end of testing
      Solution: DROP objects/reset global server variables modified during testing
                + let tests missing implementation end before loading of tables
   Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results
      Solution: Cut <engine>__datadict tests into smaller tests + generate new results.
   Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2)
      Generation of new results during post merge fix
   Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4
      Generation of new results during post merge fix
   Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding
      Generation of new results during post merge fix
      + removal of platform-specific replace routine (no more needed)
2. Restructure the tests
   - Test not more than one INFORMATION_SCHEMA view per testscript
   - Separate tests of I_S view layout+functionality from content related to the
     all time existing databases "information_schema", "mysql" and "test"
   - Avoid storage engine related variants of tests which are not sensible to
     storage engines at all.
3. Reimplement or add some subtests + cleanup
   There is a some probability that even the reviewed changeset
   - does not fix all bugs from above   or
   - contains new bugs which show up on some platforms <> Linux or on one of
     the various build types
4. The changeset contains fixes according to
   - one code review
   - minor bugs within testing code found after code review (accepted by reviewer)
   - problems found during tests with 5.0.56 in build environment
2008-03-07 17:33:07 +01:00
hhunger@hh-nb.hhunger
10ea2aa927 patch for bug#32496 (2nd) with ansi conformant and Mysql test case. 2007-11-26 21:28:01 +01:00
mleich@five.local.lan
4922727fb7 This changeset fixes
Bug#31567 "datadict" tests (all engines) fail:
             Reference protocol is non-standard build
   Bug#30418 "datadict" tests (all engines) fail:
             Dependency on the host name for ordering   
Modifications:
   1. The standard builds (build team) do not contain
      the collation 'utf8_general_cs'.
      The common developer builds (compuile-....-max)
      contain this collation.
      Solution fitting to both build variants:
         Exclude the collation 'utf8_general_cs' from
         result sets.
   2. Use mysqltest builtin sorting of result set for
      the statement where the hostname affects the
      row order.
2007-11-21 13:50:17 +01:00
gluh@mysql.com/eagle.(none)
7f67efccef Bug#31568 Some "information_schema" entries suddenly report a NULL default
updated result files
2007-10-17 13:22:34 +05:00
mleich@four.local.lan
9fa2f3c6b6 Fixes for
Bug#30418 "datadict" tests (all engines) fail: Dependency on the host name
                for ordering
     Bug#30420 "datadict" tests (all engines) fail: Release build has help tables loaded
     Bug#30438 "{memory,myisam,ndb}__datadict" tests fail: Use "InnoDB" without checking
     Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
Attention: Only the build team can check if Bug#30440 is really fixed.
2007-08-28 18:37:17 +02:00
omer@linux.site
ad0c033b84 Updated/fixed test and result files to 5.0.46
Note datadict files do not include wrong is_updatable wrong value 
     as a result of bug 30020.
2007-07-24 21:31:25 -07:00
omer@linux.site
4dac41dcad Coeection to the bug format to for better search - review comment 2007-05-02 07:50:47 -07:00
omer@linux.site
d276ff0cf6 Updates to test/result files of funcs_1 to 5.0.40 level,
- validated current result files
 - forced order by and removed time stamps 
removed a_version files (since do not make sense now when suite is in the main tree)
Note: datadict tests still fail as a result of regression bug 28181 in 5.0.42 (discovered
      while performing this update) - tests should run clean once bug is fixed
2007-05-01 06:52:23 -07:00
hhunger@hh-nb.hungers
28a05ea0ea copy from test-extra-5.0 to main tree 2007-02-06 19:07:48 +01:00