1. 10 Sep, 2014 1 commit
    • Praveenkumar Hulakund's avatar
      Bug#18790730 - CROSS-DATABASE FOREIGN KEY WITHOUT PERMISSIONS · 0b28d7e0
      Praveenkumar Hulakund authored
                     CHECK.
      
      Analysis:
      ----------
      Issue here is, while creating or altering the InnoDB table,
      if the foreign key defined on the table references a parent
      table on which the user has no access privileges then the
      table is created without reporting any error. 
      
      Currently the privilege level REFERENCES_ACL is unused
      and is not used for access evaluation while creating the
      table with a foreign key constraint or adding the foreign
      key constraint to a table. But when no privileges are granted
      to user then also access evaluation on parent table is ignored.
      
      Fix:
      ---------
      For DMLs, irrelevant of the fact, support does not want any
      changes to avoid permission checks on every operation.
      
      So, as a fix, added a function "check_fk_parent_table_access" 
      to check whether any of the SELECT_ACL, INSERT_ACL, UDPATE_ACL,
      DELETE_ACL or REFERENCE_ACL privileges are granted for user
      at table level. If none of them is granted then error is reported.
      This function is called during the table creation and alter 
      operation. 
      0b28d7e0
  2. 05 Sep, 2014 1 commit
  3. 03 Sep, 2014 1 commit
  4. 02 Sep, 2014 1 commit
  5. 28 Aug, 2014 2 commits
    • Venkatesh Duggirala's avatar
      Bug#19145712 USER AFTER FREE / DOUBLE FREE ISSUE · 2b33138d
      Venkatesh Duggirala authored
            
            Problem: A corrupted header length in FORMAT_DESCRIPTION_LOG_EVENT
            can cause server to crash.
            Analysis: FORMAT_DESCRIPTION_EVENT will be considered invalid if
            header len is too small (i.e. below OLD_HEADER_LEN).
            
            Format_description_log_event:: Format_description_log_event(...)
            {
              ...
              if ((common_header_len=buf[ST_COMMON_HEADER_LEN_OFFSET]) < OLD_HEADER_LEN)
                DBUG_VOID_RETURN; /* sanity check */
              ...
              post_header_len= my_memdup(...)
            }
            
            In that case Format_description_log_event constructor will return early,
            without allocating any memory for post_header_len. Thence this variable is
            left uninitialized and making server to crash when server is trying
            to free the uninitialized value.
            
            Fix: When Format_description_log_event constructor returns early, assign
            NULL to post_header_len.
      2b33138d
    • Alexander Nozdrin's avatar
      Update copyright text. · 341ca222
      Alexander Nozdrin authored
      341ca222
  6. 27 Aug, 2014 1 commit
  7. 26 Aug, 2014 2 commits
  8. 25 Aug, 2014 2 commits
    • Annamalai Gurusami's avatar
      Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE ADD FOREIGN KEY · 2f8bd757
      Annamalai Gurusami authored
      Problem:
      
      We maintain two rb trees in each dict_table_t.  The foreign_rbt must be in
      sync with foreign_list.  The referenced_rbt must be in sync with
      referenced_list. There is one function which checks this consistency and it
      failed, resulting in an assert failure.
      
      The root cause of the problem was identified that the search order was 
      lost in the referenced_rbt.  This is because while renaming the table,
      we didn't not refresh this referenced_rbt.
      
      Solution:
      
      When a foreign key is renamed, we must delete and re-insert into both
      foreign_rbt and referenced_rbt.  
      
      rb#6412 approved by Jimmy.
      
      2f8bd757
    • unknown's avatar
      Raise version number after cloning 5.5.40 · ddb24be1
      unknown authored
      ddb24be1
  9. 23 Aug, 2014 1 commit
  10. 21 Aug, 2014 1 commit
    • Tor Didriksen's avatar
      Bug#18928848 II. MALLOC OF UNINITIALIZED MEMORY SIZE · ab727cec
      Tor Didriksen authored
      Several string functions have optimizations for constant
      sub-expressions which lead to setting max_length == 0.
      
      For subqueries, where we need a temporary table to holde the result,
      we need to ensure that we use a VARCHAR(0) column rather than a
      CHAR(0) column when such expressions take part in grouping.
      With CHAR(0) end_update() may write garbage into the next field.
      ab727cec
  11. 20 Aug, 2014 1 commit
  12. 12 Aug, 2014 6 commits
  13. 06 Aug, 2014 2 commits
  14. 04 Aug, 2014 1 commit
  15. 01 Aug, 2014 2 commits
    • Venkata Sidagam's avatar
      Bug #18415196 MYSQL_UPGRADE DUPLICATE KEY ERROR FOR MYSQL.USER FOR 5.5.35+, 5.6.15+, 5.7.3+ · 81f79aee
      Venkata Sidagam authored
      Follow-up patch. Removed unwanted code.
      81f79aee
    • Venkata Sidagam's avatar
      Bug #18415196 MYSQL_UPGRADE DUPLICATE KEY ERROR FOR MYSQL.USER FOR 5.5.35+, 5.6.15+, 5.7.3+ · ace82cad
      Venkata Sidagam authored
      Description: mysql_upgrade fails with below error, 
      when there are duplicate entries(like 'root'@'LOCALHOST'
      and 'root'@'localhost') in mysql.user table.
      ERROR 1062 (23000) at line 1140: Duplicate entry 'localhost-root' for key 'PRIMARY'
      FATAL ERROR: Upgrade failed
      
      Analysis: As part of the bug 12917151 fix we are 
      making all the hostnames as lower case hostnames.
      So, this has been done by mysql_upgrade.
      In case of above mentioned duplicate entries 
      mysql_upgrade tries to change hostname to lowercase.
      Since there is already 'root'@'localhost' exists.
      it is failing with "duplicate entry" error.
      
      Fix: Since its a valid error failure. We are 
      making the error more verbose. So, that user will
      delete the duplicate errors manually.
      Along with existing error we are printing below
      error as well.
      ERROR 1644 (45000) at line 1153: Multiple accounts exist for @user_name, @host_name that differ only in Host lettercase; remove all except one of them
      ace82cad
  16. 31 Jul, 2014 2 commits
  17. 28 Jul, 2014 1 commit
  18. 24 Jul, 2014 1 commit
  19. 21 Jul, 2014 1 commit
    • Venkata Sidagam's avatar
      Bug #17297324 GLIBC DOUBLE FREE OR CORRUPTION WHEN KILLING CLIENT; CTRL+C · a0537faa
      Venkata Sidagam authored
      Description: Sometimes when killing the mysql command line client with
      KILL -2(SIGINT), mysql client core dumps as a result of a double free or
      corruption.
      
      Analysis: When we run the mysql client in command line mode it will goes
      to mysql_end() and frees many data structures. At the same time (i.e
      after some data structures are freed), if we give "KILL -2" signal then
      the signal will be handled with function handle_kill_signal() and as
      part of it will again calls mysql_end() and goes with free() to the
      already freed data structure for batch_readline_end() function, which
      causes core dump.
      
      Fix: Ignoring SIGQUIT and SIGINT signals when cleanup process starts.
      This will help in resolving the double free issues, which occurs 
      in case the signal handler function is started in between of the 
      clean up function.
      For 5.6 we need to ignore SIGHUP also.
      a0537faa
  20. 19 Jul, 2014 1 commit
  21. 18 Jul, 2014 1 commit
  22. 17 Jul, 2014 2 commits
    • Ashish Agarwal's avatar
      e892e719
    • Praveenkumar Hulakund's avatar
      Bug#14757009: WHEN THE GENERAL_LOG IS A SOCKET AND THE READER · 97744101
      Praveenkumar Hulakund authored
                    GOES AWAY, MYSQL QUITS WORKING.
      
      Analysis:
      -----------------
      Issue in this bug and in bug 11907705 is, the socket file or
      fifo file is set for general log at command line while starting
      the server. But currently, only regular file can be set for the 
      general log. Instead of reporting any error, the provided files
      are opened for writing and continued. Because of this issues
      mentioned in the bug reports are seen.
      
      As mentioned, only when any non-regular file is set for general
      log at command line while starting the server, these issues are
      seen. If general log file is set to non-regular file from CLI
      using system variable general_log_file then error is reported.
      
      These issues can also be faced with slow query log file, if it is
      set to non-regular file.
      
      Fix:
      -----------------
      Currently while starting the server if we fail to open log file
      then we report an error, disable logging to file and continue.
      To fix issue reported code is modified to check whether file
      is regular file or not before opening it. If file is not a 
      regular file then error is logged to error log and logging to 
      file is disabled.
      97744101
  23. 09 Jul, 2014 3 commits
  24. 08 Jul, 2014 3 commits