~ubuntu-branches/debian/squeeze/mysql-5.1/squeeze

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/include/data0type.ic

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2014-01-14 10:40:30 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140114104030-44alii0hx3x3g41y
Tags: 5.1.73-1
* New upstream release
  http://dev.mysql.com/doc/relnotes/mysql/5.1/en/news-5-1-73.html
* Update patches
* Disable flaky test rpl.rpl_innodb_bug28430 breaking the build. It's  marked
  as experimental by upstream and the internet is full of reports about it's
  unrelialibity

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
11
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
12
 
13
13
You should have received a copy of the GNU General Public License along with
14
 
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
 
Place, Suite 330, Boston, MA 02111-1307 USA
 
14
this program; if not, write to the Free Software Foundation, Inc., 
 
15
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
*****************************************************************************/
18
18
 
439
439
                } else if (!comp) {
440
440
                        return(len);
441
441
                } else {
442
 
                        /* We play it safe here and ask MySQL for
443
 
                        mbminlen and mbmaxlen.  Although
444
 
                        mbminlen and mbmaxlen are
445
 
                        initialized if and only if prtype
446
 
                        is (in one of the 3 functions in this file),
447
 
                        it could be that none of these functions
448
 
                        has been called. */
449
 
 
 
442
#ifdef UNIV_DEBUG
450
443
                        ulint   i_mbminlen, i_mbmaxlen;
451
444
 
452
445
                        innobase_get_cset_width(
453
446
                                dtype_get_charset_coll(prtype),
454
447
                                &i_mbminlen, &i_mbmaxlen);
455
448
 
456
 
                        if (UNIV_UNLIKELY(mbminlen != i_mbminlen)
457
 
                            || UNIV_UNLIKELY(mbmaxlen != i_mbmaxlen)) {
458
 
 
459
 
                                ut_print_timestamp(stderr);
460
 
                                fprintf(stderr, "  InnoDB: "
461
 
                                        "mbminlen=%lu, "
462
 
                                        "mbmaxlen=%lu, "
463
 
                                        "type->mbminlen=%lu, "
464
 
                                        "type->mbmaxlen=%lu\n",
465
 
                                        (ulong) i_mbminlen,
466
 
                                        (ulong) i_mbmaxlen,
467
 
                                        (ulong) mbminlen,
468
 
                                        (ulong) mbmaxlen);
469
 
                        }
 
449
                        ut_ad(mbminlen == i_mbminlen);
 
450
                        ut_ad(mbmaxlen == i_mbmaxlen);
 
451
#endif /* UNIV_DEBUG */
470
452
                        if (mbminlen == mbmaxlen) {
471
453
                                return(len);
472
454
                        }