~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/set_user_var.cc

  • Committer: Stewart Smith
  • Date: 2009-10-08 12:39:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1179.
  • Revision ID: stewart@flamingspork.com-20091008123927-qpf9hog04w4xc5aj
make directory_file_name() static to mysys/my_lib.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
21
 
 
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
22
22
#include <drizzled/function/set_user_var.h>
23
23
#include <drizzled/field/num.h>
24
24
#include <drizzled/session.h>
25
25
#include <drizzled/plugin/client.h>
26
26
 
27
 
namespace drizzled
28
 
{
 
27
using namespace drizzled;
29
28
 
30
29
/*
31
30
  When a user variable is updated (in a SET command or a query like
44
43
     if this variable is a constant item in the query (it is if update_query_id
45
44
     is different from query_id).
46
45
  */
47
 
  entry->update_query_id= session->getQueryId();
 
46
  entry->update_query_id= session->query_id;
48
47
  /*
49
48
    As it is wrong and confusing to associate any
50
49
    character set with NULL, @a should be latin2
316
315
  str->append(')');
317
316
}
318
317
 
 
318
 
 
319
void Item_func_set_user_var::print_as_stmt(String *str,
 
320
                                           enum_query_type query_type)
 
321
{
 
322
  str->append(STRING_WITH_LEN("set @"));
 
323
  str->append(name.str, name.length);
 
324
  str->append(STRING_WITH_LEN(":="));
 
325
  args[0]->print(str, query_type);
 
326
  str->append(')');
 
327
}
 
328
 
319
329
bool Item_func_set_user_var::send(plugin::Client *client, String *str_arg)
320
330
{
321
331
  if (result_field)
439
449
}
440
450
 
441
451
 
442
 
} /* namespace drizzled */