- 22 Dec, 2016 1 commit
-
-
Shishir Jaiswal authored
IS STARTING: CONFUSING ERROR DESCRIPTION =========== When mysql server processes transactions but has not yet committed and shuts down abnormally (due to crash, external killing etc.), a recovery is due from Storage engine side which takes place the next time mysql server (either through mysqld or mysqld_safe) is run. While the 1st server is in mid of recovery, if another instance of mysqld_safe is made to run, it may result into 2nd instance killing the 1st one after a moment. ANALYSIS ======== In the "while true" loop, we've a check (which is done after the server stops) for the existence of pid file to enquire if it was a normal shutdown or not. If the file is absent, it means that the graceful exit of server had removed this file. However if the file is present, the scripts makes a plain assumption that this file is leftover of the "current" server. It misses to consider that it could be a valid pid file belonging to another running mysql server. We need to add more checks in the latter case. The script should extract the PID from this existing file and check if its running or not. If yes, it means an older instance of mysql server is running and hence the script should abort. FIX === Checking the status of process (alive or not) by adding a @CHECK_PID@ in such a case. Aborting if its alive. Detailed logic is as follows: - The mysqld_safe script would quit at start only as soon as it finds that there is an active PID i.e. a mysql server is already running. - The PID file creation takes place after InnoDb recovery, which means in rare case (when PID file isn't created yet) it may happen that more than 1 server can come up but even in that case others will have to wait till the 1st server has released the acquired InnoDb lock. In this case all these servers will either TIMEOUT waiting for InnoDb lock or after this they would find that the 1st server is already running (by reading $pid_file) and would abort. - Our core fix is that we now check the status of mysql server process (alive or not) after the server stops running within the loop of "run -> shutdown/kill/abort -> run ... ", so that only the script who owns the mysql server would be able to bring it down if required. NOTE ==== Removed the deletion of pid file and socket file from entry of the loop, as it may result in 2nd instance deleting these files created by 1st instance in RACE condition. Compensated this by deleting these files at end of the loop Reverted the changes made in patch to Bug#16776528. So after this patch is pushed, the concept of mysqld_safe.pid would go altogether. This was required as the script was deleting other instance's mysqld_safe.pid allowing multiple mysqld_safe instances to run in parallel. This patch would fix Bug#16776528 as well as the resources would be guarded anyway by InnoDb lock + our planned 5.7 patch.
-
- 19 Dec, 2016 1 commit
-
-
Terje Rosten authored
Loop until valid answer is given. Variants of y,yes and n,no and blank (meaning default) are considered valid.
-
- 13 Dec, 2016 1 commit
-
-
Sreeharsha Ramanavarapu authored
Issue: ------ While using the LOAD statement to insert data into an updateable view, the check to verify whether a column is actually updatable is missing. Solution for 5.5 and 5.6: ------------------------- For a view whose column-list in specified in the LOAD command, this check is not performed. This fix adds the check. This is a partial backport of Bug#21097485. Solution for 5.7 and trunk: --------------------------- For a view whose column-list is specified in the LOAD command, this check is already performed. This fix adds the same check when no column-list is specified.
-
- 12 Dec, 2016 1 commit
-
-
Gipson Pulla authored
-
- 06 Dec, 2016 1 commit
-
-
Terje Rosten authored
pidof is Linuxism, prefer pgrep on other UNIX systems.
-
- 05 Dec, 2016 3 commits
-
-
Georgi Kodinov authored
The XML parser position stack for each level is with a fixed depth. So a bounds check was done to ensure that this depth is not exceeded. But it was off by one (i.e. the size of the array was a valid index). Fixed by decreasing the allowable depth by one to match the maximum number of elements in the position stack.
-
Terje Rosten authored
Add .gitattributes to let git archive ignore .gitignore.
-
Pavan Naik authored
Description : ============= When a MTR test run is started, it initializes the server and creates the datadir under '$MYSQL_TEST_DIR/var'('/tmp/var' or '/dev/shm/var' if --mem option is used) location and then copies it to the datadir location of server(s). If $parallel == 1, datadir location of the server is '$MYSQL_TEST_DIR/var/data'. If $parallel > 1, datadir location of any server is '$MYSQL_TEST_DIR/var/<thread_num>/data'. This is the reason MTR searches for the initialized datadir in 2 locations('$opt_vardir' and '$opt_vardir/..') from the current vardir location.. But this can cause few problems. If a directory with the name 'data' already exists under '$MYSQL_TEST_DIR' and if the MTR run is started with parallel value 1, then 1. copytree($install_db, '$opt_vardir/..') command will fail if the user doesn't have the access permission to '$MYSQL_TEST_DIR/data' directory. 2. Unnecessary contents from '$MYSQL_TEST_DIR/data' directory will be copied to server datadir location and this might affect the server startup. Fix : ===== Depending on the $parallel value decide whether the path for the initialize datadir is "$opt_vardir"(i.e $parallel = 1) or "$opt_vardir/.."(i.e $parallel > 1). Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com> Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com> RB: 14773
-
- 04 Dec, 2016 1 commit
-
-
Shishir Jaiswal authored
Post-push fix for memory leak in the code inside DBUG_EXECUTE_IF("bug24449090_simulate_oom",...);
-
- 29 Nov, 2016 2 commits
-
-
Shishir Jaiswal authored
DESCRIPTION =========== Performing a pattern match of a Regex resulting into a very large string, leads to crash due to integer wraparound. ANALYSIS ======== doinsert() - The length calculated here (to copy the number of bytes) comes out to be too large to be stored in the "int" variable 'length'. We need to ensure that the variable can accommodate large lengths. FIX === 'length' in doinsert() is now defined as of type "size_t" instead of "int"
-
Shishir Jaiswal authored
DESCRIPTION =========== Performing a pattern match of a Regex resulting into a very large string, leads to crash due to failed realloc(). ANALYSIS ======== dupl() calls enlarge(). It in turn calls realloc() for pointer p->strip. This eventually fails due to OOM. However we are still using the same pointer in memcpy() causing a SEGFAULT! FIX === 1) In dupl(), checking for error code (which would be set if realloc fails) immediately after call to enlarge(). Returning now with this error code. 2) Handling the same in the caller functions.
-
- 28 Nov, 2016 4 commits
-
-
Balasubramanian Kandasamy authored
(cherry picked from commit 7a39efab8a59ebdcd562fb788bc004ff338796ea)
-
Balasubramanian Kandasamy authored
-
mysql-builder@oracle.com authored
No commit message
-
Arun Kuruvila authored
No commit message
-
- 26 Nov, 2016 2 commits
-
-
Balasubramanian Kandasamy authored
- Removed mysql.conf, mysqld.service and mysql-systemd-start from sles spec file (cherry picked from commit 35c1adc17c1a99b2c256d374500437a6ce21339e)
-
Balasubramanian Kandasamy authored
- Removed mysql.conf, mysqld.service and mysql-systemd-start from sles spec file
-
- 25 Nov, 2016 3 commits
-
-
mysql-builder@oracle.com authored
No commit message
-
Dyre Tjeldvoll authored
PRIVILEGES Require FILE privilege when creating tables using external data directory or index directory.
-
Terje Rosten authored
Don't read --ledir option from config file. Ignore current working for finding location of mysqld Remove use of chown/chmod in scripts. Be helpful only when basedir is /var/log or /var/lib. Removed unused systemd files for SLES. Set explicit basedir in scripts.
-
- 24 Nov, 2016 2 commits
-
-
mysql-builder@oracle.com authored
No commit message
-
Dyre Tjeldvoll authored
PRIVILEGES Require FILE privilege when creating tables using external data directory or index directory.
-
- 16 Nov, 2016 1 commit
-
-
Terje Rosten authored
Don't read --ledir option from config file. Ignore current working for finding location of mysqld Remove use of chown/chmod in scripts. Be helpful only when basedir is /var/log or /var/lib. Removed unused systemd files for SLES. Set explicit basedir in scripts.
-
- 10 Nov, 2016 1 commit
-
-
Karthik Kamath authored
ANALYSIS: ========= 'CREATE TABLE' query with a large value for 'CONNECTION' string reports an incorrect error. The length of connection string is stored in .frm in two bytes (max value= 65535). When the string length exceeds the max value, the length is truncated to fit the two bytes limit. Further processing leads to reading only a part of the string as the length stored is incorrect. The remaining part of the string is treated as engine type and hence results in an error. FIX: ==== We are now restricting the connection string length to 1024. An appropriate error is reported if the length crosses this limit. NOTE: ===== The 'PASSWORD' table option is documented as unused and processed within a dead code. Hence it will not cause similar issue with large strings.
-
- 09 Nov, 2016 1 commit
-
-
Shipra Jain authored
-
- 05 Nov, 2016 1 commit
-
-
Shipra Jain authored
-
- 31 Oct, 2016 1 commit
-
-
Bjorn Munch authored
-
- 28 Oct, 2016 1 commit
-
-
Thayumanavar S authored
LOAD DATA AT MASTER. Revert "BUG#23080148 - BACKPORT BUG 14653594 AND BUG 20683959 TO" This reverts commit 1d31f5b3090d129382b50b95512f2f79305715a1. The commit causes replication incompatibility between minor revisions and based on discussion with Srinivasarao, the patch is reverted.
-
- 24 Oct, 2016 1 commit
-
-
Terje Rosten authored
Wrapper for mysql_config used in multilib installs modified to work as intended, added more archs (aarch64, ppc64le, s390x, s390, sparc and sparc64) to lists in fallback mode and use same script for EL and Fedora. Thanks to Alexey Kopytov for report and fix.
-
- 13 Oct, 2016 1 commit
-
-
Karthik Kamath authored
700101 ANALYSIS: ========= To set the time 'start_time' of query in THD, current time is obtained by calling 'gettimeofday()'. On Solaris platform, due to some system level issues, time obtained is invalid i.e. its either greater than 2038 (max signed value to hold microseconds since 1970) or 1970 (0 microseconds since 1970). In these cases, validation checks infer that the 'start_time' is invalid and mysql server initiates the shutdown process. But the reason for shutdown is not logged. FIX: ==== We are now logging appropriate message when shutdown is triggered in the above mentioned scenarios. Now, even if the initial validation checks infer that the 'start_time' is invalid, server shutdown is not initiated immediately. Before initiating the server shutdown, the process of setting 'start_time' and validating it is reiterated (for max 5 times). If correct time is obtained in these 5 iterations then server continues to run.
-
- 12 Oct, 2016 1 commit
-
-
Nawaz Nazeer Ahamed authored
-
- 06 Oct, 2016 1 commit
-
-
Terje Rosten authored
- Remove use of touch and chmod. - Restrict usage of chown to cases where target directory is /var/log. - Due to limited feature set in /bin/sh on Solaris, /bin/bash will be used on this platform. - Give error if directory for UNIX socket file is missing. - Privileged user should not log to files owned by different user (mysqld will log as before).
-
- 03 Oct, 2016 1 commit
-
-
Vasil Dimov authored
Prevent GCC from moving a mach_read_from_4() before we have checked that we have 4 bytes to read. The pointer may only point to a 1, 2 or 3 bytes in which case the code should not read 4 bytes. This is a workaround to a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77673 Patch submitted by: Laurynas Biveinis <laurynas.biveinis@gmail.com> RB: 14135 Reviewed by: Pawel Olchawa <pawel.olchawa@oracle.com>
-
- 29 Sep, 2016 1 commit
-
-
mysql-builder@oracle.com authored
No commit message
-
- 28 Sep, 2016 3 commits
-
-
Robert Golebiowski authored
-
Arun Kuruvila authored
RESTRICTED IN ALL GA RELEASES Back port of WL#6782 to 5.5 and 5.6. This also includes back port of Bug#20771331, Bug#20741572 and Bug#20770671. Bug#24695274 and Bug#24679907 are also handled along with this.
-
Arun Kuruvila authored
RESTRICTED IN ALL GA RELEASES Back port of WL#6782 to 5.5 and 5.6. This also includes back port of Bug#20771331, Bug#20741572 and Bug#20770671. Bug#24695274 and Bug#24679907 are also handled along with this.
-
- 27 Sep, 2016 1 commit
-
-
Robert Golebiowski authored
-
- 26 Sep, 2016 2 commits
-
-
Nawaz Nazeer Ahamed authored
-
Bjorn Munch authored
-