~pbms-core/pbms/5.11-beta

« back to all changes in this revision

Viewing changes to php/ext/tests/003BasicInsert.phpt

  • Committer: Barry.Leslie at PrimeBase
  • Date: 2010-02-25 17:15:10 UTC
  • Revision ID: barry.leslie@primebase.com-20100225171510-ztd2hnjosu40ci34
Pulled the BLOB alias support out of the  daemon. This was done because
supporting it in a transactional environment would have been complicated and
since it is not part of the core objectives of the PBMS daemon I felt that it was
not worth the effort it would take.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
        $pbms = pbms_connect($host, $port, $database)
19
19
                or pbms_error_and_die("Could not connect");
20
20
                
 
21
 
21
22
        ini_set("display_errors", "0");
 
23
        //$errorlevel=error_reporting();
 
24
        //error_reporting($errorlevel & ~E_WARNNING);
 
25
        //error_reporting($errorlevel & ~E_ERROR);
22
26
        // Check that the error functions work  
23
 
        pbms_get_data("GARBAGE")        // This should fail because of a bad BLOB ref/alias.
24
 
                or printf("Expected error from pbms_get_data(\"GARBAGE\"): %d \n", pbms_errno());
25
 
                
 
27
        if (pbms_get_data("GARBAGE"))   // This should fail because of a bad BLOB ref.
 
28
                printf("Expected error from pbms_get_data(\"GARBAGE\"): %d \n", pbms_errno());
 
29
                
 
30
        if (pbms_connect($host, 1))     // This should fail because of a bad connection.
 
31
                printf("Expected connection failure: %d \n", pbms_errno());
 
32
                
 
33
        //error_reporting($errorlevel);
26
34
        ini_set("display_errors", "1");
27
35
 
28
 
        pbms_connect($host, 1); // This should fail because of a bad connection.
29
 
                
30
36
        $mysql = mysql_connect()
31
37
                or mysql_error_and_die("Could not connect");
32
38
 
105
111
        mysql_close($mysql);
106
112
?>
107
113
--EXPECT--
108
 
Expected error from pbms_get_data("GARBAGE"): -14008 
109
 
 
110
 
Warning: pbms_connect(): couldn't connect to host in /Users/leslie/Projects/mysql_build/pbms/php/ext/tests/003BasicInsert.php on line 21
111
114
Connected successfully
112
115
Basic insert BLOB data done.
113
116