Merge lp:~sergei.glushchenko/percona-server/ps55-128-max-index into lp:percona-server/5.5

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 304
Proposed branch: lp:~sergei.glushchenko/percona-server/ps55-128-max-index
Merge into: lp:percona-server/5.5
Diff against target: 201 lines (+70/-5)
12 files modified
Percona-Server/CMakeLists.txt (+5/-0)
Percona-Server/config.h.cmake (+1/-1)
Percona-Server/mysql-test/include/have_64_keys.inc (+12/-0)
Percona-Server/mysql-test/r/have_64_keys.require (+14/-0)
Percona-Server/mysql-test/t/create.test (+5/-0)
Percona-Server/mysql-test/t/ps_1general.test (+5/-0)
Percona-Server/mysql-test/t/ps_2myisam.test (+5/-0)
Percona-Server/mysql-test/t/ps_3innodb.test (+5/-0)
Percona-Server/mysql-test/t/ps_4heap.test (+5/-0)
Percona-Server/mysql-test/t/ps_5merge.test (+5/-0)
Percona-Server/mysys/my_bitmap.c (+1/-1)
Percona-Server/sql/sql_bitmap.h (+7/-3)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/ps55-128-max-index
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Laurynas Biveinis (community) Needs Fixing
Review via email: mp+122521@code.launchpad.net

Description of the change

This is a port from
http://bazaar.launchpad.net/~percona-core/percona-server/rnt-5.1/revision/166

Been tested locally and the only failed tests were
main.create
main.ps_1general
main.ps_2myisam
main.ps_4heap
main.ps_5merge
main.ps_3innodb

which are designed with the assumption that MAX_INDEXES=64.

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

#25824

Revision history for this message
Alexey Kopytov (akopytov) wrote :

As discussed on IRC we should look into making the failing test cases pass (or be skipped) with all --with-max-indexes values.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

And add a CMake option to control the max. index limit for 5.5.

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

include/have_64_keys.inc been added to check whether we have exactly 64 max indexes or not. If we have not
main.create
main.ps_1general
main.ps_2myisam
main.ps_4heap
main.ps_5merge
main.ps_3innodb
are skipped.

Also MAX_INDEXES=N option been added to cmake to produce build with non-default MAX_INDEXES value.

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/490/

More than a half of debug Jenkins builds are failed because of known issue in upstream MySQL. This is reported in http://bugs.mysql.com/bug.php?id=65946, https://bugs.launchpad.net/percona-server/+bug/1050758.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Same comments as for 5.1.

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Branch is updated now.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Sergei,

Can you add a docstring for the MAX_INDEXES option, so it appears in "cmake -L .", "cmake -LH .", etc?

You can copy it from the autoconf macro in 5.1: "Sets the maximum number of indexes per table, default 64".

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

