Re: [Maria-developers] Sachin weekly report

2016-07-04 Thread Sachin Setia
Hello everyone,

Weekly Report for 6th week of gsoc
1.hidden fields fully supported , they also show in extra column
2.suppose if we declare key as unique(abc,df) then instead of key name
to be abc it will be abc_df
3.prototype and prototype for how to store information about hash and
type of hash in field and KEY
finally decided to add bool flag (is_row_hash) in Field and added a
new long flag in KEY named ex_flags
it is stored and retried from extra2 region
4. studying optimizer code for  where condition on unique key.
5. Now it will give error for these statements
   create table t1(abc blob unique,index(db_row_hash_1));
   alter table t2 add column abc blob unique,add index(db_row_hash_1);
6.now we can delete unique blob columns.Db_row_hash will be
automatically removed
currently working on case like
create table t1(a blob,b blob ,unique(a,b));
alter table t1 drop column a;
this works after alter but records stored in table can be duplicate
which voids the
unique key rule.
Regards
sachin

___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-developers] GSoC weekly reports (Unique indexes for blobs)

2016-07-04 Thread Shubham Barai
GSoC (week 6)

Hello everyone,

1. defined some new functions to get the clustered record from secondary
index record and extract its key value to compare with the secondary index
key.It works for single clustered record. Currently trying to solve
the problem with multiple records with same hash value.

2.implemented some new functions for the update operation.

2.1 a function which checks if hash columns in a table need to be
updated.
2.2 a  function to add hash fields in update vector.

3.When updating a row, sql layer calls index_read function for faster
retrieval of a row if the column used in where clause is one of the keys or
a part of the key. So I modified index_read function to convert mysql
search key in innobase format and then create a new search key with a hash
value.As hash index stores only hash value, it will be only possible to
search a row with a hash index if all of the key parts are present in
search key.

current branch for InnoDB : temp

On 27 June 2016 at 19:23, Shubham Barai  wrote:

> GSoC (week 5)
>
>
> Hello everyone,
>
> Here is the list of things I have done in the 5th week of GSoC.
>
> 1.implemented unique key violation with a hash collision. (actual row
> comparison is remaining ).
>
> 2.modified hash function for data types like varchar and binary data types.
>
> 3.fixed a bug which was causing a server to crash for complex unique keys.
>
> 4.added support to allow any number of nulls which will not cause any
> unique key violation.
>
> 5.added test cases for above features.
>
> On 22 June 2016 at 16:36, Shubham Barai  wrote:
>
>> Hi,
>>
>> can we discuss on IRC first?
>>
>>
>> Regards,
>> Shubham
>>
>> On 22 June 2016 at 13:21, Jan Lindström 
>> wrote:
>>
>>> Hi,
>>>
>>> Please commit and push these changes to your git branch I have not yet
>>> seen them, in my opinion as this is only a working branch you can push
>>> often. I still fail to see any test cases on InnoDB branch, do you have
>>> more than one branch and if you have why ? Depending on extent of these
>>> changes my estimate is that you are behind schedule to complete project in
>>> time. Based on your progress report you are still missing update and delete
>>> and redo-logging. For alter table you should start from forcing copy-method
>>> and then if time permits develop on-line method. This naturally only after
>>> everything else
>>> has been completed and tested.
>>>
>>> R: Jan
>>>
>>> On Tue, Jun 21, 2016 at 11:06 PM, Shubham Barai <
>>> shubhambara...@gmail.com> wrote:
>>>
 GSoC (week 4)

 Hello everyone,

 After working on create table operation,next thing I had to work on was
 insert operations.So I explored some of the functions like
 row_ins_scan_index_for_duplicates, btr_pcur_get_rec to get clear
 understanding about how to implement duplicate search on hash index.
 There was a problem in hash function that I wrote .It would calculate
 same hash value for two different keys if the prefix length of blob key
 part was zero. Now it seems to be working after I checked it in debugger.I
 still have to modify it for data types like varchar etc.
 I have added test cases for insert operations in myisam.
 In MyIsam, I found one problem in update operation. When updating a
 row,if the key is conflicting then server crashes because some pointer goes
 invalid in compare_record. I haven't fixed this issue yet.

 I also modified some functions in dict0load.cc to  adjust some members
 of dict_index_t for a new index type.The main problem is that index entry
 for hash based index cointains only two fields(hash value and row id) while
 dict_index_t  contains hash field and other user defined fields which are
 used to calculate hash value.Some of the operations like alter table( e.g.
 rename column) needs to get access to all fields while other functions like
 rec_get_offsets and row_build_index_entry_low needs to get access to only
 hash field and row id. I am still working on this to find efficient
 solution to this problem.

 On 16 June 2016 at 23:29, Sergei Golubchik  wrote:

