~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_str.test

  • Committer: Monty Taylor
  • Date: 2008-11-16 06:29:53 UTC
  • mto: (584.1.9 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116062953-ivdltjmfe009b5fr
Moved stuff into item/

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
select 'hello',"'hello'",'""hello""','''h''e''l''l''o''',"hel""lo",'hel\'lo';
10
10
select 'hello' 'monty';
11
11
select length('\n\t\r\b\0\_\%\\');
 
12
select bit_length('\n\t\r\b\0\_\%\\');
12
13
select char_length('\n\t\r\b\0\_\%\\');
13
 
select character_length('\n\t\r\b\0\_\%\\');
14
14
select length('\n\t\n\b\0\\_\\%\\');
15
15
select concat('monty',' was here ','again'),length('hello'),char(ascii('h')),ord('h');
16
16
select hex(char(256));
140
140
# Test bug in concat_ws
141
141
#
142
142
 
143
 
CREATE TEMPORARY TABLE t1 (
 
143
CREATE TABLE t1 (
144
144
  id int NOT NULL,
145
145
  title varchar(255) default NULL,
146
146
  prio int default NULL,
164
164
# Test bug in AES_DECRYPT() when called with wrong argument
165
165
#
166
166
 
167
 
CREATE TEMPORARY TABLE t1 (id int NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) ENGINE=MyISAM;
 
167
CREATE TABLE t1 (id int NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) ENGINE=MyISAM;
168
168
INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf');
169
169
DROP TABLE t1;
170
170
 
183
183
#
184
184
# test for #739
185
185
 
186
 
CREATE TEMPORARY TABLE t1 (title text) ENGINE=MyISAM;
 
186
CREATE TABLE t1 (title text) ENGINE=MyISAM;
187
187
INSERT INTO t1 VALUES ('Congress reconvenes in September to debate welfare and adult education');
188
188
INSERT INTO t1 VALUES ('House passes the CAREERS bill');
189
189
SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1;
252
252
explain extended select hex(130);
253
253
explain extended select binary 'HE';
254
254
explain extended select collation(conv(130,16,10));
 
255
explain extended select coercibility(conv(130,16,10));
255
256
explain extended select length('\n\t\r\b\0\_\%\\');
256
257
explain extended select concat('monty',' was here ','again');
257
258
explain extended select length('hello');
294
295
#
295
296
 
296
297
create table t1 (c1 INT, c2 INT);
297
 
--error ER_WARN_DATA_OUT_OF_RANGE
 
298
--error 1264
298
299
insert into t1 values ('21474836461','21474836461');
299
 
--error ER_WARN_DATA_OUT_OF_RANGE
 
300
--error 1264
300
301
insert into t1 values ('-21474836461','-21474836461');
301
302
select * from t1;
302
303
drop table t1;
329
330
# Bug #7751 - conversion for a bigint constant 
330
331
#
331
332
 
332
 
CREATE TEMPORARY TABLE t1 (
 
333
CREATE TABLE t1 (
333
334
  id int NOT NULL auto_increment,
334
335
  a bigint default NULL,
335
336
  PRIMARY KEY  (id)
336
337
) ENGINE=MyISAM;
337
338
 
338
 
--error ER_WARN_DATA_OUT_OF_RANGE
 
339
--error 1264
339
340
INSERT INTO t1 VALUES ('0','16307858876001849059');
340
341
 
341
342
SELECT CONV('e251273eb74a8ee3', 16, 10);
511
512
#
512
513
# Bug #31758 inet_ntoa, oct, crashes server with null + filesort 
513
514
#
514
 
create TEMPORARY table t1 (a bigint not null)engine=myisam;
 
515
create table t1 (a bigint not null)engine=myisam;
515
516
insert into t1 set a = 1024*1024*1024*4;
516
517
drop table t1;
517
 
create TEMPORARY table t1 (a char(36) not null)engine=myisam;
 
518
create table t1 (a char(36) not null)engine=myisam;
518
519
insert ignore into t1 set a = ' ';
519
520
insert ignore into t1 set a = ' ';
520
521
select * from t1 order by (oct(a));