410 #include <RDBC/configure.h>
418 UChar_t gAllowedChars[]= {
419 '\307',
'\374',
'\351',
'\342',
'\344',
'\340',
'\345',
'\347',
'\352',
'\353',
420 '\350',
'\357',
'\356',
'\354',
'\304',
'\305',
'\311',
'\346',
'\306',
'\364',
421 '\366',
'\362',
'\373',
'\371',
'\377',
'\326',
'\334',
'\341',
'\355',
'\363',
422 '\372',
'\361',
'\321',0};
530 Bool_t return_value = kTRUE;
629 return mysql_get_server_info(imp->
fMYSQL);
642 return "VO MySQL Driver";
662 TString
str = RDBC_VERSION;
674 Int_t return_value = 0;
686 Int_t return_value = 0;
781 Bool_t return_value = kTRUE;
798 Bool_t return_value = kTRUE;
869 return using323() ?
"`" :
" ";
884 TString
str =
"UNIQUE,ZEROFILL,UNSIGNED,BIGINT,BLOB,TINYBLOB,MEDIMUMBLOB,"
885 "LONGBLOB,MEDIUMINT,PROCEDURE,SHOW,LIMIT,DEFAULT,TABLES,"
886 "REGEXP,RLIKE,KEYS,TINYTEXT,MEDIUMTEXT";
902 TString
str =
"ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS,COT,"
903 "DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW,POWER,"
904 "RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE";
920 TString
str =
"ASCII,CHAR,CHAR_LENGTH,CHARACTER_LENGTH,CONCAT,"
921 "ELT,FIELD,FIND_IN_SET,INSERT,INSTR,INTERVAL,"
922 "LCASE,LEFT,LENGTH,LOCATE,LOWER,LTRIM,MID,POSITION,"
923 "OCTET_LENGTH,REPEAT,REPLACE,REVERSE,RIGHT,RTRIM,"
924 "SPACE,SOUNDEX,SUBSTRING,SUBSTRING_INDEX,TRIM,"
941 TString
str =
"DATABASE,USER,SYSTEM_USER,SESSION_USER,"
942 "PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION";
956 TString
str =
"DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,"
957 "DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,"
958 "SECOND,PERIOD_ADD,PERIOD_DIFF,TO_DAYS,FROM_DAYS,"
959 "DATE_FORMAT,TIME_FORMAT,CURDATE,CURRENT_DATE,"
960 "CURTIME,CURRENT_TIME,NOW,SYSDATE,CURRENT_TIMESTAMP,"
961 "UNIX_TIMESTAMP,FROM_UNIXTIME,SEC_TO_TIME,TIME_TO_SEC";
1004 return (
char*)gAllowedChars;
1017 Bool_t return_value = kTRUE;
1018 return return_value;
1031 Bool_t return_value = kTRUE;
1032 return return_value;
1050 Bool_t return_value = kTRUE;
1051 return return_value;
1065 Bool_t return_value = kTRUE;
1066 return return_value;
1265 Bool_t return_value = kTRUE;
1266 return return_value;
1280 Bool_t return_value = kTRUE;
1281 return return_value;
1294 Bool_t return_value = kTRUE;
1295 return return_value;
1309 Bool_t return_value = kTRUE;
1310 return return_value;
1323 Bool_t return_value = kTRUE
1324 return return_value;
1340 Bool_t return_value = kTRUE;
1341 return return_value;
1374 Bool_t return_value = kTRUE;
1375 return return_value;
1388 Bool_t return_value = kTRUE;
1389 return return_value;
1403 Bool_t return_value = kTRUE;
1404 return return_value;
1424 Bool_t return_value = kTRUE;
1425 return return_value;
1439 Bool_t return_value = kTRUE;
1440 return return_value;
1453 Bool_t return_value = kTRUE;
1454 return return_value;
1467 Bool_t return_value = kTRUE;
1468 return return_value;
1482 Bool_t return_value = kTRUE;
1483 return return_value;
1496 Bool_t return_value = kTRUE;
1497 return return_value;
1510 Bool_t return_value = kTRUE;
1511 return return_value;
1537 Bool_t return_value = kTRUE;
1538 return return_value;
1565 Bool_t return_value = kTRUE;
1566 return return_value;
1654 Bool_t return_value = kTRUE;
1655 return return_value;
1697 Bool_t return_value = kFALSE;
1698 return return_value;
1788 if (_Conn.getServerMajorVersion() >= 3) {
1789 if (_Conn.getServerMajorVersion() == 3) {
1790 if (_Conn.getServerMinorVersion() >= 22) {
1836 Bool_t return_value = kFALSE;
1837 return return_value;
1940 Bool_t return_value = kTRUE;
1941 return return_value;
2029 Bool_t TSQLDatabaseMetaData::SupportsOpenCursorsAcrossCommit()
2269 return gMaxCursorNameLength;
2371 return MySQLdefs::kMAXBUF - 4;
2559 const TString& catalog,
2560 const TString& schemaPattern,
2561 const TString& procedureNamePattern )
2610 const TString& catalog,
2611 const TString& schemaPattern,
2612 const TString& procedureNamePattern,
2613 const TString& columnNamePattern )
2692 const TString& catalog,
2693 const TString& schemaPattern,
2694 const TString& tableNamePattern,
2695 const TString&
types )
2737 static MYSQL_FIELD SQLTABLES_fields[] = {
2738 {
"TABLE_CAT",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
2739 {
"TABLE_SHEM",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
2740 {
"TABLE_NAME",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN,0},
2741 {
"TABLE_TYPE",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,5,0},
2742 {
"REMARKS",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,11}};
2744 const Int_t SQLTABLES_FIELDS = array_elements(SQLTABLES_values);
2748 TString
db = con->
fURL->GetDatabase();
2750 if( !catalog.IsNull() && schemaPattern.IsNull() && tableNamePattern.IsNull() ) {
2758 gResult->
fMYSQL_RES->fields = SQLTABLES_fields;
2759 gResult->
fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2765 if( catalog.IsNull() && schemaPattern ==
"%" && tableNamePattern.IsNull() ) {
2766 gResult->
fMYSQL_RES = (MYSQL_RES*) my_malloc(
sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2768 gResult->
fMYSQL_RES->fields = SQLTABLES_fields;
2769 gResult->
fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2775 if( catalog.IsNull() && schemaPattern.IsNull() &&
2776 tableNamePattern.IsNull() && types==
"%" ) {
2777 gResult->
fMYSQL_RES = (MYSQL_RES*) my_malloc(
sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2779 gResult->
fMYSQL_RES->fields = SQLTABLES_fields;
2780 gResult->
fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2788 if( (!types.IsNull() && !types.Contains(
"TABLE") ) ||
2789 (!catalog.IsNull() && catalog !=
"%" && catalog !=
db) ||
2790 (!schemaPattern.IsNull() && schemaPattern !=
"%" && catalog !=
db) ) {
2791 gResult->
fMYSQL_RES = (MYSQL_RES*) my_malloc(
sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2793 gResult->
fMYSQL_RES->fields = SQLTABLES_fields;
2794 gResult->
fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2809 gResult->
fMYSQL_RES->fields = SQLTABLES_fields;
2810 gResult->
fMYSQL_RES->field_count = SQLTABLES_FIELDS;
2833 static MYSQL_FIELD SCHEMA_fields[] = {
2834 {
"TABLE_SHEM",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0}};
2839 gResult->
fMYSQL_RES = (MYSQL_RES*) my_malloc(
sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2863 static MYSQL_FIELD CATALOG_fields[] = {
2864 {
"TABLE_CAT",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0}};
2876 gResult->
fMYSQL_RES->fields = CATALOG_fields;
2902 static MYSQL_FIELD TTYPE_fields[] = {
2903 {
"TABLE_TYPE",
"Catalog",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0}};
2908 gResult->
fMYSQL_RES = (MYSQL_RES*) my_malloc(
sizeof(MYSQL_RES),MYF(MY_ZEROFILL));
2919 const TString& catalog,
2920 const TString& schemaPattern,
2921 const TString& tableNamePattern,
2922 const TString& columnNamePattern )
3005 const TString& catalog,
3006 const TString& schema,
3007 const TString& table,
3008 const TString& columnNamePattern )
3062 const TString& catalog,
3063 const TString& schemaPattern,
3064 const TString& tableNamePattern )
3120 const TString& catalog,
3121 const TString& schema,
3122 const TString& table,
3181 const TString& catalog,
3182 const TString& schema,
3183 const TString& table )
3232 const TString& catalog,
3233 const TString& schema,
3234 const TString& table )
3274 const TString& catalog,
3275 const TString& schema,
3276 const TString& table )
3368 const TString& catalog,
3369 const TString& schema,
3370 const TString& table )
3462 const TString& primaryCatalog,
3463 const TString& primarySchema,
3464 const TString& primaryTable,
3465 const TString& foreignCatalog,
3466 const TString& foreignSchema,
3467 const TString& foreignTable )
3640 const TString& catalog,
3641 const TString& schema,
3642 const TString& table,
3644 Bool_t approximate )
3727 static MYSQL_FIELD SQLSTAT_fields[] = {
3728 {
"TABLE_CAT",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
3729 {
"TABLE_SCHEM",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
3730 {
"TABLE_NAME",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN,NOT_NULL_FLAG},
3731 {
"NON_UNIQUE",
"MySQL_Stat",NULL,FIELD_TYPE_SHORT,1,1,NOT_NULL_FLAG},
3732 {
"NDEX_QUALIFIER",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,0},
3733 {
"INDEX_NAME",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN},
3734 {
"TYPE",
"MySQL_Stat",NULL,FIELD_TYPE_SHORT,1,1,NOT_NULL_FLAG},
3735 {
"ORDINAL_POSITION",
"MySQL_Stat",NULL,FIELD_TYPE_SHORT,1,2,NOT_NULL_FLAG},
3736 {
"COLUMN_NAME",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,NAME_LEN,NAME_LEN,NOT_NULL_FLAG},
3737 {
"ASC_OR_DESC",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,1,1},
3738 {
"CARDINALITY",
"MySQL_Stat",NULL,FIELD_TYPE_LONG,11,11},
3739 {
"PAGES",
"MySQL_Stat",NULL,FIELD_TYPE_LONG,9,9},
3740 {
"FILTER_CONDITION",
"MySQL_Stat",NULL,FIELD_TYPE_VAR_STRING,10,10},
3743 const Int_t SQLSTAT_FIELDS=array_elements(SQLSTAT_fields);
3804 Bool_t return_value = kFALSE;
3805 return return_value;