diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2013-05-22 13:35:21 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2013-05-22 13:35:21 +0200 |
commit | aebcd56ca912979c92a32513def44aa121d82bb2 (patch) | |
tree | 08f3b33040d32d0cb4b397371988746636d4169d /storage/connect/tabmysql.cpp | |
parent | 41bda068a5affa1f8b483784df532c5a3ee8dcfd (diff) | |
download | mariadb-git-aebcd56ca912979c92a32513def44aa121d82bb2.tar.gz |
- Changing CONNECT version number and date
modified:
storage/connect/ha_connect.cc
storage/connect/mysql-test/connect/r/xml.result
- Testing default pivot columns for srcdef
Fixing order by MariaDB bug for pivot tables
modified:
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/tabpivot.cpp
storage/connect/tabpivot.h
Diffstat (limited to 'storage/connect/tabmysql.cpp')
-rw-r--r-- | storage/connect/tabmysql.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index 8b97a592d93..f06e8e9bd57 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -901,6 +901,29 @@ PCOL TDBMYSQL::MakeFieldColumn(PGLOBAL g, char *name) } // end of MakeFieldColumn /***********************************************************************/ +/* Called by Pivot tables to find default column names in a View */ +/* as the name of last field not equal to the passed name. */ +/***********************************************************************/ +char *TDBMYSQL::FindFieldColumn(char *name) + { + int n; + MYSQL_FIELD *fld; + char *cp = NULL; + + for (n = Myc.m_Fields - 1; n >= 0; n--) { + fld = &Myc.m_Res->fields[n]; + + if (!name || stricmp(name, fld->name)) { + cp = fld->name; + break; + } // endif name + + } // endfor n + + return cp; + } // end of FindFieldColumn + +/***********************************************************************/ /* Data Base read routine for MYSQL access method. */ /***********************************************************************/ int TDBMYSQL::ReadDB(PGLOBAL g) |