> Sergei,
>
> Can you add a docstring for the MAX_INDEXES option, so it appears in "cmake -L
> .", "cmake -LH .", etc?
>
> You can copy it from the autoconf macro in 5.1: "Sets the maximum number of
> indexes per table, default 64".
Done.

Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/CMakeLists.txt'
--- Percona-Server/CMakeLists.txt 2012-04-19 16:51:34 +0000
+++ Percona-Server/CMakeLists.txt 2012-09-26 13:24:24 +0000
@@ -202,6 +202,11 @@
202OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)202OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
203MARK_AS_ADVANCED(WITH_FAST_MUTEXES)203MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
204204
205IF (NOT MAX_INDEXES)
206 SET(MAX_INDEXES 64)
207ENDIF()
208SET(MAX_INDEXES ${MAX_INDEXES} CACHE STRING "Sets the maximum number of indexes per table, default 64")
209
205# Set DBUG_OFF and other optional release-only flags for non-debug project types210# Set DBUG_OFF and other optional release-only flags for non-debug project types
206FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)211FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
207 FOREACH(LANG C CXX)212 FOREACH(LANG C CXX)
208213
=== modified file 'Percona-Server/config.h.cmake'
--- Percona-Server/config.h.cmake 2011-08-09 08:03:29 +0000
+++ Percona-Server/config.h.cmake 2012-09-26 13:24:24 +0000
@@ -381,7 +381,7 @@
381381
382#cmakedefine HAVE_MBSTATE_T382#cmakedefine HAVE_MBSTATE_T
383383
384#define MAX_INDEXES 64384#cmakedefine MAX_INDEXES @MAX_INDEXES@
385385
386#cmakedefine QSORT_TYPE_IS_VOID 1386#cmakedefine QSORT_TYPE_IS_VOID 1
387#cmakedefine RETQSORTTYPE @RETQSORTTYPE@387#cmakedefine RETQSORTTYPE @RETQSORTTYPE@
388388
=== added file 'Percona-Server/mysql-test/include/have_64_keys.inc'
--- Percona-Server/mysql-test/include/have_64_keys.inc 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/include/have_64_keys.inc 2012-09-26 13:24:24 +0000
@@ -0,0 +1,12 @@
1# Check that we have MAX_INDEXES=64
2
3--require r/have_64_keys.require
4
5# Check that maximum length of possible_keys and key_len fields is 4096
6# They are defined in THD::send_explain_fields as NAME_CHAR_LEN*MAX_KEY
7# where NAME_CHAR_LEN is always 64 (mysql_com.h) and MAX_KEY is
8# a synonym of MAX_INDEXES
9
10--enable_metadata
11EXPLAIN SELECT 1;
12--disable_metadata
013
=== added file 'Percona-Server/mysql-test/r/have_64_keys.require'
--- Percona-Server/mysql-test/r/have_64_keys.require 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/r/have_64_keys.require 2012-09-26 13:24:24 +0000
@@ -0,0 +1,14 @@
1EXPLAIN SELECT 1;
2Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
3def id 8 3 1 N 32929 0 63
4def select_type 253 19 6 N 1 31 8
5def table 253 64 0 Y 0 31 8
6def type 253 10 0 Y 0 31 8
7def possible_keys 253 4096 0 Y 0 31 8
8def key 253 64 0 Y 0 31 8
9def key_len 253 4096 0 Y 0 31 8
10def ref 253 1024 0 Y 0 31 8
11def rows 8 10 0 Y 32928 0 63
12def Extra 253 255 14 N 1 31 8
13id select_type table type possible_keys key key_len ref rows Extra
141 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
015
=== modified file 'Percona-Server/mysql-test/t/create.test'
--- Percona-Server/mysql-test/t/create.test 2012-04-18 23:26:28 +0000
+++ Percona-Server/mysql-test/t/create.test 2012-09-26 13:24:24 +0000
@@ -2,6 +2,11 @@
2# Check some special create statements.2# Check some special create statements.
3#3#
44
5# This test checks some limits which are related to MAX_INDEXES constant
6# which could be set to non-default value at build time.
7# We just skip the test in this case.
8--source include/have_64_keys.inc
9
5--disable_warnings10--disable_warnings
6drop table if exists t1,t2,t3,t4,t5;11drop table if exists t1,t2,t3,t4,t5;
7drop database if exists mysqltest;12drop database if exists mysqltest;
813
=== modified file 'Percona-Server/mysql-test/t/ps_1general.test'
--- Percona-Server/mysql-test/t/ps_1general.test 2009-11-04 12:28:20 +0000
+++ Percona-Server/mysql-test/t/ps_1general.test 2012-09-26 13:24:24 +0000
@@ -4,6 +4,11 @@
4# #4# #
5##############################################################5##############################################################
66
7# This test checks some limits which are related to MAX_INDEXES constant
8# which could be set to non-default value at build time.
9# We just skip the test in this case.
10--source include/have_64_keys.inc
11
7# 12#
8# NOTE: PLEASE SEE THE DETAILED DESCRIPTION AT THE BOTTOM OF THIS FILE13# NOTE: PLEASE SEE THE DETAILED DESCRIPTION AT THE BOTTOM OF THIS FILE
9# BEFORE ADDING NEW TEST CASES HERE !!!14# BEFORE ADDING NEW TEST CASES HERE !!!
1015
=== modified file 'Percona-Server/mysql-test/t/ps_2myisam.test'
--- Percona-Server/mysql-test/t/ps_2myisam.test 2005-07-28 00:22:47 +0000
+++ Percona-Server/mysql-test/t/ps_2myisam.test 2012-09-26 13:24:24 +0000
@@ -4,6 +4,11 @@
4# #4# #
5###############################################5###############################################
66
7# This test checks some limits which are related to MAX_INDEXES constant
8# which could be set to non-default value at build time.
9# We just skip the test in this case.
10--source include/have_64_keys.inc
11
7# 12#
8# NOTE: PLEASE SEE ps_1general.test (bottom) 13# NOTE: PLEASE SEE ps_1general.test (bottom)
9# BEFORE ADDING NEW TEST CASES HERE !!!14# BEFORE ADDING NEW TEST CASES HERE !!!
1015
=== modified file 'Percona-Server/mysql-test/t/ps_3innodb.test'
--- Percona-Server/mysql-test/t/ps_3innodb.test 2010-07-04 07:30:04 +0000
+++ Percona-Server/mysql-test/t/ps_3innodb.test 2012-09-26 13:24:24 +0000
@@ -4,6 +4,11 @@
4# #4# #
5###############################################5###############################################
66
7# This test checks some limits which are related to MAX_INDEXES constant
8# which could be set to non-default value at build time.
9# We just skip the test in this case.
10--source include/have_64_keys.inc
11
7# 12#
8# NOTE: PLEASE SEE ps_1general.test (bottom) 13# NOTE: PLEASE SEE ps_1general.test (bottom)
9# BEFORE ADDING NEW TEST CASES HERE !!!14# BEFORE ADDING NEW TEST CASES HERE !!!
1015
=== modified file 'Percona-Server/mysql-test/t/ps_4heap.test'
--- Percona-Server/mysql-test/t/ps_4heap.test 2005-07-28 14:09:54 +0000
+++ Percona-Server/mysql-test/t/ps_4heap.test 2012-09-26 13:24:24 +0000
@@ -4,6 +4,11 @@
4# #4# #
5###############################################5###############################################
66
7# This test checks some limits which are related to MAX_INDEXES constant
8# which could be set to non-default value at build time.
9# We just skip the test in this case.
10--source include/have_64_keys.inc
11
7# 12#
8# NOTE: PLEASE SEE ps_1general.test (bottom) 13# NOTE: PLEASE SEE ps_1general.test (bottom)
9# BEFORE ADDING NEW TEST CASES HERE !!!14# BEFORE ADDING NEW TEST CASES HERE !!!
1015
=== modified file 'Percona-Server/mysql-test/t/ps_5merge.test'
--- Percona-Server/mysql-test/t/ps_5merge.test 2005-07-28 14:09:54 +0000
+++ Percona-Server/mysql-test/t/ps_5merge.test 2012-09-26 13:24:24 +0000
@@ -4,6 +4,11 @@
4# #4# #
5###############################################5###############################################
66
7# This test checks some limits which are related to MAX_INDEXES constant
8# which could be set to non-default value at build time.
9# We just skip the test in this case.
10--source include/have_64_keys.inc
11
7# 12#
8# NOTE: PLEASE SEE ps_1general.test (bottom) 13# NOTE: PLEASE SEE ps_1general.test (bottom)
9# BEFORE ADDING NEW TEST CASES HERE !!!14# BEFORE ADDING NEW TEST CASES HERE !!!
1015
=== modified file 'Percona-Server/mysys/my_bitmap.c'
--- Percona-Server/mysys/my_bitmap.c 2011-07-03 23:48:19 +0000
+++ Percona-Server/mysys/my_bitmap.c 2012-09-26 13:24:24 +0000
@@ -294,7 +294,7 @@
294 m+= prefix_bytes;294 m+= prefix_bytes;
295 if ((prefix_bits= prefix_size & 7))295 if ((prefix_bits= prefix_size & 7))
296 *(m++)= (1 << prefix_bits)-1;296 *(m++)= (1 << prefix_bits)-1;
297 if ((d= no_bytes_in_map(map)-prefix_bytes))297 if ((d= no_bytes_in_map(map) - (m - (uchar *) map->bitmap)))
298 bzero(m, d);298 bzero(m, d);
299}299}
300300
301301
=== modified file 'Percona-Server/sql/sql_bitmap.h'
--- Percona-Server/sql/sql_bitmap.h 2011-06-30 15:46:53 +0000
+++ Percona-Server/sql/sql_bitmap.h 2012-09-26 13:24:24 +0000
@@ -51,7 +51,11 @@
51 void intersect(ulonglong map2buff)51 void intersect(ulonglong map2buff)
52 {52 {
53 MY_BITMAP map2;53 MY_BITMAP map2;
54 bitmap_init(&map2, (uint32 *)&map2buff, sizeof(ulonglong)*8, 0);54 ulonglong buf;
55
56 /* bitmap_init() zeroes the supplied buffer */
57 bitmap_init(&map2, (uint32 *)&buf, sizeof(ulonglong)*8, 0);
58 buf= map2buff;
55 bitmap_intersect(&map, &map2);59 bitmap_intersect(&map, &map2);
56 }60 }
57 /* Use highest bit for all bits above sizeof(ulonglong)*8. */61 /* Use highest bit for all bits above sizeof(ulonglong)*8. */
@@ -91,9 +95,9 @@
91 ulonglong to_ulonglong() const95 ulonglong to_ulonglong() const
92 {96 {
93 if (sizeof(buffer) >= 8)97 if (sizeof(buffer) >= 8)
94 return uint8korr(buffer);98 return uint8korr((uchar *) buffer);
95 DBUG_ASSERT(sizeof(buffer) >= 4);99 DBUG_ASSERT(sizeof(buffer) >= 4);
96 return (ulonglong) uint4korr(buffer);100 return (ulonglong) uint4korr((uchar *) buffer);
97 }101 }
98};102};
99103

Subscribers

People subscribed via source and target branches