1. 01 Nov, 2007 1 commit
    • unknown's avatar
      Bug#31850 Test crashes in "embedded" server · cba71f3e
      unknown authored
      The mysql_change_user command fails to properly update the database pointer
      when no database is selected, leading to "use after free" errors. The same
      happens on the user privilege pointer in the thread security context.
      
      The solution is to properly reset and update the database name. Also update
      the user_priv pointer so that it doesn't point to freed memory.
      
      
      sql/sql_connect.cc:
        After a successful call to check_user() without specifying a new
        database name, the previous database thd->db) is freed but the
        pointer is not updated to NULL.
      sql/sql_parse.cc:
        Update the security_ctx->priv_user pointer as it is a alias for
        the user security_ctx->user pointer. Also remove unneeded cast,
        the x_free macro casts the argument.
      cba71f3e
  2. 31 Oct, 2007 13 commits
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/31669-5.1 · 5589343f
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      5589343f
    • unknown's avatar
      Post merge fix for bug 31669. · 07816ab6
      unknown authored
      
      tests/mysql_client_test.c:
        Macro name changed in 5.1
      07816ab6
    • unknown's avatar
      Cleanup: rename select_send::status to select_send::is_result_set_started. · fd820b6a
      unknown authored
      Add select_send::cleanup.
      Fix a compilation warning.
      Issues spotted while working on the fix for Bug#12713.
      
      
      sql-common/client.c:
        Fix a warning.
      sql/sql_class.cc:
        Give a variable a more specific name. Rewrite an incorrect comment.
        Add a cleanup for select_send. The only case now this cleanup can be
        necessary is when we have a prepared statement inside a stored procedure, 
        and a continue handler. At first execution, the statement is killed
        after having executed select_send::send_fields. At the second execution
        it is killed after having executed select_send::send_fields.
      sql/sql_class.h:
        Rename a member. Add comments.
      fd820b6a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · f033c614
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc
      
      
      libmysql/libmysql.c:
        Auto merged
      f033c614
    • unknown's avatar
      Cleanup: use helper functions to set an error in MYSQL or MYSQL_STMT. · c583e264
      unknown authored
      No functionality added or changed.
      This is a pre-requisite for the fix for Bug#12713 Error in a stored 
      function called from a SELECT doesn't cause ROLLBACK of statem
      
      Address post-review comments.
      
      
      include/sql_common.h:
        Declare auxiliary functions to manipulate mysql.net.last_er* and 
        mysql_stmt.last_er*
      libmysql/libmysql.c:
        Use helper functions to set an error in MYSQL or MYSQL_STMT
      libmysqld/lib_sql.cc:
        Use helper functions to set an error in MYSQL or MYSQL_STMT
      sql-common/client.c:
        Use helper functions to set an error in MYSQL or MYSQL_STMT
      c583e264
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 518767ed
      unknown authored
      into  station.:/mnt/raid/alik/MySQL/devel/5.1-rt-bug31649
      
      518767ed
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug31347/my51-bug31347 · 34e5cf68
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
      
      
      sql/sql_acl.cc:
        Auto merged
      34e5cf68
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug31347/my50-bug31347 · 51e7b6bf
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/bug31347/my51-bug31347
      
      
      sql/sql_acl.cc:
        Auto merged
      51e7b6bf
    • unknown's avatar
      Bug#31347 Increase in memory usage after many DROP USER statements · 6ee3ecef
      unknown authored
      Dropping users causes huge increase in memory usage because field values were
      allocated on the server memory root for temporary usage but never deallocated.
      
      This patch changes the target memory root to be that of the thread handler
      instead since this root is cleared between each statement.
      
      
      sql/sql_acl.cc:
        Changed memory root from server life time memory to thread life time memory.
      6ee3ecef
    • unknown's avatar
      Fix for a BUG#31649: events.test fails: NULL "state" field of · e396d320
      unknown authored
      SHOW PROCESSLIST.
      
      The problem was a race condition: if the Event Scheduler was not
      quick enough, the following scenario happens:
        - The Event Scheduler picks up the created event;
        - The event is executed;
        - event_scheduler_thread->proc_info is set to NULL;
        - The client issues SELECT FROM I_S.
      
      The fix is to wait for the Event Scheduler to reach 'Waiting
      for next activation' state. 
      
      
      mysql-test/t/events.test:
        Wait for the Event Scheduler to start waiting for the activation.
      e396d320
    • unknown's avatar
      Fix result files after patch for BUG#31035. · 94efbbe3
      unknown authored
      
      mysql-test/r/group_min_max.result:
        Update result file.
      mysql-test/r/index_merge_myisam.result:
        Update result file.
      94efbbe3
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/31669-5.1 · c5b663a7
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      c5b663a7
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/mysql-5.0-runtime · eaa3b384
      unknown authored
      into  endora.local:/Users/davi/mysql/bugs/31669-5.1
      
      
      sql/sql_table.cc:
        Auto merged
      libmysql/libmysql.c:
        Manual merge
      tests/mysql_client_test.c:
        Manual merge
      eaa3b384
  3. 30 Oct, 2007 8 commits
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/30904-5.1 · 2a4e5f7c
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      2a4e5f7c
    • unknown's avatar
      Bug#30904 SET PASSWORD statement is non-transactional · b541504b
      unknown authored
      The SET PASSWORD statement is non-transactional (no explicit transaction
      boundaries) in nature and hence is forbidden inside stored functions and
      triggers, but it weren't being effectively forbidden.
      
      The implemented fix is to issue a implicit commit with every SET PASSWORD
      statement, effectively prohibiting these statements in stored functions
      and triggers. 
      
      
      mysql-test/r/sp-error.result:
        Add test case result for Bug#30904
      mysql-test/t/sp-error.test:
        Add test case for Bug#30904
      sql/sql_lex.h:
        Add variable to set that a statement with SET PASSWORD causes a implicit
        commit.
      sql/sql_parse.cc:
        End active transaction in SET PASSWORD.
      sql/sql_yacc.yy:
        Set the correct flag on SET PASSWORD if inside a SP, thus effectively
        prohibiting SET PASSWORD statements in stored functions and triggers.
      b541504b
    • unknown's avatar
      In ha_delete_table, use a standard mechanism to intercept the error message · 383ce41d
      unknown authored
      and convert it to a warning instead of direct manipulation with the
      thread error stack.
      Fix a bug in handler::print_erorr when a garbled message was
      printed for HA_ERR_NO_SUCH_TABLE.
      This is a pre-requisite patch for the fix for Bug#12713 Error in a stored
      function called from a SELECT doesn't cause ROLLBACK of statem
      
      
      sql/handler.cc:
        Use a standard mechanism to intercept the error message, instead
        of direct manipulation with thread error stack. 
        Fix a bug when for HA_ERR_NO_SUCH_TABLE handler::print_error() would
        print a garbled message.
      sql/log.cc:
        Extend internal error handler interface to carry the message text.
      sql/mysqld.cc:
        Extend internal error handler interface to carry the message text.
      sql/sql_base.cc:
        Extend internal error handler interface to carry the message text.
      sql/sql_class.cc:
        Extend internal error handler interface to carry the message text.
      sql/sql_class.h:
        Extend internal error handler interface to carry the message text.
      sql/sql_error.cc:
        Extend internal error handler interface to carry the message text.
      383ce41d
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 98a07054
      unknown authored
      into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc-2
      
      
      sql/sql_connect.cc:
        Manual merge.
      98a07054
    • unknown's avatar
      Use an inline getter method (thd->is_error()) to query if there is an error · 6a8fcca8
      unknown authored
      in THD.
      In future the error may be stored elsewhere (not in net.report_error) and 
      it's important to start using an opaque getter to simplify merges.
      
      
      sql/filesort.cc:
        net.report_error -> is_error()
      sql/ha_ndbcluster_binlog.cc:
        net.report_error -> is_error()
      sql/item_func.cc:
        net.report_error -> is_error()
      sql/item_subselect.cc:
        net.report_error -> is_error()
      sql/set_var.cc:
        net.report_error -> is_error()
      sql/sp.cc:
        net.report_error -> is_error()
      sql/sp_head.cc:
        net.report_error -> is_error()
      sql/sql_base.cc:
        net.report_error -> is_error()
      sql/sql_class.cc:
        net.report_error -> is_error()
      sql/sql_class.h:
        net.report_error -> is_error()
      sql/sql_connect.cc:
        net.report_error -> is_error()
      sql/sql_delete.cc:
        net.report_error -> is_error()
      sql/sql_insert.cc:
        net.report_error -> is_error()
      sql/sql_parse.cc:
        net.report_error -> is_error()
      sql/sql_prepare.cc:
        net.report_error -> is_error()
      sql/sql_select.cc:
        net.report_error -> is_error()
      sql/sql_union.cc:
        net.report_error -> is_error()
      sql/sql_update.cc:
        net.report_error -> is_error()
      sql/sql_view.cc:
        net.report_error -> is_error()
      sql/sql_yacc.yy:
        net.report_error -> is_error()
      6a8fcca8
    • unknown's avatar
      Merge moksha.local:/Users/davi/mysql/bugs/31669-5.0 · 2c56c2b9
      unknown authored
      into  moksha.local:/Users/davi/mysql/mysql-5.0-runtime
      
      
      libmysql/libmysql.c:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      2c56c2b9
    • unknown's avatar
      Fix failing init_connect.test (5.1-runtime). · 753d2783
      unknown authored
      
      sql/sql_connect.cc:
        Fix failing init_connect.test (5.1-runtime). Add comments for the unjustified use
        of thd->is_slave_error.
      753d2783
    • unknown's avatar
      Make sure rpl.rpl_innodb_mixed_dml passes even if rpl_mixed.dat is read-only. · ad1b0eed
      unknown authored
      This is important for a development environment where not all source files
      are checked out.
      
      ad1b0eed
  4. 29 Oct, 2007 5 commits
    • unknown's avatar
      Merge lambda.weblab:/home/malff/TREE/mysql-5.1-base · 52ddd7a0
      unknown authored
      into  lambda.weblab:/home/malff/TREE/mysql-5.1-rt-merge
      
      
      mysql-test/include/mix1.inc:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      mysql-test/r/select.result:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      52ddd7a0
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 4c8bc192
      unknown authored
      into  lambda.weblab:/home/malff/TREE/mysql-5.1-rt-merge
      
      
      mysql-test/r/udf.result:
        Auto merged
      mysql-test/t/udf.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/udf_example.c:
        Auto merged
      sql/udf_example.def:
        Auto merged
      4c8bc192
    • unknown's avatar
      Merge lambda.weblab:/home/malff/TREE/mysql-5.0-base · 609d2150
      unknown authored
      into  lambda.weblab:/home/malff/TREE/mysql-5.0-rt-merge
      
      
      sql/sql_table.cc:
        Auto merged
      609d2150
    • unknown's avatar
      Fix for BUG#27610: ALTER TABLE ROW_FORMAT=... does not · d294689a
      unknown authored
      rebuild the table.
      
      The problem was that ROW_FORMAT clause in ALTER TABLE did not trigger
      table reconstruction.
      
      The fix is to rebuild a table if ROW_FORMAT is specified.
      
      
      mysql-test/include/mix1.inc:
        Add a test case for BUG#27610: ALTER TABLE ROW_FORMAT=... does not
        rebuild the table.
      mysql-test/r/innodb_mysql.result:
        Update result file.
      sql/sql_table.cc:
        Rebuild a table if ROW_FORMAT was specified in ALTER TABLE.
      d294689a
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1 · 2a934d94
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      2a934d94
  5. 25 Oct, 2007 2 commits
    • unknown's avatar
      Mimic a rename which Daniel already did in 6.0, · 3e6acc9a
      unknown authored
      to get rid of a name clash among *deleted* files on case-insignificant file systems.
      
      
      BitKeeper/deleted/.del-changelog-bleh:
        Rename: BitKeeper/deleted/.del-changelog -> BitKeeper/deleted/.del-changelog-bleh
      3e6acc9a
    • unknown's avatar
      Bug#30854 (Tables name show as binary in slave err msg on vm-win2003-64-b) · 88273e80
      unknown authored
      The root cause of this defect is that a call to my_error() is using a
      'LEX_STRING' parameter instead of a 'char*'
      
      This patch fixes the failing calls to my_error(), as well as similar calls
      found during investigation.
      
      This is a compiling bug (see the instrumentation in the bug report), no test cases provided.
      
      
      sql/sql_base.cc:
        Fix broken calls to "..." (va_args) functions.
      sql/sql_table.cc:
        Fix broken calls to "..." (va_args) functions.
      88273e80
  6. 24 Oct, 2007 2 commits
  7. 23 Oct, 2007 9 commits
    • unknown's avatar
      result fix · a3d3fa35
      unknown authored
      a3d3fa35
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · 2446b969
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      client/mysqldump.c:
        Auto merged
      include/config-win.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      mysql-test/r/func_sapdb.result:
        Auto merged
      mysql-test/r/type_decimal.result:
        Auto merged
      mysql-test/r/variables.result:
        Auto merged
      mysql-test/t/type_datetime.test:
        Auto merged
      mysql-test/t/type_decimal.test:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/item_timefunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      storage/myisam/sort.c:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/r/type_datetime.result:
        after merge fix
      2446b969
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt · cb178356
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      cb178356
    • unknown's avatar
      after merge fix · e3eed377
      unknown authored
      e3eed377
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.1 · a895c8f0
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      
      client/client_priv.h:
        Auto merged
      client/mysqldump.c:
        Auto merged
      include/config-win.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/func_sapdb.result:
        Auto merged
      mysql-test/r/information_schema.result:
        Auto merged
      mysql-test/r/variables.result:
        Auto merged
      mysql-test/t/information_schema.test:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/item_timefunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.cc:
        Auto merged
      storage/innobase/handler/ha_innodb.cc:
        Auto merged
      storage/myisam/sort.c:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/r/query_cache.result:
        manual merge
      mysql-test/include/mix1.inc:
        manual merge
      mysql-test/r/innodb_mysql.result:
        manual merge
      mysql-test/r/type_datetime.result:
        manual merge
      mysql-test/r/type_decimal.result:
        manual merge
      mysql-test/t/query_cache.test:
        manual merge
      mysql-test/t/type_datetime.test:
        manual merge
      mysql-test/t/type_decimal.test:
        manual merge
      sql/item.cc:
        manual merge
      a895c8f0
    • unknown's avatar
      Patch for BUG#30736: Row Size Too Large Error Creating a Table and · cfa54d6d
      unknown authored
      Inserting Data.
      
      The problem was that under some circumstances Field class was not
      properly initialized before calling create_length_to_internal_length()
      function, which led to assert failure.
      
      The fix is to do the proper initialization.
      
      The user-visible problem was that under some circumstances
      CREATE TABLE ... SELECT statement crashed the server or led
      to wrong error message (wrong results).
      
      
      mysql-test/r/select.result:
        Update result file.
      mysql-test/t/select.test:
        Add a test case for BUG#30736: Row Size Too Large Error
        Creating a Table and Inserting Data.
      sql/sql_table.cc:
        Move sql_field->decimals initialization before
        sql_field->create_length_to_internal_length() call.
      cfa54d6d
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0 · 3e459feb
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
      
      
      client/mysqldump.c:
        Auto merged
      include/config-win.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      myisam/sort.c:
        Auto merged
      mysql-test/r/func_sapdb.result:
        Auto merged
      mysql-test/r/variables.result:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/ha_innodb.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_sum.cc:
        Auto merged
      sql/item_timefunc.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      mysql-test/r/type_datetime.result:
        manual merge
      mysql-test/r/type_decimal.result:
        manual merge
      mysql-test/t/type_datetime.test:
        manual merge
      mysql-test/t/type_decimal.test:
        manual merge
      sql/item.cc:
        manual merge
      3e459feb
    • unknown's avatar
      Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt · 63230037
      unknown authored
      into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
      
      63230037
    • unknown's avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 4eaaddec
      unknown authored
      into  mysql.com:/home/hf/work/30638/my50-30638
      
      4eaaddec