Commit be901b60 authored by Nisha Gopalakrishnan's avatar Nisha Gopalakrishnan

Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.

Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.

During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max supported
path length, causing the server to exit during
subsequent processing.

Fix
===
During the preparation of partition name, check and report
an error if the partition path name exceeds the maximum path
name limit.

This is a 5.5 patch.
parent ebd96c31
This diff is collapsed.
This diff is collapsed.
#ifndef SQL_PARTITION_INCLUDED #ifndef SQL_PARTITION_INCLUDED
#define SQL_PARTITION_INCLUDED #define SQL_PARTITION_INCLUDED
/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -272,10 +272,10 @@ char *generate_partition_syntax(partition_info *part_info, ...@@ -272,10 +272,10 @@ char *generate_partition_syntax(partition_info *part_info,
const char *current_comment_start); const char *current_comment_start);
#endif #endif
void create_partition_name(char *out, const char *in1, bool create_partition_name(char *out, const char *in1,
const char *in2, uint name_variant, const char *in2, uint name_variant,
bool translate); bool translate);
void create_subpartition_name(char *out, const char *in1, bool create_subpartition_name(char *out, const char *in1,
const char *in2, const char *in3, const char *in2, const char *in3,
uint name_variant); uint name_variant);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment