~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/pad.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
 
22
22
#include <drizzled/function/str/pad.h>
23
23
#include <drizzled/error.h>
24
24
#include <drizzled/function/str/alloc_buffer.h>
25
25
#include <drizzled/session.h>
26
 
#include <drizzled/system_variables.h>
27
26
 
28
 
namespace drizzled {
 
27
namespace drizzled
 
28
{
29
29
 
30
30
void Item_func_rpad::fix_length_and_dec()
31
31
{
205
205
    goto err;
206
206
  }
207
207
 
208
 
  if (args[2]->null_value || !pad_char_length)
 
208
  if (args[2]->null_value || !pad_char_length ||
 
209
      str->alloc((uint32_t) byte_count))
209
210
    goto err;
210
 
  str->alloc((uint32_t) byte_count);
 
211
 
211
212
  str->length(0);
212
213
  str->set_charset(collation.collation);
213
214
  count-= res_char_length;