A PRIMARY key is used to organize the data on disk and because there is a relationship to how the data is physically arranged you cannot have any part of a primary key being NULL.
A non-primary index CAN have one or more columns that allow NULLs. demo
CREATE TABLE `my_docs` (
`id` int(6) unsigned NOT NULL AUTO_INCREMENT,
`rev` int(3) ,
`content` varchar(200) NOT NULL,
PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8;
INSERT INTO `my_docs` (`rev`, `content`) VALUES
(1, 'The earth is flat'),
(1, 'One hundred angels can dance on the head of a pin'),
(NULL, 'The earth is flat and rests on a bull\'s horn'),
(3, 'The earth is like a ball.');
alter table `my_docs` add key my_added_index (`rev`);
SELECT id, rev, content
FROM `my_docs`
where rev = 3
| id | rev | content |
|----|-----|---------------------------|
| 4 | 3 | The earth is like a ball. |
+---+-------------+-----------+------+----------------+----------------+---------+-------+------+----------+-------+
| d | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+---+-------------+-----------+------+----------------+----------------+---------+-------+------+----------+-------+
| 1 | SIMPLE | my_docs | ref | my_added_index | my_added_index | 5 | const | 1 | 100.00 | |
+---+-------------+-----------+------+----------------+----------------+---------+-------+------+----------+-------+