~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_str.test

  • Committer: Monty Taylor
  • Date: 2008-12-06 22:41:03 UTC
  • mto: (656.1.7 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: monty@inaugust.com-20081206224103-jdouqwt9hb0f01y1
Moved non-working tests into broken suite for easier running of working tests.

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));
98
98
 
99
99
select quote('\'\"\\test');
100
100
select quote(concat('abc\'', '\\cba'));
101
 
--error ER_DIVISION_BY_ZERO
102
101
select quote(1/0), quote('\0\Z');
103
102
select length(quote(concat(char(0),"test")));
104
103
select hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235))));
141
140
# Test bug in concat_ws
142
141
#
143
142
 
144
 
CREATE TEMPORARY TABLE t1 (
 
143
CREATE TABLE t1 (
145
144
  id int NOT NULL,
146
145
  title varchar(255) default NULL,
147
146
  prio int default NULL,
165
164
# Test bug in AES_DECRYPT() when called with wrong argument
166
165
#
167
166
 
168
 
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;
169
168
INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf');
170
169
DROP TABLE t1;
171
170
 
184
183
#
185
184
# test for #739
186
185
 
187
 
CREATE TEMPORARY TABLE t1 (title text) ENGINE=MyISAM;
 
186
CREATE TABLE t1 (title text) ENGINE=MyISAM;
188
187
INSERT INTO t1 VALUES ('Congress reconvenes in September to debate welfare and adult education');
189
188
INSERT INTO t1 VALUES ('House passes the CAREERS bill');
190
189
SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1;
253
252
explain extended select hex(130);
254
253
explain extended select binary 'HE';
255
254
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 ER_WARN_DATA_OUT_OF_RANGE
 
298
--error 1264
299
299
insert into t1 values ('21474836461','21474836461');
300
 
--error ER_WARN_DATA_OUT_OF_RANGE
 
300
--error 1264
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 TEMPORARY TABLE t1 (
 
333
CREATE 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 ER_WARN_DATA_OUT_OF_RANGE
 
339
--error 1264
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
 
--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);
 
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");
480
479
 
481
480
#
482
481
# Bug#18243: REVERSE changes its argument
513
512
#
514
513
# Bug #31758 inet_ntoa, oct, crashes server with null + filesort 
515
514
#
516
 
create TEMPORARY table t1 (a bigint not null)engine=myisam;
 
515
create table t1 (a bigint not null)engine=myisam;
517
516
insert into t1 set a = 1024*1024*1024*4;
518
517
drop table t1;
519
 
create TEMPORARY table t1 (a char(36) not null)engine=myisam;
 
518
create table t1 (a char(36) not null)engine=myisam;
520
519
insert ignore into t1 set a = ' ';
521
520
insert ignore into t1 set a = ' ';
522
521
select * from t1 order by (oct(a));