~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Nathan Williams
  • Date: 2009-06-24 17:47:02 UTC
  • mto: This revision was merged to the branch mainline in revision 1082.
  • Revision ID: nathanlws@gmail.com-20090624174702-rs66w3tjdnb4jitj
The rest of the files in the drizzled directory were purged of the cmin macro and replace with std::min (except for the definition in globals.h and 1 usage in stacktrace.cc).

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <drizzled/lock.h>
38
38
#include <drizzled/select_send.h>
39
39
#include <bitset>
 
40
#include <algorithm>
40
41
 
41
42
using namespace std;
42
43
 
2525
2526
    char command[80];
2526
2527
    Lex_input_stream *lip= session->m_lip;
2527
2528
    strncpy(command, lip->yylval->symbol.str,
2528
 
            cmin(lip->yylval->symbol.length, sizeof(command)-1));
2529
 
    command[cmin(lip->yylval->symbol.length, sizeof(command)-1)]=0;
 
2529
            min(lip->yylval->symbol.length, (uint32_t)(sizeof(command)-1)));
 
2530
    command[min(lip->yylval->symbol.length, (uint32_t)(sizeof(command)-1))]=0;
2530
2531
    my_error(ER_CANT_USE_OPTION_HERE, MYF(0), command);
2531
2532
    return 1;
2532
2533
  }