To use it, grab a snapshot from hudson (the reason the tests fail is that i have not had time to rewrite INFORMATION_SCHEMA queries to support the new I_S in Drizzle). Then follow this example to get started, important stuff is in bold
Connection connection = DriverManager.getConnection( "jdbc:drizzle://localhost:3307/test_units_jdbc?enableBlobStreaming=true"); // inserting a blob: Statement stmt = connection.createStatement(); stmt.execute("create table bstreaming1 (id int not null primary key auto_increment, test longblob)"); PreparedStatement ps = connection.prepareStatement("insert into bstreaming1 values (null, ?)"); // fake an inputstream with data: ByteArrayInputStream bais = new ByteArrayInputStream("HEJHEJHEJ".getBytes()); ps.setBinaryStream(1, bais); ps.executeUpdate(); stmt = connection.createStatement(); ResultSet rs = stmt.executeQuery("select * from bstreaming1"); assertEquals(rs.next(), true); byte b = new byte; int l = rs.getBinaryStream("test").read(b); assertEquals("HEJHEJHEJ",new String(b,0,l));
To get PBMS support in drizzle you need to have a fairly recent build, and start the daemon with --plugin_add=pbms. InnoDB tables are streaming enabled, which means that any LONGBLOB column will be streamed.
Note that in the current version you will get the blob reference and not a String representation of the blob if you do a getString on the column for example, this will change when I get time to do it.
I have not yet tested against MySQL, if you have a PBMS enabled MySQL server, please let me know if it works!