Systems for MySQL
The world's most popular open source database
Contact a MySQL Representative
Login | Register
Learn about new MySQL releases, technical articles, events and more.
#include "mysql_priv.h"
#include "sp_pcontext.h"
#include "sp_head.h"
Include dependency graph for sp_pcontext.cc:
Go to the source code of this file.
Definition at line 35 of file sp_pcontext.cc.
References FALSE, LEX_STRING::length, p, LEX_STRING::str, and TRUE.
00036 { 00037 int i; 00038 const char *p; 00039 00040 if (sqlstate->length != 5) 00041 return FALSE; 00042 for (p= sqlstate->str, i= 0 ; i < 5 ; i++) 00043 { 00044 char c = p[i]; 00045 00046 if ((c < '0' || '9' < c) && 00047 (c < 'A' || 'Z' < c)) 00048 return FALSE; 00049 } 00050 return TRUE; 00051 }