1. 06 Apr, 2007 1 commit
    • cmiller@zippy.cornsilk.net's avatar
      Changing the state of whether we're recording profiling information · 88455a04
      cmiller@zippy.cornsilk.net authored
      halfway through a query (as happens in "SET SESSION PROFILING = ...")
      has a few side-effects, the worst of which is a memory leak for
      prepared statements, which poke directly from the parser into the 
      profiling code (we don't have the query text when we need it) and 
      that overwrites a pointer to heap-allocated memory when the previous
      statement turns on profiling.
      
      Instead, now set a flag when we begin a new statement that tracks 
      whether profiling is on _at the start_ of the query.  Use that to
      track whether we gather info.
      
      Additionally, use that AND use the state of the profiling variable
      after the end of a query to know whether to store information about 
      the query that just finished.
      88455a04
  2. 04 Apr, 2007 1 commit
    • cmiller@zippy.cornsilk.net's avatar
      Backport: · 6204ae25
      cmiller@zippy.cornsilk.net authored
      B-g#27427: resolveip fails on hostnames with a leading digit
      
      We need inet_aton for the extra/resolveip tool.  Some OSes put this
      in nonstandard libraries.
      6204ae25
  3. 03 Apr, 2007 10 commits
    • cmiller@zippy.cornsilk.net's avatar
      Unreported minor bug: We start numbering query IDs at zero, which · 4078a7cc
      cmiller@zippy.cornsilk.net authored
      is a special case in "SHOW PROFILE FOR QUERY n".  No one can get
      the zero item (which is always the statement that turns on profiling),
      because zero represents the final item, internally.
      
      Now, order the queries starting at one.
      4078a7cc
    • cmiller@zippy.cornsilk.net's avatar
      Backport: · cd28612e
      cmiller@zippy.cornsilk.net authored
      B-g#27501: 5.0 significantly more sys ("kernel") time than 4.1 \
            due to getrusage() calls
      
      Even if profiling is turned off, the parser makes calls to reset 
      the state at the beginning of each query.  That would eventually 
      instantiate a PROFILE_ENTRY, which does indeed capture resource 
      usage.
      
      Instead, now check that profiling is active before progressing
      far into the storage/expiration of old entries in the history.
      This has the pleasant side-effect that queries to toggle profiling
      are not recorded in the history.
      cd28612e
    • cmiller@zippy.cornsilk.net's avatar
      Backport: · b7a27a6b
      cmiller@zippy.cornsilk.net authored
      B-g#26600: table PROFILING in INFORMATION SCHEMA has wrong data type
      
      B-g#27047[partial]: INFORMATION_SCHEMA table cannot have BIGINT \
            fields
      
      No Information_schema table has ever needed floating-point data 
      before.  Transforming all floating point to a string and back to a
      number causes a real data problem on Windows, where the libc may 
      pad the exponent with more leading zeroes than we expect and the
      significant digits are truncated away.
      
      This also makes interpreting an unimplemented type as a string into
      a fatal error in debug builds.  Thus, we will catch problems when we
      try to use those types in new I_S tables.
      b7a27a6b
    • cmiller@zippy.cornsilk.net's avatar
      Backport: · ad181bb0
      cmiller@zippy.cornsilk.net authored
      B-g#27060: SQL Profile utility may not be reporting right duration \
            for each step
      
      Whenever the profiler is reset at the beginning of a query, there's
      a "hidden" profiling entry that represents that point in time.  It 
      has no status description, as those are set by state changes and no
      such point has yet been encountered.  That profiling entry is not
      in the list of entries generated when we change states.
      
      The profiling code had the problem that each step of printing 
      profiling data subtracted the previous "step"'s data, but gave the
      label to that data of the current step, which is wrong.  The label/
      state refers to the period beginning with that profiling data, not
      ending with it.
      
      Now, give a label to the first profiling pseudo-entry, so that we 
      have a name to assign to the period that ends with the first state 
      change.  Now also use the state name of the previous step in showing 
      the delta values that end with this step.
      ad181bb0
    • cmiller@zippy.cornsilk.net's avatar
      Backport: · 2e698f8c
      cmiller@zippy.cornsilk.net authored
      Patch contributed by Jocelyn Fournier.  CLA received 2007-02-27.
        
      B-g#25347: mysqlcheck -A -r doesn't repair table marked as crashed
        
      mysqlcheck tests nullness of the engine type to know whether the
      "table" is a view or not.  That also falsely catches tables that 
      are severly damaged.
        
      Instead, use SHOW FULL TABLES to test whether a "table" is a view
      or not.
        
      (Don't add new function.  Instead, get original data a smarter way.)
      
      Make it safe for use against databases before when views appeared.
      2e698f8c
    • cmiller@zippy.cornsilk.net's avatar
      Backport: · 9816842b
      cmiller@zippy.cornsilk.net authored
      B-g#24795: SHOW PROFILE implementation
      
      Don't use memory roots to store profiling information, because
      memory roots make freeing the data a no-op, and thus long-running
      processes with profiling turned on the whole time could eventually 
      use all available memory.
      
      Instead, use regular heap allocation and deallocation calls to 
      manage profiling data.  Replace the leaky List usage with a similar-
      behaving structure named "Queue".
      9816842b
    • cmiller@zippy.cornsilk.net's avatar
      Backport of Igor's patch for Bug#27362, March 22 2007. · 0b3dfea7
      cmiller@zippy.cornsilk.net authored
      Fixed bug #27362: crash at evaluation of IN predicate when one
      of its argument happened to be a decimal expression returning
      the NULL value.
      The crash was due to the fact the function in_decimal::set did
      not take into account that val_decimal() could return 0 if 
      the decimal expression had been evaluated to NULL.  
      0b3dfea7
    • cmiller@zippy.cornsilk.net's avatar
    • cmiller@zippy.cornsilk.net's avatar
      Listing all columns of a particular type tells us nothing at all. · 27720d8b
      cmiller@zippy.cornsilk.net authored
      The test fails, and it shouldn't.
      27720d8b
    • cmiller@zippy.cornsilk.net's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 5f4dfdd5
      cmiller@zippy.cornsilk.net authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
      5f4dfdd5
  4. 20 Mar, 2007 9 commits
  5. 19 Mar, 2007 6 commits
  6. 18 Mar, 2007 1 commit
    • kent@mysql.com/kent-amd64.(none)'s avatar
      make_win_bin_dist: · 1c6fc80f
      kent@mysql.com/kent-amd64.(none) authored
        - Support both "release" and "relwithdebinfo" targets
        - Copy ".pdb" and ".pdb" files for the server and instance manager
        - Removed the examples directory, unsupported
        - Handle both old and new builds in the same script, "-debug" and "-nt"
          extensions, directory "data" and "share" in different location
      1c6fc80f
  7. 17 Mar, 2007 1 commit
  8. 16 Mar, 2007 2 commits
  9. 15 Mar, 2007 6 commits
    • svoj@mysql.com/april.(none)'s avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines · 8b325697
      svoj@mysql.com/april.(none) authored
      into  mysql.com:/home/svoj/devel/bk/mysql-5.0-engines
      8b325697
    • dlenev@mockturtle.local's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · e25ea78f
      dlenev@mockturtle.local authored
      into  mockturtle.local:/home/dlenev/src/mysql-4.1-merge
      e25ea78f
    • dlenev@mockturtle.local's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 4f46196d
      dlenev@mockturtle.local authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-merge
      4f46196d
    • dlenev@mockturtle.local's avatar
      Merge mockturtle.local:/home/dlenev/src/mysql-4.1-bg25966 · e4f88d52
      dlenev@mockturtle.local authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg25966-2
      e4f88d52
    • dlenev@mockturtle.local's avatar
      Fix for bug #25966 "2MB per second endless memory consumption after LOCK · 01bd08b5
      dlenev@mockturtle.local authored
      TABLE ... WRITE".
      
      Memory and CPU hogging occured when connection which had to wait for table
      lock was serviced by thread which previously serviced connection that was
      killed (note that connections can reuse threads if thread cache is enabled).
      One possible scenario which exposed this problem was when thread which
      provided binlog dump to replication slave was implicitly/automatically
      killed when the same slave reconnected and started pulling data through
      different thread/connection.
      The problem also occured when one killed particular query in connection
      (using KILL QUERY) and later this connection had to wait for some table
      lock.
      
      This problem was caused by the fact that thread-specific mysys_var::abort
      variable, which indicates that waiting operations on mysys layer should
      be aborted (this includes waiting for table locks), was set by kill
      operation but was never reset back. So this value was "inherited" by the
      following statements or even other connections (which reused the same
      physical thread). Such discrepancy between this variable and THD::killed
      flag broke logic on SQL-layer and caused CPU and memory hogging.
      
      This patch tries to fix this problem by properly resetting this member.
      
      There is no test-case associated with this patch since it is hard to test
      for memory/CPU hogging conditions in our test-suite.
      01bd08b5
    • dlenev@mockturtle.local's avatar
      Fix for bug #25966 "2MB per second endless memory consumption after LOCK · f2cb6641
      dlenev@mockturtle.local authored
      TABLE ... WRITE".
      
      CPU hogging occured when connection which had to wait for table lock was
      serviced by thread which previously serviced connection that was killed
      (note that connections can reuse threads if thread cache is enabled).
      One possible scenario which exposed this problem was when thread which
      provided binlog dump to replication slave was implicitly/automatically
      killed when the same slave reconnected and started pulling data through
      different thread/connection.
      In 5.* versions memory hogging was added to CPU hogging. Moreover in
      those versions the problem also occured when one killed particular query
      in connection (using KILL QUERY) and later this connection had to wait for
      some table lock.
      
      This problem was caused by the fact that thread-specific mysys_var::abort
      variable, which indicates that waiting operations on mysys layer should
      be aborted (this includes waiting for table locks), was set by kill
      operation but was never reset back. So this value was "inherited" by the
      following statements or even other connections (which reused the same
      physical thread). Such discrepancy between this variable and THD::killed
      flag broke logic on SQL-layer and caused CPU and memory hogging.
      
      This patch tries to fix this problem by properly resetting this member.
      
      There is no test-case associated with this patch since it is hard to test
      for memory/CPU hogging conditions in our test-suite.
      f2cb6641
  10. 14 Mar, 2007 3 commits