~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_str.result

  • Committer: Paul McCullagh
  • Date: 2010-09-16 15:26:41 UTC
  • mto: (1771.3.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1785.
  • Revision ID: paul.mccullagh@primebase.org-20100916152641-9mwb1hga0qwz41nu
Merged with 1.1 trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
quote(concat('abc\'', '\\cba'))
250
250
'abc\'\\cba'
251
251
select quote(1/0), quote('\0\Z');
252
 
ERROR 22012: Division by 0
 
252
quote(1/0)      quote('\0\Z')
 
253
NULL    '\0\Z'
 
254
Warnings:
 
255
Error   1365    Division by 0
253
256
select length(quote(concat(char(0),"test")));
254
257
length(quote(concat(char(0),"test")))
255
258
8
287
290
length(repeat("a",100000000))   length(repeat("a",1000*64))
288
291
NULL    64000
289
292
Warnings:
290
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
293
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
291
294
select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("sql" in ("mysql"));
292
295
position("0" in "baaa" in (1))  position("0" in "1" in (1,2,3)) position("sql" in ("mysql"))
293
296
1       0       3
717
720
1000000
718
721
1      
719
722
drop table t1;
720
 
select load_file(DRIZZLETEST_BAD_FILE);
721
 
ERROR HY000: The file 'DRIZZLETEST_BAD_FILE' must be in the schema directory or be readable by all
 
723
select load_file("lkjlkj");
 
724
load_file("lkjlkj")
 
725
NULL
 
726
select ifnull(load_file("lkjlkj"),"it's null");
 
727
ifnull(load_file("lkjlkj"),"it's null")
 
728
it's null
722
729
CREATE TABLE t1 (a varchar(10));
723
730
INSERT INTO t1 VALUES ('abc'), ('xyz');
724
731
SELECT a, CONCAT(a,' ',a) AS c FROM t1
833
840
WHERE id='a12' AND (LENGTH(code)=5 OR code < 'a00');
834
841
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
835
842
1       SIMPLE  t2      const   PRIMARY PRIMARY 42      const   1       100.00  Using index
836
 
1       SIMPLE  t1      ref     code    code    43      const   4       100.00  Using where; Using index
 
843
1       SIMPLE  t1      ref     code    code    43      const   2       100.00  Using where; Using index
837
844
Warnings:
838
845
Note    1003    select `test`.`t1`.`code` AS `code`,'a12' AS `id` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`code` = 'a12') and <cache>(('a12' = 'a12')) and ((length(`test`.`t1`.`code`) = 5) or <cache>(('a12' < 'a00'))))
839
846
DROP TABLE t1,t2;
1374
1381
repeat('hello', 4294967295)
1375
1382
NULL
1376
1383
Warnings:
1377
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1384
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1378
1385
select repeat('hello', -4294967296);
1379
1386
repeat('hello', -4294967296)
1380
1387
 
1382
1389
repeat('hello', 4294967296)
1383
1390
NULL
1384
1391
Warnings:
1385
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1392
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1386
1393
select repeat('hello', -4294967297);
1387
1394
repeat('hello', -4294967297)
1388
1395
 
1390
1397
repeat('hello', 4294967297)
1391
1398
NULL
1392
1399
Warnings:
1393
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1400
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1394
1401
select repeat('hello', -18446744073709551615);
1395
1402
repeat('hello', -18446744073709551615)
1396
1403
 
1401
1408
repeat('hello', 18446744073709551615)
1402
1409
NULL
1403
1410
Warnings:
1404
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1411
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1405
1412
select repeat('hello', -18446744073709551616);
1406
1413
repeat('hello', -18446744073709551616)
1407
1414
 
1414
1421
Warnings:
1415
1422
Error   1292    Truncated incorrect DECIMAL value: ''
1416
1423
Error   1292    Truncated incorrect DECIMAL value: ''
1417
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1424
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1418
1425
select repeat('hello', -18446744073709551617);
1419
1426
repeat('hello', -18446744073709551617)
1420
1427
 