> Hi, Shubham!
>
> What I wanted to say on IRC was:
>
> here's what the comment of cmp_dtuple_rec_with_match_low() says:
>
>   ...   If rec has an externally stored field we do not
>   compare it but return with value 0 if such a comparison should be
>   made.
>
> Note that blobs are externally stored fields in InnoDB, so, I think,
> this means that you cannot use cmp_dtuple_rec() to compare blobs.
>
> Regards,
> Sergei
> Chief Architect MariaDB
> and secur...@mariadb.org
>


 ___
 Mailing list: https://launchpad.net/~maria-developers
 Post to : maria-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~maria-developers
 More help   : https://help.la

Re: [Maria-developers] MariaDB 10.1.15

2016-07-04 Thread Reindl Harald



Am 04.07.2016 um 14:01 schrieb Antonio Fernandes:

What happened to MariaDB 10.1.15?

I've upgraded my slave server, waited a few days (like I always do before
master) and now, no MariaDB 10.1.15 :)

Ohh, btw, 10.1.14 changelog
(https://mariadb.com/kb/en/mariadb/mariadb-10114-changelog/) still displays
that 10.1.15 is the latest


when you follow devel/users list it has a crash-bug regression, see archives



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


[Maria-developers] MariaDB 10.1.15

2016-07-04 Thread Antonio Fernandes
Hi all,

What happened to MariaDB 10.1.15?

I've upgraded my slave server, waited a few days (like I always do before
master) and now, no MariaDB 10.1.15 :)

Ohh, btw, 10.1.14 changelog
(https://mariadb.com/kb/en/mariadb/mariadb-10114-changelog/) still displays
that 10.1.15 is the latest.

Regards,
António


___
Mailing list: https://launchpad.net/~maria-developers
Post to : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp


[Maria-developers] MDEV-8919 Wrong result for CAST(9999999999999999999.0)

2016-07-04 Thread Alexander Barkov

  Hi Sergei,

Please review a patch for mdev-8919.

Thanks!
commit f683cd85b3ba14aa7a40bf774dd2a0e0d5dd4d6f
Author: Alexander Barkov 
Date:   Mon Jul 4 13:29:58 2016 +0400

MDEV-8919 Wrong result for CAST(999.0)

diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index e196ba2..08e8a92 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -9,6 +9,7 @@ CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER)
 -1
 Warnings:
 Note	1105	Cast to unsigned converted negative integer to it's positive complement
+Note	1105	Cast to signed converted positive out-of-range integer to it's negative complement
 select CAST('10 ' as unsigned integer);
 CAST('10 ' as unsigned integer)
 10
@@ -29,6 +30,8 @@ Note	1105	Cast to unsigned converted negative integer to it's positive complemen
 select ~5, cast(~5 as signed);
 ~5	cast(~5 as signed)
 18446744073709551610	-6
+Warnings:
+Note	1105	Cast to signed converted positive out-of-range integer to it's negative complement
 explain extended select ~5, cast(~5 as signed);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
@@ -37,6 +40,8 @@ Note	1003	select ~(5) AS `~5`,cast(~(5) as signed) AS `cast(~5 as signed)`
 select cast(18446744073709551615 as signed);
 cast(18446744073709551615 as signed)
 -1
+Warnings:
+Note	1105	Cast to signed converted positive out-of-range integer to it's negative complement
 select cast(5 as unsigned) -6.0;
 cast(5 as unsigned) -6.0
 -1.0
@@ -208,12 +213,16 @@ CAST(0xb3 as signed)
 select CAST(0x8fff as signed);
 CAST(0x8fff as signed)
 -8070450532247928833
