~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_str.test

  • Committer: Mark Atwood
  • Date: 2011-12-28 02:50:31 UTC
  • Revision ID: me@mark.atwood.name-20111228025031-eh4h1zwv4ig88g0i
fix tests/r/basic.result

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\_\%\\');
13
12
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));
98
98
 
99
99
select quote('\'\"\\test');
100
100
select quote(concat('abc\'', '\\cba'));
 
101
--error ER_DIVISION_BY_ZERO
101
102
select quote(1/0), quote('\0\Z');
102
103
select length(quote(concat(char(0),"test")));
103
104
select hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235))));
140
141
# Test bug in concat_ws
141
142
#
142
143
 
143
 
CREATE TABLE t1 (
 
144
CREATE TEMPORARY TABLE t1 (
144
145
  id int NOT NULL,
145
146
  title varchar(255) default NULL,
146
147
  prio int default NULL,
164
165
# Test bug in AES_DECRYPT() when called with wrong argument
165
166
#
166
167
 
167
 
CREATE TABLE t1 (id int NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) ENGINE=MyISAM;
 
168
CREATE TEMPORARY TABLE t1 (id int NOT NULL auto_increment, tmp text NOT NULL, KEY id (id)) ENGINE=MyISAM;
168
169
INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf');
169
170
DROP TABLE t1;
170
171
 
183
184
#
184
185
# test for #739
185
186
 
186
 
CREATE TABLE t1 (title text) ENGINE=MyISAM;
 
187
CREATE TEMPORARY TABLE t1 (title text) ENGINE=MyISAM;
187
188
INSERT INTO t1 VALUES ('Congress reconvenes in September to debate welfare and adult education');
188
189
INSERT INTO t1 VALUES ('House passes the CAREERS bill');
189
190
SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1;
252
253
explain extended select hex(130);
253
254
explain extended select binary 'HE';
254
255
explain extended select collation(conv(130,16,10));
255
 
explain extended select coercibility(conv(130,16,10));
256
256
explain extended select length('\n\t\r\b\0\_\%\\');
257
257
explain extended select concat('monty',' was here ','again');
258
258
explain extended select length('hello');
295
295
#
296
296
 
297
297
create table t1 (c1 INT, c2 INT);
298
 
--error 1264
 
298
--error ER_WARN_DATA_OUT_OF_RANGE
299
299
insert into t1 values ('21474836461','21474836461');
300
 
--error 1264
 
300
--error ER_WARN_DATA_OUT_OF_RANGE
301
301
insert into t1 values ('-21474836461','-21474836461');
302
302
select * from t1;
303
303
drop table t1;
330
330
# Bug #7751 - conversion for a bigint constant 
331
331
#
332
332
 
333
 
CREATE TABLE t1 (
 
333
CREATE TEMPORARY TABLE t1 (
334
334
  id int NOT NULL auto_increment,
335
335
  a bigint default NULL,
336
336
  PRIMARY KEY  (id)
337
337
) ENGINE=MyISAM;
338
338
 
339
 
--error 1264
 
339
--error ER_WARN_DATA_OUT_OF_RANGE
340
340
INSERT INTO t1 VALUES ('0','16307858876001849059');
341
341
 
342
342
SELECT CONV('e251273eb74a8ee3', 16, 10);
470
470
--disable_metadata
471
471
drop table t1;
472
472
 
473
 
#
474
 
# Bug #10418: LOAD_FILE does not behave like in manual if file does not exist
475
 
#
476
 
 
477
 
select load_file("lkjlkj");
478
 
select ifnull(load_file("lkjlkj"),"it's null");
 
473
--disable_query_log
 
474
let $bad_test_file = "$DRIZZLETEST_VARDIR/lkjlkj" ;
 
475
--enable_query_log
 
476
let $replace_substring = `SELECT SUBSTRING($bad_test_file,1,128)`;
 
477
--replace_result $replace_substring DRIZZLETEST_BAD_FILE $bad_test_file DRIZZLETEST_BAD_FILE 
 
478
--error ER_TEXTFILE_NOT_READABLE
 
479
eval select load_file($bad_test_file);
479
480
 
480
481
#
481
482
# Bug#18243: REVERSE changes its argument
512
513
#
513
514
# Bug #31758 inet_ntoa, oct, crashes server with null + filesort 
514
515
#
515
 
create table t1 (a bigint not null)engine=myisam;
 
516
create TEMPORARY table t1 (a bigint not null)engine=myisam;
516
517
insert into t1 set a = 1024*1024*1024*4;
517
518
drop table t1;
518
 
create table t1 (a char(36) not null)engine=myisam;
 
519
create TEMPORARY table t1 (a char(36) not null)engine=myisam;
519
520
insert ignore into t1 set a = ' ';
520
521
insert ignore into t1 set a = ' ';
521
522
select * from t1 order by (oct(a));