1427
1434
Warnings:
1428
1435
Error   1292    Truncated incorrect DECIMAL value: ''
1429
1436
Error   1292    Truncated incorrect DECIMAL value: ''
1430
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1437
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1431
1438
select space(-1);
1432
1439
space(-1)
1433
1440
 
1438
1445
space(4294967295)
1439
1446
NULL
1440
1447
Warnings:
1441
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1448
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1442
1449
select space(-4294967296);
1443
1450
space(-4294967296)
1444
1451
 
1446
1453
space(4294967296)
1447
1454
NULL
1448
1455
Warnings:
1449
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1456
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1450
1457
select space(-4294967297);
1451
1458
space(-4294967297)
1452
1459
 
1454
1461
space(4294967297)
1455
1462
NULL
1456
1463
Warnings:
1457
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1464
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1458
1465
select space(-18446744073709551615);
1459
1466
space(-18446744073709551615)
1460
1467
 
1465
1472
space(18446744073709551615)
1466
1473
NULL
1467
1474
Warnings:
1468
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1475
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1469
1476
select space(-18446744073709551616);
1470
1477
space(-18446744073709551616)
1471
1478
 
1478
1485
Warnings:
1479
1486
Error   1292    Truncated incorrect DECIMAL value: ''
1480
1487
Error   1292    Truncated incorrect DECIMAL value: ''
1481
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1488
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1482
1489
select space(-18446744073709551617);
1483
1490
space(-18446744073709551617)
1484
1491
 
1491
1498
Warnings:
1492
1499
Error   1292    Truncated incorrect DECIMAL value: ''
1493
1500
Error   1292    Truncated incorrect DECIMAL value: ''
1494
 
Warning 1301    Result of repeat() was larger than max_allowed_packet (67108864) - truncated
 
1501
Warning 1301    Result of repeat() was larger than max_allowed_packet (1048576) - truncated
1495
1502
select rpad('hello', -1, '1');
1496
1503
rpad('hello', -1, '1')
1497
1504
NULL
1502
1509
rpad('hello', 4294967295, '1')
1503
1510
NULL
1504
1511
Warnings:
1505
 
Warning 1301    Result of rpad() was larger than max_allowed_packet (67108864) - truncated
 
1512
Warning 1301    Result of rpad() was larger than max_allowed_packet (1048576) - truncated
1506
1513
select rpad('hello', -4294967296, '1');
1507
1514
rpad('hello', -4294967296, '1')
1508
1515
NULL
1510
1517
rpad('hello', 4294967296, '1')
1511
1518
NULL
1512
1519
Warnings:
1513
 
Warning 1301    Result of rpad() was larger than max_allowed_packet (67108864) - truncated
 
1520
Warning 1301    Result of rpad() was larger than max_allowed_packet (1048576) - truncated
1514
1521
select rpad('hello', -4294967297, '1');
1515
1522
rpad('hello', -4294967297, '1')
1516
1523
NULL
1518
1525
rpad('hello', 4294967297, '1')
1519
1526
NULL
1520
1527
Warnings:
1521
 
Warning 1301    Result of rpad() was larger than max_allowed_packet (67108864) - truncated
 
1528
Warning 1301    Result of rpad() was larger than max_allowed_packet (1048576) - truncated
1522
1529
select rpad('hello', -18446744073709551615, '1');
1523
1530
rpad('hello', -18446744073709551615, '1')
1524
1531
NULL
1529
1536
rpad('hello', 18446744073709551615, '1')
1530
1537
NULL
1531
1538
Warnings:
1532
 
Warning 1301    Result of rpad() was larger than max_allowed_packet (67108864) - truncated
 
1539
Warning 1301    Result of rpad() was larger than max_allowed_packet (1048576) - truncated
1533
1540
select rpad('hello', -18446744073709551616, '1');
1534
1541
rpad('hello', -18446744073709551616, '1')
1535
1542
NULL
1542
1549
Warnings:
1543
1550
Error   1292    Truncated incorrect DECIMAL value: ''
1544
1551
Error   1292    Truncated incorrect DECIMAL value: ''
1545
 