+Warnings:
+Note	1105	Cast to signed converted positive out-of-range integer to it's negative complement
 select CAST(0x as unsigned);
 CAST(0x as unsigned)
 18446744073709551615
 select CAST(0xfffe as signed);
 CAST(0xfffe as signed)
 -2
+Warnings:
+Note	1105	Cast to signed converted positive out-of-range integer to it's negative complement
 select cast('-10a' as signed integer);
 cast('-10a' as signed integer)
 -10
@@ -548,6 +557,8 @@ cast(18446744073709551615 as unsigned)
 select cast(18446744073709551615 as signed);
 cast(18446744073709551615 as signed)
 -1
+Warnings:
+Note	1105	Cast to signed converted positive out-of-range integer to it's negative complement
 select cast('18446744073709551615' as unsigned);
 cast('18446744073709551615' as unsigned)
 18446744073709551615
@@ -578,6 +589,8 @@ Note	1105	Cast to signed converted positive out-of-range integer to it's negativ
 select cast(1.0e+300 as signed int);
 cast(1.0e+300 as signed int)
 9223372036854775807
+Warnings:
+Warning	1916	Got overflow when converting '1e300' to INT. Value truncated.
 create table t1  select cast(1 as unsigned), cast(1 as signed), cast(1 as double(5,2)), cast(1 as decimal(5,3)), cast("A" as binary), cast("A" as char(100)), cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME), cast("1:2:3" as TIME);
 show create table t1;
 Table	Create Table
@@ -822,3 +835,87 @@ utf8_bin
 select collation(cast("a" as char(10) binary ascii));
 collation(cast("a" as char(10) binary ascii))
 latin1_bin
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-8919 Wrong result for CAST(999.0)
+#
+SELECT CAST(-9e0 AS UNSIGNED) AS c1;
+c1
+0
+Warnings:
+Warning	1916	Got overflow when converting '-9' to UNSIGNED INT. Value truncated.
+SELECT CAST(-9.0 AS UNSIGNED) AS c2;
+c2
+0
+Warnings:
+Warning	1916	Got overflow when converting '-9.0' to UNSIGNED INT. Value truncated.
+SELECT CAST(999e0 AS UNSIGNED) AS c1;
+c1
+1000
+SELECT CAST(999.0 AS UNSIGNED) AS c2;
+c2
+999
+SELECT CAST(e0 AS UNSIGNED) AS c1;
+c1
+18446744073709551615
+Warnings:
+Warning	1916	Got overflow when converting '1e20' to UNSIGNED INT. Value truncated.
+SELECT CAST(.0 AS UNSIGNED) AS c2;
+c2
+18446744073709551615
+Warnings:
+Warning	1916	Got overflow when converting '.0' to UNSIGNED INT. Value truncated.
+SELECT CAST(-1e0 AS UNSIGNED), CAST(-1e308 AS UNSIGNED);
+CAST(-1e0 AS UNSIGNED)	CAST(-1e308 AS UNSIGNED)
+0	0
+Warnings:
+Warning	1916	Got overflow when converting '-1' to UNSIGNED INT. Value truncated.
+Warning	1916	Got overflow when converting '-1e308' to UNSIGNED INT. Value truncated.
+SELECT CAST(TIME'-00:00:01.567' AS UNSIGNED);
+CAST(TIME'-00:00:01.567' AS UNSIGNED)
+0
+Warnings:
+Warning	1916	Got overflow when converting '-00:00:01.567000' to UNSIGNED INT. Value truncated.
+CREATE TABLE t1 (a DOUBLE UNSIGNED, b DOUBLE);
+INSERT INTO t1 VALUES (1e19, 1e19),(1.9e19, 1.9e19);
+SELECT a, CAST(a AS SIGNED), CAST(b AS SIGNED) FROM t1;
+a	CAST(a AS SIGNED)	CAST(b AS SIGNED)
+1e19	9223372036854775807	9223372036854775807
+1.9e19	9223372036854775807	9223372036854775807
+Warnings:
+Warning	1916	Got overflow when converting '1e19' to INT. Value t