~ubuntu-branches/ubuntu/precise/drizzle/precise

« back to all changes in this revision

Viewing changes to plugin/show_dictionary/show_columns.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2011-03-02 10:38:38 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110302103838-4ezi8b065c4bv329
Tags: 2011.03.11-0ubuntu1
* New upstream release.
* Sleep no longer an so.
* Re-add get-orig-source, but this time with working.
* New symbol added to libdrizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
22
 
#include "plugin/show_dictionary/dictionary.h"
23
 
#include "drizzled/identifier.h"
 
21
#include <config.h>
 
22
#include <plugin/show_dictionary/dictionary.h>
 
23
#include <drizzled/identifier.h>
24
24
#include <string>
25
25
 
26
26
using namespace std;
60
60
  if (not isShowQuery())
61
61
   return;
62
62
 
63
 
  statement::Show *select= static_cast<statement::Show *>(getSession().lex->statement);
 
63
  statement::Show *select= static_cast<statement::Show *>(getSession().getLex()->statement);
64
64
 
65
65
  if (not select->getShowTable().empty() && not select->getShowSchema().empty())
66
66
  {
67
67
    table_name.append(select->getShowTable().c_str());
68
68
    identifier::Table identifier(select->getShowSchema().c_str(), select->getShowTable().c_str());
69
69
 
70
 
    is_tables_primed= plugin::StorageEngine::getTableDefinition(getSession(),
71
 
                                                                identifier,
72
 
                                                                table_proto);
 
70
    if (not plugin::Authorization::isAuthorized(*getSession().user(),
 
71
                                            identifier, false))
 
72
    {
 
73
      drizzled::error::access(*getSession().user(), identifier);
 
74
      return;
 
75
    }
 
76
 
 
77
    table_proto= plugin::StorageEngine::getTableMessage(getSession(), identifier);
 
78
 
 
79
    if (table_proto)
 
80
      is_tables_primed= true;
73
81
  }
74
82
}
75
83