Warning 1301    Result of rpad() was larger than max_allowed_packet (67108864) - truncated
 
1552
Warning 1301    Result of rpad() was larger than max_allowed_packet (1048576) - truncated
1546
1553
select rpad('hello', -18446744073709551617, '1');
1547
1554
rpad('hello', -18446744073709551617, '1')
1548
1555
NULL
1555
1562
Warnings:
1556
1563
Error   1292    Truncated incorrect DECIMAL value: ''
1557
1564
Error   1292    Truncated incorrect DECIMAL value: ''
1558
 
Warning 1301    Result of rpad() was larger than max_allowed_packet (67108864) - truncated
 
1565
Warning 1301    Result of rpad() was larger than max_allowed_packet (1048576) - truncated
1559
1566
select lpad('hello', -1, '1');
1560
1567
lpad('hello', -1, '1')
1561
1568
NULL
1566
1573
lpad('hello', 4294967295, '1')
1567
1574
NULL
1568
1575
Warnings:
1569
 
Warning 1301    Result of lpad() was larger than max_allowed_packet (67108864) - truncated
 
1576
Warning 1301    Result of lpad() was larger than max_allowed_packet (1048576) - truncated
1570
1577
select lpad('hello', -4294967296, '1');
1571
1578
lpad('hello', -4294967296, '1')
1572
1579
NULL
1574
1581
lpad('hello', 4294967296, '1')
1575
1582
NULL
1576
1583
Warnings:
1577
 
Warning 1301    Result of lpad() was larger than max_allowed_packet (67108864) - truncated
 
1584
Warning 1301    Result of lpad() was larger than max_allowed_packet (1048576) - truncated
1578
1585
select lpad('hello', -4294967297, '1');
1579
1586
lpad('hello', -4294967297, '1')
1580
1587
NULL
1582
1589
lpad('hello', 4294967297, '1')
1583
1590
NULL
1584
1591
Warnings:
1585
 
Warning 1301    Result of lpad() was larger than max_allowed_packet (67108864) - truncated
 
1592
Warning 1301    Result of lpad() was larger than max_allowed_packet (1048576) - truncated
1586
1593
select lpad('hello', -18446744073709551615, '1');
1587
1594
lpad('hello', -18446744073709551615, '1')
1588
1595
NULL
1593
1600
lpad('hello', 18446744073709551615, '1')
1594
1601
NULL
1595
1602
Warnings:
1596
 
Warning 1301    Result of lpad() was larger than max_allowed_packet (67108864) - truncated
 
1603
Warning 1301    Result of lpad() was larger than max_allowed_packet (1048576) - truncated
1597
1604
select lpad('hello', -18446744073709551616, '1');
1598
1605
lpad('hello', -18446744073709551616, '1')
1599
1606
NULL
1606
1613
Warnings:
1607
1614
Error   1292    Truncated incorrect DECIMAL value: ''
1608
1615
Error   1292    Truncated incorrect DECIMAL value: ''
1609
 
Warning 1301    Result of lpad() was larger than max_allowed_packet (67108864) - truncated
 
1616
Warning 1301    Result of lpad() was larger than max_allowed_packet (1048576) - truncated
1610
1617
select lpad('hello', -18446744073709551617, '1');
1611
1618
lpad('hello', -18446744073709551617, '1')
1612
1619
NULL
1619
1626
Warnings:
1620
1627
Error   1292    Truncated incorrect DECIMAL value: ''
1621
1628
Error   1292    Truncated incorrect DECIMAL value: ''
1622
 
Warning 1301    Result of lpad() was larger than max_allowed_packet (67108864) - truncated
 
1629
Warning 1301    Result of lpad() was larger than max_allowed_packet (1048576) - truncated
1623
1630
SELECT CHAR(0xff,0x8f);
1624
1631
CHAR(0xff,0x8f)
1625
1632
��