~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/pars0sym.h

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä, Stewart Smith
  • Date: 2010-11-17 05:52:09 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101117055209-69m035q6h7e1txrc
Merge Revision revid:marko.makela@oracle.com-20100629113248-fvl48lnzr44z94gg from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100629113248-fvl48lnzr44z94gg

Original Authors: Marko Mkel <marko.makela@oracle.com>
Original commit message:
Bug#52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4

Merge and adjust a forgotten change to fix this bug.
rb://393 approved by Jimmy Yang
  ------------------------------------------------------------------------
  r3794 | marko | 2009-01-07 14:14:53 +0000 (Wed, 07 Jan 2009) | 18 lines

  branches/6.0: Allow the minimum length of a multi-byte character to be
  up to 4 bytes. (Bug #35391)

  dtype_t, dict_col_t: Replace mbminlen:2, mbmaxlen:3 with mbminmaxlen:5.
  In this way, the 5 bits can hold two values of 0..4, and the storage size
  of the fields will not cross the 64-bit boundary.  Encode the values as
  DATA_MBMAX * mbmaxlen + mbminlen.  Define the auxiliary macros
  DB_MBMINLEN(mbminmaxlen), DB_MBMAXLEN(mbminmaxlen), and
  DB_MINMAXLEN(mbminlen, mbmaxlen).

  Try to trim and pad UTF-16 and UTF-32 with spaces as appropriate.

  Alexander Barkov suggested the use of cs->cset->fill(cs, buff, len, 0x20).
  ha_innobase::store_key_val_for_row() now does that, but the added function
  row_mysql_pad_col() does not, because it doesn't have the MySQL TABLE object.

  rb://49 approved by Heikki Tuuri
  ------------------------------------------------------------------------

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1997, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1997, 2009, Innobase Oy. 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
53
53
/******************************************************************//**
54
54
Adds an integer literal to a symbol table.
55
55
@return symbol table node */
56
 
#ifdef __cplusplus
57
 
extern "C"
58
 
#endif
59
56
UNIV_INTERN
60
57
sym_node_t*
61
58
sym_tab_add_int_lit(
65
62
/******************************************************************//**
66
63
Adds an string literal to a symbol table.
67
64
@return symbol table node */
68
 
#ifdef __cplusplus
69
 
extern "C"
70
 
#endif
71
65
UNIV_INTERN
72
66
sym_node_t*
73
67
sym_tab_add_str_lit(
79
73
/******************************************************************//**
80
74
Add a bound literal to a symbol table.
81
75
@return symbol table node */
82
 
#ifdef __cplusplus
83
 
extern "C"
84
 
#endif
85
76
UNIV_INTERN
86
77
sym_node_t*
87
78
sym_tab_add_bound_lit(
92
83
/******************************************************************//**
93
84
Adds an SQL null literal to a symbol table.
94
85
@return symbol table node */
95
 
#ifdef __cplusplus
96
 
extern "C"
97
 
#endif
98
86
UNIV_INTERN
99
87
sym_node_t*
100
88
sym_tab_add_null_lit(
103
91
/******************************************************************//**
104
92
Adds an identifier to a symbol table.
105
93
@return symbol table node */
106
 
#ifdef __cplusplus
107
 
extern "C"
108
 
#endif
109
94
UNIV_INTERN
110
95
sym_node_t*
111
96
sym_tab_add_id(
117
102
/******************************************************************//**
118
103
Add a bound identifier to a symbol table.
119
104
@return symbol table node */
120
 
#ifdef __cplusplus
121
 
extern "C"
122
 
#endif
123
105
UNIV_INTERN
124
106
sym_node_t*
125
107
sym_tab_add_bound_id(