1. 20 Oct, 2004 1 commit
    • unknown's avatar
      Fix for bug #6173 "One can circumvent missing UPDATE privilege if · 4dbb8830
      unknown authored
      he has SELECT and INSERT privileges for table with primary key"
      
      Now we set lex->duplicates= DUP_UPDATE right in parser if INSERT has
      ON DUPLICATE KEY UPDATE clause, this simplifies insert_precheck()
      function (this also fixes a bug) and some other code.
      
      
      mysql-test/r/grant2.result:
        Added test for bug #6173 "One can circumvent missing UPDATE privilege if
        he has SELECT and INSERT privileges for table with primary key"
      mysql-test/t/grant2.test:
        Added test for bug #6173 "One can circumvent missing UPDATE privilege if
        he has SELECT and INSERT privileges for table with primary key"
      sql/mysql_priv.h:
        insert_precheck() don't need "update" parameter any longer since
        now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
        KEY UPDATE clause.
      sql/sql_parse.cc:
        insert_precheck() don't need "update" parameter any longer since
        now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
        KEY UPDATE clause, so it can determine whenever it is needed to
        require UPDATE_ACL by itself. Also calling of mysql_insert() is
        simplified.
      sql/sql_prepare.cc:
        insert_precheck() don't need "update" parameter any longer since
        now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
        KEY UPDATE clause, so it can determine whenever it is needed to
        require UPDATE_ACL by itself. Also calling of mysql_insert() is
        simplified.
      sql/sql_yacc.yy:
        It is better to set Lex->duplicates= DUP_UPDATE right in parser if we
        have INSERT with ON DUPLICATE KEY UPDATE clause, rather doing this later.
      4dbb8830
  2. 15 Oct, 2004 3 commits
    • unknown's avatar
      New tests for bug#1644 and bug#1676, · deed5517
      unknown authored
      test for bug#1180 changed to table naming scheme 't#'.
      
      
      mysql-test/r/ps_11bugs.result:
        Expected results of new tests for bug#1644 and bug#1676,
        test for bug#1180 changed to table naming scheme 't#'.
      mysql-test/t/ps_11bugs.test:
        New tests to check bug#1644 and bug#1676,
        test for bug#1180 changed to table naming scheme 't#'.
      deed5517
    • unknown's avatar
      819422c6
    • unknown's avatar
      TAG: · b8e8df46
      unknown authored
        Tagged ChangeSet 1.2091 as mysql-4.1.6
      configure.in:
        Updated version string to 4.1.7
      
      
      configure.in:
        Updated version string to 4.1.7
      b8e8df46
  3. 14 Oct, 2004 16 commits
  4. 13 Oct, 2004 10 commits
    • unknown's avatar
      e82bcce7
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · c45f9d12
      unknown authored
      into mysql.com:/media/sda1/mysql/mysql-4.1-5985
      
      
      sql/sql_class.h:
        Auto merged
      c45f9d12
    • unknown's avatar
      A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)" · e7a0d543
      unknown authored
      crashes server." The fix makes Item_func_rand prepared-statements
      aware plus it fixes the case when RAND is used in prepared
      statements and replication is on (as well as several similar issues).
      Until now we did not reset THD before every execution of a prepared
      statement, so if some execution had set thd->time_zone_used
      or thd->rand_used they would not be reset until next mysql_parse.
      Some of post-review fixes done.
      
      
      mysql-test/r/ps.result:
        A test case for Bug#5985: test results fixed.
      mysql-test/t/ps.test:
        A test case for Bug#5985 "prepare stmt from "select rand(?)" crashes
        server."
      sql/item_func.cc:
        Actual fix for Bug#5985: Item_func_rand rewritten to be 
        prepared statements aware.
      sql/item_func.h:
        Actual fix for Bug#5985: Item_func_rand rewritten to be 
        prepared statements aware.
      sql/mysql_priv.h:
        We need a separate call to reset THD state before every execute of
        a prepared statement. Otherwise things like THD->user_var_events
        are never cleaned up and bloat binary log (as the list of events
        grows from execution to execution).
      sql/sql_class.cc:
        Statement::end_statement -> THD::end_statement()
        (a leftover from some design change which is not to pushed now, but the
        leftover is to be pushed).
      sql/sql_class.h:
        Statement::end_statement -> THD::end_statement()
        (a leftover from some design change which is not to pushed now, but the
        leftover is to be pushed).
      sql/sql_lex.cc:
        Move the part responsible for initializing LEX from mysql_init_query
        to lex_start.
      sql/sql_lex.h:
        All lex-related initialization is now in lex_start.
        Move thd->select_number to lex->select_number to be able to use it
        easily in lex_start.
      sql/sql_parse.cc:
        Split mysql_init_query into two functions: mysql_reset_thd_for_next_query,
        which is used in PS and conventional execution, and lex_start, used only
        when we want to parse something.
        Fix init_connect to use initialized THD.
      sql/sql_prepare.cc:
        Deploy mysql_reset_thd_for_next_query to reset THD state before
        execution of a prepared statement.
        Normally this should have been added to just one place, but
        we have to reset thd before assigning placeholders from variables,
        thus we can't do that in execute_stmt (yuck).
      e7a0d543
    • unknown's avatar
      Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1 · 7c2b9701
      unknown authored
      into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
      
      
      sql/item_subselect.cc:
        Auto merged
      7c2b9701
    • unknown's avatar
      srv0srv.c, log0log.c, srv0srv.h, ha_innodb.cc, ha_innodb.h: · 522b175c
      unknown authored
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      
      
      sql/ha_innodb.h:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      sql/ha_innodb.cc:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      innobase/include/srv0srv.h:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      innobase/log/log0log.c:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      innobase/srv/srv0srv.c:
        Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
      522b175c
    • unknown's avatar
      Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-4.1 · d591fcee
      unknown authored
      into mysql.com:/home/mydev/mysql-4.1
      
      d591fcee
    • unknown's avatar
      BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S). · ee0892aa
      unknown authored
      BUG#4335 - one name can be handler open'ed many times.
      Fixed problems detected on Windows build by VC++.
      Removed unused variables.
      Applied a neccessary cast.
      
      ee0892aa
    • unknown's avatar
      tests/client_test.c: · 8a559cfe
      unknown authored
        Make checks (asserts) performed in client_test.c work in non-debug
        builds.
      
      
      tests/client_test.c:
        Make checks (asserts) performed in client_test.c work in non-debug
        builds: all asserts/DBUG_ASSERTs replaced with if (!(expr)) abort();
      8a559cfe
    • unknown's avatar
      InnoDB: correct potential overflow in trx_purge() · b51562ed
      unknown authored
      
      innobase/trx/trx0purge.c:
        trx_purge(): avoid overflow in setting srv_dml_needed_delay
      b51562ed
    • unknown's avatar
      fix for some build/test errors for 4.1.6 · b37f86a3
      unknown authored
      b37f86a3
  5. 12 Oct, 2004 6 commits
    • unknown's avatar
      Move Heikki's comment about thd->query comment to proper place · f8fe986c
      unknown authored
      (bad merge from 4.0)
      
      
      sql/sql_class.h:
        Move a comment to proper place (bad merge from 4.0)
      f8fe986c
    • unknown's avatar
      post-commit: · 2e4f7ae7
      unknown authored
        Added catch for (example) WL#1234 into bk commit subjects
      
      
      BitKeeper/triggers/post-commit:
        Added catch for (example) WL#1234 into bk commit subjects
      2e4f7ae7
    • unknown's avatar
      ps.test, ps.result: a test case for Bug#6042 "constants · febdbf18
      unknown authored
      propogation works only once (prepared statements)".
      
      
      mysql-test/r/ps.result:
        Test case for Bug#6042: test results fixed
      mysql-test/t/ps.test:
        A test case for Bug#6042 "constants propogation works only once
        (prepared statements).
      febdbf18
    • unknown's avatar
      New tests for prepared statements: · 24db339f
      unknown authored
      - 'ps_10nestset' uses a "nested set" approach for an employee 
        hierarchy, then does arithmetic on the "salary" field;
        (soon) to be extended by inserts / deletes which imply
        mass updates on the "l"/"r" fields showing the set inclusion,
      - 'ps_11bugs' will get (some of ?) those bug DB entries which
        refer to prepared statements, but whose number does not appear
        in a test file comment - so it will also be extended.
      
      24db339f
    • unknown's avatar
      item.h: · cf19901a
      unknown authored
        A fix for Bug#6042 "constants propogation works olny once (prepared
        statements)": reset item->marker in Item::cleanup, as it's used
        in propogate_cond_constants. No test case as the only way I could
        come up with to show the problem is EXPLAIN, and EXPLAIN is painful
        to use in the test suite.
      
      
      sql/item.h:
        A fix for Bug#6042 "constants propogation works olny once (prepared
        statements)": reset item->marker in Item::cleanup, as it's used
        in propogate_cond_constants
      cf19901a
    • unknown's avatar
      NDB compile fix sol9x86 · 3908b8f8
      unknown authored
      
      ndb/include/kernel/LogLevel.hpp:
        compile fix sol9x86
      ndb/include/util/version.h:
        compile fix sol9x86
      ndb/src/common/util/version.c:
        compile fix sol9x86
      ndb/src/mgmsrv/Services.cpp:
        compile fix sol9x86
      3908b8f8
  6. 11 Oct, 2004 4 commits