• Mattias Jonsson's avatar
    Bug#37402: Mysql cant read partitioned table with capital letter in the name · 295fc583
    Mattias Jonsson authored
    Problem was that ha_partition had HA_FILE_BASED flag set
    (since it uses a .par file), but after open it uses the first partitions
    flags, which results in different case handling for create and for
    open.
    
    Solution was to change the underlying partition name so it was consistent.
    (Only happens when lower_case_table_names = 2, i.e. Mac OS X and storage
    engines without HA_FILE_BASED, like InnoDB and Memory.)
    
    (Recommit after adding rename of check_lowercase_names to
    get_canonical_filename, and moved it from handler.h to mysql_priv.h)
    
    NOTE: if a mixed case name for a partitioned table was created when
    lower_case_table_name = 2 it should be renamed or dropped before using
    the updated version (See bug#37402 for more info)
    295fc583
partition_mgm_lc0_myisam.test 1.99 KB
################################################################################
# t/partition_mgm_lc0_myisam.test                                              #
#                                                                              #
# Purpose:                                                                     #
#  Test of partitioning management functions (incl upper/lower case names):    #
#        MyISAM branch + lower_case_table_names = 0                            #
#        (usually Unix like, apart from Mac OS X)                              #
#        Also requires lower_case_file_system OFF                              #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: mattiasj                                                    #
# Original Date: 2008-06-27                                                    #
################################################################################

# The server must support partitioning.
--source include/have_partition.inc

#
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
#       TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
#       THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#

#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
--source include/have_lowercase0.inc
--source include/have_case_sensitive_file_system.inc

#------------------------------------------------------------------------------#
# Engine specific settings and requirements

##### Storage engine to be tested
#--source include/have_myisam.inc
let $engine= 'MyISAM';

#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--source suite/parts/inc/partition_mgm.inc